JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q21806F

Package Exports

  • webstream-kernel

Readme

Webstream Kernel

Example: analyze all imports from a repo

import fs from "fs/promises";
import ignore from "ignore";
import imports from "imports-walk-ts";
import path from "path";
import { peekYaml } from "peek-log";
import { froms, filters, maps, nils } from "webstream-kernal";

const ignorer = ignore({})
  .add(await fs.readFile("./.gitignore", "utf8"))
  .createFilter();

await from(new Bun.Glob("./**/*.{ts,tsx,jsx,js}").scan())
  .pipeThrough(maps((f) => path.normalize(f)))
  .pipeThrough(filters(ignorer))
  .pipeThrough(maps((f) => fs.readFile(f, "utf8")))
  .pipeThrough(maps((c) => imports(c)))
  .pipeThrough(maps(peekYaml))
  .pipeTo(nils());