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

foliage

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foliage - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

src/__tests__/equality.test.js

10

CHANGELOG.md
# Changelog
## 0.7.0
- Added `is` method for some sugar around equality checks
```
Uglified : 2.18kb
Gzipped : 0.89kb
```
## 0.6.0
- Makes better use of internal methods to reduce file size

@@ -7,0 +15,0 @@ - Dissoc no longer automatically prunes empty objects

2

dist/Foliage.js

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

module.exports=function(t){function r(e){if(n[e])return n[e].exports;var i=n[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){function e(t){this._path=[],this._root=this,this._state=t}var i=n(4),o=n(5),u=n(2);e.prototype={getPath:function(t){return t?this._path.concat(t):this._path},commit:function(t){this._root._state=t},get:function(t){return Object.create(this,{_path:{value:this.getPath(t)}})},set:function(t,r){1===arguments.length&&(r=arguments[0],t=void 0),this.commit(i(this._state,this.getPath(t),r))},remove:function(t){this.commit(o(this._state,this.getPath(t)))},fetch:function(t,r){var n=this.get(t).valueOf();return void 0===n?r:n},keys:function(){return Object.keys(this.valueOf()||{})},values:function(){return this.keys().map(this.fetch,this)},valueOf:function(){return u(this._state,this.getPath())},toJSON:function(){return this.valueOf()},toArray:function(){return this.values()},find:function(){return this.filter.apply(this,arguments)[0]}};var s=["map","reduce","filter","forEach"];s.forEach(function(t){e.prototype[t]=function(){var r;return(r=this.toArray())[t].apply(r,arguments)}}),t.exports=e},function(t,r,n){t.exports=function(t){if(Array.isArray(t))return t.slice();var r={};for(var n in t)r[n]=t[n];return r}},function(t,r,n){var e=n(3);t.exports=function(t,r){for(var n=!0;n;){u=s=void 0,n=!1;var i=t,o=r,u=o[0],s=o.slice(1);if(!u)return i;if(e(i,o)===!1)return void 0;if(!s.length)return i[u];t=i[u],r=s,n=!0}}},function(t,r,n){t.exports=function(t,r){var n=!0;t:for(;n;){o=u=s=a=void 0,n=!1;var e=t,i=r,o=i[0],u=i.slice(1),s=void 0!==e,a=s&&o in e;if(u.length){if(a){t=e[o],r=u,n=!0;continue t}return!1}return a}}},function(t,r,n){var e=n(1),i=n(2);t.exports=function o(t,r,n){if(i(t,r)===n)return t;var u=r[0],s=r.slice(1),a=e(t);return s.length?a[u]=o(u in a?a[u]:{},s,n):a[u]=n,a}},function(t,r,n){var e=n(1),i=n(3);t.exports=function o(t,r){if(i(t,r)===!1)return t;var n=r[0],u=r.slice(1),s=e(t);return u.length?s[n]=o(t[n],u):delete s[n],s}}]);
module.exports=function(t){function r(e){if(n[e])return n[e].exports;var i=n[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){function e(t){this._path=[],this._root=this,this._state=t}var i=n(4),o=n(5),u=n(2);e.prototype={getPath:function(t){return t?this._path.concat(t):this._path},commit:function(t){this._root._state=t},get:function(t){return Object.create(this,{_path:{value:this.getPath(t)}})},set:function(t,r){1===arguments.length&&(r=arguments[0],t=void 0),this.commit(i(this._state,this.getPath(t),r))},remove:function(t){this.commit(o(this._state,this.getPath(t)))},fetch:function(t,r){var n=this.get(t).valueOf();return void 0===n?r:n},keys:function(){return Object.keys(this.valueOf()||{})},values:function(){return this.keys().map(this.fetch,this)},valueOf:function(){return u(this._state,this.getPath())},toJSON:function(){return this.valueOf()},toArray:function(){return this.values()},is:function(t){return t.valueOf()==this.valueOf()},find:function(){return this.filter.apply(this,arguments)[0]}};var s=["map","reduce","filter","forEach"];s.forEach(function(t){e.prototype[t]=function(){var r;return(r=this.toArray())[t].apply(r,arguments)}}),t.exports=e},function(t,r,n){t.exports=function(t){if(Array.isArray(t))return t.slice();var r={};for(var n in t)r[n]=t[n];return r}},function(t,r,n){var e=n(3);t.exports=function(t,r){for(var n=!0;n;){u=s=void 0,n=!1;var i=t,o=r,u=o[0],s=o.slice(1);if(!u)return i;if(e(i,o)===!1)return void 0;if(!s.length)return i[u];t=i[u],r=s,n=!0}}},function(t,r,n){t.exports=function(t,r){var n=!0;t:for(;n;){o=u=s=a=void 0,n=!1;var e=t,i=r,o=i[0],u=i.slice(1),s=void 0!==e,a=s&&o in e;if(u.length){if(a){t=e[o],r=u,n=!0;continue t}return!1}return a}}},function(t,r,n){var e=n(1),i=n(2);t.exports=function o(t,r,n){if(i(t,r)===n)return t;var u=r[0],s=r.slice(1),a=e(t);return s.length?a[u]=o(u in a?a[u]:{},s,n):a[u]=n,a}},function(t,r,n){var e=n(1),i=n(3);t.exports=function o(t,r){if(i(t,r)===!1)return t;var n=r[0],u=r.slice(1),s=e(t);return u.length?s[n]=o(t[n],u):delete s[n],s}}]);
//# sourceMappingURL=Foliage.js.map
{
"name": "foliage",
"version": "0.6.0",
"version": "0.7.0",
"description": "A cursor like tree data structure.",

@@ -5,0 +5,0 @@ "main": "dist/Foliage.js",

@@ -69,2 +69,6 @@ /**

is(branch) {
return branch.valueOf() == this.valueOf()
},
find() {

@@ -71,0 +75,0 @@ return this.filter(...arguments)[0]

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