Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
rdf-isomorphic
Advanced tools
Determines if two RDF graphs are isomorphic, i.e., if two RDF graphs are equal while ignoring quad order and ignoring non-equal blank node labels between the graphs.
This package is can be useful within unit/spec tests.
This library accepts RDFJS-compliant quads.
The following examples assume the following imports:
import * as DataFactory from "@rdfjs/data-model"; // External library
import {isomorphic} from "rdf-isomorphic";
const graphA = [
DataFactory.quad(
DataFactory.blankNode('s1'),
DataFactory.namedNode('p'),
DataFactory.blankNode('o1'),
),
];
const graphB = [
DataFactory.quad(
DataFactory.blankNode('s2'),
DataFactory.namedNode('p'),
DataFactory.blankNode('o2'),
),
];
isomorphic(graphA, graphB); // Outputs true
const graphA = [
DataFactory.quad(
DataFactory.blankNode('s1'),
DataFactory.namedNode('p1'),
DataFactory.blankNode('o1'),
),
];
const graphB = [
DataFactory.quad(
DataFactory.blankNode('s2'),
DataFactory.namedNode('p2'),
DataFactory.blankNode('o2'),
),
];
isomorphic(graphA, graphB); // Outputs false
This algorithm is based on the RDF isomorphism checker in RDF.rb, which in its turn is based on the algorithm described by Jeremy Carrol.
In summary, the algorithm generates a hash for each blank node based on the connected resources. These hashes are then compared between the two given graphs, and a bijection is attempted to be created. If no such bijection can be found, then the graphs are considered non-isomorphic.
The implementation of this package is inspired by the Ruby RDF::Isomorphic gem.
This software is written by Ruben Taelman.
This code is released under the MIT license.
FAQs
Determines if two RDF graphs are isomorphic
We found that rdf-isomorphic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.