react-humanize-duration

1.0.1 • Public • Published

React Humanize Duration

Humanize a number into time in React and React Native 10001 second

CI Version Downloads Install size

NPM

Try in CodeSandbox

Edit react-camelcase

Install

$ npm install react-humanize-duration

Usage

import HumanizeDuration from 'react-humanize-duration';
 
const App = () => (
  <div>
    <HumanizeDuration duration={1000} />
  </div>
);
 
// => '1 second'

API

number={input}

Type: integer

<HumanizeDuration duration={1000} />
 
// => '1 second'

language={object}

Type: object

<HumanizeDuration duration={1000} language={{ language: 'es' }} />
 
// => '1 segundo'

License

MIT © Yohix

Package Sidebar

Install

npm i react-humanize-duration

Weekly Downloads

180

Version

1.0.1

License

MIT

Unpacked Size

89.5 kB

Total Files

5

Last publish

Collaborators

  • yohix