Socket
Socket
Sign inDemoInstall

@discoveryjs/json-ext

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discoveryjs/json-ext - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

src/browser-method-is-not-supported.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 0.3.2 (2020-10-26)
- Added missed file for build purposes
## 0.3.1 (2020-10-26)

@@ -2,0 +6,0 @@

4

dist/json-ext.js

@@ -8,3 +8,3 @@ (function (global, factory) {

var name = "@discoveryjs/json-ext";
var version = "0.3.1";
var version = "0.3.2";
var description = "A set of utilities that extend the use of JSON";

@@ -25,3 +25,3 @@ var keywords = [

var browser = {
"./src/stringify-stream.js": "./browser-method-is-not-supported.js"
"./src/stringify-stream.js": "./src/browser-method-is-not-supported.js"
};

@@ -28,0 +28,0 @@ var scripts = {

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jsonExt=t()}(this,(function(){"use strict";function e(e){return"function"==typeof e.pipe&&"function"==typeof e._read&&"object"==typeof e._readableState&&null!==e._readableState}var t={escapableCharCodeSubstitution:{8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"},isLeadingSurrogate:function(e){return e>=55296&&e<=56319},isTrailingSurrogate:function(e){return e>=56320&&e<=57343},type:{PRIMITIVE:1,PROMISE:4,ARRAY:3,OBJECT:2,STRING_STREAM:5,OBJECT_STREAM:6},isReadableStream:e,replaceValue:function(e,t,n,r){switch(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),null!==r&&(n=r.call(e,String(t),n)),typeof n){case"function":case"symbol":n=void 0;break;case"object":if(null!==n){const e=n.constructor;e!==String&&e!==Number&&e!==Boolean||(n=n.valueOf())}}return n},getTypeNative:function(e){return null===e||"object"!=typeof e?1:Array.isArray(e)?3:2},getTypeAsync:function(t){return null===t||"object"!=typeof t?1:"function"==typeof t.then?4:e(t)?t._readableState.objectMode?6:5:Array.isArray(t)?3:2},normalizeReplacer:function(e){if("function"==typeof e)return e;if(Array.isArray(e)){const t=new Set(e.map((e=>"string"==typeof e||"number"==typeof e?String(e):null)).filter((e=>"string"==typeof e)));return t.add(""),(e,n)=>t.has(e)?n:void 0}return null},normalizeSpace:function(e){return"number"==typeof e?!(!Number.isFinite(e)||e<1)&&" ".repeat(Math.min(e,10)):"string"==typeof e&&e.slice(0,10)||!1}};const{normalizeReplacer:n,normalizeSpace:r,replaceValue:i,getTypeNative:o,getTypeAsync:a,isLeadingSurrogate:s,isTrailingSurrogate:c,escapableCharCodeSubstitution:u,type:{PRIMITIVE:l,OBJECT:f,ARRAY:d,PROMISE:p,STRING_STREAM:y,OBJECT_STREAM:g}}=t,h=Array.from({length:2048}).map(((e,t)=>u.hasOwnProperty(t)?2:t<32?6:t<128?1:2));function b(e){let t=0,n=!1;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i<2048)t+=h[i];else{if(s(i)){t+=6,n=!0;continue}c(i)?t=n?t-2:t+6:t+=3}n=!1}return t+2}return{version:"0.3.1",stringifyInfo:function(e,t,s,c){t=n(t),s=function(e){return"string"==typeof(e=r(e))?e.length:0}(s),c=c||{};const u=new Map,h=new Set,S=new Set,m=new Set,T=new Set,A=c.async?a:o,w={"":e};let R=!1,E=0;return function e(n,r){if(R)return;r=i(this,n,r,t);let o=A(r);if(o!==l&&h.has(r))return m.add(r),E+=4,void(c.continueOnCircular||(R=!0));switch(o){case l:void 0!==r||Array.isArray(this)?E+=function(e){switch(typeof e){case"string":return b(e);case"number":return Number.isFinite(e)?String(e).length:4;case"boolean":return e?4:5;case"undefined":case"object":return 4;default:throw new TypeError("Do not know how to serialize a "+typeof e)}}(r):this===w&&(E+=9);break;case f:{if(u.has(r)){S.add(r),E+=u.get(r);break}const t=E;let n=0;E+=2,h.add(r);for(const t in r)if(hasOwnProperty.call(r,t)){const i=E;e.call(r,t,r[t]),i!==E&&(E+=b(t)+1,n++)}n>1&&(E+=n-1),h.delete(r),s>0&&n>0&&(E+=(1+(h.size+1)*s+1)*n,E+=1+h.size*s),u.set(r,E-t);break}case d:{if(u.has(r)){S.add(r),E+=u.get(r);break}const t=E;E+=2,h.add(r);for(let t=0;t<r.length;t++)e.call(r,String(t),r[t]);r.length>1&&(E+=r.length-1),h.delete(r),s>0&&r.length>0&&(E+=(1+(h.size+1)*s)*r.length,E+=1+h.size*s),u.set(r,E-t);break}case p:case y:T.add(r);break;case g:E+=2,T.add(r)}}.call(w,"",e),{minLength:isNaN(E)?1/0:E,circular:[...m],duplicate:[...S],async:[...T]}},stringifyStream:()=>{throw new Error("Method is not supported")}}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jsonExt=t()}(this,(function(){"use strict";function e(e){return"function"==typeof e.pipe&&"function"==typeof e._read&&"object"==typeof e._readableState&&null!==e._readableState}var t={escapableCharCodeSubstitution:{8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"},isLeadingSurrogate:function(e){return e>=55296&&e<=56319},isTrailingSurrogate:function(e){return e>=56320&&e<=57343},type:{PRIMITIVE:1,PROMISE:4,ARRAY:3,OBJECT:2,STRING_STREAM:5,OBJECT_STREAM:6},isReadableStream:e,replaceValue:function(e,t,n,r){switch(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),null!==r&&(n=r.call(e,String(t),n)),typeof n){case"function":case"symbol":n=void 0;break;case"object":if(null!==n){const e=n.constructor;e!==String&&e!==Number&&e!==Boolean||(n=n.valueOf())}}return n},getTypeNative:function(e){return null===e||"object"!=typeof e?1:Array.isArray(e)?3:2},getTypeAsync:function(t){return null===t||"object"!=typeof t?1:"function"==typeof t.then?4:e(t)?t._readableState.objectMode?6:5:Array.isArray(t)?3:2},normalizeReplacer:function(e){if("function"==typeof e)return e;if(Array.isArray(e)){const t=new Set(e.map((e=>"string"==typeof e||"number"==typeof e?String(e):null)).filter((e=>"string"==typeof e)));return t.add(""),(e,n)=>t.has(e)?n:void 0}return null},normalizeSpace:function(e){return"number"==typeof e?!(!Number.isFinite(e)||e<1)&&" ".repeat(Math.min(e,10)):"string"==typeof e&&e.slice(0,10)||!1}};const{normalizeReplacer:n,normalizeSpace:r,replaceValue:i,getTypeNative:o,getTypeAsync:a,isLeadingSurrogate:s,isTrailingSurrogate:c,escapableCharCodeSubstitution:u,type:{PRIMITIVE:l,OBJECT:f,ARRAY:d,PROMISE:p,STRING_STREAM:y,OBJECT_STREAM:g}}=t,h=Array.from({length:2048}).map(((e,t)=>u.hasOwnProperty(t)?2:t<32?6:t<128?1:2));function b(e){let t=0,n=!1;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i<2048)t+=h[i];else{if(s(i)){t+=6,n=!0;continue}c(i)?t=n?t-2:t+6:t+=3}n=!1}return t+2}return{version:"0.3.2",stringifyInfo:function(e,t,s,c){t=n(t),s=function(e){return"string"==typeof(e=r(e))?e.length:0}(s),c=c||{};const u=new Map,h=new Set,S=new Set,m=new Set,T=new Set,A=c.async?a:o,w={"":e};let R=!1,E=0;return function e(n,r){if(R)return;r=i(this,n,r,t);let o=A(r);if(o!==l&&h.has(r))return m.add(r),E+=4,void(c.continueOnCircular||(R=!0));switch(o){case l:void 0!==r||Array.isArray(this)?E+=function(e){switch(typeof e){case"string":return b(e);case"number":return Number.isFinite(e)?String(e).length:4;case"boolean":return e?4:5;case"undefined":case"object":return 4;default:throw new TypeError("Do not know how to serialize a "+typeof e)}}(r):this===w&&(E+=9);break;case f:{if(u.has(r)){S.add(r),E+=u.get(r);break}const t=E;let n=0;E+=2,h.add(r);for(const t in r)if(hasOwnProperty.call(r,t)){const i=E;e.call(r,t,r[t]),i!==E&&(E+=b(t)+1,n++)}n>1&&(E+=n-1),h.delete(r),s>0&&n>0&&(E+=(1+(h.size+1)*s+1)*n,E+=1+h.size*s),u.set(r,E-t);break}case d:{if(u.has(r)){S.add(r),E+=u.get(r);break}const t=E;E+=2,h.add(r);for(let t=0;t<r.length;t++)e.call(r,String(t),r[t]);r.length>1&&(E+=r.length-1),h.delete(r),s>0&&r.length>0&&(E+=(1+(h.size+1)*s)*r.length,E+=1+h.size*s),u.set(r,E-t);break}case p:case y:T.add(r);break;case g:E+=2,T.add(r)}}.call(w,"",e),{minLength:isNaN(E)?1/0:E,circular:[...m],duplicate:[...S],async:[...T]}},stringifyStream:()=>{throw new Error("Method is not supported")}}}));
{
"name": "@discoveryjs/json-ext",
"version": "0.3.1",
"version": "0.3.2",
"description": "A set of utilities that extend the use of JSON",

@@ -19,3 +19,3 @@ "keywords": [

"browser": {
"./src/stringify-stream.js": "./browser-method-is-not-supported.js"
"./src/stringify-stream.js": "./src/browser-method-is-not-supported.js"
},

@@ -22,0 +22,0 @@ "scripts": {

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