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

@xliic/preserving-json-yaml-parser

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xliic/preserving-json-yaml-parser - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

3

lib/clone.d.ts

@@ -1,1 +0,2 @@

export declare function simpleClone<T>(orig: T, replacer?: (value: unknown) => unknown): T;
import { Path } from "./types";
export declare function simpleClone<T>(orig: T, replacer?: (value: unknown, location: Path) => unknown): T;

@@ -12,5 +12,7 @@ "use strict";

let container = {};
let location = [];
const stack = [container];
(0, object_1.visitObject)(undefined, "fakeroot", orig, {
onObjectStart: (parent, key, value) => {
location.push(key);
stack.push(container);

@@ -21,5 +23,7 @@ container = container[key] = {};

onObjectEnd: () => {
location.pop();
container = stack.pop();
},
onArrayStart: (parent, key, value) => {
location.push(key);
stack.push(container);

@@ -30,6 +34,7 @@ container = container[key] = [];

onArrayEnd: () => {
location.pop();
container = stack.pop();
},
onValue: (parent, key, value, preserved) => {
container[key] = replacer ? replacer(value) : value;
container[key] = replacer ? replacer(value, [...location.slice(1), key]) : value;
},

@@ -36,0 +41,0 @@ });

{
"name": "@xliic/preserving-json-yaml-parser",
"version": "1.10.0",
"version": "1.11.0",
"description": "YAML/JSON parser and serializer that preserves formatting of the original numerical values (i.e. 1.0 vs 1) and handles integers bigger than MAX_SAFE_INTEGER",

@@ -21,12 +21,12 @@ "main": "lib/index.js",

"devDependencies": {
"@types/jest": "^27.5.1",
"@types/jest": "^29.5.6",
"@types/js-yaml": "^4.0.2",
"@types/node": "^14.14.31",
"jest": "^28.1.0",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"jsonc-parser": "^3.0.0",
"outdent": "^0.8.0",
"ts-jest": "^28.0.3",
"ts-jest": "^29.1.1",
"typescript": "^4.7.2"
}
}
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