Socket
Socket
Sign inDemoInstall

isodate-convert

Package Overview
Dependencies
69
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    isodate-convert

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


Version published
Weekly downloads
3
Maintainers
1
Install size
91.6 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 23 Sep 2015

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc