Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
24hto12hformat
Advanced tools
Readme
Converts from 24-hour hh:mm
to 12-hour hh:mm +merdian
or hh:mm:ss +merdian
format.
Install:
yarn add 24hto12hformat
# or
npm install 24hto12hformat --save
In your code:
import timeFormatter from '24hto12hformat';
timeFormatter('13:30'); // => 1:30 pm
// same as timeFormatter('13:30', false);
// but
timeFormatter('13:30', true); // => 1:30 PM
// works fine
timeFormatter('15:33:29 GMT+020'); // => 3:33 pm
// to add seconds:
timeFormatter('13:30', true, true); // => 1:30:00 PM
timeFormatter('13:30:13', true, true); // => 1:30:13 PM
/**
*
* @param {string} time
* @param {boolean} uppercase
* @param {boolean} includeSeconds
* @return {string}
*/
If the the supplied time
argument is not a string
, or it does not start in the hh:mm
format, then the module will throw an exception in the form of a string.
Fun fact: the original name of this package (24h-to-12h-format
) could not be published to NPM due to their system considering it a spam name. :)
FAQs
Converts from 24-hour hh:mm to 12-hour hh:mm +merdian
The npm package 24hto12hformat receives a total of 0 weekly downloads. As such, 24hto12hformat popularity was classified as not popular.
We found that 24hto12hformat 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.