{"_id":"update-sections","_rev":"76074","name":"update-sections","description":"Easily prepend, append, inject or replace 'sections' in a markdown string.","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:24:35.000Z","created":"2016-02-22T01:36:15.399Z","0.1.2":"2016-07-27T11:28:23.775Z","0.1.1":"2016-07-27T11:04:54.782Z","0.1.0":"2016-02-22T01:36:15.399Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-sections.git"},"versions":{"0.1.2":{"name":"update-sections","description":"Easily prepend, append, inject or replace 'sections' in a markdown string.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/update-sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-sections/issues"},"license":"MIT","files":["index.js","LICENSE","README.md"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"sections":"^0.1.8"},"devDependencies":{"gulp-format-md":"^0.1.9","mocha":"^2.5.3"},"keywords":["append","content","fix","heading","inject","lint","linter","maintain","markdown","md","plugin","plugins","prepend","section","sections","snippet","up-to-date","update","update-plugin","update-updater","updateplugin","updater"],"lintDeps":{"ignore":[]},"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"76d555e9de1f4a0126eb7f809fac8c3ee67aa7cf","_id":"update-sections@0.1.2","_shasum":"ab53037038e67cdf06f74cecc02e5e02a17b9af7","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ab53037038e67cdf06f74cecc02e5e02a17b9af7","size":3082,"noattachment":false,"key":"/update-sections/-/update-sections-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-sections/download/update-sections-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/update-sections-0.1.2.tgz_1469618900985_0.32434831210412085"},"directories":{},"publish_time":1469618903775,"_cnpm_publish_time":1469618903775,"_hasShrinkwrap":false},"0.1.1":{"name":"update-sections","description":"Easily prepend, append, inject or replace 'sections' in a markdown string.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/update-sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-sections/issues"},"license":"MIT","files":["index.js","LICENSE","README.md"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"sections":"^0.1.8"},"devDependencies":{"gulp-format-md":"^0.1.9","mocha":"^2.5.3"},"keywords":["append","content","fix","heading","inject","lint","linter","maintain","markdown","md","plugin","plugins","prepend","section","sections","snippet","up-to-date","update","update-plugin","update-updater","updateplugin","updater"],"lintDeps":{"ignore":[]},"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"b025a284ef87b593055876581df6020701cafd25","_id":"update-sections@0.1.1","_shasum":"9dcdd684070246b3bc5fe2142353325c9dc237a2","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9dcdd684070246b3bc5fe2142353325c9dc237a2","size":2949,"noattachment":false,"key":"/update-sections/-/update-sections-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-sections/download/update-sections-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/update-sections-0.1.1.tgz_1469617492095_0.8564823216293007"},"directories":{},"publish_time":1469617494782,"_cnpm_publish_time":1469617494782,"_hasShrinkwrap":false},"0.1.0":{"name":"update-sections","description":"Easily prepend, append, inject or replace 'sections' in a markdown string.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/update-sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"sections":"^0.1.2"},"devDependencies":{"gulp-format-md":"*","mocha":"*"},"keywords":["append","content","heading","inject","markdown","md","prepend","section","sections","snippet"],"lintDeps":{"ignore":[]},"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"e5486d804584954c880e1d8f7a9e74e4cbc01e6e","_id":"update-sections@0.1.0","_shasum":"efc756acb3a0d041eef3e39f98a85d918551eb8a","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"efc756acb3a0d041eef3e39f98a85d918551eb8a","size":2791,"noattachment":false,"key":"/update-sections/-/update-sections-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-sections/download/update-sections-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/update-sections-0.1.0.tgz_1456104970603_0.6211309190839529"},"directories":{},"publish_time":1456104975399,"_cnpm_publish_time":1456104975399,"_hasShrinkwrap":false}},"readme":"# update-sections [![NPM version](https://img.shields.io/npm/v/update-sections.svg?style=flat)](https://www.npmjs.com/package/update-sections) [![NPM downloads](https://img.shields.io/npm/dm/update-sections.svg?style=flat)](https://npmjs.org/package/update-sections) [![Build Status](https://img.shields.io/travis/jonschlinkert/update-sections.svg?style=flat)](https://travis-ci.org/jonschlinkert/update-sections)\n\nEasily prepend, append, inject or replace 'sections' in a markdown string.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save update-sections\n```\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar update = require('update-sections');\nvar readme = fs.readFileSync('README.md', 'utf8');\nvar snippet = fs.readFileSync('contributing.md', 'utf8');\n\n// Inject the `contributing.md` string before the \"License\" section\nvar str = update(readme, 'License', snippet, 'before');\n```\n\n## API\n\n### [update](index.js#L32)\n\nRe-write a layout with \"sections\" defined in a declarative configuration. The `sections` property must be an array of section object, and each object  must have all params defined: `contents`, `heading` and `placement`.\n\nSupported `placement` values are:\n\n* `inner` (or aliases: `inside` and `between`): inject the content directly after the heading, before the content of a section\n* `before` (or alias `prepend`): inject the content before the specified section's heading\n* `after` (or alias `append`): inject the content after the specified section's heading\n\n**Params**\n\n* `contents` **{String}**: the string with sections to update\n* `heading` **{String}**: the heading of the existing section to match for placement\n* `value` **{String}**: the \"snippet\" to inject for the section\n* `placement` **{String}**: where to place the new content, relative to the specified heading.\n* `returns` **{String}**\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme && verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/update-sections/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 27, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/update-sections","bugs":{"url":"https://github.com/jonschlinkert/update-sections/issues"},"license":"MIT"}