0.1.0 • Published 5 years ago

@mblackmblack/to-seconds v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

to-seconds Build Status

Convert an object of time properties to seconds: {seconds: 2}120

Install

$ npm install @mblackmblack/to-seconds

Usage

const toSeconds = require('@mblackmblack/to-seconds');

toSeconds({
	days: 15,
	hours: 11,
	minutes: 23,
	seconds: 1
});
//=> 1336981

API

toSeconds(input)

input

Type: Object

Specify an object with any of the following properties:

  • days
  • hours
  • minutes
  • seconds

Related

Credits

This project is forked from https://github.com/sindresorhus/to-milliseconds. Special thanks to sindresorhus

License

MIT © Matthew Black