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

clownface-shacl-path

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clownface-shacl-path - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

5

lib/toSparql.d.ts
import type { NamedNode } from '@rdfjs/types';
import { SparqlTemplateResult } from '@tpluscode/rdf-string';
import { MultiPointer } from 'clownface';
import { ShaclPropertyPath } from './path.js';
/**
* Creates a SPARQL template string which represents a SHACL path as Property Path
*
* @param path SHACL Property Path
* @param pathOrNode SHACL Property Path
*/
export declare function toSparql(path: MultiPointer | NamedNode): SparqlTemplateResult;
export declare function toSparql(pathOrNode: MultiPointer | NamedNode | ShaclPropertyPath): SparqlTemplateResult;
export declare namespace toSparql {

@@ -11,0 +12,0 @@ var sequence: (path: MultiPointer) => SparqlTemplateResult[];

9

lib/toSparql.js

@@ -45,7 +45,10 @@ import { sparql } from '@tpluscode/rdf-string';

*
* @param path SHACL Property Path
* @param pathOrNode SHACL Property Path
*/
export function toSparql(path) {
export function toSparql(pathOrNode) {
const visitor = new ToSparqlPropertyPath();
return visitor.visit(fromNode(path));
const path = 'termType' in pathOrNode || '_context' in pathOrNode
? fromNode(pathOrNode)
: pathOrNode;
return visitor.visit(path);
}

@@ -52,0 +55,0 @@ /**

{
"name": "clownface-shacl-path",
"description": "Find nodes in graph by following SHACL Paths",
"version": "2.2.0",
"version": "2.3.0",
"main": "index.js",

@@ -6,0 +6,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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