Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-strings-in-object

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-strings-in-object - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

dist/index.d.ts

54

example/example.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc