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

boxed-immutable

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boxed-immutable - npm Package Compare versions

Comparing version 0.7.0 to 0.7.2

1

index.js

@@ -17,2 +17,3 @@ 'use strict';

createBox: boxed.createBox,
defaultCanBox: boxed.defaultCanBox,
boxState: boxed.boxState,

@@ -19,0 +20,0 @@ boxOut: boxed.boxOut,

2

package.json
{
"name": "boxed-immutable",
"version": "0.7.0",
"version": "0.7.2",
"private": false,

@@ -5,0 +5,0 @@ "description": "Immutable proxy wrapper with exception free access to nested properties and auto-instantiation of intermediate containers when nested properties are defined",

@@ -48,7 +48,9 @@ "use strict";

const customBox = boxedImmutable.createBox({
canBox(value) {
return !(value instanceof UnBoxable);
}
});
// non-pure Array or Object are now not boxed by default
// const customBox = boxedImmutable.createBox({
// canBox(value) {
// return !(value instanceof UnBoxable);
// }
// });
const customBox = boxedImmutable.box;

@@ -55,0 +57,0 @@ describe("unboxable", () => {

@@ -5,2 +5,3 @@ # Version History

- [0.7.2](#072)
- [0.7.0](#070)

@@ -32,2 +33,21 @@ - [0.6.0](#060)

## 0.7.2
* Change: by default only box values which are either non-object like or are pure `Array` or
`Object`. This will store all others by reference. If the properties of particular class are
desired to be persisted then define a custom box with your `canBox` function to test which
values should be boxed.
```javascript
const boxedImmutable = require('boxed-immutable');
const createBox = boxedImmutable.createBox;
const defaultCanBox = boxedImmutable.defaultCanBox;
const _$ = createBox({
canBox(value, prop, collection) {
return value instanceof YourType || defaultCanBox(value);
}
});
```
## 0.7.0

@@ -34,0 +54,0 @@

Sorry, the diff of this file is too big to display

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