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

fbp-graph

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fbp-graph - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

10

lib/Graph.js

@@ -1043,6 +1043,8 @@ // FBP Graph

exports.loadJSON = function(definition, callback, metadata = {}) {
var caseSensitive, conn, def, graph, group, i, id, j, len, len1, priv, properties, property, pub, ref, ref1, ref2, ref3, ref4, ref5, value;
if (typeof definition === 'string') {
definition = JSON.parse(definition);
exports.loadJSON = function(passedDefinition, callback, metadata = {}) {
var caseSensitive, conn, def, definition, graph, group, i, id, j, len, len1, priv, properties, property, pub, ref, ref1, ref2, ref3, ref4, ref5, value;
if (typeof passedDefinition === 'string') {
definition = JSON.parse(passedDefinition);
} else {
definition = JSON.parse(JSON.stringify(passedDefinition));
}

@@ -1049,0 +1051,0 @@ if (!definition.properties) {

6

lib/Journal.js

@@ -504,5 +504,5 @@ // FBP Graph Journal

// Move backwards, and apply inverse changes
for (r = m = ref3 = this.currentRevision, ref4 = revId + 1; -1 !== 0 && (-1 > 0 ? m <= ref4 : m >= ref4); r = m += -1) {
for (r = m = ref3 = this.currentRevision, ref4 = revId + 1; m >= ref4; r = m += -1) {
entries = this.store.fetchTransaction(r);
for (i = n = ref5 = entries.length - 1; -1 !== 0 && (-1 > 0 ? n <= 0 : n >= 0); i = n += -1) {
for (i = n = ref5 = entries.length - 1; n >= 0; i = n += -1) {
this.executeEntryInversed(entries[i]);

@@ -566,3 +566,3 @@ }

entries = [];
for (r = j = ref = startRev, ref1 = endRev; 1 !== 0 && (1 > 0 ? j < ref1 : j > ref1); r = j += 1) {
for (r = j = ref = startRev, ref1 = endRev; j < ref1; r = j += 1) {
ref2 = this.store.fetchTransaction(r);

@@ -569,0 +569,0 @@ for (l = 0, len = ref2.length; l < len; l++) {

{
"name": "fbp-graph",
"version": "0.3.2",
"version": "0.4.0",
"description": "JavaScript FBP graph library",

@@ -27,5 +27,5 @@ "main": "index.js",

"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"babel-loader": "^8.0.4",
"chai": "^4.0.1",

@@ -39,3 +39,3 @@ "coffee-loader": "^0.9.0",

"grunt-contrib-coffee": "^2.0.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-connect": "^2.0.0",
"grunt-mocha-phantomjs": "^4.0.0",

@@ -46,3 +46,3 @@ "grunt-mocha-test": "^0.13.2",

"mocha": "^5.0.0",
"nyc": "^11.3.0"
"nyc": "^12.0.1"
},

@@ -49,0 +49,0 @@ "dependencies": {

@@ -22,5 +22,11 @@ FBP Graph library for JavaScript [![Build Status](https://travis-ci.org/flowbased/fbp-graph.svg?branch=master)](https://travis-ci.org/flowbased/fbp-graph) [![Greenkeeper badge](https://badges.greenkeeper.io/flowbased/fbp-graph.svg)](https://greenkeeper.io/) [![Coverage Status](https://coveralls.io/repos/github/flowbased/fbp-graph/badge.svg?branch=master)](https://coveralls.io/github/flowbased/fbp-graph?branch=master)

```javascript
var fbpGraph = require('fbp-graph');
fbpGraph.graph.loadFile('some/path.json',{}, function (err, graph) {
const fbpGraph = require('fbp-graph');
fbpGraph.graph.loadFile('some/path.json', {}, (err, graph) => {
// Do something with the graph object
});
```
## Changes
* 0.4.0 (December 7th 2018)
- Original JSON loaded via `loadJSON` no longer gets mutated by the graph instance (thanks @davecarlson)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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