{"_id":"single-trailing-newline","_rev":"297461","name":"single-trailing-newline","description":"Ensure a string has a single trailing newline based off it's dominant newline character.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"time":{"modified":"2021-06-03T18:59:52.000Z","created":"2015-10-30T18:52:08.861Z","1.0.0":"2015-10-30T18:52:08.861Z"},"users":{},"author":{"name":"John Otander"},"repository":{"type":"git","url":"git+https://github.com/johnotander/single-trailing-newline.git"},"versions":{"1.0.0":{"name":"single-trailing-newline","description":"Ensure a string has a single trailing newline based off it's dominant newline character.","author":{"name":"John Otander"},"version":"1.0.0","main":"index.js","files":["index.js"],"scripts":{"test":"ava"},"repository":{"type":"git","url":"git+https://github.com/johnotander/single-trailing-newline.git"},"keywords":["newline","trailing","single","cf","lf","linebreak","eol"],"license":"MIT","bugs":{"url":"https://github.com/johnotander/single-trailing-newline/issues"},"homepage":"https://github.com/johnotander/single-trailing-newline","dependencies":{"detect-newline":"^1.0.3"},"devDependencies":{"ava":"*"},"gitHead":"735e3602235ba5fbd646223481e4203bd335cb4b","_id":"single-trailing-newline@1.0.0","_shasum":"81f0ad2ad645181945c80952a5c1414992ee9664","_from":".","_npmVersion":"3.3.8","_nodeVersion":"4.1.2","_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"dist":{"shasum":"81f0ad2ad645181945c80952a5c1414992ee9664","size":1847,"noattachment":false,"key":"/single-trailing-newline/-/single-trailing-newline-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/single-trailing-newline/download/single-trailing-newline-1.0.0.tgz"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"directories":{},"publish_time":1446231128861,"_cnpm_publish_time":1446231128861,"_hasShrinkwrap":false}},"readme":"# single-trailing-newline [![Build Status](https://secure.travis-ci.org/johnotander/single-trailing-newline.png?branch=master)](https://travis-ci.org/johnotander/single-trailing-newline) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\nEnsure a string has a single trailing newline based off it's dominant newline character.\n\n## Installation\n\n```bash\nnpm install --save single-trailing-newline\n```\n\n## Usage\n\n```javascript\nvar singleTrailingNewline = require('single-trailing-newline')\n\nsingleTrailingNewline('foo\\nbar')  // => 'foo\\nbar\\n'\nsingleTrailingNewline('foo\\nbar\\n\\n')  // => 'foo\\nbar\\n'\nsingleTrailingNewline('foo\\r\\nbar')  // => 'foo\\r\\nbar\\r\\n'\nsingleTrailingNewline('foo\\r\\nbar\\n\\n\\n\\n')  // => 'foo\\r\\nbar\\n'\n```\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).\n\n***\n\n> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).\n","_attachments":{},"homepage":"https://github.com/johnotander/single-trailing-newline","bugs":{"url":"https://github.com/johnotander/single-trailing-newline/issues"},"license":"MIT"}