How to use xxhash-wasm - 1 common examples

To help you get started, we’ve selected a few xxhash-wasm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github preconstruct / preconstruct / packages / cli / src / rollup-plugins / babel.ts View on Github external
supportsStaticESM: true,
    supportsDynamicImport: true,
    ...rest.caller
  }
});

const lru = new QuickLRU<
  string,
  { code: string; promise: Promise<{ code: string; map: any }> }
>({
  maxSize: 1000
});

let hasher: (str: string) => string;

export let hasherPromise = initHasher().then(({ h64 }: any) => {
  hasher = h64;
});

let rollupPluginBabel = (pluginOptions: any): Plugin => {
  const { exclude, extensions, include, ...babelOptions } = unpackOptions(
    pluginOptions
  );

  const extensionRegExp = new RegExp(
    `(${extensions.map(escapeRegExpCharacters).join("|")})$`
  );
  const includeExcludeFilter = createFilter(include, exclude);
  const filter = (id: string) =>
    extensionRegExp.test(id) && includeExcludeFilter(id);

  return {

xxhash-wasm

A WebAssembly implementation of xxHash

MIT
Latest version published 2 days ago

Package Health Score

83 / 100
Full package analysis

Popular xxhash-wasm functions