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.md352 linesDownload Raw Back to unist-util-is
1# unist-util-is2 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[unist][] utility to check if nodes pass a test.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  * [`is(node[, test[, index, parent[, context]]])`](#isnode-test-index-parent-context)21  * [`convert(test)`](#converttest)22  * [`Check`](#check)23  * [`Test`](#test)24  * [`TestFunction`](#testfunction)25* [Examples](#examples)26  * [Example of `convert`](#example-of-convert)27* [Types](#types)28* [Compatibility](#compatibility)29* [Related](#related)30* [Contribute](#contribute)31* [License](#license)32 33## What is this?34 35This package is a small utility that checks that a node is a certain node.36 37## When should I use this?38 39Use this small utility if you find yourself repeating code for checking what40nodes are.41 42A similar package, [`hast-util-is-element`][hast-util-is-element], works on hast43elements.44 45For more advanced tests, [`unist-util-select`][unist-util-select] can be used46to match against CSS selectors.47 48## Install49 50This package is [ESM only][esm].51In Node.js (version 16+), install with [npm][]:52 53```sh54npm install unist-util-is55```56 57In Deno with [`esm.sh`][esmsh]:58 59```js60import {is} from 'https://esm.sh/unist-util-is@6'61```62 63In browsers with [`esm.sh`][esmsh]:64 65```html66<script type="module">67  import {is} from 'https://esm.sh/unist-util-is@6?bundle'68</script>69```70 71## Use72 73```js74import {is} from 'unist-util-is'75 76const node = {type: 'strong'}77const parent = {type: 'paragraph', children: [node]}78 79is() // => false80is({children: []}) // => false81is(node) // => true82is(node, 'strong') // => true83is(node, 'emphasis') // => false84 85is(node, node) // => true86is(parent, {type: 'paragraph'}) // => true87is(parent, {type: 'strong'}) // => false88 89is(node, test) // => false90is(node, test, 4, parent) // => false91is(node, test, 5, parent) // => true92 93function test(node, n) {94  return n === 595}96```97 98## API99 100This package exports the identifiers [`convert`][api-convert] and101[`is`][api-is].102There is no default export.103 104### `is(node[, test[, index, parent[, context]]])`105 106Check if `node` is a `Node` and whether it passes the given test.107 108###### Parameters109 110* `node` (`unknown`, optional)111  — thing to check, typically [`Node`][node]112* `test` ([`Test`][api-test], optional)113  — a test for a specific element114* `index` (`number`, optional)115  — the node’s position in its parent116* `parent` ([`Node`][node], optional)117  — the node’s parent118* `context` (`unknown`, optional)119  — context object (`this`) to call `test` with120 121###### Returns122 123Whether `node` is a [`Node`][node] and passes a test (`boolean`).124 125###### Throws126 127When an incorrect `test`, `index`, or `parent` is given.128There is no error thrown when `node` is not a node.129 130### `convert(test)`131 132Generate a check from a test.133 134Useful if you’re going to test many nodes, for example when creating a135utility where something else passes a compatible test.136 137The created function is a bit faster because it expects valid input only:138a `node`, `index`, and `parent`.139 140###### Parameters141 142* `test` ([`Test`][api-test], optional)143  — a test for a specific node144 145###### Returns146 147A check ([`Check`][api-check]).148 149### `Check`150 151Check that an arbitrary value is a node (TypeScript type).152 153###### Parameters154 155* `this` (`unknown`, optional)156  — context object (`this`) to call `test` with157* `node` (`unknown`)158  — anything (typically a node)159* `index` (`number`, optional)160  — the node’s position in its parent161* `parent` ([`Node`][node], optional)162  — the node’s parent163 164###### Returns165 166Whether this is a node and passes a test (`boolean`).167 168### `Test`169 170Check for an arbitrary node (TypeScript type).171 172###### Type173 174```ts175type Test =176  | Array<Record<string, unknown> | TestFunction | string>177  | Record<string, unknown>178  | TestFunction179  | string180  | null181  | undefined182```183 184Checks that the given thing is a node, and then:185 186* when `string`, checks that the node has that tag name187* when `function`, see  [`TestFunction`][api-test-function]188* when `object`, checks that all keys in test are in node, and that they have189  (strictly) equal values190* when `Array`, checks if one of the subtests pass191 192### `TestFunction`193 194Check if a node passes a test (TypeScript type).195 196###### Parameters197 198* `node` ([`Node`][node])199  — a node200* `index` (`number` or `undefined`)201  — the node’s position in its parent202* `parent` ([`Node`][node] or `undefined`)203  — the node’s parent204 205###### Returns206 207Whether this node passes the test (`boolean`, optional).208 209## Examples210 211### Example of `convert`212 213```js214import {u} from 'unist-builder'215import {convert} from 'unist-util-is'216 217const test = convert('leaf')218 219const tree = u('tree', [220  u('node', [u('leaf', '1')]),221  u('leaf', '2'),222  u('node', [u('leaf', '3'), u('leaf', '4')]),223  u('leaf', '5')224])225 226const leafs = tree.children.filter(function (child, index) {227  return test(child, index, tree)228})229 230console.log(leafs)231```232 233Yields:234 235```js236[{type: 'leaf', value: '2'}, {type: 'leaf', value: '5'}]237```238 239## Types240 241This package is fully typed with [TypeScript][].242It exports the additional types [`Check`][api-check],243[`Test`][api-test],244[`TestFunction`][api-test-function].245 246## Compatibility247 248Projects maintained by the unified collective are compatible with maintained249versions of Node.js.250 251When we cut a new major release, we drop support for unmaintained versions of252Node.253This means we try to keep the current release line, `unist-util-is@^6`,254compatible with Node.js 16.255 256## Related257 258* [`unist-util-find-after`](https://github.com/syntax-tree/unist-util-find-after)259  — find a node after another node260* [`unist-util-find-before`](https://github.com/syntax-tree/unist-util-find-before)261  — find a node before another node262* [`unist-util-find-all-after`](https://github.com/syntax-tree/unist-util-find-all-after)263  — find all nodes after another node264* [`unist-util-find-all-before`](https://github.com/syntax-tree/unist-util-find-all-before)265  — find all nodes before another node266* [`unist-util-find-all-between`](https://github.com/mrzmmr/unist-util-find-all-between)267  — find all nodes between two nodes268* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter)269  — create a new tree with nodes that pass a check270* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove)271  — remove nodes from tree272 273## Contribute274 275See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for276ways to get started.277See [`support.md`][support] for ways to get help.278 279This project has a [code of conduct][coc].280By interacting with this repository, organization, or community you agree to281abide by its terms.282 283## License284 285[MIT][license] © [Titus Wormer][author]286 287<!-- Definitions -->288 289[api-check]: #check290 291[api-convert]: #converttest292 293[api-is]: #isnode-test-index-parent-context294 295[api-test]: #test296 297[api-test-function]: #testfunction298 299[author]: https://wooorm.com300 301[backers-badge]: https://opencollective.com/unified/backers/badge.svg302 303[build]: https://github.com/syntax-tree/unist-util-is/actions304 305[build-badge]: https://github.com/syntax-tree/unist-util-is/workflows/main/badge.svg306 307[chat]: https://github.com/syntax-tree/unist/discussions308 309[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg310 311[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md312 313[collective]: https://opencollective.com/unified314 315[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md316 317[coverage]: https://codecov.io/github/syntax-tree/unist-util-is318 319[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-is.svg320 321[downloads]: https://www.npmjs.com/package/unist-util-is322 323[downloads-badge]: https://img.shields.io/npm/dm/unist-util-is.svg324 325[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c326 327[esmsh]: https://esm.sh328 329[hast-util-is-element]: https://github.com/syntax-tree/hast-util-is-element330 331[health]: https://github.com/syntax-tree/.github332 333[license]: license334 335[node]: https://github.com/syntax-tree/unist#node336 337[npm]: https://docs.npmjs.com/cli/install338 339[size]: https://bundlejs.com/?q=unist-util-is340 341[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=unist-util-is342 343[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg344 345[support]: https://github.com/syntax-tree/.github/blob/main/support.md346 347[typescript]: https://www.typescriptlang.org348 349[unist]: https://github.com/syntax-tree/unist350 351[unist-util-select]: https://github.com/syntax-tree/unist-util-select352 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai