edit-json-file
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -29,2 +29,3 @@ "use strict"; | ||
* - `stringify_eol` (Boolean): Wheter to add the new line at the end of the file or not (default: `false`) | ||
* - `ignore_dots` (Boolean): Wheter to use the path including dots or have an object structure (default: `false`) | ||
* - `autosave` (Boolean): Save the file when setting some data in it. | ||
@@ -41,2 +42,3 @@ * | ||
options.stringify_eol = options.stringify_eol || false; | ||
options.ignore_dots = options.ignore_dots || false; | ||
this.path = path; | ||
@@ -67,2 +69,4 @@ this.data = this.read(); | ||
}); | ||
} else if (this.options.ignore_dots) { | ||
this.data[path] = value; | ||
} else { | ||
@@ -91,2 +95,5 @@ setValue(this.data, path, value); | ||
if (path) { | ||
if (this.options.ignore_dots) { | ||
return this.data[path]; | ||
} | ||
return findValue(this.data, path); | ||
@@ -93,0 +100,0 @@ } |
@@ -13,3 +13,3 @@ { | ||
"license": "MIT", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"main": "lib/index.js", | ||
@@ -16,0 +16,0 @@ "scripts": { |
@@ -158,2 +158,3 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. --> | ||
- `stringify_eol` (Boolean): Wheter to add the new line at the end of the file or not (default: `false`) | ||
- `ignore_dots` (Boolean): Wheter to use the path including dots or have an object structure (default: `false`) | ||
- `autosave` (Boolean): Save the file when setting some data in it. | ||
@@ -303,11 +304,11 @@ | ||
- `json-config-ts` | ||
- `@formbird/core` | ||
- `@williarts/williarts-commons` | ||
- `menreiki2` | ||
- `node-file-rev` | ||
- `@wonderland/cli-plugin-new` | ||
- `@wonderland/cli-plugin-serverless` | ||
- `next-nodecms` | ||
- `@neutralinojs/neu` | ||
- `@airbnb/nimbus` | ||
- `json-config-ts` | ||
- `frdl` | ||
@@ -324,9 +325,9 @@ - `gyaon-cli` | ||
- `uiseeds` | ||
- `extracct` | ||
- `blip-lang` | ||
- `returrn` | ||
- `blip-lang` | ||
- `extracct` | ||
- `@malmo/cli` | ||
- `@xploration-tech/xtouch` | ||
- `env-to-now-json` | ||
- `@fanxie/cli` | ||
- `env-to-now-json` | ||
- `@superjs/require-auto` | ||
@@ -356,3 +357,2 @@ - `sisback` | ||
- `@perlatsp/devild` | ||
- `mongoose-auto-api.cli` | ||
- `@kcom/package-tools` | ||
@@ -371,3 +371,2 @@ - `grafpad` | ||
- `cucu-generator` | ||
- `typescript-nestjs-starter` | ||
- `typescript-fastify-starter` | ||
@@ -380,7 +379,5 @@ - `typescript-koa-starter` | ||
- `package-to-local` | ||
- `@postlight/node-typescript-starter-kit` | ||
- `express-react-generator-typescript` | ||
- `react-sgh-scaffolding` | ||
- `striplet` | ||
- `typescript-express-starter` | ||
- `ontrac` | ||
@@ -398,26 +395,41 @@ - `@acanto/october-scripts` | ||
- `@empirica/meteor-deploy` | ||
- `express-generator-typescript` | ||
- `@elastosfoundation/trinity-cli` | ||
- `@acanto/workflow` | ||
- `express-generator-typescript-k8s` | ||
- `@acanto/workflow` | ||
- `@chakra-ui/cli` | ||
- `robinhood-yolo` | ||
- `@neutralinojs/neu` | ||
- `bloggify-tools` | ||
- `create-itk-app` | ||
- `malmo` | ||
- `@hayes0724/shopify-packer` | ||
- `new-express-app` | ||
- `monstro` | ||
- `typescript-vue-starter` | ||
- `@marvinkome/create-node-app` | ||
- `forcemanager-cli` | ||
- `@triptyk/nfw-cli` | ||
- `jollofjs` | ||
- `jollof-cli` | ||
- `bloggify-tools` | ||
- `ootb-express-app` | ||
- `generator-brei-app` | ||
- `tail-react` | ||
- `@wizwarrior/node.ts` | ||
- `typescript-nest-starter` | ||
- `node-file-rev` | ||
- `create-express-template` | ||
- `baelte-cli` | ||
- `nipinit` | ||
- `@postlight/node-typescript-starter-kit` | ||
- `@anyopsos/cli` | ||
- `d-bot-script` | ||
- `modern-project-generator` | ||
- `@teamhive/angular-npm-seed` | ||
- `@triptyk/nfw-cli` | ||
- `typescript-express-starter` | ||
- `@elastosfoundation/trinity-cli` | ||
- `guser` | ||
- `@frdl/frdl` | ||
- `@frdl/legacy-and-deprecations-fallback` | ||
- `@jianghe/sand-cli` | ||
- `jollof-cli` | ||
- `jollofjs` | ||
- `forcemanager-cli` | ||
- `typescript-vue-starter` | ||
- `@grogqli/server` | ||
- `@hayes0724/shopify-packer` | ||
- `@j.u.p.iter/jupiter-scripts` | ||
- `@acanto/laravel-scripts` | ||
- `@rajzik/lumos` | ||
- `express-generator-typescript` | ||
@@ -424,0 +436,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19087
200
459