@thomasseanfahey/domq 0.1.0 → 0.1.2

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 +8 -8
  2. package/package.json +8 -4
package/README.md CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  Query DOM relationships, not selectors.
4
4
 
5
- `domq` is a small, ESM-first library for composable DOM traversal (relations) and filtering (predicates) with deterministic ordering and lazy evaluation.
5
+ `@thomasseanfahey/domq` is a small, ESM-first library for composable DOM traversal (relations) and filtering (predicates) with deterministic ordering and lazy evaluation.
6
6
 
7
7
  It’s designed for browser extensions, testing tooling, scraping/automation scripts, and any code that needs *relationship-first* DOM queries that don’t fit cleanly into CSS selectors.
8
8
 
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- npm install domq
12
+ npm install @thomasseanfahey/domq
13
13
  ```
14
14
 
15
15
  ## Quick start
16
16
 
17
17
  ```js
18
- import { dq } from "domq";
18
+ import { dq } from "@thomasseanfahey/domq";
19
19
 
20
20
  const start = document.querySelector("#start");
21
21
 
@@ -136,8 +136,8 @@ const cta = getPrimaryCTA(event.target);
136
136
  Shadow traversal is explicit via `domq/shadow`.
137
137
 
138
138
  ```js
139
- import { dq } from "domq";
140
- import { shadow } from "domq/shadow";
139
+ import { dq } from "@thomasseanfahey/domq";
140
+ import { shadow } from "@thomasseanfahey/domq/shadow";
141
141
 
142
142
  const el = dq(start)
143
143
  .use(shadow)
@@ -150,8 +150,8 @@ const el = dq(start)
150
150
  Expensive predicates live in `domq/extra`.
151
151
 
152
152
  ```js
153
- import { dq } from "domq";
154
- import { extra } from "domq/extra";
153
+ import { dq } from "@thomasseanfahey/domq";
154
+ import { extra } from "@thomasseanfahey/domq/extra";
155
155
 
156
156
  const visibleButtons = dq(document.body)
157
157
  .use(extra)
@@ -176,7 +176,7 @@ Browsers can’t resolve bare specifiers like `"domq"` without a bundler. For a
176
176
  }
177
177
  </script>
178
178
  <script type="module">
179
- import { dq } from "domq";
179
+ import { dq } from "@thomasseanfahey/domq";
180
180
  console.log(dq(document.body).descendants().count());
181
181
  </script>
182
182
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thomasseanfahey/domq",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Query DOM relationships, not selectors. Composable traversal + predicates with deterministic semantics and lazy evaluation.",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -25,7 +25,9 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "sideEffects": false,
28
- "engines": { "node": ">=18" },
28
+ "engines": {
29
+ "node": ">=18"
30
+ },
29
31
  "keywords": [
30
32
  "dom",
31
33
  "dom-traversal",
@@ -46,9 +48,11 @@
46
48
  "prepublishOnly": "npm test && npm run build:types",
47
49
  "pack:check": "npm pack --dry-run"
48
50
  },
49
- "devDependencies": { "typescript": "^5.6.3" },
51
+ "devDependencies": {
52
+ "typescript": "^5.6.3"
53
+ },
50
54
  "license": "MIT",
51
55
  "publishConfig": {
52
56
  "access": "public"
53
57
  }
54
- }
58
+ }