jsonschema-key-compression
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -80,3 +80,3 @@ /** | ||
if (query.sort) { | ||
ret.sort = query.sort.map(item => { | ||
ret.sort = query.sort.map((item) => { | ||
if (typeof item === 'string') { | ||
@@ -83,0 +83,0 @@ const hasMinus = item.startsWith('-'); |
{ | ||
"name": "jsonschema-key-compression", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Compress json-data based on it's json-schema", | ||
@@ -5,0 +5,0 @@ "author": "pubkey", |
@@ -22,3 +22,3 @@ import { | ||
// object | ||
const ret = {}; | ||
const ret: PlainJsonObject = {}; | ||
Object.keys(obj).forEach(key => { | ||
@@ -126,3 +126,3 @@ const compressedKey = compressedAndFlaggedKey( | ||
if (query.sort) { | ||
ret.sort = (query.sort as any).map(item => { | ||
ret.sort = (query.sort as any[]).map((item: string | any) => { | ||
if (typeof item === 'string') { | ||
@@ -164,3 +164,3 @@ const hasMinus = item.startsWith('-'); | ||
} else if (typeof selector === 'object' && selector !== null) { | ||
const ret = {}; | ||
const ret: any = {}; | ||
Object.keys(selector).forEach(key => { | ||
@@ -167,0 +167,0 @@ let useKey; |
@@ -16,3 +16,3 @@ import { | ||
// object | ||
const ret = {}; | ||
const ret: PlainJsonObject = {}; | ||
Object.keys(obj).forEach(key => { | ||
@@ -19,0 +19,0 @@ const decompressed = decompressedKey( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70361
34
1047