head-metadata 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -16
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,30 +1,32 @@
1
1
  <h1 align="center">
2
- <img src="https://raw.githubusercontent.com/your-org/head-metadata/main/.github/banner.svg" alt="head-metadata banner">
2
+ <img src="https://raw.githubusercontent.com/builder-group/community/develop/packages/head-metadata/.github/banner.svg" alt="head-metadata banner">
3
3
  </h1>
4
4
 
5
5
  <p align="left">
6
- <a href="https://github.com/your-org/head-metadata/blob/main/LICENSE">
7
- <img src="https://img.shields.io/github/license/your-org/head-metadata?label=license&style=flat&colorA=293140&colorB=00C896" alt="GitHub License"/>
8
- </a>
9
- <a href="https://www.npmjs.com/package/head-metadata">
10
- <img src="https://img.shields.io/bundlephobia/minzip/head-metadata?label=minzipped%20size&style=flat&colorA=293140&colorB=00C896" alt="NPM bundle minzipped size"/>
11
- </a>
12
- <a href="https://www.npmjs.com/package/head-metadata">
13
- <img src="https://img.shields.io/npm/dt/head-metadata.svg?label=downloads&style=flat&colorA=293140&colorB=00C896" alt="NPM total downloads"/>
14
- </a>
6
+ <a href="https://github.com/builder-group/community/blob/develop/LICENSE">
7
+ <img src="https://img.shields.io/github/license/builder-group/community.svg?label=license&style=flat&colorA=293140&colorB=FDE200" alt="GitHub License"/>
8
+ </a>
9
+ <a href="https://www.npmjs.com/package/head-metadata">
10
+ <img src="https://img.shields.io/bundlephobia/minzip/head-metadata.svg?label=minzipped%20size&style=flat&colorA=293140&colorB=FDE200" alt="NPM bundle minzipped size"/>
11
+ </a>
12
+ <a href="https://www.npmjs.com/package/head-metadata">
13
+ <img src="https://img.shields.io/npm/dt/featuer-state.svg?label=downloads&style=flat&colorA=293140&colorB=FDE200" alt="NPM total downloads"/>
14
+ </a>
15
+ <a href="https://discord.gg/w4xE3bSjhQ">
16
+ <img src="https://img.shields.io/discord/795291052897992724.svg?label=&logo=discord&logoColor=000000&color=293140&labelColor=FDE200" alt="Join Discord"/>
17
+ </a>
15
18
  </p>
16
19
 
17
20
  > Status: Experimental
18
21
 
19
- `head-metadata` is a utility for extracting structured metadata (like `<meta>`, `<title>`, and `<link>`) from the `<head>` of an HTML document.
22
+ `head-metadata` is a typesafe and straightforward utility for extracting structured metadata (like `<meta>`, `<title>`, and `<link>`) from the `<head>` of an HTML document.
20
23
 
21
24
  ## 📖 Usage
22
25
 
23
26
  ### Extract Metadata from `<head>`
24
27
 
25
28
  ```ts
26
- import { extractHeadMetadata } from 'head-metadata';
27
- import { metaExtractor, titleExtractor, linkExtractor } from 'head-metadata/extractors';
29
+ import { extractHeadMetadata, linkExtractor, metaExtractor, titleExtractor } from 'head-metadata';
28
30
 
29
31
  const html = `
30
32
  <html>
@@ -37,9 +39,9 @@ const html = `
37
39
  `;
38
40
 
39
41
  const metadata = extractHeadMetadata(html, {
40
- meta: metaExtractor,
41
- title: titleExtractor,
42
- link: linkExtractor
42
+ meta: metaExtractor,
43
+ title: titleExtractor,
44
+ link: linkExtractor
43
45
  });
44
46
 
45
47
  console.log(metadata);
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "head-metadata",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
- "description": "Extracts metadata from the head of a HTML document",
5
+ "description": "Typesafe and straightforward utility for extracting structured metadata (like `<meta>`, `<title>`, and `<link>`) from the `<head>` of an HTML document",
6
6
  "keywords": [],
7
- "homepage": "https://builder.group/?source=package-json",
7
+ "homepage": "https://builder.group/?utm_source=package-json",
8
8
  "bugs": {
9
9
  "url": "https://github.com/builder-group/community/issues"
10
10
  },
@@ -23,10 +23,10 @@
23
23
  "README.md"
24
24
  ],
25
25
  "dependencies": {
26
- "xml-tokenizer": "0.0.32"
26
+ "xml-tokenizer": "0.0.38"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/node": "^22.15.21",
29
+ "@types/node": "^22.15.29",
30
30
  "rollup-presets": "0.0.21"
31
31
  },
32
32
  "size-limit": [