New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

graphy

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphy - npm Package Compare versions

Comparing version 0.1.15 to 0.1.16

142

dist/index.js

@@ -292,3 +292,3 @@ /**

// concat prefix name with suffixed iri
return s_best_prefix_name + p_iri.substr(n_longest_prefix_length);
return s_best_prefix_name + ':' + p_iri.substr(n_longest_prefix_length);
}

@@ -311,3 +311,3 @@ };

// prepare a set for all top-level nodes
var a_top_level_nodes = new Set();
var as_top_level_nodes = new Set();

@@ -324,3 +324,3 @@ // create graph map keyed by id of each node

// begin with assumption that all nodes are top level
a_top_level_nodes.add(s_id);
as_top_level_nodes.add(s_id);
});

@@ -356,3 +356,3 @@

// remove that blanknode from top level
a_top_level_nodes['delete'](z_value);
as_top_level_nodes['delete'](z_value);
}

@@ -376,3 +376,3 @@ }

// remove that blanknode from top level
a_top_level_nodes['delete'](z_item);
as_top_level_nodes['delete'](z_item);
}

@@ -395,3 +395,3 @@ }

// remove that blanknode from top level
a_top_level_nodes['delete'](z_item);
as_top_level_nodes['delete'](z_item);
}

@@ -409,3 +409,3 @@ }

// remove that blanknode from top level
a_top_level_nodes['delete'](s_item_id);
as_top_level_nodes['delete'](s_item_id);
}

@@ -415,11 +415,21 @@ }

}
// node is a literal or named thing
else if (z_value['@value'] || z_value['@id']) {}
// node is an iri
else if (z_value['@id']) {
// not a blanknode; ignore
// iri is a blanknode
if (z_value['@id'].startsWith('_:')) {
// node is something else
else {
local.fail('unrecognized object struct for top-level json-ld node value point to by \'' + s_key + '\' key: ' + (0, _arginfo2['default'])(z_value));
// remove that blanknode from top level
as_top_level_nodes['delete'](z_value['@id']);
}
}
// node is a literal
else if (z_value['@value']) {}
// not a blanknode; ignore
// node is something else
else {
local.fail('unrecognized object struct for top-level json-ld node value point to by \'' + s_key + '\' key: ' + (0, _arginfo2['default'])(z_value));
}
}

@@ -439,3 +449,3 @@ // value type is number

// return list of top-level nodes
return Array.from(a_top_level_nodes);
return Array.from(as_top_level_nodes);
};

@@ -638,7 +648,26 @@

$: {
value: function value(s_namespace) {
value: Object.defineProperties(function (s_namespace) {
return cover_iri(h_iri, expand(s_namespace));
}
}, {
short: {
get: function get() {
return shorten(h_iri.iri);
}
}
})
},
// what this is
$is: {
// read-only property 'iri'
value: Object.defineProperties(function () {
return 'iri';
}, {
iri: {
value: true
}
})
},
// set json-ld @id property

@@ -687,2 +716,20 @@ '@id': {

}
},
// what this is
$is: {
// read-only property 'literal'
value: Object.defineProperties(function () {
return 'literal';
}, {
literal: {
value: true
}
})
},
// literal value
'@value': {
value: h_literal.value
}

@@ -760,2 +807,15 @@ };

}
},
// what this is
$is: {
// read-only property 'collection'
value: Object.defineProperties(function () {
return 'collection';
}, {
collection: {
value: true
}
})
}

@@ -824,10 +884,31 @@ };

$: {
//
value: Object.defineProperties(function (s_namespace) {
return network_node(h_node, expand(s_namespace));
}, {
// hide this property when iterating
enumerable: false,
// auto-prefix the iri of this node
short: {
get: function get() {
//
value: function value(s_namespace) {
return network_node(h_node, expand(s_namespace));
}
// only do this for named things
if (!h_node['@id'].startsWith('_:')) {
return shorten(expand(h_node['@id']));
}
}
}
})
},
// what this is
$is: {
// read-only property 'blaknode'
value: Object.defineProperties(function () {
return 'blanknode';
}, {
blanknode: {
value: true
}
})
}

@@ -869,6 +950,2 @@ };

h_properties[s_key] = {
// hide this property when iterating
enumerable: false,
// do not expand iri

@@ -887,6 +964,2 @@ value: s_value

h_properties[s_key] = {
// hide this property when iterating
enumerable: false,
//

@@ -901,6 +974,2 @@ value: p_iri

h_properties['$' + s_key.substr(1)] = {
// hide this property when iterating
enumerable: false,
//

@@ -940,3 +1009,3 @@ value: p_iri.substr(n_namespace_length)

// this predicate/object pair shows when iterating
// show this predicate when iterating
enumerable: true,

@@ -1065,2 +1134,5 @@

};
// shorten an arbitrary iri
operator.shorten = shorten;
}

@@ -1067,0 +1139,0 @@

{
"name": "graphy",
"version": "0.1.15",
"version": "0.1.16",
"description": "Query linked-data graphs by abstracting away traditional JSON-LD interaction",

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

@@ -91,2 +91,22 @@ # graphy [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]

// autp-prefixing an iri
k_banana.$.short; // ns:Banana
k_banana.appears.$.short; // color:Yellow
// type indicators
k_banana.$is(); // 'blanknode'
k_banana.$is.blanknode; // true
// type indicators ..contd'
k_banana.appears.$is(); // 'iri'
k_banana.data.$is(); // 'literal'
k_banana.stages.$is(); // 'collection'
// type indicators ..contd'
k_banana.appears.$is.iri; // true
k_banana.data.$is.literal; // true
k_banana.stages.$is.iri; // undefined
k_banana.stages.$is.literal; // undefined
k_banana.stages.$is.collection; // true
// predicates with multiple objects

@@ -93,0 +113,0 @@ k_banana.alias; // emits warning: 'more than one triple share the same predicate "ns:alias" with subject "ns:Banana"; By using '.alias', you are accessing any one of these triples arbitrarily'

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