$ npm install --save split-on-first-occurrence
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!']
Type: string
The string to split.
Type: string
The seperator char or chars.
- 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