1.0.0 • Published 7 years ago
replace-section v1.0.0
replace-section
Install
$ npm install --save replace-section
Usage
const input = `const foo = 1
// @remove start
const text = 'not me'
// @remove end
const bar = 2`
replaceSection({
input,
startWith: '// @remove start',
endWith: '// @remove end',
replaceWith: ''
})
//=> yields
/*
const foo = 1
const bar = 2
*/
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