Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@segment/isodate-traverse

segmentio3mSEE LICENSE IN LICENSE1.1.1

Traverse an object and convert all ISO strings into Dates.

ISO, date, datestring, parse, object, convert

readme

isodate-traverse

CircleCI Codecov

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

Installation

$ npm install @segment/isodate-traverse

Example

var traverse = require('@segment/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

changelog

1.1.0 / 2017-09-6

  • Remove IE 7/8 from circle
  • Fix array detection

1.0.1 / 2016-05-12

  • Modernize test/CI harness
  • Fix linting errors
  • Fix all IE7/8 compatibility issues

1.0.0 / 2016-04-07

  • test: disable broken stuff for now
  • add circle.yml
  • package: @segment/isodate@1
  • remove component, add browserify

0.3.3 - July 2, 2014

  • fix date parsing, bump isodate

0.3.2 - April 1, 2014

  • using pinned each-component
  • fix: returning non-objects

0.3.1 - February 10, 2013

  • bump is dependency

0.3.0 - January 30, 2013

  • removing clone logic (addressing issue #2)

0.2.0 - December 13, 2013

0.1.0 - October 10, 2013

  • add strict argument which is enabled by default

0.0.1 - September 12, 2013

:sparkles: