Skip to content

jbenet/transformer-conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published