# @underlay/namespaces

> URI constants for commonly used Underlay namespaces

Latest version **0.3.0** (published 2022-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @underlay/namespaces
pnpm add @underlay/namespaces
yarn add @underlay/namespaces
bun add @underlay/namespaces
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2022-01-24 |
| First published | 2021-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joel Gustafson |
| Maintainers | joelg |

## Links

- npm: https://www.npmjs.com/package/@underlay/namespaces
- Repository: https://github.com/underlay/namespaces
- Homepage: https://github.com/underlay/namespaces#readme
- Issues: https://github.com/underlay/namespaces/issues
- npm.io page: https://npm.io/package/@underlay/namespaces

## Recent versions

- 0.3.0 (latest) — 2022-01-24
- 0.2.0 — 2021-11-01
- 0.1.3 — 2021-09-01
- 0.1.1 — 2021-08-18
- 0.1.0 — 2021-08-18
- 0.0.3 — 2021-03-14
- 0.0.2 — 2021-01-29
- 0.0.1 — 2021-01-28

## README

# namespaces

[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme) [![license](https://img.shields.io/github/license/underlay/namespaces)](https://opensource.org/licenses/MIT) [![NPM version](https://img.shields.io/npm/v/@underlay/namespaces)](https://www.npmjs.com/package/@underlay/namespaces) ![TypeScript types](https://img.shields.io/npm/types/@underlay/namespaces) ![lines of code](https://img.shields.io/tokei/lines/github/underlay/namespaces)

URI constants for commonly used Underlay namespaces.

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [API](#api)
  - [XSD terms](#xsd-terms)
  - [RDF terms](#rdf-terms)
  - [Underlay terms](#underlay-terms)
- [Contributing](#contributing)
- [License](#license)

## Install

```
npm i @underlay/namespaces
```

## Usage

```typescript
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](https://www.w3.org/TR/xmlschema11-2/) are exported as a read-only `xsd` object:

```typescript
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:

```typescript
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:

```typescript
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

---
_Source: https://npm.io/package/@underlay/namespaces · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
