Socket
Socket
Sign inDemoInstall

fast-json-stringify

Package Overview
Dependencies
Maintainers
9
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-json-stringify - npm Package Compare versions

Comparing version 5.0.5 to 5.0.6

2

index.js

@@ -58,3 +58,3 @@ 'use strict'

const schemaId = ref.slice(0, hashIndex) || location.schemaId
const jsonPointer = ref.slice(hashIndex)
const jsonPointer = ref.slice(hashIndex) || '#'

@@ -61,0 +61,0 @@ const schemaRef = schemaId + jsonPointer

{
"name": "fast-json-stringify",
"version": "5.0.5",
"version": "5.0.6",
"description": "Stringify your JSON at max speed",

@@ -36,3 +36,3 @@ "main": "index.js",

"devDependencies": {
"@sinclair/typebox": "^0.23.3",
"@sinclair/typebox": "^0.24.9",
"benchmark": "^2.1.4",

@@ -39,0 +39,0 @@ "cli-select": "^1.1.2",

@@ -1929,1 +1929,28 @@ 'use strict'

})
test('should resolve absolute $refs', (t) => {
t.plan(1)
const externalSchema = {
FooSchema: {
$id: 'FooSchema',
type: 'object',
properties: {
type: {
anyOf: [
{ type: 'string', const: 'bar' },
{ type: 'string', const: 'baz' }
]
}
}
}
}
const schema = { $ref: 'FooSchema' }
const object = { type: 'bar' }
const stringify = build(schema, { schema: externalSchema })
const output = stringify(object)
t.equal(output, JSON.stringify(object))
})
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