enslave

0.0.2 • Public • Published

What is enslave?

enslave is the inverse function of liberate

Usage

var enslave = require('enslave')
 
function add(a, b){ return a.value + b.value }
 
var n = {add: enslave(add)}
 
var A = Object.create(n)
A.value = 1
 
var B = Object.create(n)
B.value = 2
 
A.add(B)  // returns 3
 

Credits

Ripped straight from sinful.js, as I found it useful on its own.

Readme

Keywords

none

Package Sidebar

Install

npm i enslave

Weekly Downloads

1

Version

0.0.2

License

CC-SA-BY-3.0

Last publish

Collaborators

  • ashnur