Skip to content

NuFlow/FlowJS

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FlowJS (Work in Progress)

Hello, world! Example:

// Setup code
async function hello() {
  return 'hello'
}

// More setup code
async function world(data) {
  return `${data}, world!`
}

// The good stuff
const result = await flow.promisify()
  .from(hello)
  .to(world)
  .run()
	
// result: hello, world!

Features:

  • Zero dependencies
  • Tiny library size! Under 2.50 KB minified and under 1KB gzipped!
  • Cross Platform - Runs everywhere Javascript does
  • Declarative style (tell the library WHAT you want, not how you want it) - 1 2 3 4
  • Functions have a lot of freedom, use: return values, Promises, async/await, or the traditional callback. Flow gets out of your way!

Installation:

npm install https://github.com/NuFlow/FlowJS --save


Include into your project (CommonJS)

const Flow = require('flow')
const flow = new Flow()

Tools used to create FlowJS:

  • Rollup for building and bundling
  • FlowType for static type-checking
  • Jest for runtime tests
  • WallabyJS for debugging and helping Jest along