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

realistic-structured-clone

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

realistic-structured-clone - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

dist/index.js

26

package.json
{
"name": "realistic-structured-clone",
"version": "1.0.1",
"version": "2.0.0",
"description": "A pure JS implementation of the structured clone algorithm (or at least something pretty close to that)",

@@ -18,17 +18,27 @@ "homepage": "https://github.com/dumbmatter/realistic-structured-clone",

],
"main": "index.js",
"main": "dist/index.js",
"scripts": {
"lint": "eslint index.js test",
"mocha": "mocha --recursive",
"test": "npm run lint && npm run mocha"
"build": "rm -rf dist && mkdir dist && browserify index.js --node -s realisticStructuredClone -t [ babelify --global --presets [ es2015 ] ] | derequire > dist/index.js",
"prepublish": "npm run build",
"test": "npm run build && mocha --recursive"
},
"author": "Jeremy Scheff <jdscheff@gmail.com> (http://dumbmatter.com/)",
"license": "Apache-2.0",
"files": [
"dist"
],
"dependencies": {
"lodash.isplainobject": "^3.0.2"
"core-js": "^2.5.3",
"domexception": "^1.0.1",
"typeson": "^5.8.2",
"typeson-registry": "^1.0.0-alpha.20"
},
"devDependencies": {
"eslint": "^3.9.1",
"mocha": "^2.2.4"
"babel-core": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babelify": "^8.0.0",
"browserify": "^16.1.0",
"derequire": "^2.0.6",
"mocha": "^5.0.1"
}
}

@@ -46,12 +46,10 @@ # Realistic Structured Clone [![Build Status](https://travis-ci.org/dumbmatter/realistic-structured-clone.svg?branch=master)](https://travis-ci.org/dumbmatter/realistic-structured-clone)

However, that won't help you in Node.js/io.js. It's also asynchronous, which could be a problem. `realistic-structured-clone` is synchronous and works everywhere.
However, that won't help you in Node.js. It's also asynchronous, which could be a problem. `realistic-structured-clone` is synchronous and works everywhere.
## Current State
[The spec](http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#internal-structured-cloning-algorithm) says it's supposed to handle FileList, ImageData, and ImageBitmap objects. But none of that is implemented yet, so passing an object containing any of those types of objects will result in an erroneous `DataCloneError`.
As of version 2.0, it should be pretty damn close to the spec! However it is now just a light wrapper around the [Typeson](https://github.com/dfahlander/typeson) structured-cloning-throwing preset.
All other data types should work like described in the spec. Check the tests if you don't believe me, and please create an issue if you find a problem.
## License
Apache 2.0
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