transformer-conversion

0.1.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i transformer-conversion

Weekly Downloads

13

Version

0.1.3

License

MIT

Last publish

Collaborators

  • jbenet