This commit is contained in:
8
node_modules/trim-trailing-lines/index.js
generated
vendored
Normal file
8
node_modules/trim-trailing-lines/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = trimTrailingLines
|
||||
|
||||
// Remove final newline characters from `value`.
|
||||
function trimTrailingLines(value) {
|
||||
return String(value).replace(/\n+$/, '')
|
||||
}
|
||||
22
node_modules/trim-trailing-lines/license
generated
vendored
Normal file
22
node_modules/trim-trailing-lines/license
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <mailto:tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
72
node_modules/trim-trailing-lines/package.json
generated
vendored
Normal file
72
node_modules/trim-trailing-lines/package.json
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "trim-trailing-lines",
|
||||
"version": "1.1.4",
|
||||
"description": "Remove final line feeds from a string",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"trim",
|
||||
"final",
|
||||
"line",
|
||||
"newline",
|
||||
"characters"
|
||||
],
|
||||
"repository": "wooorm/trim-trailing-lines",
|
||||
"bugs": "https://github.com/wooorm/trim-trailing-lines/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"browserify": "^17.0.0",
|
||||
"nyc": "^15.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^9.0.0",
|
||||
"remark-preset-wooorm": "^8.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"tinyify": "^3.0.0",
|
||||
"xo": "^0.34.0"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"build-bundle": "browserify . -s trimTrailingLines -o trim-trailing-lines.js",
|
||||
"build-mangle": "browserify . -s trimTrailingLines -p tinyify -o trim-trailing-lines.min.js",
|
||||
"build": "npm run build-bundle && npm run build-mangle",
|
||||
"test-api": "node test",
|
||||
"test-coverage": "nyc --reporter lcov tape test.js",
|
||||
"test": "npm run format && npm run build && npm run test-coverage"
|
||||
},
|
||||
"nyc": {
|
||||
"check-coverage": true,
|
||||
"lines": 100,
|
||||
"functions": 100,
|
||||
"branches": 100
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"esnext": false,
|
||||
"ignores": [
|
||||
"trim-trailing-lines.js"
|
||||
]
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
}
|
||||
}
|
||||
68
node_modules/trim-trailing-lines/readme.md
generated
vendored
Normal file
68
node_modules/trim-trailing-lines/readme.md
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
# trim-trailing-lines
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Remove final line feeds from a string.
|
||||
|
||||
## Install
|
||||
|
||||
[npm][]:
|
||||
|
||||
```sh
|
||||
npm install trim-trailing-lines
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
var trimTrailingLines = require('trim-trailing-lines')
|
||||
|
||||
trimTrailingLines('foo\nbar') // => 'foo\nbar'
|
||||
trimTrailingLines('foo\nbar\n') // => 'foo\nbar'
|
||||
trimTrailingLines('foo\nbar\n\n') // => 'foo\nbar'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `trimTrailingLines(value)`
|
||||
|
||||
Remove final line feed characters from `value`.
|
||||
|
||||
###### Parameters
|
||||
|
||||
* `value` (`string`) — Value with trailing line feeds, coerced to string.
|
||||
|
||||
###### Returns
|
||||
|
||||
`string` — Value without trailing newlines.
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://img.shields.io/travis/wooorm/trim-trailing-lines.svg
|
||||
|
||||
[build]: https://travis-ci.org/wooorm/trim-trailing-lines
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/trim-trailing-lines
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/trim-trailing-lines.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/trim-trailing-lines
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/trim-trailing-lines.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=trim-trailing-lines
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
Reference in New Issue
Block a user