Skip to content

luma-dev/unist-util-visit-fast

Repository files navigation

@luma-dev/unist-util-visit-fast

License

MIT and CC0

Install

npm i @luma-dev/unist-util-visit-fast

Usage

import {
  visit,
  CONTINUE,
  STEP_OVER,
  REPLACE,
  EXIT,
  BREAK,
  DELETE,
  DELETE_EXIT,
  DELETE_BREAK,
} from "@luma-dev/unist-util-visit-fast";

Please refer to src/__tests__/visit.spec.ts

Why?

unist-util-visit took $O(n^2)$ time when you have $n$ children. This library just takes $O(n)$ time.

Quick benchmark for the key point logic.

About

No description, website, or topics provided.

Resources

License

CC0-1.0, MIT licenses found

Licenses found

CC0-1.0
CC0-LICENSE
MIT
MIT-LICENSE

Stars

Watchers

Forks

Packages

No packages published