fast-json-stringify
Advanced tools
+0
-4
@@ -225,6 +225,2 @@ 'use strict' | ||
| if (options.debugMode) { | ||
| options.mode = 'debug' | ||
| } | ||
| if (options.mode === 'debug') { | ||
@@ -231,0 +227,0 @@ return { |
+1
-1
| { | ||
| "name": "fast-json-stringify", | ||
| "version": "6.4.0", | ||
| "version": "7.0.0", | ||
| "description": "Stringify your JSON at max speed", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,3 +25,3 @@ 'use strict' | ||
| t.plan(5) | ||
| const debugMode = build({ debugMode: true }) | ||
| const debugMode = build({ mode: 'debug' }) | ||
@@ -35,17 +35,5 @@ t.assert.ok(typeof debugMode === 'object') | ||
| test('activate debug mode truthy', t => { | ||
| t.plan(5) | ||
| const debugMode = build({ debugMode: 'yes' }) | ||
| t.assert.ok(typeof debugMode === 'object') | ||
| t.assert.ok(typeof debugMode.code === 'string') | ||
| t.assert.ok(debugMode.ajv instanceof Ajv) | ||
| t.assert.ok(debugMode.validator instanceof Validator) | ||
| t.assert.ok(debugMode.serializer instanceof Serializer) | ||
| }) | ||
| test('to string auto-consistent', t => { | ||
| t.plan(6) | ||
| const debugMode = build({ debugMode: 1 }) | ||
| const debugMode = build({ mode: 'debug' }) | ||
@@ -78,3 +66,3 @@ t.assert.ok(typeof debugMode === 'object') | ||
| } | ||
| }, { debugMode: 1 }) | ||
| }, { mode: 'debug' }) | ||
@@ -108,3 +96,3 @@ t.assert.ok(typeof debugMode === 'object') | ||
| } | ||
| }, { debugMode: 1 }) | ||
| }, { mode: 'debug' }) | ||
@@ -122,3 +110,3 @@ t.assert.ok(typeof debugMode === 'object') | ||
| const debugMode = fjs({ type: 'integer' }, { debugMode: 1, rounding: 'ceil' }) | ||
| const debugMode = fjs({ type: 'integer' }, { mode: 'debug', rounding: 'ceil' }) | ||
| const compiled = fjs.restore(debugMode) | ||
@@ -125,0 +113,0 @@ t.assert.equal(compiled(3.95), 4) |
+0
-12
@@ -166,11 +166,5 @@ import Ajv, { Options as AjvOptions } from 'ajv' | ||
| /** | ||
| * @deprecated | ||
| * Enable debug mode. Please use `mode: "debug"` instead | ||
| */ | ||
| debugMode?: boolean | ||
| /** | ||
| * Running mode of fast-json-stringify | ||
| */ | ||
| mode?: 'debug' | 'standalone' | ||
| /** | ||
@@ -184,3 +178,2 @@ * Large arrays are defined as arrays containing, by default, `20000` | ||
| largeArraySize?: number | string | BigInt | ||
| /** | ||
@@ -205,6 +198,2 @@ * Specify the function on how large Arrays should be stringified. | ||
| interface DeprecateDebugOption extends build.Options { | ||
| debugMode: true | ||
| } | ||
| interface StandaloneOption extends build.Options { | ||
@@ -223,3 +212,2 @@ mode: 'standalone' | ||
| declare function build (schema: build.AnySchema, options: DebugOption): { code: string, ajv: Ajv } | ||
| declare function build (schema: build.AnySchema, options: DeprecateDebugOption): { code: string, ajv: Ajv } | ||
| declare function build (schema: build.AnySchema, options: StandaloneOption): string | ||
@@ -226,0 +214,0 @@ declare function build (schema: build.AnySchema, options?: build.Options): <TDoc = any>(doc: TDoc) => any |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
401375
-0.18%14660
-0.14%