Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
readme.md286 linesDownload Raw Back to hast-util-to-text
1# hast-util-to-text2 3[![Build][build-badge]][build]4[![Coverage][coverage-badge]][coverage]5[![Downloads][downloads-badge]][downloads]6[![Size][size-badge]][size]7[![Sponsors][sponsors-badge]][collective]8[![Backers][backers-badge]][collective]9[![Chat][chat-badge]][chat]10 11[hast][] utility to get the plain-text value of a node.12 13## Contents14 15* [What is this?](#what-is-this)16* [When should I use this?](#when-should-i-use-this)17* [Install](#install)18* [Use](#use)19* [API](#api)20  * [`toText(tree[, options])`](#totexttree-options)21  * [`Options`](#options)22  * [`Whitespace`](#whitespace)23* [Types](#types)24* [Compatibility](#compatibility)25* [Security](#security)26* [Related](#related)27* [Contribute](#contribute)28* [License](#license)29 30## What is this?31 32This package is a utility that takes a [hast][] node and gets its plain-text33value.34It is like the DOMs `Node#innerText`, which is a bit nicer than35`Node#textContent`, because this turns `<br>` elements into line breaks and36uses `'\t'` (tabs) between table cells.37 38There are some small deviations from the spec, because the DOM has knowledge of39associated CSS, and can take into account that elements have `display: none` or40`text-transform` association with them, and this utility can’t do that.41 42## When should I use this?43 44This is a small utility that is useful when you want a plain-text version of a45node that is close to how it’s “visible” to users.46 47This utility is similar to [`hast-util-to-string`][hast-util-to-string], which48is simpler, and more like the `Node#textContent` algorithm discussed above.49 50There is also a package [`hast-util-from-text`][hast-util-from-text], which sort51of does the inverse: it takes a string, sets that as text on the node, while52turning line endings into `<br>`s53 54## Install55 56This package is [ESM only][esm].57In Node.js (version 16+), install with [npm][]:58 59```sh60npm install hast-util-to-text61```62 63In Deno with [`esm.sh`][esmsh]:64 65```js66import {toText} from 'https://esm.sh/hast-util-to-text@4'67```68 69In browsers with [`esm.sh`][esmsh]:70 71```html72<script type="module">73  import {toText} from 'https://esm.sh/hast-util-to-text@4?bundle'74</script>75```76 77## Use78 79```js80import {h} from 'hastscript'81import {toText} from 'hast-util-to-text'82 83const tree = h('div', [84  h('h1', {hidden: true}, 'Alpha.'),85  h('article', [86    h('p', ['Bravo', h('br'), 'charlie.']),87    h('p', 'Delta echo \t foxtrot.')88  ])89])90 91console.log(toText(tree))92```93 94Yields:95 96```txt97Bravo98charlie.99 100Delta echo foxtrot.101```102 103## API104 105This package exports the identifier [`toText`][api-to-text].106There is no default export.107 108### `toText(tree[, options])`109 110Get the plain-text value of a node.111 112###### Parameters113 114* `tree` ([`Node`][node])115  — tree to turn into text116* `options` ([`Options`][api-options], optional)117  — configuration118 119###### Returns120 121Serialized `tree` (`string`).122 123###### Algorithm124 125* if `tree` is a [comment][], returns its `value`126* if `tree` is a [text][], applies normal whitespace collapsing to its127  `value`, as defined by the [CSS Text][css] spec128* if `tree` is a [root][] or [element][], applies an algorithm similar to the129  `innerText` getter as defined by [HTML][]130 131###### Notes132 133> 👉 **Note**: the algorithm acts as if `tree` is being rendered, and as if134> we’re a CSS-supporting user agent, with scripting enabled.135 136* if `tree` is an element that is not displayed (such as a `head`), we’ll137  still use the `innerText` algorithm instead of switching to `textContent`138* if descendants of `tree` are elements that are not displayed, they are139  ignored140* CSS is not considered, except for the default user agent style sheet141* a line feed is collapsed instead of ignored in cases where Fullwidth, Wide,142  or Halfwidth East Asian Width characters are used, the same goes for a case143  with Chinese, Japanese, or Yi writing systems144* replaced elements (such as `audio`) are treated like non-replaced elements145 146### `Options`147 148Configuration (TypeScript type).149 150##### Fields151 152* `whitespace` ([`Whitespace`][api-whitespace], default: `'normal'`)153  — default whitespace setting to use154 155### `Whitespace`156 157Valid and useful whitespace values (from [CSS][]) (TypeScript type).158 159##### Type160 161```ts162type Whitespace = 'normal' | 'nowrap' | 'pre' | 'pre-wrap'163```164 165## Types166 167This package is fully typed with [TypeScript][].168It exports the additional types [`Options`][api-options] and169[`Whitespace`][api-whitespace].170 171## Compatibility172 173Projects maintained by the unified collective are compatible with maintained174versions of Node.js.175 176When we cut a new major release, we drop support for unmaintained versions of177Node.178This means we try to keep the current release line, `hast-util-to-text@^4`,179compatible with Node.js 16.180 181## Security182 183`hast-util-to-text` does not change the syntax tree so there are no184openings for [cross-site scripting (XSS)][xss] attacks.185 186## Related187 188* [`hast-util-to-string`189  ](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-to-string)190  — get the plain-text value (`textContent`)191* [`hast-util-from-text`](https://github.com/syntax-tree/hast-util-from-text)192  — set the plain-text value (`innerText`)193* [`hast-util-from-string`194  ](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-from-string)195  — set the plain-text value (`textContent`)196 197## Contribute198 199See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for200ways to get started.201See [`support.md`][support] for ways to get help.202 203This project has a [code of conduct][coc].204By interacting with this repository, organization, or community you agree to205abide by its terms.206 207## License208 209[MIT][license] © [Titus Wormer][author]210 211<!-- Definitions -->212 213[build-badge]: https://github.com/syntax-tree/hast-util-to-text/workflows/main/badge.svg214 215[build]: https://github.com/syntax-tree/hast-util-to-text/actions216 217[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/hast-util-to-text.svg218 219[coverage]: https://codecov.io/github/syntax-tree/hast-util-to-text220 221[downloads-badge]: https://img.shields.io/npm/dm/hast-util-to-text.svg222 223[downloads]: https://www.npmjs.com/package/hast-util-to-text224 225[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-to-text226 227[size]: https://bundlejs.com/?q=hast-util-to-text228 229[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg230 231[backers-badge]: https://opencollective.com/unified/backers/badge.svg232 233[collective]: https://opencollective.com/unified234 235[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg236 237[chat]: https://github.com/syntax-tree/unist/discussions238 239[npm]: https://docs.npmjs.com/cli/install240 241[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c242 243[esmsh]: https://esm.sh244 245[typescript]: https://www.typescriptlang.org246 247[license]: license248 249[author]: https://wooorm.com250 251[health]: https://github.com/syntax-tree/.github252 253[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md254 255[support]: https://github.com/syntax-tree/.github/blob/main/support.md256 257[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md258 259[html]: https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute260 261[css]: https://drafts.csswg.org/css-text/#white-space-phase-1262 263[hast-util-to-string]: https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-to-string264 265[hast-util-from-text]: https://github.com/syntax-tree/hast-util-from-text266 267[hast]: https://github.com/syntax-tree/hast268 269[node]: https://github.com/syntax-tree/hast#nodes270 271[root]: https://github.com/syntax-tree/hast#root272 273[comment]: https://github.com/syntax-tree/hast#comment274 275[text]: https://github.com/syntax-tree/hast#text276 277[element]: https://github.com/syntax-tree/hast#element278 279[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting280 281[api-to-text]: #totexttree-options282 283[api-options]: #options284 285[api-whitespace]: #whitespace286 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai