npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@underlay/namespaces

v0.3.0

Published

URI constants for commonly used Underlay namespaces

Downloads

4

Readme

namespaces

standard-readme compliant license NPM version TypeScript types lines of code

URI constants for commonly used Underlay namespaces.

Table of Contents

Install

npm i @underlay/namespaces

Usage

import { xsd, rdf, ul } from "@underlay/namespaces"

console.log(xsd.integer) // "http://www.w3.org/2001/XMLSchema#integer"
console.log(rdf.type) // "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
console.log(ul.class) // "http://underlay.org/ns/class"

API

XSD terms

The datatypes from the XML Schema Definition Language are exported as a read-only xsd object:

const xsd: {
	readonly string: "http://www.w3.org/2001/XMLSchema#string"
	readonly boolean: "http://www.w3.org/2001/XMLSchema#boolean"
	readonly Decimal: "http://www.w3.org/2001/XMLSchema#decimal"
	readonly integer: "http://www.w3.org/2001/XMLSchema#integer"
	readonly double: "http://www.w3.org/2001/XMLSchema#double"
	readonly float: "http://www.w3.org/2001/XMLSchema#float"
	readonly date: "http://www.w3.org/2001/XMLSchema#date"
	readonly time: "http://www.w3.org/2001/XMLSchema#time"
	readonly dateTime: "http://www.w3.org/2001/XMLSchema#dateTime"
	readonly dateTimeStamp: "http://www.w3.org/2001/XMLSchema#dateTimeStamp"
	readonly gYear: "http://www.w3.org/2001/XMLSchema#gYear"
	readonly gMonth: "http://www.w3.org/2001/XMLSchema#gMonth"
	readonly gDay: "http://www.w3.org/2001/XMLSchema#gDay"
	readonly gYearMonth: "http://www.w3.org/2001/XMLSchema#gYearMonth"
	readonly gMonthDay: "http://www.w3.org/2001/XMLSchema#gMonthDay"
	readonly duration: "http://www.w3.org/2001/XMLSchema#duration"
	readonly yearMonthDuration: "http://www.w3.org/2001/XMLSchema#yearMonthDuration"
	readonly dayTimeDuration: "http://www.w3.org/2001/XMLSchema#dayTimeDuration"
	readonly byte: "http://www.w3.org/2001/XMLSchema#byte"
	readonly short: "http://www.w3.org/2001/XMLSchema#short"
	readonly int: "http://www.w3.org/2001/XMLSchema#int"
	readonly long: "http://www.w3.org/2001/XMLSchema#long"
	readonly unsignedByte: "http://www.w3.org/2001/XMLSchema#unsignedByte"
	readonly unsignedShort: "http://www.w3.org/2001/XMLSchema#unsignedShort"
	readonly unsignedInt: "http://www.w3.org/2001/XMLSchema#unsignedInt"
	readonly unsignedLong: "http://www.w3.org/2001/XMLSchema#unsignedLong"
	readonly positiveInteger: "http://www.w3.org/2001/XMLSchema#positiveInteger"
	readonly nonNegativeInteger: "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
	readonly nonPositiveInteger: "http://www.w3.org/2001/XMLSchema#nonPositiveInteger"
	readonly hexBinary: "http://www.w3.org/2001/XMLSchema#hexBinary"
	readonly base64Binary: "http://www.w3.org/2001/XMLSchema#base64Binary"
	readonly anyURI: "http://www.w3.org/2001/XMLSchema#anyURI"
	readonly language: "http://www.w3.org/2001/XMLSchema#language"
	readonly normalizedString: "http://www.w3.org/2001/XMLSchema#normalizedString"
	readonly token: "http://www.w3.org/2001/XMLSchema#token"
	readonly NMTOKEN: "http://www.w3.org/2001/XMLSchema#NMTOKEN"
	readonly Name: "http://www.w3.org/2001/XMLSchema#Name"
	readonly NCNames: "http://www.w3.org/2001/XMLSchema#NCNames"
}

RDF terms

A selection of terms from the RDF Schema vocabulary are exported as a read-only rdf object:

const rdf: {
	readonly type: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
	readonly first: "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
	readonly rest: "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
	readonly langString: "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
	readonly JSON: "http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON"
}

Underlay terms

The terms in the Underlay namespace are exported as a read-only ul object:

const ul: {
	readonly class: "http://underlay.org/ns/class"
	readonly key: "http://underlay.org/ns/key"
	readonly value: "http://underlay.org/ns/value"
	readonly uri: "http://underlay.org/ns/uri"
	readonly literal: "http://underlay.org/ns/literal"
	readonly datatype: "http://underlay.org/ns/datatype"
	readonly product: "http://underlay.org/ns/product"
	readonly component: "http://underlay.org/ns/component"
	readonly coproduct: "http://underlay.org/ns/coproduct"
	readonly option: "http://underlay.org/ns/option"
	readonly reference: "http://underlay.org/ns/reference"
	readonly some: "http://underlay.org/ns/some"
	readonly none: "http://underlay.org/ns/none"
	readonly source: "http://underlay.org/ns/source"
	readonly target: "http://underlay.org/ns/target"
}

Contributing

This library is not intended to be comprehensive. Open an issue to discuss adding other namespaces.

License

MIT © 2021 underlay