2.3.19 • Published 2 days ago

@thi.ng/prefixes v2.3.19

Weekly downloads
224
License
Apache-2.0
Repository
github
Last release
2 days ago

prefixes

npm version npm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

50+ Linked Data vocabulary prefixes and their namespace URLs.

Status

STABLE - used in production

Search or submit any issues for this package

Related packages

Installation

yarn add @thi.ng/prefixes

ES module import:

<script type="module" src="https://cdn.skypack.dev/@thi.ng/prefixes"></script>

Skypack documentation

For Node.js REPL:

# with flag only for < v16
node --experimental-repl-await

> const prefixes = await import("@thi.ng/prefixes");

Package sizes (gzipped, pre-treeshake): ESM: 998 bytes

Dependencies

None

API

Generated API docs

This package only contains constants, no actual code. Please see source code for full list provided.

Note: some namespace URIs exist in two flavors - for RDF vocab and as XML namespace. The latter versions are always prefixed with XML_, e.g.:

import { xsd, XML_XSD } from "@thi.ng/prefixes";

xsd     // http://www.w3.org/2001/XMLSchema#
XML_XSD // http://www.w3.org/2001/XMLSchema

Usage with @thi.ng/hiccup

All current @thi.ng/hiccup consumers/processors support RDFa attributes and specifically allow the prefix attrib value to be given as object of prefixes. This allows for very compact prefix definitions like so:

import { serialize } from "@thi.ng/hiccup";
import { article, body, div, h1, html } from "@thi.ng/hiccup-html";
import { dc, schema } from "@thi.ng/prefixes";

serialize(
    html({ lang: "en" },
        body({ prefix: { dc, schema } },
            article({ resource: "/posts/hello-world", typeof: "schema:BlogPosting"},
                h1({ property: "dc:title" }, "Hello World"),
                div({ property: "schema:articleBody" }, "...")
            )
        )
    )
);

Serialized HTML/RDFa result:

<html lang="en">
    <body prefix="dc: http://purl.org/dc/elements/1.1/ schema: http://schema.org/">
        <article resource="/posts/hello-world" typeof="schema:BlogPosting">
            <h1 property="dc:title">Hello World</h1>
            <div property="schema:articleBody">...</div>
        </article>
    </body>
</html>

Authors

Karsten Schmidt

If this project contributes to an academic publication, please cite it as:

@misc{thing-prefixes,
  title = "@thi.ng/prefixes",
  author = "Karsten Schmidt",
  note = "https://thi.ng/prefixes",
  year = 2020
}

License

© 2020 - 2021 Karsten Schmidt // Apache Software License 2.0

2.3.19

2 days ago

2.3.18

17 days ago

2.3.17

20 days ago

2.3.16

29 days ago

2.3.15

1 month ago

2.3.14

1 month ago

2.3.13

2 months ago

2.3.12

2 months ago

2.3.11

2 months ago

2.3.10

3 months ago

2.3.9

3 months ago

2.3.8

3 months ago

2.3.7

3 months ago

2.3.4

3 months ago

2.3.6

3 months ago

2.3.5

3 months ago

2.3.3

4 months ago

2.3.2

4 months ago

2.3.1

4 months ago

2.3.0

5 months ago

2.2.10

5 months ago

2.2.9

5 months ago

2.2.8

5 months ago

2.2.7

5 months ago

2.2.1

9 months ago

2.2.0

9 months ago

2.2.3

6 months ago

2.2.2

7 months ago

2.2.5

6 months ago

2.2.4

6 months ago

2.2.6

5 months ago

2.1.27

9 months ago

2.1.28

9 months ago

2.1.25

9 months ago

2.1.26

9 months ago

2.1.29

9 months ago

2.1.30

9 months ago

2.1.24

11 months ago

2.1.23

1 year ago

2.1.21

1 year ago

2.1.22

1 year ago

2.1.20

1 year ago

2.1.18

1 year ago

2.1.19

1 year ago

2.1.16

1 year ago

2.1.17

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.12

2 years ago

2.1.13

1 year ago

2.1.11

2 years ago

2.1.10

2 years ago

2.1.8

2 years ago

2.1.9

2 years ago

2.1.6

2 years ago

2.1.7

2 years ago

2.1.5

2 years ago

2.1.4

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.16

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago