This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import benchmark from 'benchloop'; | |
import fs from 'node:fs'; | |
import path from 'node:path'; | |
import toIgnore from 'fast-ignore'; | |
import dotignore from 'dotignore'; | |
/* HELPERS */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import {$} from 'voby'; | |
import {useCanvasOverlay, useEffect, useEventListener, useRect, useResolved} from '~/hooks'; | |
/* TYPES */ | |
type Line = { | |
offset: number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- string_decoder | |
- 1.1.1 | |
- Repository: https://github.com/nodejs/string_decoder | |
- Readme: https://raw.githubusercontent.com/nodejs/string_decoder/master/README.md | |
- License: https://raw.githubusercontent.com/nodejs/string_decoder/master/LICENSE | |
- 1.3.0 | |
- Repository: https://github.com/nodejs/string_decoder | |
- Readme: https://raw.githubusercontent.com/nodejs/string_decoder/master/README.md | |
- License: https://raw.githubusercontent.com/nodejs/string_decoder/master/LICENSE | |
- source-map |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sieve = ( size ) => { | |
//TODO: add windowing for the buffer, allocating a fixed-size buffer that gets repopulated when needed | |
const buffer = new Uint8Array ( Math.ceil ( size / 8 ) ).fill ( 255 ); | |
const primes = []; | |
let prev = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import {$$} from 'voby'; | |
import {useEffect} from '~/hooks'; | |
/* MAIN */ | |
const useResizeObserver = ( ref: $<Element | undefined>, fn: ResizeObserverCallback, options: ResizeObserverOptions = {} ): void => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:where(abbr), :where(address), :where(area), :where(article), :where(aside), :where(audio), :where(b), :where(base), :where(bdi), :where(bdo), :where(big), :where(blockquote), :where(body), :where(br), :where(caption), :where(cite), :where(code), :where(col), :where(colgroup), :where(data), :where(datalist), :where(dd), :where(del), :where(details), :where(dfn), :where(dialog), :where(dl), :where(dt), :where(em), :where(embed), :where(fieldset), :where(figcaption), :where(figure), :where(footer), :where(form), :where(h1), :where(h2), :where(h3), :where(h4), :where(h5), :where(h6), :where(head), :where(header), :where(hgroup), :where(hr), :where(i), :where(input), :where(ins), :where(kbd), :where(keygen), :where(label), :where(legend), :where(li), :where(link), :where(main), :where(map), :where(mark), :where(menu), :where(menuitem), :where(meta), :where(meter), :where(nav), :where(object), :where(ol), :where(optgroup), :where(option), :where(output), :where(param), :where(picture), :where(pre), :where(progress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import {$, $$, useEffect, useInterval} from 'voby'; | |
/* STYLE */ | |
css` | |
:root { | |
--lag-bar-color-bg: var(--color-black-bg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import './styles.scss'; | |
import _ from '_'; | |
import {$, $$} from 'voby'; | |
import {If} from '~/components'; | |
import {useActiving, useDragger} from '~/hooks'; | |
import type {Props} from './types'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 20x faster replacement for "npm run" | |
# - It supports scripts executing a built-in shell function | |
# - It supports scripts executing a binary found in PATH | |
# - It supports scripts executing a binary found in node_modules | |
# - It supports passing arguments and options to scripts | |
# - It supports reading scripts either via ripgrep (fast) or via jq (slower, but safer) | |
# - It adds ./node_modules/.bin to the $PATH | |
# - It handles gracefully when a script has not been found | |
# - It handles gracefully when "&", "&&", "|", "||", or ENV variables are used, falling back to "npm run" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as assert from 'node:assert'; | |
import Buffer from 'node:buffer'; | |
import fs from 'node:fs'; | |
import {deflateSync, inflateSync} from 'fflate'; | |
import * as LZW from '@amoutonbrady/lz-string' | |
import * as Huffy from 'huffy'; | |
import Base64 from 'radix64-encoding'; | |
const encoder = new TextEncoder (); |