
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@datatypes/moment
Advanced tools
ISO 8601 based time and date module.
npm install --save @datatypes/moment
import Moment from '@datatypes/moment'
new Moment('2015-11-24T21:32:43Z')
Possible formats for the time-string (when a string can be interpreted as a date or a time, date takes precedence)
Date
20
201
2015
, 0002
2015-11
2015-W48
2015W48
2015-11-24
20151124
2015-W48-2
2015W482
2015-328
2015328
Time
21:32
2132
21:32:43
213243
21:32:43.654
213243.654
Datetime
<date>T<time>
<date> <time>
toObject
Returns a plain-object representation of the Moment instance. The lower limit is always inclusive and the upper limit exclusive.
new Moment('2015-11-24T21:37:42.123Z').toObject() === {
string: '2015-11-24T21:37:42.123Z',
lowerLimit: new Date('2015-11-24T21:37:42.123Z'),
upperLimit: new Date('2015-11-24T21:37:42.124Z'),
precision: 'millisecond'
}
toJSON
Returns a JSON representation of the Hour instance.
new Moment('2015-11-24').toJSON() === '{' +
'"string":"2015-11-24",' +
'"precision":"day",' +
'"lowerLimit":"2015-11-24T00:00:00.000Z",' +
'"upperLimit":"2015-11-25T00:00:00.000Z"' +
'}'
toString
Returns the ISO 8601 representation of the Hour instance.
new Moment('2015-11-24T21:37:42.123Z').toString() === '2015-11-24T21:37:42.123Z'
FAQs
ISO 8601 based time and date module
The npm package @datatypes/moment receives a total of 5 weekly downloads. As such, @datatypes/moment popularity was classified as not popular.
We found that @datatypes/moment 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.