Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/fast-stable-stringify

Package Overview
Dependencies
Maintainers
15
Versions
744
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/fast-stable-stringify - npm Package Compare versions

Comparing version 2.0.0-preview.2 to 2.0.0-preview.2.20240417112348.42e80e05b94e649b7921049b531abab2bf637347

dist/types/index.d.ts

2

dist/index.browser.js

@@ -22,3 +22,3 @@ // src/index.ts

return null;
} else if (val.toJSON && typeof val.toJSON === "function") {
} else if ("toJSON" in val && typeof val.toJSON === "function") {
return stringify(val.toJSON(), isArrayProp);

@@ -25,0 +25,0 @@ } else {

@@ -22,3 +22,3 @@ // src/index.ts

return null;
} else if (val.toJSON && typeof val.toJSON === "function") {
} else if ("toJSON" in val && typeof val.toJSON === "function") {
return stringify(val.toJSON(), isArrayProp);

@@ -25,0 +25,0 @@ } else {

@@ -22,3 +22,3 @@ // src/index.ts

return null;
} else if (val.toJSON && typeof val.toJSON === "function") {
} else if ("toJSON" in val && typeof val.toJSON === "function") {
return stringify(val.toJSON(), isArrayProp);

@@ -25,0 +25,0 @@ } else {

{
"name": "@solana/fast-stable-stringify",
"version": "2.0.0-preview.2",
"version": "2.0.0-preview.2.20240417112348.42e80e05b94e649b7921049b531abab2bf637347",
"description": "Deterministic stringification for when performance and bundle size matters",

@@ -61,2 +61,4 @@ "exports": {

"compile:js": "tsup --config build-scripts/tsup.config.package.ts",
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node ../../node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
"dev": "jest -c ../../node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
"publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag ${PUBLISH_TAG:-preview} --access public --no-git-checks",

@@ -70,5 +72,6 @@ "publish-packages": "pnpm prepublishOnly && pnpm publish-impl",

"test:treeshakability:node": "agadoo dist/index.node.js",
"test:unit:browser": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.browser.ts --globalSetup @solana/test-config/test-validator-setup.js --globalTeardown @solana/test-config/test-validator-teardown.js --rootDir . --silent",
"test:unit:node": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.node.ts --globalSetup @solana/test-config/test-validator-setup.js --globalTeardown @solana/test-config/test-validator-teardown.js --rootDir . --silent"
"test:typecheck": "tsc --noEmit",
"test:unit:browser": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
"test:unit:node": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
}
}

@@ -10,3 +10,3 @@ # fast-stable-stringify

```javascript
var stringify = require('fast-stable-stringify');
import stringify from '@solana/fast-stable-stringify';
stringify({ d: 0, c: 1, a: 2, b: 3, e: 4 }); // '{"a":2,"b":3,"c":1,"d":0,"e":4}'

@@ -17,12 +17,11 @@ ```

* handle all variations of all basic javascript values (number, string, boolean, array, object, null, Date, BigInt)
* handle undefined _and_ function in the same way as `JSON.stringify`
* **not support ie8 (and below) with complete certainty**.
- handle all variations of all basic javascript values (number, string, boolean, array, object, null, Date, BigInt)
- handle undefined _and_ function in the same way as `JSON.stringify`
- **not support ie8 (and below) with complete certainty**.
Unlike substack's, it does:
* not implement the 'replacer' or 'space' arguments of the JSON.stringify method
* not check for circular references
- not implement the 'replacer' or 'space' arguments of the JSON.stringify method
- not check for circular references
## Running tests

@@ -32,3 +31,3 @@

npm run test:unit:browser
npm run test:unit:node
```
npm run test:unit:node
```

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

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

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