Functional JavaScript
JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
src
test
test_src
.gitignore
.npmignore
.travis.yml
LICENSE-MIT
README.md
grunt.js
package.json

README.md

funkyjs - Functional JavaScript Build Status

Documentation

For now, look through the code.

Examples

var F = require('funkyjs');
var _ = require('underscore');

// funkyjs
var newList = F('map', F('range', 4), F('incr'));

// JavaScript + Underscore
var newList = _.map(_.range(4), function(el) {
  return el += 1;
});

// funkyjs
var array = (
  F('sortBy',
    F('zip',
      F('shuffle', F('range', 62)),
      F('shuffle', F('range', 62))), F('sum-array')));

// JavaScript + Underscore
var array = (
  _.sortBy(
    _.zip(_.shuffle(_.range(62)), _.shuffle(_.range(62))),
    function() {
      return _.reduce(
        _.toArray(arguments),
        function(memo, el) {
          return memo + el;
        },
        0
      );
    }
  )
);

Even better...

# funkyjs + CoffeeScript
array = (
  (F 'sortBy',
    (F 'zip',
      (F 'shuffle', (F 'range', 62)),
      (F 'shuffle', (F 'range', 62))), (F 'sum-array')))

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

License

Copyright (c) 2013 Vail Gold
Licensed under the MIT license.