Skip to content

zcong1993/expire-map

Repository files navigation

expire-map

NPM version NPM downloads CircleCI codecov donate

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. 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