sparqljson-to-tree
Advanced tools
Comparing version 2.0.0 to 2.1.0
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
<a name="v2.1.0"></a> | ||
## [v2.1.0](https://github.com/rubensworks/sparqljson-to-tree.js/compare/v1.3.0...v2.1.0) - 2020-09-16 | ||
### Changed | ||
* [Migrate to rdf-data-factory and @types/rdf-js 4.x](https://github.com/rubensworks/sparqljson-to-tree.js/commit/98d02bf6973dedaae0837f7e641838cce13a8936) | ||
<a name="v2.0.0"></a> | ||
@@ -5,0 +11,0 @@ ## [v2.0.0](https://github.com/rubensworks/sparqljson-to-tree.js/compare/v1.3.0...v2.0.0) - 2019-06-13 |
15
index.js
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./lib/Converter")); | ||
__exportStar(require("./lib/Converter"), exports); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Converter = void 0; | ||
const rdf_literal_1 = require("rdf-literal"); | ||
@@ -88,4 +89,4 @@ const sparqljson_parse_1 = require("sparqljson-parse"); | ||
let valid = false; | ||
for (let i = 0; i < tree1.length; i++) { | ||
const mergedElement = Converter.mergeTrees(tree1[i], tree2[0]); | ||
for (const tree1Element of tree1) { | ||
const mergedElement = Converter.mergeTrees(tree1Element, tree2[0]); | ||
if (mergedElement.valid) { | ||
@@ -96,3 +97,3 @@ valid = true; | ||
else { | ||
merged.push(tree1[i]); | ||
merged.push(tree1Element); | ||
} | ||
@@ -99,0 +100,0 @@ } |
{ | ||
"name": "sparqljson-to-tree", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Converts SPARQL JSON results to a tree-based structure", | ||
@@ -33,13 +33,13 @@ "keywords": [ | ||
"devDependencies": { | ||
"@rdfjs/data-model": "^1.1.1", | ||
"@types/jest": "^24.0.1", | ||
"@types/jest": "^26.0.0", | ||
"@types/minimist": "^1.2.0", | ||
"coveralls": "^3.0.0", | ||
"jest": "^24.3.0", | ||
"jest": "^26.0.0", | ||
"manual-git-changelog": "^1.0.0", | ||
"pre-commit": "^1.2.2", | ||
"ts-jest": "^24.0.0", | ||
"tslint": "^5.8.0", | ||
"rdf-data-factory": "^1.0.2", | ||
"ts-jest": "^26.0.0", | ||
"tslint": "^6.0.0", | ||
"tslint-eslint-rules": "^5.3.1", | ||
"typescript": "^3.0.3" | ||
"typescript": "^4.0.2" | ||
}, | ||
@@ -75,5 +75,5 @@ "jest": { | ||
"dependencies": { | ||
"rdf-literal": "^1.0.0", | ||
"sparqljson-parse": "^1.5.0" | ||
"rdf-literal": "^1.2.0", | ||
"sparqljson-parse": "^1.6.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # SPARQL-Results+JSON to tree | ||
[![Coverage Status](https://coveralls.io/repos/github/rubensworks/sparqljson-to-tree.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/sparqljson-to-tree.js?branch=master) | ||
[![npm version](https://badge.fury.io/js/sparqljson-to-tree.svg)](https://www.npmjs.com/package/sparqljson-to-tree) [![Greenkeeper badge](https://badges.greenkeeper.io/rubensworks/sparqljson-to-tree.js.svg)](https://greenkeeper.io/) | ||
[![npm version](https://badge.fury.io/js/sparqljson-to-tree.svg)](https://www.npmjs.com/package/sparqljson-to-tree) | ||
@@ -80,2 +80,3 @@ A utility package that allows you to convert [SPARQL JSON](https://www.w3.org/TR/sparql11-results-json/) results to a tree-based structure. | ||
const schema = { singularizeVariables: { | ||
'': true, // So we have an object as root instead of an array | ||
books: false, | ||
@@ -82,0 +83,0 @@ books_name: true, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19267
285
103
Updatedrdf-literal@^1.2.0
Updatedsparqljson-parse@^1.6.0