@zcong/expire-map
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i @zcong/expire-map

    Weekly Downloads

    1

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    6.17 kB

    Total Files

    5

    Last publish

    Collaborators

    • zcong