ic

isodate-convert

Traverse an object, converting all ISO strings to JavaScript Dates and vice versa.

Showing:

Popularity

Downloads/wk

17

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

3

Size (min+gzip)

1.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

isodate-convert Circle CI

Traverse an object, converting all ISO strings to JavaScript Dates and vice versa.

Installation

npm install --save isodate-convert

Example

var decode = require('isodate-convert').decode
var obj = { date: '2013-09-04T00:57:26.434Z' }
var decoded = decode(obj)
// { date: [object Date] }

var encode = require('isodate-convert').encode
var encoded = encode(decoded)
// { date: '2013-09-04T00:57:26.434Z' }

API

encode(obj)

Traverse an obj, converting all ISO strings to real Dates.

decode(obj)

Traverse an obj, converting all Dates to ISO strings.

Badges

js-standard-style

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100