New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sweet-compose

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sweet-compose

Sweet js macro for function composition

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

sweet-compose

NPM version

Sweet js macro for function composition

Usage

$ npm install --save sweet-compose
$ sjs -m sweet-compose myfile.js
var assert = require('chai').assert

it('should compose two functions', function() {
	function add1(x) { return x+1; }
	function double(x) { return x*2; }
	assert.equal((double +. add1)(2), 6)
})

it('should sequence two functions', function() {
	function add1(x) { return x+1; }
	function double(x) { return x*2; }
	assert.equal((double +| add1)(2), 5)
})

License

ISC © Raine Lourie

Keywords

sweet macros

FAQs

Package last updated on 27 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts