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

rdf-object

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdf-object - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

6

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
<a name="v1.7.0"></a>
## [v1.7.0](https://github.com/rubensworks/rdf-object.js/compare/v1.6.0...v1.7.0) - 2020-11-25
### Added
* [Handle compacted terms in createCompactedResource](https://github.com/rubensworks/rdf-object.js/commit/21e73deefa9e531d9c278df3dd78994bca53b09d)
<a name="v1.6.0"></a>

@@ -5,0 +11,0 @@ ## [v1.6.0](https://github.com/rubensworks/rdf-object.js/compare/v1.5.0...v1.6.0) - 2020-11-24

21

lib/RdfObjectLoader.js

@@ -57,2 +57,6 @@ "use strict";

if (typeof hash !== 'object') {
hash = this.contextResolved.expandTerm(hash);
if (!hash) {
return this.getOrMakeResource(this.dataFactory.blankNode());
}
return this.getOrMakeResource(rdf_string_1.stringToTerm(hash, this.dataFactory));

@@ -65,5 +69,16 @@ }

// Create resource for named node term by @id value, or blank node
const resource = this.getOrMakeResource(hash['@id'] ?
this.dataFactory.namedNode(hash['@id']) :
this.dataFactory.blankNode());
let term;
if (hash['@id']) {
const expandedId = this.contextResolved.expandTerm(hash['@id']);
if (expandedId) {
term = this.dataFactory.namedNode(expandedId);
}
else {
term = this.dataFactory.blankNode();
}
}
else {
term = this.dataFactory.blankNode();
}
const resource = this.getOrMakeResource(term);
// Iterate over all entries in the hash

@@ -70,0 +85,0 @@ for (const [key, value] of Object.entries(hash)) {

2

package.json
{
"name": "rdf-object",
"version": "1.6.0",
"version": "1.7.0",
"description": "Loads RDF as JSON objects",

@@ -5,0 +5,0 @@ "keywords": [

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