{"_id":"sections","_rev":"75566","name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:24:29.000Z","created":"2016-02-15T04:20:12.980Z","1.0.0":"2017-04-27T04:49:04.760Z","0.1.10":"2017-03-16T16:49:53.254Z","0.1.9":"2016-08-04T13:41:24.420Z","0.1.8":"2016-03-20T22:16:23.615Z","0.1.7":"2016-03-02T11:56:40.365Z","0.1.6":"2016-02-23T12:52:46.765Z","0.1.5":"2016-02-23T12:50:34.932Z","0.1.4":"2016-02-23T07:50:16.348Z","0.1.2":"2016-02-22T00:54:07.913Z","0.1.1":"2016-02-15T19:39:34.496Z","0.1.0":"2016-02-15T04:20:12.980Z"},"users":{"garrickajo":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"versions":{"1.0.0":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"gfm-code-blocks":"^1.0.0","sort-by-value":"^0.1.0"},"devDependencies":{"gulp-format-md":"^0.1.12","mocha":"^3.3.0","write":"^0.3.3"},"keywords":["format","markdown","md","parse","sections"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"gitHead":"ec3ea81580de43e1b14d160853e1eadbf860006d","_id":"sections@1.0.0","_shasum":"db657f5a478b45d2a046d045c1aa792eb823c2c1","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"db657f5a478b45d2a046d045c1aa792eb823c2c1","size":4992,"noattachment":false,"key":"/sections/-/sections-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sections-1.0.0.tgz_1493268542367_0.21635788562707603"},"directories":{},"publish_time":1493268544760,"_hasShrinkwrap":false,"_cnpm_publish_time":1493268544760},"0.1.10":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.10","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"gfm-code-blocks":"^1.0.0"},"devDependencies":{"gulp-format-md":"^0.1.11","mocha":"^3.2.0"},"keywords":["format","markdown","md","parse","sections"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"gitHead":"3d9b11c5ac4a1d0a61bc2ac7021edf30f01d19fb","_id":"sections@0.1.10","_shasum":"b4747d8aba1829a1345a291a9db5d2532977787f","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b4747d8aba1829a1345a291a9db5d2532977787f","size":4305,"noattachment":false,"key":"/sections/-/sections-0.1.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.10.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sections-0.1.10.tgz_1489682991225_0.5016237394884229"},"directories":{},"publish_time":1489682993254,"_cnpm_publish_time":1489682993254,"_hasShrinkwrap":false},"0.1.9":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.9","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js","LICENSE","README.md"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"define-property":"^0.2.5","gfm-code-blocks":"^0.3.0"},"devDependencies":{"gulp-format-md":"^0.1.10","mocha":"^3.0.1"},"keywords":["format","markdown","md","parse","sections"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"gitHead":"fc9e116a586f48b1bf1792d3e0ecd9cd34197dc3","_id":"sections@0.1.9","_shasum":"fc6e8423bea1c56ca1132835a5681dd73246dfc5","_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":"fc6e8423bea1c56ca1132835a5681dd73246dfc5","size":4342,"noattachment":false,"key":"/sections/-/sections-0.1.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.9.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sections-0.1.9.tgz_1470318082498_0.8732061190530658"},"directories":{},"publish_time":1470318084420,"_cnpm_publish_time":1470318084420,"_hasShrinkwrap":false},"0.1.8":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.8","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js","gfm.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.7","mocha":"^2.4.5"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"dependencies":{"define-property":"^0.2.5","gfm-code-blocks":"^0.3.0"},"gitHead":"3c8f785d45e1392df330d23eefb243028245bacf","_id":"sections@0.1.8","_shasum":"615cc9239068c6efc2baa4f481d08f2d648af6bb","_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":"615cc9239068c6efc2baa4f481d08f2d648af6bb","size":4264,"noattachment":false,"key":"/sections/-/sections-0.1.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.8.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sections-0.1.8.tgz_1458512181284_0.22347772819921374"},"directories":{},"publish_time":1458512183615,"_cnpm_publish_time":1458512183615,"_hasShrinkwrap":false},"0.1.7":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.7","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js","gfm.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"dependencies":{"define-property":"^0.2.5","gfm-code-blocks":"^0.3.0"},"gitHead":"0496d42b2a646ba8ea83ec9f512e6641ff0fc082","_id":"sections@0.1.7","_shasum":"a1eb587a17554867e63df6577e887f966b04c6db","_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":"a1eb587a17554867e63df6577e887f966b04c6db","size":4217,"noattachment":false,"key":"/sections/-/sections-0.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.7.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sections-0.1.7.tgz_1456919797692_0.7510729958303273"},"directories":{},"publish_time":1456919800365,"_cnpm_publish_time":1456919800365,"_hasShrinkwrap":false},"0.1.6":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.6","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js","gfm.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"dependencies":{"define-property":"^0.2.5","gfm-code-blocks":"^0.3.0"},"gitHead":"ccbe7310532d6dbc6bc87293a5696c5f6183c9d7","_id":"sections@0.1.6","_shasum":"fa185adca18ff3b9a70a80b1df89d8059db6c3d4","_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":"fa185adca18ff3b9a70a80b1df89d8059db6c3d4","size":4205,"noattachment":false,"key":"/sections/-/sections-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.6.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/sections-0.1.6.tgz_1456231963336_0.10767028434202075"},"directories":{},"publish_time":1456231966765,"_cnpm_publish_time":1456231966765,"_hasShrinkwrap":false},"0.1.5":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.5","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"dependencies":{"define-property":"^0.2.5","gfm-code-blocks":"^0.3.0"},"gitHead":"ebb4049c687831c5c1353584300a49b179f47ef4","_id":"sections@0.1.5","_shasum":"8dc43c957be7ed79d5cfd080ee88d748cbfe508d","_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":"8dc43c957be7ed79d5cfd080ee88d748cbfe508d","size":3959,"noattachment":false,"key":"/sections/-/sections-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.5.tgz"},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/sections-0.1.5.tgz_1456231829897_0.5786859691143036"},"directories":{},"publish_time":1456231834932,"_cnpm_publish_time":1456231834932,"_hasShrinkwrap":false},"0.1.4":{"name":"sections","description":"Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.","version":"0.1.4","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"gitHead":"ebb4049c687831c5c1353584300a49b179f47ef4","_id":"sections@0.1.4","_shasum":"2220e71bafdea90c961a5c6ca9ace9ec75e65c5d","_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":"2220e71bafdea90c961a5c6ca9ace9ec75e65c5d","size":3874,"noattachment":false,"key":"/sections/-/sections-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.4.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/sections-0.1.4.tgz_1456213812892_0.918520640116185"},"directories":{},"publish_time":1456213816348,"_cnpm_publish_time":1456213816348,"_hasShrinkwrap":false},"0.1.2":{"name":"sections","description":"Prepend, append or replace \"sections\" in a markdown string.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"gitHead":"18c727cb5ec967bcb41b526b8faa094b6bc8e735","_id":"sections@0.1.2","_shasum":"37ae46bc3a0a4f8e634d975cd9e1d5f3760355fa","_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":"37ae46bc3a0a4f8e634d975cd9e1d5f3760355fa","size":3848,"noattachment":false,"key":"/sections/-/sections-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/sections-0.1.2.tgz_1456102442931_0.7405783904250711"},"directories":{},"publish_time":1456102447913,"_cnpm_publish_time":1456102447913,"_hasShrinkwrap":false},"0.1.1":{"name":"sections","description":"Manipulate sections in a string of markdown.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"reflinks":["verb"]},"gitHead":"79bfc21a78ab918527f8e5f07c439dc97d9fd40c","_id":"sections@0.1.1","_shasum":"588af1d216d554194c7efe4bcaed9a95c02b8c42","_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":"588af1d216d554194c7efe4bcaed9a95c02b8c42","size":3485,"noattachment":false,"key":"/sections/-/sections-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/sections-0.1.1.tgz_1455565172307_0.875028484268114"},"directories":{},"publish_time":1455565174496,"_cnpm_publish_time":1455565174496,"_hasShrinkwrap":false},"0.1.0":{"name":"sections","description":"Manipulate sections in a string of markdown.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/sections","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/sections.git"},"bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*"},"keywords":["format","markdown","md","parse"],"verb":{"layout":"default","related":{"list":["gulp-format-md","markdown-utils","remarkable"]},"plugins":["gulp-format-md"]},"gitHead":"8b9d151a5166984304b02a6d8050e5efb96c3549","_id":"sections@0.1.0","_shasum":"f5ced6e4001211f9ca53598483991810b9b98157","_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":"f5ced6e4001211f9ca53598483991810b9b98157","size":3453,"noattachment":false,"key":"/sections/-/sections-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sections/download/sections-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/sections-0.1.0.tgz_1455510009335_0.5414631755556911"},"directories":{},"publish_time":1455510012980,"_cnpm_publish_time":1455510012980,"_hasShrinkwrap":false}},"readme":"# sections [![NPM version](https://img.shields.io/npm/v/sections.svg?style=flat)](https://www.npmjs.com/package/sections) [![NPM monthly downloads](https://img.shields.io/npm/dm/sections.svg?style=flat)](https://npmjs.org/package/sections)  [![NPM total downloads](https://img.shields.io/npm/dt/sections.svg?style=flat)](https://npmjs.org/package/sections) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/sections.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/sections)\n\n> Manipulate sections in a markdown string. A 'section' is a block of content preceded by a valid markdown ATX heading.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save sections\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add sections\n```\n\n## Usage\n\nThis is meant to be fast and opinionated, and only works with [ATX headings](http://spec.commonmark.org/0.24/#atx-headings).\n\n```js\nvar sections = require('sections');\nvar obj = sections.parse(str);\n```\n\n## API\n\n<details>\n<summary><strong>.parse</strong></summary>\n\n### [.parse](index.js#L34)\n\nParses sections in a `string` of markdown and returns an object with two properties:\n\n* `sections`: an array of markdown \"sections\", delimited by [ATX headings](http://spec.commonmark.org/0.24/#atx-headings),\n* `result`: the cumulative result of whatever is returned by the (optional) function that is passed as the second argument.\nReturns an object that looks [something like this](#example-object)\n\n**Params**\n\n* `string` **{String}**\n* `fn` **{Function}**\n* `returns` **{Object}**\n\n**Example**\n\n```js\nvar fs = require('fs');\nvar readme = fs.readFileSync('readme.md', 'utf8');\nvar sections = require('sections');\nconsole.log(sections.parse(readme));\n```\n\n</details>\n\n<details>\n<summary><strong>.format</strong></summary>\n\n### [.format](index.js#L72)\n\nFormat sections. By default, if no filter function\nis passed, this filters out empty sections fixes\nwhitespace between sections.\n\n**Params**\n\n* `str` **{String}**: Markdown string\n* `fn` **{Function}**: optional filter function\n* `returns` **{String}**\n\n</details>\n\n<details>\n<summary><strong>.sortBy</strong></summary>\n\n### [.sortBy](index.js#L117)\n\nSort the sections in a parsed sections object, by the\ngiven `prop` and array of `values`.\n\n**Params**\n\n* `obj` **{Object}**: Object returned from [.parse](#parse)\n* `prop` **{String|Array}**: Defaults to `title`. The property to sort by, or the array of values to sort by.\n* `values` **{Array}**: Array of values to sort by.\n* `returns` **{Object}**\n\n</details>\n\n<details>\n<summary><strong>.render</strong></summary>\n\n### [.render](index.js#L152)\n\nRenders the array of `sections` from [.parse](#parse).\n\n**Params**\n\n* `obj` **{Object}**: Sections object returned from [.parse](#parse)\n* `values` **{Array}**: (optional) To sort the array of sections by `title`, pass an array of values to sort by.\n* `returns` **{String}**\n\n**Example**\n\n```js\nvar fs = require('fs');\nvar readme = fs.readFileSync('readme.md', 'utf8');\nvar sections = require('sections');\nvar obj = sections.parse(readme);\nvar str = sections.render(obj);\nconsole.log(str);\n```\n\n</details>\n\n### Example object\n\nThe parsed object that is returned looks something like this:\n\n```js\n{ sections:\n   [ Section {\n       pos: 12,\n       count: 0,\n       string: '# sections \\n',\n       heading: '# sections',\n       level: 1,\n       title: 'sections',\n       body: '' },\n     Section {\n       pos: 32,\n       count: 1,\n       string: '\\n## Foo\\nThis is foo\\n',\n       heading: '## Foo',\n       level: 2,\n       title: 'Foo',\n       body: 'This is foo' },\n     Section {\n       pos: 52,\n       count: 2,\n       string: '\\n## Bar\\nThis is bar\\n',\n       heading: '## Bar',\n       level: 2,\n       title: 'Bar',\n       body: 'This is bar' },\n     Section {\n       pos: 72,\n       count: 3,\n       string: '\\n## Baz\\nThis is baz\\n',\n       heading: '## Baz',\n       level: 2,\n       title: 'Baz',\n       body: 'This is baz' } ],\n  result: '',\n  headings: [ 'sections', 'Foo', 'Bar', 'Baz' ] }\n```\n\n## About\n\n### Related projects\n\n* [gulp-format-md](https://www.npmjs.com/package/gulp-format-md): Gulp plugin for beautifying markdown using pretty-remarkable. | [homepage](https://github.com/jonschlinkert/gulp-format-md \"Gulp plugin for beautifying markdown using pretty-remarkable.\")\n* [markdown-utils](https://www.npmjs.com/package/markdown-utils): Micro-utils for creating markdown snippets. | [homepage](https://github.com/jonschlinkert/markdown-utils \"Micro-utils for creating markdown snippets.\")\n* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable \"Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.\")\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 project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 27, 2017._","_attachments":{},"homepage":"https://github.com/jonschlinkert/sections","bugs":{"url":"https://github.com/jonschlinkert/sections/issues"},"license":"MIT"}