Fast, asynchronous, functional reactive stream programming framework with multi‑threading capability based on ES6+.

Master Build StatusMaster Build StatusDependenciesDev DependenciesKnown VulnerabilitiesDeepScan grade

Introduction to Scramjet

Scramjet is a fast, simple, free and open source functional reactive stream programming framework written on top of node.js streams with multi-threadding support. The code is written by chaining functions that transform data easily with ES7 async/await syntax. It is built upon the logic behind three well known javascript array operations: map, filter and reduce. Scramjet transforms are so standard and natural that we're sure you can start writing your code straight away.

StringStream
  .from(async () => {
    const res = await fetch(url);
    if (!res.ok) throw new Error("Aaaaargh!")
    return res.body;
  })
  .split(/\r?\n/)
  .parse(str => str.split("\t"))
  .map(
    async ([name, ...items]) => insertToDB({name, items})
  )
  .reduce(
    async (acc, {score}) => acc + await dedupe(inserted),
    0
  )
  .then(
    () => console.log(`Found and confirmed`)
  )