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.
EasyDate is a Javascript extension for easy dates manipulations which is heavily inspired by Rails ActiveSupport::Duration class.
EasyDate is a Javascript extension for easy dates manipulations which was heavily inspired by Rails ActiveSupport::Duration class.
Node.js npm install easy-date
Bower bower install easy-date
Node.js
require('easy-date');
In Browser
<script src="easy-date.js"></script>
Quickstart usage:
by adding the codes above, new methods are now available on all numbers:
var date1 = 3..days().fromNow();
var date2 = (10).months().ago();
var yesterday = 1..day().ago();
var today = new Date();
var num = 5;
num.years().before(today); //==> is equal to 5..years().ago()
num.years().since(today); //==> is equal to 5..years().fromNow()
it will also add some basic date helpers
Date.today() //=> new Date()
Date.yesterday() //=> 1..day().ago()
Date.tommorrow() //=> 1..day().fromNow()
The date.format library written by Steven Levithan (http://blog.stevenlevithan.com/archives/date-time-format) is now integrated for a very nice date formatting.
5..days().fromNow().format("d mmmm yyyy");
// is same as
5..days().fromNow("d mmmm yyyy");
// other functions
Date.today("yyyy-mm-dd");
Date.yesterday("dddd");
3..days().since(Date.yesterday(), "mmm dd, yyyy");
Check the complete formatting here
Copyright (c) 2017 Melvin Sembrano. See LICENSE for further details
FAQs
EasyDate is a Javascript extension for easy dates manipulations which is heavily inspired by Rails ActiveSupport::Duration class.
The npm package easy-date receives a total of 2 weekly downloads. As such, easy-date popularity was classified as not popular.
We found that easy-date 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.