SkillAgentSearch skills...

Udhr

Universal declaration of human rights

Install / Use

/learn @wooorm/Udhr
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

udhr

[![Build][badge-build-image]][badge-build-url] [![Coverage][badge-coverage-image]][badge-coverage-url] [![Downloads][badge-downloads-image]][badge-downloads-url]

The most translated copyright-free document on this planet: the [universal declaration of human rights][ohchr-index] in [unicode][efele-udhr] in JavaScript.

Contents

What is this?

This package exposes all UDHRs.

When should I use this?

Perhaps when you are dealing with natural language detection?

Install

This package is [ESM only][esm]. In Node.js (version 18+), install with [npm][]:

npm install udhr

In Deno with [esm.sh][esmsh]:

import {udhr} from 'https://esm.sh/udhr@6'

In browsers with [esm.sh][esmsh]:

<script type="module">
  import {udhr} from 'https://esm.sh/udhr@6?bundle'
</script>

Use

import fs from 'node:fs/promises'
import {resolve} from 'import-meta-resolve'
import {udhr} from 'udhr'

for (const d of udhr) {
  if (d.code === 'bod') {
    console.log(d)
    break
  }
}

const base = await resolve('udhr', import.meta.url)
// Declarations are stored as `declaration/$code.html`.
const url = new URL('declaration/bod.html', base)

console.log(await fs.readFile(url, 'utf8'))

Yields:

{
  code: 'bod',
  name: 'Tibetan, Central',
  bcp47: 'bo',
  ohchr: 'tic',
  iso6393: 'bod',
  direction: 'ltr',
  stage: 4,
  latitude: 28.37,
  longitude: 90.19
}
<!doctype html>
<html lang="bo" dir="ltr" data-code="bod" data-iso6393="bod">
  <head>
    <title>Tibetan, Central</title>
  </head>
  <body>
    <h1>༄༅༎ ཡོངས་ཁྱབ་གསལ་བསྒྲགས་འགྲོ་བ་མིའི་ཐོབ་ཐང༌།</h1>
    <header>
      <h2>སྔོན་བརྗོད།</h2>
      <p>༈ འགྲོ་བ་མིའི་ཁྱིམ་ཚང་ཁག་གི་ནང་མི་ཡོངས་ལ་རང་བཞིན་ཉིད་ནས་ཡོད་པའི་ཆེ་མཐོངས་དང་འདྲ་མཉམ། སུས་ཀྱང་འཕྲོག་ཏུ་མི་རུང་བའི་ཐོབ་ཐང་བཅས་ཀྱི་གནད་དོན་རྟོགས པར་བྱེད་པ་ནི། འཛམ་གླིང་ནང་གི་རང་དབང་དང༌། དྲང་བདེན། ཞི་བདེ་བཅས་ཀྱི་རྣང་གཞི་ལྟེ་བ་ཡིན།</p>
…

API

This package exports the identifier [udhr][api-udhr]. It exports the [TypeScript][] type [Info][api-info]. There is no default export.

udhr

Universal Declaration of Human Rights ([Array<Info>][api-info]).

The actual declarations are available in HTML at declaration/$code.html.

Info

Info (TypeScript type).

Type
interface Info {
  bcp47: string
  code: string
  direction?: 'ltr' | 'rtl' | 'ttb'
  iso6393: string
  latitude: number
  longitude: number
  name: string
  ohchr?: string
  stage: 1 | 2 | 3 | 4 | 5
}

Data

<!--support start-->

| Name | BCP 47 | ISO 639-3 | Direction | Location | | - | - | - | - | - | | Sãotomense | cri | cri | ltr | 6.7, 0.3 | | Crioulo, Upper Guinea (008) | pov | pov | ltr | 13.2, -15.3 | | Mbundu (009) | kmb | kmb | ltr | -9.0, 14.9 | | Tetun Dili | tdt | tdt | ltr | -8.5, 125.5 | | Umbundu (011) | umb | umb | ltr | -12.5, 14.4 | | (Mijisa) | und | und | ltr | -75.0, 30.0 | | (Maiunan) | und | und | ltr | -75.0, 30.0 | | (Minjiang, spoken) | und | und | ltr | -75.0, 30.0 | | (Minjiang, written) | und | und | ltr | -75.0, 30.0 | | Drung | duu | duu | ltr | 28.0, 98.0 | | (Muzzi) | und | und | ltr | -75.0, 30.0 | | (Klau) | und | und | ltr | -75.0, 30.0 | | (Jinan) | und | und | ltr | -75.0, 30.0 | | (Bizisa) | und | und | ltr | -75.0, 30.0 | | (Yeonbyeon) | und | und | ltr | -75.0, 30.0 | | Gumuz | guk | guk | ltr | 11.1, 35.9 | | Kafa | kbr | kbr | ltr | 7.3, 36.2 | | Sidamo | sid | sid | ltr | 6.7, 38.4 | | Kituba (2) | ktu | ktu | ltr | -2.3, 17.1 | | South Azerbaijani | azb | azb | ltr | 36.5, 48.4 | | Latvian (2) | lv | lvs | ltr | 56.8, 24.3 | | Spanish (resolution) | es | spa | ltr | 40.4, -1.1 | | Zarma | dje | dje | ltr | 12.9, 2.4 | | Mirandese | mwl | mwl | ltr | 41.5, -6.4 | | Maasai | mas | mas | ltr | -3.1, 36.5 | | Malay, Papuan | pmy | pmy | ltr | -2.5, 139.7 | | Malay, Ambonese | abs | abs | ltr | -3.7, 128.2 | | Minangkabau (2) | min | min | ltr | -0.9, 100.4 | | Banjar | bjn | bjn | ltr | 0.8, 115.8 | | (Bataknese) | und | und | ltr | -75.0, 30.0 | | Morisyen | mfe | mfe | ltr | -20.3, 57.5 | | Hausa (2) | hau | hau |

Related Skills

View on GitHub
GitHub Stars20
CategoryDevelopment
Updated1mo ago
Forks1

Languages

HTML

Security Score

95/100

Audited on Feb 20, 2026

No findings