parse-strings-in-object
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -1,37 +0,17 @@ | ||
let before = { | ||
topLevel: true, | ||
topNumber: 1, | ||
foo: { | ||
active: 'true', | ||
number: '0', | ||
anotherNumber: '3.17', | ||
}, | ||
bar: { | ||
active: 'false', | ||
number: '10', | ||
aString: 'yo', | ||
subSub: { | ||
thisIsTrue: 'true', | ||
thisIsFalse: 'false', | ||
thisIsNumber: '0.00006' | ||
} | ||
}, | ||
justAString: 'hello', | ||
ipAddress: '192.168.1.101', | ||
listOfNumbers: ['0', '1', '2'], | ||
listOfObjects: [ | ||
{ | ||
id: 0, | ||
value: 'hello' | ||
}, | ||
{ | ||
id: 1, | ||
value: 'world' | ||
} | ||
] | ||
} | ||
let after = require('../lib/index.js')(before); | ||
console.log('before:', before); | ||
console.log('after:\n', JSON.stringify(after, null, 4)); | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
exports.__esModule = true; | ||
var dist_1 = __importDefault(require("../dist")); | ||
var input = { | ||
aNumber: "1.0", | ||
aString: "hello" | ||
}; | ||
var expectedResult = { | ||
aNumber: 1.0, | ||
aString: "hello" | ||
}; | ||
var result = dist_1["default"](input); | ||
console.log("input:", input); | ||
console.log("result:", result); |
{ | ||
"name": "parse-strings-in-object", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Convert string values in object to boolean and numbers", | ||
"keywords": ["json", "parser", "types", "configuration", "utilities", "strings", "objects"], | ||
"keywords": [ | ||
"json", | ||
"parser", | ||
"types", | ||
"configuration", | ||
"utilities", | ||
"strings", | ||
"objects" | ||
], | ||
"repository": "https://github.com/anselanza/parse-strings-in-object", | ||
"main": "lib/index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "npx mocha test/tests.js --watch" | ||
"prepare": "npm run clean && npm run build", | ||
"clean": "shx rm -rf dist", | ||
"build": "npx tsc && npm run test", | ||
"test": "npx jest" | ||
}, | ||
@@ -14,5 +25,11 @@ "author": "Stephen Buchanan", | ||
"devDependencies": { | ||
"mocha": "^5.0.1", | ||
"chai": "^4.1.2" | ||
"@types/jest": "^24.0.23", | ||
"jest": "^24.9.0", | ||
"prettier": "^1.19.1", | ||
"shx": "^0.3.2", | ||
"ts-jest": "^24.2.0", | ||
"tslint": "^5.20.1", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.7.3" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
28399
14
516
8
1