Socket
Book a DemoInstallSign in
Socket

@jacobmarshall/human-time

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jacobmarshall/human-time

Display time in a human-readable format.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@jacobmarshall/human-time

Display time in a human-readable format.

Usage

You can install the library using npm

$ npm install --save @jacobmarshall/human-time

and use it like

import human from '@jacobmarshall/human-time';

human(new Date());
// => "just now"

human(new Date(Date.now() + 5 * 1000))
// => "5 seconds from now"

human(new Date(Date.now() + 5 * 1000), false)
// => "5 seconds"

License

MIT

Keywords

human

FAQs

Package last updated on 04 Dec 2016

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