New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rdf-validate-shacl

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdf-validate-shacl - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

8

CHANGELOG.md

@@ -7,3 +7,11 @@

*
## 0.2.0 (2020-05-25)
* [BREAKING] Change `ValidationReport` and `ValidationResult` shorthand
properties to return RDF terms instead of strings (#30).
## 0.1.3 (2020-04-23)

@@ -10,0 +18,0 @@

2

package.json
{
"name": "rdf-validate-shacl",
"version": "0.1.3",
"version": "0.2.0",
"description": "RDF SHACL validator",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,3 +43,3 @@

// See https://www.w3.org/TR/shacl/#results-validation-result for details
// about each method
// about each property
console.log(result.message)

@@ -46,0 +46,0 @@ console.log(result.path)

@@ -47,40 +47,26 @@ const clownface = require('clownface')

get message () {
return this._getValue(sh.resultMessage)
return this.cf.out(sh.resultMessage).terms || []
}
get path () {
return this._getValue(sh.resultPath)
return this.cf.out(sh.resultPath).term || null
}
get focusNode () {
return this._getValue(sh.focusNode)
return this.cf.out(sh.focusNode).term || null
}
get severity () {
const severity = this._getValue(sh.resultSeverity)
return severity ? severity.split('#')[1] : null
return this.cf.out(sh.severity).term || null
}
get sourceConstraintComponent () {
return this._getValue(sh.sourceConstraintComponent)
return this.cf.out(sh.sourceConstraintComponent).term || null
}
get sourceShape () {
return this._getValue(sh.sourceShape)
return this.cf.out(sh.sourceShape).term || null
}
_getValue (predicate) {
const term = this.cf.out(predicate).term
return term ? serializeTermValue(term) : null
}
}
function serializeTermValue (term) {
if (term.termType === 'BlankNode') {
return `_:${term.value}`
}
return term.value
}
module.exports = ValidationReport
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