1.0.1 • Published 4 years ago

react-humanize-duration v1.0.1

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

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