react-humanize-duration
v1.0.1
Published
Humanize a number into time in React and React Native
Downloads
790
Maintainers
Readme
React Humanize Duration
Humanize a number into time in React and React Native
1000
→1 second
Try in CodeSandbox
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