Skip to content

segmentio/convert-dates

Repository files navigation

convert-dates

CircleCI Codecov

Note
Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.

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.

About

Convert all Date instances in an object.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •