https://github.com/comunica/validate-iri.js
Library to validate IRIs according to RFC 3987
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
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
Metadata Files
README.md
Validate IRI
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
- Website: https://comunica.dev
- Twitter: comunicajs
- Repositories: 69
- Profile: https://github.com/comunica
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
Top Committers
| Name | 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
- Homepage: https://github.com/comunica/validate-iri.js#readme
- License: MIT
-
Latest release: 1.0.1
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- @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
- 741 dependencies
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-node v3 composite
- coverallsapp/github-action master composite