transformer-conversion
v0.1.3
Published
transformer conversion
Downloads
28
Readme
transformer-conversion
Conversions in transformer.
Example
See: transformer.js-date-to-unix-time
var Conversion = require('transformer-conversion')
var tJsDate = require('transformer.js-date')
var tUnixTime = require('transformer.unix-time')
// require any other modules you may need here.
module.exports = Conversion(tJsDate, tUnixTime, convert)
function convert(jsDate) {
return jsDate.getTime() / 1000.0; // Date uses ms, not s.
}
See also: https://github.com/jbenet/transformer-pkg#transformer-pkg-init-conversion