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

Package detail

@segment/convert-dates

segmentio2kSEE LICENSE IN LICENSE1.1.0

Convert all Date instances in an object.

date

readme

convert-dates

CircleCI Codecov

Convert all Date instances in an object.

Installation

$ npm install @segment/convert-dates

Example

var convert = require('convert-dates');
var obj = { date: new Date() };

obj = convert(obj, function (date) { return 'string'; });

obj.date; // "string"

API

convertDates(object, converter)

Passes all of the Date values in an object through the converter function.

changelog

1.1.0 / 2017-10-19

  • Merge pull request #2 from segmentio/add-arrays
  • removed ie 7 and 8 from circle
  • Add arrays

    1.0.0 / 2016-06-02

  • Modernize test harness; Remove Duo support, add npm support

0.1.1 - February 10, 2013

  • bump is dependency

0.1.0 - October 22, 2013

  • manipulate a clone
  • properly package for npm

0.0.1 - September 3, 2013

:sparkles: