
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
moment-parser
Advanced tools
Natural language time parser for moment.js strings
npm install moment-parser
var parser = require('moment-parser');
// durations
console.log(parser.parse('1 hour')); //{ type: 'MomentDuration', value: 1, unit: 'hour' }
console.log(parser.parseDuration('2 months and 1 day')); // a momentjs duration of { days: 1, months: 2 }
// moments
console.log(parser.parse('2015-01-01')); //{ type: 'ISODateLiteral', value: '2015-01-01T00:00:00' }
console.log(parser.parseMoment('day 5 of next month')); // a momentjs moment at the start of next month plus 4 days
npm test
(proper grammar docs coming soon!)
All times are UTC0 unless a time zone is specified by appending it to an ISO-8601 string.
2014-09-21
2014-09-22T11:39:17.993
2014-09-22T03:39:17.993-08:00
second
minute
hour
day
week
month
year
Note that month
and year
are special "calendar" durations that do
not have fixed length but instead advance whole months or years relative
to a fixed moment.
0s
1m
2h
3d
4w
5M
6y
1 hour and 23 minutes
01:23:00
1 second
20 minutes
now
yesterday
today
tomorrow
07:00:00 after today
1 minute from now
2 minutes from now
:+2m
1 hour and 10 minutes before now
:-01:10:00
3 days ago
3 weeks and 1 day ago
this month
last month
day 20 of last month
this minute
next hour
this day
today
last day
yesterday
FAQs
moment parser that supports natural language expressions
The npm package moment-parser receives a total of 405 weekly downloads. As such, moment-parser popularity was classified as not popular.
We found that moment-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.