![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
date.format
Advanced tools
Readme
Add to JS Date.prototype .format()
method, allow format the object date in a readable form.
Call to method with the pattern you want and will return it formated.
Date.format is based on String.format > "Hello {name}!".format({name:"Homer"});
Date.prototype.format( pattern [, UTC]);
require('date.format');
var date = new Date();
console.log(date.format("Local: Day {Y}/{M}/{D} at {h}:{m}:{s} and {ms}ms"));
console.log(date.format("Local: Day {YY}/{MM}/{DD} at {hh}:{mm}:{ss} and {mss}ms"));
console.log(date.format("UTC: Day {Y}/{M}/{D} at {h}:{m}:{s} and {ms}ms",true));
console.log(date.format("UTC: Day {YY}/{MM}/{DD} at {hh}:{mm}:{ss} and {mss}ms",true));
/*
>> Local: Day 2015/1/5 at 20:44:58 and 803ms
>> Local: Day 15/01/05 at 20:44:58 and 0803ms
>> UTC: Day 2015/1/5 at 19:44:58 and 803ms
>> UTC: Day 15/01/15 at 19:44:58 and 0803ms
*/
NEW:
MIT
Añade a Date.prototype de JS el método .format()
, permitiendo formatear el objeto date de una forma legible.
Especificamos al método el formato en el que devolverá el objeto date.
Date.format utiliza String.format > "Hello {name}!".format({name:"Homer"});
Date.prototype.format( pattern [, UTC]);
require('date.format');
var date = new Date();
console.log(date.format("Local: Day {Y}/{M}/{D} at {h}:{m}:{s} and {ms}ms"));
console.log(date.format("Local: Day {YY}/{MM}/{DD} at {hh}:{mm}:{ss} and {mss}ms"));
console.log(date.format("UTC: Day {Y}/{M}/{D} at {h}:{m}:{s} and {ms}ms",true));
console.log(date.format("UTC: Day {YY}/{MM}/{DD} at {hh}:{mm}:{ss} and {mss}ms",true));
/*
>> Local: Day 2015/1/5 at 20:44:58 and 803ms
>> Local: Day 15/01/05 at 20:44:58 and 0803ms
>> UTC: Day 2015/1/5 at 19:44:58 and 803ms
>> UTC: Day 15/01/15 at 19:44:58 and 0803ms
*/
NEW:
MIT
FAQs
JS Date format => date.format('Today {Y}/{M}/{D} at {h}:{m}:{s}h and {ms}ms');
The npm package date.format receives a total of 56 weekly downloads. As such, date.format popularity was classified as not popular.
We found that date.format demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.