Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 392 Bytes

Readme.md

File metadata and controls

30 lines (17 loc) · 392 Bytes

increment

increment strings

Example

increment('user', '-') // user-1
increment('user-1', '-') // user-2
increment('user-999', '-') // user-1000

Installation

$ npm install increment

or in the browser...

$ component install matthewmueller/increment

API

increment(str, [ prefix ])

Increment str by 1. Give an optional prefix.

License

MIT