replace-section
v1.0.0
Published
Replace a section in string.
Readme
replace-section
Install
$ npm install --save replace-sectionUsage
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
