
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
This is a RDF data model mapping library for javascript. It's primary feature is mapping from RDFS Class to javascript constructor function, and mapping from RDFS data types to javascript data types.
npm install --save rdfs
const RDFS = require('rdfs');
const RDFS = require('rdfs');
const should = require('should/as-function');
const JSONLD = require('jsonld');
const model = new RDFS.Model(
'http://qfield.net/example/ns#',
{
'rdf': RDFS.IRI_RDF,
'rdfs': RDFS.IRI_RDFS,
'xsd': RDFS.IRI_XSD,
'owl': 'http://www.w3.org/2002/07/owl#',
'dc': 'http://purl.org/dc/elements/1.1/'
}
);
const owlThing = model.rdfsClass('owl:Thing');
const thisProject = owlThing('rdfs-js');
thisProject.set('dc:creator', 'Qfield');
const jsonldDoc = thisProject.toJSON();
const nquads = await JSONLD.toRDF(jsonldDoc, {
format: 'application/nquads'
});
const expectedStatements = [
'<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .',
'<http://www.w3.org/2002/07/owl#Thing> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .',
'<http://qfield.net/example/ns#rdfs-js> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .',
'<http://qfield.net/example/ns#rdfs-js> <http://purl.org/dc/elements/1.1/creator> "Qfield" .'
];
const statements = nquads.trim().split('\n');
should(statements).have.length(expectedStatements.length);
should(statements).containDeep(expectedStatements);
should(expectedStatements).containDeep(statements);
const RDFS = require('rdfs');
const should = require('should/as-function');
const JSONLD = require('jsonld');
const model = new RDFS.Model(
'http://qfield.net/example/ns#',
{
'rdf': RDFS.IRI_RDF,
'rdfs': RDFS.IRI_RDFS,
'xsd': RDFS.IRI_XSD,
'owl': 'http://www.w3.org/2002/07/owl#',
'dc': 'http://purl.org/dc/elements/1.1/'
}
);
const rdfDoc = '<http://qfield.net/example/ns#rdfs-js> <http://purl.org/dc/elements/1.1/creator> "Qfield" .\n'
+ '<http://qfield.net/example/ns#rdfs-js> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .\n'
+ '<http://www.w3.org/2002/07/owl#Thing> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .\n';
const jsonldDoc = await JSONLD.fromRDF(rdfDoc, {
format: 'application/nquads'
});
const container = await model.load(jsonldDoc);
const thisProject = container.get(RDFS.IRI_RDFS_MEMBER).get('rdfs-js');
should(thisProject.get('dc:creator').valueOf()).equal('Qfield');
should(thisProject.get(RDFS.IRI_RDF_TYPE).has(model.rdfsResource('owl:Thing'))).be.true();
const owlThing = thisProject.get(RDFS.IRI_RDF_TYPE).get('owl:Thing');
should(owlThing.get(RDFS.IRI_RDF_TYPE).has(model.rdfsClass)).be.true();
Copyright © 2020 Qfield
Apache 2.0
FAQs
RDF data model mapping library for javascript.
The npm package rdfs receives a total of 60 weekly downloads. As such, rdfs popularity was classified as not popular.
We found that rdfs 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 and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.