Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewmueller/increment
increment strings. good for keeping slugs unique.
https://github.com/matthewmueller/increment
Last synced: about 1 month ago
JSON representation
increment strings. good for keeping slugs unique.
- Host: GitHub
- URL: https://github.com/matthewmueller/increment
- Owner: matthewmueller
- Created: 2013-01-16T02:45:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-07T22:59:31.000Z (almost 11 years ago)
- Last Synced: 2024-04-08T20:10:03.809Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 119 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# increment
increment strings
## Example
```js
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