This commit is contained in:
eric sciple 2020-01-24 12:20:19 -05:00
parent beb1329f9f
commit 2b95e76931
7736 changed files with 1874747 additions and 51184 deletions

24
node_modules/detect-newline/index.js generated vendored Normal file
View file

@ -0,0 +1,24 @@
'use strict';
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
var newlines = (str.match(/(?:\r?\n)/g) || []);
if (newlines.length === 0) {
return null;
}
var crlf = newlines.filter(function (el) {
return el === '\r\n';
}).length;
var lf = newlines.length - crlf;
return crlf > lf ? '\r\n' : '\n';
};
module.exports.graceful = function (str) {
return module.exports(str) || '\n';
};

21
node_modules/detect-newline/license generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.

73
node_modules/detect-newline/package.json generated vendored Normal file
View file

@ -0,0 +1,73 @@
{
"_args": [
[
"detect-newline@2.1.0",
"/Users/eric/repos/actions/setup-node"
]
],
"_development": true,
"_from": "detect-newline@2.1.0",
"_id": "detect-newline@2.1.0",
"_inBundle": false,
"_integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=",
"_location": "/detect-newline",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "detect-newline@2.1.0",
"name": "detect-newline",
"escapedName": "detect-newline",
"rawSpec": "2.1.0",
"saveSpec": null,
"fetchSpec": "2.1.0"
},
"_requiredBy": [
"/jest-docblock"
],
"_resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz",
"_spec": "2.1.0",
"_where": "/Users/eric/repos/actions/setup-node",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/detect-newline/issues"
},
"description": "Detect the dominant newline character of a string",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/detect-newline#readme",
"keywords": [
"newline",
"linebreak",
"line-break",
"line",
"lf",
"crlf",
"eol",
"linefeed",
"character",
"char"
],
"license": "MIT",
"name": "detect-newline",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/detect-newline.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "2.1.0"
}

42
node_modules/detect-newline/readme.md generated vendored Normal file
View file

@ -0,0 +1,42 @@
# detect-newline [![Build Status](https://travis-ci.org/sindresorhus/detect-newline.svg?branch=master)](https://travis-ci.org/sindresorhus/detect-newline)
> Detect the dominant newline character of a string
## Install
```
$ npm install --save detect-newline
```
## Usage
```js
const detectNewline = require('detect-newline');
detectNewline('foo\nbar\nbaz\r\n');
//=> '\n'
```
## API
### detectNewline(input)
Returns detected newline or `null` when no newline character is found.
### detectNewline.graceful(input)
Returns detected newline or `\n` when no newline character is found.
## Related
- [detect-newline-cli](https://github.com/sindresorhus/detect-newline-cli) - CLI for this module
- [detect-indent](https://github.com/sindresorhus/detect-indent) - Detect the indentation of code
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)