@zcong/expire-map
v0.2.1
Published
map that support expire
Downloads
12
Readme
expire-map
Install
$ yarn add @zcong/expire-map
Usage
const ExpireMap = require('@zcong/expire-map').default
const em = new ExpireMap(5000)
em.setExpire('haha', 'hehe', 2000)
console.log(em.get('haha'))
// 'hehe'
// after 2000 ms
console.log(em.get('haha'))
// undefined
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
expire-map © zcong1993, Released under the MIT License. Authored and maintained by zcong1993 with help from contributors (list).
github.com/zcong1993 · GitHub @zcong1993