{"_id":"condense-newlines","_rev":"321198","name":"condense-newlines","description":"Replace extraneous newlines with a single newline, or pass a specified number of newlines to use.","dist-tags":{"latest":"0.2.1"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-04T01:26:44.000Z","created":"2014-07-12T09:23:34.116Z","0.2.1":"2016-04-23T22:15:17.230Z","0.2.0":"2016-03-08T22:18:55.382Z","0.1.0":"2014-07-12T09:23:34.116Z"},"users":{"jonschlinkert":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/condense-newlines.git"},"versions":{"0.2.1":{"name":"condense-newlines","description":"Replace extraneous newlines with a single newline, or pass a specified number of newlines to use.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/condense-newlines","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/condense-newlines.git"},"bugs":{"url":"https://github.com/jonschlinkert/condense-newlines/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","is-whitespace":"^0.3.0","kind-of":"^3.0.2"},"devDependencies":{"gulp-format-md":"^0.1.7","mocha":"^2.4.5"},"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"related":{"list":["arr-union","array-unique","arrayify-compact"]},"run":true,"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"]},"gitHead":"80945bc9b98de1e84a153fa1a8881595fc45e59e","_id":"condense-newlines@0.2.1","_shasum":"3de985553139475d32502c83b02f60684d24c55f","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3de985553139475d32502c83b02f60684d24c55f","size":2926,"noattachment":false,"key":"/condense-newlines/-/condense-newlines-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/condense-newlines/download/condense-newlines-0.2.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/condense-newlines-0.2.1.tgz_1461449714819_0.08328100736252964"},"directories":{},"publish_time":1461449717230,"_cnpm_publish_time":1461449717230,"_hasShrinkwrap":false},"0.2.0":{"name":"condense-newlines","description":"Replace extraneous newlines with a single newline, or pass a specified number of newlines to use.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/condense-newlines","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/condense-newlines.git"},"bugs":{"url":"https://github.com/jonschlinkert/condense-newlines/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"is-whitespace":"^0.3.0"},"devDependencies":{"gulp-format-md":"^0.1.7","mocha":"^2.4.5"},"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["arrayify-compact","array-unique","arr-union"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"76e6d1a00f012193913d8cbaf24e44a71a7ee72f","_id":"condense-newlines@0.2.0","_shasum":"db58cd8798ad212a5fb8048e7e29a94827272df7","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"db58cd8798ad212a5fb8048e7e29a94827272df7","size":2660,"noattachment":false,"key":"/condense-newlines/-/condense-newlines-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/condense-newlines/download/condense-newlines-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/condense-newlines-0.2.0.tgz_1457475530982_0.7814347851090133"},"directories":{},"publish_time":1457475535382,"_cnpm_publish_time":1457475535382,"_hasShrinkwrap":false},"0.1.0":{"name":"condense-newlines","description":"Replace extraneous newlines with a single newline, or pass a specified number of newlines to use.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/condense-newlines","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/condense-newlines.git"},"bugs":{"url":"https://github.com/jonschlinkert/condense-newlines/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/condense-newlines/blob/master/LICENSE-MIT"}],"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb-tag-jscomments":">= 0.1.4","verb":">= 0.2.6","mocha":"*"},"dependencies":{"arrayify-compact":"^0.1.0"},"_id":"condense-newlines@0.1.0","_shasum":"9b25a137676b783649f9131953945bbf9029895e","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9b25a137676b783649f9131953945bbf9029895e","size":2739,"noattachment":false,"key":"/condense-newlines/-/condense-newlines-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/condense-newlines/download/condense-newlines-0.1.0.tgz"},"directories":{},"publish_time":1405157014116,"_cnpm_publish_time":1405157014116,"_hasShrinkwrap":false}},"readme":"# condense-newlines [![NPM version](https://img.shields.io/npm/v/condense-newlines.svg?style=flat)](https://www.npmjs.com/package/condense-newlines) [![NPM downloads](https://img.shields.io/npm/dm/condense-newlines.svg?style=flat)](https://npmjs.org/package/condense-newlines) [![Build Status](https://img.shields.io/travis/jonschlinkert/condense-newlines.svg?style=flat)](https://travis-ci.org/jonschlinkert/condense-newlines)\n\nReplace extraneous newlines with a single newline, or pass a specified number of newlines to use.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install condense-newlines --save\n```\n\n## Usage\n\n```js\nvar condense = require('condense-newlines');\nconsole.log(condense('\\n\\na\\n\\n\\nb\\nc\\r\\n\\r\\nd\\n\\n\\n'));\n//=> '\\na\\nb\\nc\\nd\\n';\n```\n\n## Options\n\n### options.sep\n\nSpecify the separator to use\n\n```js\nconsole.log(condense('\\n\\na\\n\\n\\nb\\nc\\r\\n\\r\\nd\\n\\n\\n', {sep: '\\n\\n'}));\n//=> '\\n\\na\\n\\nb\\n\\nc\\n\\nd\\n\\n';\n```\n\n### options.min\n\nThe minimum number of consecutive newlines to condense.\n\n**Default**\n\n: `2`\n\n```js\nconsole.log(condense('\\n\\na\\n\\n\\nb\\nc\\r\\n\\r\\nd\\n\\n\\n', {min: 2}));\n//=> '\\n\\na\\n\\nb\\n\\nc\\n\\nd\\n\\n';\n```\n\n### options.keepWhitespace\n\nDon't treat whitespace-only lines as newlines.\n\n```js\nconsole.log(condense('\\n\\na\\n\\n      \\nb\\nc\\r\\n\\r\\nd\\n\\n\\n', {\n  keepWhitespace: true, sep: '\\n\\n'\n}));\n\n//=> '\\n\\na\\n\\n      \\nb\\n\\nc\\n\\nd\\n\\n';\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://www.npmjs.com/package/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union)\n* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique)\n* [arrayify-compact](https://www.npmjs.com/package/arrayify-compact): Casts the given value to a flatten array, and removes falsey items (similar to lodash… [more](https://www.npmjs.com/package/arrayify-compact) | [homepage](https://github.com/jonschlinkert/arrayify-compact)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/condense-newlines/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ 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/condense-newlines/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 23, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/condense-newlines","bugs":{"url":"https://github.com/jonschlinkert/condense-newlines/issues"},"license":"MIT"}