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.1.1 to 1.2.0

6

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
<a name="v1.2.0"></a>
## [v1.2.0](https://github.com/rubensworks/rdf-object.js/compare/v1.1.0...v1.2.0) - 2020-04-07
### Changed
* [Bump to jsonld-context-parser 2.0.0 with support for JSON-LD 1.1, Closes #22](https://github.com/rubensworks/rdf-object.js/commit/5113bf2266c1d2249e62a19a028d62e65085e65b)
<a name="v1.1.1"></a>

@@ -5,0 +11,0 @@ ## [v1.1.1](https://github.com/rubensworks/rdf-object.js/compare/v1.1.0...v1.1.1) - 2019-02-07

2

lib/RdfListMaterializer.js

@@ -75,6 +75,6 @@ "use strict";

}
exports.RdfListMaterializer = RdfListMaterializer;
RdfListMaterializer.RDF_FIRST = data_model_1.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#first');
RdfListMaterializer.RDF_REST = data_model_1.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#rest');
RdfListMaterializer.RDF_NIL = data_model_1.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#nil');
exports.RdfListMaterializer = RdfListMaterializer;
//# sourceMappingURL=RdfListMaterializer.js.map

@@ -1,2 +0,2 @@

import { IJsonLdContextNormalized, JsonLdContext } from "jsonld-context-parser";
import { JsonLdContextNormalized, JsonLdContext } from "jsonld-context-parser";
import * as RDF from "rdf-js";

@@ -9,3 +9,3 @@ import { Resource } from "./Resource";

readonly normalizeLists: boolean;
readonly context: Promise<IJsonLdContextNormalized>;
readonly context: Promise<JsonLdContextNormalized>;
readonly resources: {

@@ -12,0 +12,0 @@ [term: string]: Resource;

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

@@ -1,2 +0,2 @@

import { IJsonLdContextNormalized } from "jsonld-context-parser";
import { JsonLdContextNormalized } from "jsonld-context-parser";
import * as RDF from "rdf-js";

@@ -24,7 +24,7 @@ /**

*/
readonly type: "NamedNode" | "BlankNode" | "Literal" | "Variable" | "DefaultGraph";
get type(): "NamedNode" | "BlankNode" | "Literal" | "Variable" | "DefaultGraph";
/**
* @return {string} The URI, blank node label, literal value or variable name of this resource.
*/
readonly value: string;
get value(): string;
/**

@@ -56,3 +56,3 @@ * Check if this resource is of the given type.

term: RDF.Term;
context?: IJsonLdContextNormalized;
context?: JsonLdContextNormalized;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsonld_context_parser_1 = require("jsonld-context-parser");
const rdf_string_1 = require("rdf-string");

@@ -14,3 +15,3 @@ const ShortcutPropertyHandler_1 = require("./ShortcutPropertyHandler");

this.propertiesUri = {};
this.properties = new Proxy(this.propertiesUri, new ShortcutPropertyHandler_1.ShortcutPropertyHandler(args.context || {}));
this.properties = new Proxy(this.propertiesUri, new ShortcutPropertyHandler_1.ShortcutPropertyHandler(args.context || new jsonld_context_parser_1.JsonLdContextNormalized({})));
this.property = new Proxy(this.properties, new SingularPropertyHandler_1.SingularPropertyHandler());

@@ -17,0 +18,0 @@ }

@@ -1,2 +0,2 @@

import { IJsonLdContextNormalized } from "jsonld-context-parser";
import { JsonLdContextNormalized } from "jsonld-context-parser";
/**

@@ -10,3 +10,3 @@ * A proxy handler for exposing a URI-to-? map to shortcut-to-? map

private readonly context;
constructor(context: IJsonLdContextNormalized);
constructor(context: JsonLdContextNormalized);
has(target: {

@@ -13,0 +13,0 @@ [predicate: string]: T[];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsonld_context_parser_1 = require("jsonld-context-parser");
/**

@@ -16,6 +15,6 @@ * A proxy handler for exposing a URI-to-? map to shortcut-to-? map

get(target, p) {
return target[jsonld_context_parser_1.ContextParser.expandTerm(this.toTermString(p), this.context, true)] || [];
return target[this.context.expandTerm(this.toTermString(p), true)] || [];
}
set(target, p, value) {
target[jsonld_context_parser_1.ContextParser.expandTerm(this.toTermString(p), this.context, true)] = value;
target[this.context.expandTerm(this.toTermString(p), true)] = value;
return true;

@@ -25,3 +24,3 @@ }

return Object.keys(target)
.map((key) => jsonld_context_parser_1.ContextParser.expandTerm(key, this.context, true))
.map((key) => this.context.expandTerm(key, true))
.filter((key) => this.has(target, key));

@@ -28,0 +27,0 @@ }

{
"name": "rdf-object",
"version": "1.1.1",
"version": "1.2.0",
"description": "Loads RDF as JSON objects",

@@ -34,7 +34,7 @@ "keywords": [

"devDependencies": {
"@types/jest": "^24.0.0",
"@types/n3": "^1.0.4",
"@types/jest": "^25.1.0",
"@types/n3": "^1.1.4",
"arrayify-stream": "^1.0.0",
"coveralls": "^3.0.0",
"jest": "^23.4.1",
"jest": "^25.0.0",
"jest-rdf": "^1.3.0",

@@ -46,4 +46,4 @@ "manual-git-changelog": "^1.0.1",

"streamify-string": "^1.0.1",
"ts-jest": "^23.0.1",
"tslint": "^5.8.0",
"ts-jest": "^25.1.0",
"tslint": "^6.0.0",
"tslint-eslint-rules": "^5.3.1",

@@ -53,3 +53,5 @@ "typescript": "^3.0.1"

"jest": {
"setupTestFrameworkScriptFile": "jest-rdf",
"setupFilesAfterEnv": [
"jest-rdf"
],
"transform": {

@@ -80,4 +82,4 @@ "^.+\\.ts$": "ts-jest"

"dependencies": {
"@rdfjs/data-model": "^1.1.1",
"jsonld-context-parser": "^1.1.0",
"@rdfjs/data-model": "^1.1.2",
"jsonld-context-parser": "^2.0.0",
"rdf-string": "^1.3.1",

@@ -84,0 +86,0 @@ "streamify-array": "^1.0.1"

@@ -5,3 +5,3 @@ # RDF Object

[![Coverage Status](https://coveralls.io/repos/github/rubensworks/rdf-object.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/rdf-object.js?branch=master)
[![npm version](https://badge.fury.io/js/rdf-object.svg)](https://www.npmjs.com/package/rdf-object) [![Greenkeeper badge](https://badges.greenkeeper.io/rubensworks/rdf-object.js.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/rdf-object.svg)](https://www.npmjs.com/package/rdf-object)

@@ -8,0 +8,0 @@ RDF Object makes it easier to read RDF data

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