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

baobab

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baobab - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

bower.json
{
"name": "baobab",
"main": "build/baobab.min.js",
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/Yomguithereal/baobab",

@@ -6,0 +6,0 @@ "author": {

# Changelog
## v1.1.1
* Updating `emmett` to `v3.0.1`.
* Adding missing setters methods to the tree.
* Fixing `cursor.root` method.
## v1.1.0

@@ -4,0 +10,0 @@

@@ -14,3 +14,3 @@ /**

Object.defineProperty(Baobab, 'version', {
value: '1.1.0'
value: '1.1.1'
});

@@ -17,0 +17,0 @@

{
"name": "baobab",
"version": "1.1.0",
"version": "1.1.1",
"description": "JavaScript persistent data tree with cursors.",
"main": "index.js",
"dependencies": {
"emmett": "^3.0.0"
"emmett": "^3.0.1"
},
"devDependencies": {
"async": "~0.9.0",
"browserify": "^9.0.3",
"async": "^1.2.1",
"benchmark": "^1.0.0",
"browserify": "^10.2.4",
"gulp": "^3.8.10",

@@ -24,5 +25,6 @@ "gulp-header": "^1.2.2",

"scripts": {
"test": "gulp test",
"benchmark": "node benchmark.js",
"build": "gulp build",
"lint": "gulp lint"
"lint": "gulp lint",
"test": "gulp test"
},

@@ -29,0 +31,0 @@ "repository": {

@@ -137,3 +137,3 @@ [![Build Status](https://travis-ci.org/Yomguithereal/baobab.svg)](https://travis-ci.org/Yomguithereal/baobab)

A *baobab* tree can obviously be updated. However, one has to understand that he won't do it, at least by default, synchronously.
A *baobab* tree can obviously be updated. However, one has to understand that the library won't do so, at least by default, synchronously.

@@ -152,3 +152,3 @@ Rather, the tree will stack and merge every update order you give it and will only commit them later on (note that you remain free to force a synchronous update of the tree through `tree.commit` or by tweaking the tree's [options](#options)).

var initialState = tree.get();
tree.set('hello', 'monde'});
tree.set('hello', 'monde');

@@ -269,3 +269,3 @@ // After asynchronous update...

// Nested path
cursor.apply(['one', 'two'], 'orange');
cursor.apply(['one', 'two'], inc);
```

@@ -288,3 +288,3 @@

// Nested path
cursor.chain(['one', 'two'], 'orange');
cursor.chain(['one', 'two'], inc);
```

@@ -303,3 +303,3 @@

// Nested path
cursor.apply(['one', 'two'], {hello: 'world'});
cursor.merge(['one', 'two'], {hello: 'world'});
```

@@ -381,2 +381,13 @@

*select*
Will fire whenever a path is selected in the tree.
```js
tree.on('select', function(e) {
console.log('Path:', e.data.path);
console.log('Resultant cursor:', e.data.cursor);
});
```
##### Cursor level

@@ -433,2 +444,4 @@

var paletteCursor = tree.select('palette');
// Retrieving data

@@ -461,5 +474,5 @@ colorsCursor.get(1);

// Retrieving or selecting data by using the value of another cursor
var currentColorCursor = tree.select('colors', {$cursor: ['currentColor']});
var currentColorCursor = paletteCursor.select('colors', {$cursor: ['palette', 'currentColor']});
var currentColor = tree.get('colors', {$cursor: ['currentColor']});
var currentColor = paletteCursor.get('colors', {$cursor: ['palette', 'currentColor']});

@@ -466,0 +479,0 @@ // Creating a blank tree

@@ -68,3 +68,14 @@ /**

['get', 'set', 'unset', 'update'].forEach(bootstrap.bind(this));
[
'apply',
'chain',
'get',
'merge',
'push',
'set',
'splice',
'unset',
'unshift',
'update'
].forEach(bootstrap.bind(this));

@@ -71,0 +82,0 @@ // Facets

@@ -150,3 +150,3 @@ /**

Cursor.prototype.root = function() {
return this.tree.root();
return this.tree.root;
};

@@ -385,3 +385,3 @@

if (!record)
throw Error('boabab.Cursor.undo: cannot find a relevant record (' + steps + ' back).');
throw Error('baobab.Cursor.undo: cannot find a relevant record (' + steps + ' back).');

@@ -388,0 +388,0 @@ this.undoing = true;

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