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

rdf-validate-datatype

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdf-validate-datatype - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

4

CHANGELOG.md
# Changelog
## 0.1.4 (2021-08-02)
* Enforce leading "--" for `xsd:gMonth`
## 0.1.3 (2021-01-19)

@@ -5,0 +9,0 @@

4

package.json
{
"name": "rdf-validate-datatype",
"version": "0.1.3",
"version": "0.1.4",
"description": "Validate literal value of an RDF term based on its datatype.",

@@ -32,3 +32,3 @@ "main": "index.js",

"@rdfjs/data-model": "~1.2.0",
"mocha": "~8.2.1",
"mocha": "~8.4.0",
"nyc": "~15.1.0",

@@ -35,0 +35,0 @@ "standard": "~16.0.0"

@@ -19,6 +19,8 @@

```javascript
import { validateTerm } from 'rdf-validate-datatype'
import validateDatatype from 'rdf-validate-datatype'
import rdf from '@rdfjs/data-model'
import { xsd } from '@tpluscode/rdf-ns-builders'
const { validateTerm } = validateDatatype
const term = rdf.literal('test')

@@ -40,6 +42,8 @@ const isValid = validateTerm(term) // -> true

```javascript
import { validateQuad } from 'rdf-validate-datatype'
import validateDatatype from 'rdf-validate-datatype'
import rdf from '@rdfjs/data-model'
import { schema, xsd } from '@tpluscode/rdf-ns-builders'
const { validateQuad } = validateDatatype
const quad = rdf.quad(

@@ -65,6 +69,8 @@ rdf.namedNode('bob'),

```javascript
import { validators, validateTerm } from 'rdf-validate-datatype'
import validateDatatype from 'rdf-validate-datatype'
import rdf from '@rdfjs/data-model'
import { xsd } from '@tpluscode/rdf-ns-builders'
const { validators, validateTerm } = validateDatatype
// Register a new datatype

@@ -71,0 +77,0 @@ const myDatatype = rdf.namedNode('my-datatype')

@@ -206,3 +206,3 @@ /* global BigInt */

const monthPattern = new RegExp(`^${monthSeg}${timezoneSeg}?$`)
const monthPattern = new RegExp(`^--${monthSeg}${timezoneSeg}?$`)
validators.register(xsd.gMonth, value => monthPattern.test(value))

@@ -209,0 +209,0 @@

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