https://github.com/comunica/validate-iri.js

Library to validate IRIs according to RFC 3987

https://github.com/comunica/validate-iri.js

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary

Keywords from Contributors

linked-data
Last synced: 10 months ago · JSON representation

Repository

Library to validate IRIs according to RFC 3987

Basic Info
  • Host: GitHub
  • Owner: comunica
  • License: mit
  • Language: TypeScript
  • Default Branch: master
  • Size: 142 KB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • Open Issues: 5
  • Releases: 0
Created over 4 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License

README.md

Validate IRI

Build status Coverage Status npm version

This tool validates an IRI, either using strict RFC 3987 grammar, or using a faster but less strict pragmatic validation mode. It works in both JavaScript and TypeScript.

Installation

bash $ npm install validate-iri or bash $ yarn add validate-iri

This package also works out-of-the-box in browsers via tools such as webpack and browserify.

Usage

Multiple validation modes are provided: - IriValidationStrategy.Strict: carefully validates the IRI using RFC 3987 grammar. This is the default value. - IriValidationStrategy.Pragmatic: quickly validates that the IRI has a valid scheme and does not contain any character forbidden by the N-Triples, Turtle and N3 grammars. - IriValidationStrategy.None: does not validate the IRI at all.

Example: import { validateIri, IriValidationStrategy } from 'validate-iri' const yourIri = 'https://example.com/john-doe' validateIri(yourIri, IriValidationStrategy.Pragmatic) // Will return an error if the IRI is invalid.

Performance

When using strict validation mode, a significant performance overhead should be taken into account. In isolation, strict validation is an order of magnitude slower than pragmatic validation.

When used in a parser such as rdfxml-streaming-parser.js, the performance impact on parsing is the following (GeoSpecies Knowledge Base with 1.8M triples):

  • Strict validation: 12.053s
  • Pragmatic validation: 9.116s
  • No validation: 8.338s

License

This code is released under the MIT license.

Owner

  • Name: Comunica
  • Login: comunica
  • Kind: organization
  • Location: Ghent, Belgium

Flexible SPARQL and GraphQL over decentralized RDF on the Web.

GitHub Events

Total
  • Delete event: 2
  • Issue comment event: 1
  • Push event: 19
  • Pull request event: 5
  • Create event: 3
Last Year
  • Delete event: 2
  • Issue comment event: 1
  • Push event: 19
  • Pull request event: 5
  • Create event: 3

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 20
  • Total Committers: 4
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.5
Past Year
  • Commits: 6
  • Committers: 2
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
Ruben Taelman r****n@u****e 10
Tpt t****t@h****r 5
renovate[bot] 2****]@u****m 4
Tobias Schweizer t****r@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 3
  • Total pull requests: 21
  • Average time to close issues: about 20 hours
  • Average time to close pull requests: 7 months
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 0.67
  • Average comments per pull request: 1.43
  • Merged pull requests: 6
  • Bot issues: 1
  • Bot pull requests: 16
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • tobiasschweizer (1)
  • prabhu (1)
  • renovate[bot] (1)
Pull Request Authors
  • renovate[bot] (16)
  • Tpt (3)
  • danielbeeke (1)
  • tobiasschweizer (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • npm 230,561 last-month
  • Total docker downloads: 49,718
  • Total dependent packages: 3
  • Total dependent repositories: 76
  • Total versions: 2
  • Total maintainers: 1
npmjs.org: validate-iri

Validates an IRI according to RFC 3987

  • Versions: 2
  • Dependent Packages: 3
  • Dependent Repositories: 76
  • Downloads: 230,561 Last month
  • Docker Downloads: 49,718
Rankings
Docker downloads count: 0.7%
Downloads: 1.3%
Dependent repos count: 1.6%
Average: 5.6%
Dependent packages count: 5.9%
Forks count: 9.8%
Stargazers count: 14.5%
Maintainers (1)
Last synced: 10 months ago

Dependencies

package.json npm
  • @rubensworks/eslint-config ^1.0.0 development
  • @types/jest ^26.0.0 development
  • @typescript-eslint/eslint-plugin ^4.2.0 development
  • @typescript-eslint/parser ^4.1.1 development
  • coveralls ^3.0.0 development
  • eslint ^7.9.0 development
  • eslint-config-es ^3.23.0 development
  • eslint-import-resolver-typescript ^2.3.0 development
  • eslint-plugin-import ^2.22.0 development
  • eslint-plugin-jest ^24.0.2 development
  • eslint-plugin-tsdoc ^0.2.7 development
  • eslint-plugin-unused-imports ^1.0.0 development
  • jest ^26.0.0 development
  • manual-git-changelog ^1.0.0 development
  • pre-commit ^1.2.2 development
  • ts-jest ^26.0.0 development
  • typescript ^4.0.2 development
yarn.lock npm
  • 741 dependencies
.github/workflows/ci.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • coverallsapp/github-action master composite