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.
$ npm install @segment/convert-dates
var convert = require('convert-dates');
var obj = { date: new Date() };
obj = convert(obj, function (date) { return 'string'; });
obj.date; // "string"
Passes all of the Date
values in an object
through the converter
function.