@lets/count

1.0.0 • Public • Published

count

🔢 Consistent counter

// Just count
count() // 1st
count() // 2nd

// Set counter
count.set(14)
count() // 15th
count() // 16th

// Start counting from
count.from(10)
count() // 11th
count() // 12th

// Count down
count.down() // 11th
count.down() // 10th

// Reset counter to 0
count.reset()
count.down() // -1st
count.down() // -2nd

Transpiled version

Environments which exclude node_modules from the transpiling pipeline should include the "browser" entry instead of "main". This exposes an ES5 commonjs module.

Also available for explicit import:

const count = require('@lets/count/dist');

Package Sidebar

Install

npm i @lets/count

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.81 kB

Total Files

4

Last publish

Collaborators

  • omrilotan