Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@makenova/panda

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@makenova/panda

format seconds as a digital clock string

latest
Source
npmnpm
Version
1.1.5
Version published
Weekly downloads
11
83.33%
Maintainers
1
Weekly downloads
 
Created
Source

panda

Build Status

🐼 format seconds as a digital clock string 🐼

Panda, 🐼, Panda, 🐼, Panda

Install

npm install --save @makenova/panda

# OR install it globally for cli use

npm install -g @makenova/panda

Use

var convert = require('@makenova/panda')
convert(7250) // => '120 : 50'
convert(45012, { hours: true }) // => '12 : 30 : 12'

or in with import

import convert from '@makenova/panda')
convert(7250) // => '120 : 50'
convert(45012, { hours: true }) // => '12 : 30 : 12'

or if you installed it globally,

panda 45012 # => 750 : 12
panda 45012 true # => 12 : 30 : 12

# no args will print usage
panda

Usage
$ panda <seconds> [show_hours_boolean]

Examples
$ panda 45012
750 : 12

$ panda 45012 true
12 : 30 : 12

API

convert(seconds, [options])

Convert seconds to a string formatted as a digital clock string. The default is Minutes : seconds.

options.hours

A boolean that indicates if hours should be displayed.

Bugs

Please report any bugs to: https://github.com/makenova/panda/issues

License

Licensed under the MIT License: https://opensource.org/licenses/MIT

Keywords

time

FAQs

Package last updated on 01 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts