PageSourceSearch

https://pika.page/assets/hast-util-whitespace-a39de67125dc449a60df…6cb53b5a035d159149d2a895e3fa5a56d4aa3163.js

js pika.page collected 2026-10-03 21:43:20 UTC 827 bytes, 22 lines download raw bytes

1// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/index.js
2
3/**
4 * @typedef {import('hast').Nodes} Nodes
5 */
6const e=/[ \t\n\f\r]/g;
7/**
8 * Check if the given value is *inter-element whitespace*.
9 *
10 * @param {Nodes | string} thing
11 *   Thing to check (`Node` or `string`).
12 * @returns {boolean}
13 *   Whether the `value` is inter-element whitespace (`boolean`): consisting of
14 *   zero or more of space, tab (`\t`), line feed (`\n`), carriage return
15 *   (`\r`), or form feed (`\f`); if a node is passed it must be a `Text` node,
16 *   whose `value` field is checked.
17 */function whitespace(e){return"object"===typeof e?"text"===e.type&&empty(e.value):empty(e)}
18/**
19 * @param {string} value
20 * @returns {boolean}
21 */function empty(t){return""===t.replace(e,"")}export{whitespace};
22

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.