isodate-traverse

0.3.2 • Public • Published

isodate-traverse

Traverse an object (or array) and convert all ISO strings into Dates.

Installation

$ component install segmentio/isodate-traverse

Example

var traverse = require('isodate-traverse');
 
var obj = {
  date: '2013-09-04T00:57:26.434Z'
};
 
var traversed = traverse(obj);
// {
//   date: [object Date]
// }

API

traverse(obj, [strict])

Traverse an obj, converting all ISO strings to real Dates. By default, strict mode will be enabled, requiring at least YYYY-MM-DD

License

MIT

Package Sidebar

Install

npm i isodate-traverse

Weekly Downloads

0

Version

0.3.2

License

MIT

Last publish

Collaborators

  • segmentio