This commit is contained in:
eric sciple 2020-01-24 12:20:47 -05:00
parent a004f0ae58
commit fc725ba36b
7280 changed files with 19 additions and 1796407 deletions

11
node_modules/load-json-file/index.js generated vendored
View file

@ -1,11 +0,0 @@
'use strict';
const path = require('path');
const fs = require('graceful-fs');
const stripBom = require('strip-bom');
const parseJson = require('parse-json');
const pify = require('pify');
const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp));
module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp));
module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp);

21
node_modules/load-json-file/license generated vendored
View file

@ -1,21 +0,0 @@
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.

View file

@ -1,79 +0,0 @@
{
"_args": [
[
"load-json-file@4.0.0",
"/Users/eric/repos/actions/setup-node"
]
],
"_development": true,
"_from": "load-json-file@4.0.0",
"_id": "load-json-file@4.0.0",
"_inBundle": false,
"_integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
"_location": "/load-json-file",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "load-json-file@4.0.0",
"name": "load-json-file",
"escapedName": "load-json-file",
"rawSpec": "4.0.0",
"saveSpec": null,
"fetchSpec": "4.0.0"
},
"_requiredBy": [
"/read-pkg-up/read-pkg"
],
"_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
"_spec": "4.0.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/load-json-file/issues"
},
"dependencies": {
"graceful-fs": "^4.1.2",
"parse-json": "^4.0.0",
"pify": "^3.0.0",
"strip-bom": "^3.0.0"
},
"description": "Read and parse a JSON file",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/load-json-file#readme",
"keywords": [
"read",
"json",
"parse",
"file",
"fs",
"graceful",
"load"
],
"license": "MIT",
"name": "load-json-file",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/load-json-file.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "4.0.0",
"xo": {
"esnext": true
}
}

View file

@ -1,45 +0,0 @@
# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file)
> Read and parse a JSON file
[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json).
## Install
```
$ npm install --save load-json-file
```
## Usage
```js
const loadJsonFile = require('load-json-file');
loadJsonFile('foo.json').then(json => {
console.log(json);
//=> {foo: true}
});
```
## API
### loadJsonFile(filepath)
Returns a promise for the parsed JSON.
### loadJsonFile.sync(filepath)
Returns the parsed JSON.
## Related
- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)