4.4.1 • Published 9 years ago

fly-util v4.4.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

Fly Utilities

npm package

About

Fly is a modern build system for Node based in co-routines, generators and promises.

Install

npm install fly-util

Usage

import util from "fly-util"

API

log

function log (...args)

Wrapper for Console.log.

error

function error (...args)

Wrapper for Console.error.

alert

function alert (...args)

Wrapper for Console.log in a distinctive color. Set process.env.VERBOSE to show output.

trace

function trace (e)
  • e {Object} error object

Wrapper for prettyjson.

defer

function defer (asyncFunc)
  • asyncFunc {Function} async function of the form (value, options, cb)
  • return {Function} new function that returns a promise

Promisify a function with a callback.

flatten

function flatten (array)
  • array {Array}
  • return [[a],[b],[c]] → [a,b,c]

Flatten a nested array recursively.

filter

function filter (pkg, load, blacklist = [], bind = true)
  • pkg {Package} project's package.json
  • load {Function} load handler
  • blacklist {Array} blacklisted plugins
  • return {Array} list of fly dependencies that can be loaded

Find fly-* plugins listed in a package dependencies.

expand

function expand (pattern, options)
  • pattern {String} Pattern to match
  • handler {Object} options to glob
  • return {Promise}

Promisified glob wrapper.

find

function* find (path, names)
  • path {String} file or path to the Flyfile
  • bind {Function} Optional. use to bind require or process path
  • return {String} path to the Flyfile

Find a valid Flyfile from a given path. If path is a directory find the first Flyfile with a supported extension.

bind

function bind (path, names)
  • path {String} file or path to the Flyfile
  • return {String} path to the Flyfile

Bind to node's require based in the file extension of your Flyfile.

Support ES6/7 by default, but Flyfiles can be written in any language supported in interpret.

Dependencies

  • mz/fs promise wrapped basic IO handling
  • clor terminal colors
  • glob expanding path/file glob patterns
  • prettyjson pretty formatting for JSON objects
  • interpret resolve modules for in-the-fly compilation.
  • update-notifier CLI update notifications

License

MIT © Jorge Bucaran et al :heart:

4.4.1

9 years ago

4.4.0

9 years ago

4.3.0

10 years ago

4.2.0

10 years ago

4.1.0

10 years ago

4.0.1

10 years ago

4.0.0

10 years ago

3.9.2

10 years ago

3.9.1

10 years ago

3.9.0

10 years ago

3.8.1

10 years ago

3.8.0

10 years ago

3.7.0

10 years ago

3.6.0

10 years ago

3.5.1

10 years ago

3.5.0

10 years ago

3.4.3

10 years ago

3.4.2

10 years ago

3.4.1

10 years ago

3.4.0

10 years ago

3.3.0

10 years ago

3.2.0

10 years ago

3.1.0

10 years ago

3.0.0

10 years ago

0.3.0

10 years ago

2.0.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.1

10 years ago