README
split-on-first-occurrence
Install
$ npm install --save split-on-first-occurrence
Usage
const split = require('split-on-first-occurrence')
split('Author: EGOIST COOL', ' ')
//=> ['Author:', 'EGOIST COOL']
// split by a string
split('Hello\n\nWorld\n\n!', '\n\n')
//=> ['Hello', 'World\n\n!']
API
split(input, char)
input
Type: string
The string to split.
char
Type: string
The seperator char or chars.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D