Socket
Socket
Sign inDemoInstall

fast-json-stringify

Package Overview
Dependencies
Maintainers
1
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 0.1.1 to 0.2.0

15

index.js

@@ -11,2 +11,3 @@ 'use strict'

${$asNull.toString()}
${$asBoolean.toString()}
`

@@ -27,2 +28,5 @@ var main

break
case 'boolean':
main = $asBoolean.name
break
case 'null':

@@ -49,3 +53,3 @@ main = $asNull.name

function $asNull (i) {
function $asNull () {
return 'null'

@@ -63,2 +67,6 @@ }

function $asBoolean (bool) {
return bool && 'true' || 'false'
}
function $asString (str) {

@@ -175,2 +183,7 @@ if (str instanceof Date) {

break
case 'boolean':
code += `
json += $asBoolean(obj${key})
`
break
case 'object':

@@ -177,0 +190,0 @@ funcName = (name + key).replace(/[-.\[\]]/g, '')

2

package.json
{
"name": "fast-json-stringify",
"version": "0.1.1",
"version": "0.2.0",
"description": "Stringify your JSON at max speed",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,2 +54,12 @@ 'use strict'

buildTest({
title: 'boolean true',
type: 'boolean'
}, true)
buildTest({
title: 'boolean false',
type: 'boolean'
}, false)
buildTest({
title: 'an integer',

@@ -199,1 +209,13 @@ type: 'integer'

})
buildTest({
'title': 'object with boolean',
'type': 'object',
'properties': {
'readonly': {
'type': 'boolean'
}
}
}, {
readonly: true
})
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