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.3.3 to 1.3.4

2

dist/index.js

@@ -59,4 +59,4 @@ "use strict";

};
const arrayLikeStringToArray = (s, token = ",") => s.split(token);
const arrayLikeStringToArray = (s, token = ",") => s.split(token).map(element => element.trim());
module.exports = parseKeys;
//# sourceMappingURL=index.js.map

@@ -176,3 +176,17 @@ "use strict";

});
test("array of paths", () => {
const before = { somePaths: "index.ts, ./some-relative-path/some_File.txt, ../../hello.world.txt,one.json,./two.json" };
const result = _1.default(before);
expect(Array.isArray(result.somePaths)).toBeTruthy();
expect(typeof result.somePaths).toBe("object");
expect(result.somePaths.length).toEqual(5);
expect(result).toEqual({ somePaths: [
"index.ts",
"./some-relative-path/some_File.txt",
"../../hello.world.txt",
"one.json",
"./two.json"
] });
});
});
//# sourceMappingURL=index.test.js.map
{
"name": "parse-strings-in-object",
"version": "1.3.3",
"version": "1.3.4",
"description": "Convert string values in object to boolean and numbers",

@@ -5,0 +5,0 @@ "keywords": [

@@ -187,3 +187,19 @@ import parser from "./";

});
test("array of paths", () => {
const before = { somePaths: "index.ts, ./some-relative-path/some_File.txt, ../../hello.world.txt,one.json,./two.json" };
const result = parser(before) as { somePaths: string[] };
expect(Array.isArray(result.somePaths)).toBeTruthy();
expect(typeof result.somePaths).toBe("object");
expect(result.somePaths.length).toEqual(5);
expect(result).toEqual({ somePaths: [
"index.ts",
"./some-relative-path/some_File.txt",
"../../hello.world.txt",
"one.json",
"./two.json"
]})
})
})

@@ -68,4 +68,4 @@ const parseKeys = <T>(obj: object): T =>

const arrayLikeStringToArray = (s: string, token: string = ",") =>
s.split(token);
s.split(token).map(element => element.trim());
export = parseKeys;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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