Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Converts 24-hour (military) time string to 12-hour (meridiem) time string and vice versa.
Converts 24-hour (military) time string to 12-hour (meridiem) time string and vice versa..
npm install midday --save
import { toMeridiem, toMilitary } from 'midday';
/**
* Converts 24-hour (military) time string to 12-hour (meridiem) time string.
* @param {string} time The time string ("00:30", "01:45", "12:00", "22:15").
* @return {string} Return converted 24-hour time string to 12-hour time.
* @throws {Error} Will throw an error if the time string is invalid.
*/
toMeridiem('00:30'); // 12:30 AM
toMeridiem('01:15'); // 1:15 AM
toMeridiem('11:45'); // 11:45 AM
toMeridiem('12:15'); // 12:15 PM
toMeridiem('13:15'); // 1:15 PM
toMeridiem('23:15'); // 11:15 PM
toMeridiem('0030'); // 12:30 AM
toMeridiem('2315'); // 11:15 PM
/**
* Converts 12-hour (meridiem) time string to 24-hour (military) time string.
* @param {string} time The time string ("12:30 AM", "11:15 PM", "1:15 AM").
* @return {string} Return converted 12-hour time string to 24-hour time.
* @throws {!Error} Will throw an error if the time string is invalid.
*/
toMilitary('12:30 AM'); // 00:30
toMilitary('1:15 AM'); // 01:15
toMilitary('11:45 AM'); // 11:45
toMilitary('12:15 PM'); // 12:15
toMilitary('1:15 PM'); // 13:15
toMilitary('11:15 PM'); // 23:15
For more information please visit Glize project page.
FAQs
Converts 24-hour (military) time string to 12-hour (meridiem) time string and vice versa.
The npm package midday receives a total of 9,891 weekly downloads. As such, midday popularity was classified as popular.
We found that midday demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.