{"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":"jonschlinkert","email":"github@sellside.com"},{"name":"doowb","email":"brian.woodward@gmail.com"}],"dist":{"shasum":"db58cd8798ad212a5fb8048e7e29a94827272df7","tarball":"http://registry-npm.ywwl.com/condense-newlines/download/condense-newlines-0.2.0.tgz","integrity":"sha512-0Wtp4fufpHlbDRhaBw4idHJZa622PfHYmNeiOeai7BDVJgXkxLmKHGaL2/k8PTynEsncjHifMOKWXLIxJzeI3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDB6bifMfHmW+m8lbVB3luAFfBfBcI8HO42orRZ//524AiEAl3DrtCVw47R6uPiYrhM0Yb32MpDBGSA1yWTVPY+OBKQ="}],"size":2660,"noattachment":false,"key":"/condense-newlines/-/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":{},"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._","publish_time":1457475535382,"_cnpm_publish_time":1457475535382,"dist-tags":{"latest":"0.2.1"}}