Socket
Socket
Sign inDemoInstall

obj-serialize

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 2.0.0

dist/chunk-GLCDNTW3.mjs

63

package.json
{
"name": "obj-serialize",
"version": "1.0.1",
"description": "Simple utility to serialize objects to be passed around to another context.",
"main": "./lib/obj-serialize.cjs",
"version": "2.0.0",
"description": "Simple utility to serialize objects to be passed around to another context. Useful in Next.js Pages Router projects.",
"author": {

@@ -20,2 +19,4 @@ "name": "Igor Klepacki",

"serialization",
"json",
"objects",
"util"

@@ -27,39 +28,43 @@ ],

"homepage": "https://github.com/neg4n/obj-serialize/#readme",
"source": "src/index.ts",
"module": "./lib/obj-serialize.module.js",
"unpkg": "./lib/obj-serialize.umd.js",
"types": "./lib/index.d.ts",
"files": [
"lib"
"README.md",
"dist"
],
"exports": {
".": {
"require": "./dist/serialize.js",
"import": "./dist/serialize.mjs"
},
"./predefined": {
"require": "./dist/predefined.js",
"import": "./dist/predefined.mjs"
}
},
"module": "./dist/serialize.mjs",
"main": "./dist/serialize.js",
"license": "MIT",
"prettier": {
"printWidth": 90,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "all"
},
"scripts": {
"dev": "ts-node src/index.ts",
"prepublishOnly": "npm run build",
"prebuild": "rimraf lib",
"build": "microbundle",
"build:watch": "microbundle watch"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@jest/types": "^29.6.3",
"@types/flat": "^5.0.2",
"@types/node": "^18.7.18",
"microbundle": "^0.15.1",
"jest": "^29.7.0",
"next": "^14.0.4",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1",
"ts-jest": "^29.1.1",
"tsup": "^8.0.1",
"typescript": "^4.8.3"
},
"dependencies": {
"@types/lodash": "^4.14.185",
"flat": "^5.0.2",
"lodash": "^4.17.21"
"flattie": "^1.1.0",
"nestie": "^1.0.3"
},
"scripts": {
"test": "pnpm jest --verbose",
"test:coverage": "pnpm jest --coverage",
"prebuild": "rimraf dist",
"build": "tsup src --dts --minify --format esm,cjs",
"build:watch": "pnpm run build --watch"
}
}
}

@@ -60,3 +60,4 @@ # obj-serialize

> ⛔️ Error: Error serializing `.smallDogs[0].birth` returned from `getServerSideProps` in “/“.
> [!CAUTION]
> Error: Error serializing `.smallDogs[0].birth` returned from `getServerSideProps` in “/“.
> Reason: `object` (“[object Date]”) cannot be serialized as JSON. Please only return JSON serializable data types.

@@ -112,2 +113,3 @@

> [!NOTE]
> ℹ️ There is a special value called `SkipSerialization`. It is a unique token that is intended to be used when serialisation traverse does not meet any condition in your serialisation rules and you just need to skip the process for particular case. It has to be this token and not `null` or `undefined` since these two can also have impact on desired data after the serialization.

@@ -114,0 +116,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc