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

jsonschema-key-compression

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonschema-key-compression - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

dist/es/types.d.ts

8

dist/lib/create-compressed-json-schema.js

@@ -24,3 +24,3 @@ "use strict";

if (schema.type === 'array' && schema.items) {
var cloned = util_1.flatClone(schema);
var cloned = (0, util_1.flatClone)(schema);
if (Array.isArray(schema.items)) {

@@ -37,3 +37,3 @@ var newItems = schema.items.map(function (item) { return createCompressedJsonSchema(compressionTable, item); });

else if (schema.type === 'object' && schema.properties) {
var cloned = util_1.flatClone(schema);
var cloned = (0, util_1.flatClone)(schema);
// compress all property names

@@ -43,3 +43,3 @@ var newProperties_1 = {};

var _b = __read(_a, 2), key = _b[0], property = _b[1];
var compressedKey = compress_1.compressedPath(compressionTable, key);
var compressedKey = (0, compress_1.compressedPath)(compressionTable, key);
newProperties_1[compressedKey] = createCompressedJsonSchema(compressionTable, property);

@@ -50,3 +50,3 @@ });

if (cloned.required) {
cloned.required = cloned.required.map(function (key) { return compress_1.compressedPath(compressionTable, key); });
cloned.required = cloned.required.map(function (key) { return (0, compress_1.compressedPath)(compressionTable, key); });
}

@@ -53,0 +53,0 @@ return cloned;

@@ -81,3 +81,3 @@ "use strict";

.forEach(function (k) {
var compressKey = util_1.numberToLetter(lastKeyNumber);
var compressKey = (0, util_1.numberToLetter)(lastKeyNumber);
lastKeyNumber++;

@@ -84,0 +84,0 @@ table.set(k, compressKey);

{
"name": "jsonschema-key-compression",
"version": "1.5.0",
"version": "1.6.0",
"description": "Compress json-data based on its json-schema",

@@ -30,4 +30,4 @@ "author": "pubkey",

"lint:fix": "tslint --project . --fix",
"transpile": "tsc -p ./ && echo '# transpile es5 (require) sucess!'",
"transpile:es": "tsc -p ./ --target ES5 --module ES6 --outDir ./dist/es && echo '# transpile es6 (modules) sucess!'",
"transpile": "tsc -p ./ && copyfiles -u 1 \"src/**/*.d.ts\" dist/lib && echo '# transpile es5 (require) sucess!'",
"transpile:es": "tsc -p ./ --target ES5 --module ES6 --outDir ./dist/es && copyfiles -u 1 \"src/**/*.d.ts\" dist/es && echo '# transpile es6 (modules) sucess!'",
"build": "rimraf -r ./dist && npm run transpile && npm run transpile:es",

@@ -40,16 +40,17 @@ "test": "mocha -r ts-node/register test/unit/index.test.ts",

"devDependencies": {
"@types/faker": "5.5.7",
"@types/faker": "5.5.8",
"@types/mocha": "9.0.0",
"@types/node": "14.17.7",
"@types/node": "14.17.17",
"@types/node-gzip": "1.1.0",
"assert": "2.0.0",
"async-test-util": "1.7.3",
"copyfiles": "2.4.1",
"faker": "5.5.3",
"mocha": "9.0.3",
"mocha": "9.1.1",
"node-gzip": "1.1.2",
"rimraf": "3.0.2",
"ts-node": "10.1.0",
"ts-node": "10.2.1",
"tslint": "6.1.3",
"typescript": "4.3.5"
"typescript": "4.4.3"
}
}

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