101 lines
4.8 KiB
JSON
101 lines
4.8 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "@expo/json-file@^5.3.0",
|
||
|
"scope": "@expo",
|
||
|
"escapedName": "@expo%2fjson-file",
|
||
|
"name": "@expo/json-file",
|
||
|
"rawSpec": "^5.3.0",
|
||
|
"spec": ">=5.3.0 <6.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/xdl"
|
||
|
]
|
||
|
],
|
||
|
"_from": "@expo/json-file@>=5.3.0 <6.0.0",
|
||
|
"_id": "@expo/json-file@5.3.0",
|
||
|
"_inCache": true,
|
||
|
"_location": "/@expo/json-file",
|
||
|
"_nodeVersion": "8.0.0",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "s3://npm-registry-packages",
|
||
|
"tmp": "tmp/json-file-5.3.0.tgz_1499121624137_0.2968416837975383"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "wilzh40",
|
||
|
"email": "wilzh40@gmail.com"
|
||
|
},
|
||
|
"_npmVersion": "4.2.0",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "@expo/json-file@^5.3.0",
|
||
|
"scope": "@expo",
|
||
|
"escapedName": "@expo%2fjson-file",
|
||
|
"name": "@expo/json-file",
|
||
|
"rawSpec": "^5.3.0",
|
||
|
"spec": ">=5.3.0 <6.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/xdl"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-5.3.0.tgz",
|
||
|
"_shasum": "9274fd22e68cfdcae1f06aed8d2d1f953a4f7168",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "@expo/json-file@^5.3.0",
|
||
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/xdl",
|
||
|
"author": {
|
||
|
"name": "support@expo.io"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/expo/json-file/issues"
|
||
|
},
|
||
|
"dependencies": {
|
||
|
"json5": "^0.5.0",
|
||
|
"lodash": "^4.6.1",
|
||
|
"mz": "^2.6.0"
|
||
|
},
|
||
|
"description": "A module for reading, writing, and manipulating JSON files",
|
||
|
"devDependencies": {
|
||
|
"babel-eslint": "^6.0.0",
|
||
|
"eslint": "^2.5.3",
|
||
|
"eslint-config-expo": "^1.0.7",
|
||
|
"eslint-plugin-react": "^4.2.3",
|
||
|
"jest-cli": "^12.1.1"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "9274fd22e68cfdcae1f06aed8d2d1f953a4f7168",
|
||
|
"tarball": "https://registry.npmjs.org/@expo/json-file/-/json-file-5.3.0.tgz"
|
||
|
},
|
||
|
"gitHead": "2d1d9e52d13aaf8896a82164043db361607d296f",
|
||
|
"homepage": "https://github.com/expo/json-file#readme",
|
||
|
"jest": {
|
||
|
"automock": false
|
||
|
},
|
||
|
"keywords": [
|
||
|
"json"
|
||
|
],
|
||
|
"license": "MIT",
|
||
|
"main": "JsonFile.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "wilzh40",
|
||
|
"email": "wilzh40@gmail.com"
|
||
|
}
|
||
|
],
|
||
|
"name": "@expo/json-file",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# json-file\nA module for reading, writing, and manipulating JSON files\n\n## Importing the package\n```js\nimport JsonFile from '@exponent/json-file';\n```\n\n## Promise-based async API\n\nEverything returns `Promise`s. If you are using ES7 (or Babel), you can write code like this:\n```js\nlet config = await JsonFile.readAsync('config.json', {cantReadFileDefault: {}});\n```\nIf you are using ES6, you can just use the return values the way you normally would use Promises.\n```js\nJsonFile.readAsync('config.json', {cantReadFileDefault: {}}).then(config => {\n ...\n});\n```\n\n## Used as an object\n```js\n\nvar file = new JsonFile('config.json', {cantReadFileDefault: {}});\nvar somethingSaved = await file.getAsync('somethingSaved', null);\n```\n\n## Used as functions\n```js\n\nvar pkg = await JsonFile.readAsync('package.json');\nvar main = await JsonFile.getAsync('package.json', 'main', 'index.js');\n...\n```\n\n## Options you can set, and their default values\n\n|Option | Description | Default Value|\n|-------|-------------|--------------|\n|`space`|How many spaces to use when pretty-printing, (0 for no pretty-printing)|`2`|\n|`default`|Catch-all default value for missing values, bad JSON, and files that can't be read|`undefined`|\n|`jsonParseErrorDefault`|The default value for when a file is read but it doesn't contain valid JSON|`undefined`|\n|`cantReadFileDefault`|The default value for when a file can't be read|`undefined`|\n\n* Note that if defaults are `undefined`, then an `Error` will be thrown instead of `undefined` being returned\n\n## Methods\n\n#### .readAsync([options])\n\nReturns the parse of the whole file as an object\n\n#### .getAsync(key, [default-value], [options])\n\nReturns a single value from a JSON file, using lodash's `_.get` to query the whole object.\n\nSee https://lodash.com/docs#get\n\n#### .writeAsync(data, [options])\n\nWrites out the given data to the file\n\n#### .setAsync(key, val, [options])\n\nUpdates the file, inserting or updating the value for `<key>` with `<val>`\n\n#### .mergeAsync(sources, [options])\n\nMerges the values in `<sources>` into the object currently encoded in the file.\n\n#### .deleteKeyAsync(key, [options])\n\nDeletes a single key from the top level of the file.\n\n## Functions\n\nThe functions available all mirror the methods above but take `file` (filename as a string) as their first argument.\n",
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/expo/json-file.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "jest --no-cache"
|
||
|
},
|
||
|
"version": "5.3.0"
|
||
|
}
|