Skip to content
needjs is a module that will help you satisfy your needs and handles their requirement.
JavaScript
Branch: master
Clone or download
Latest commit d45f1f9 Sep 18, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Added Events Jul 16, 2017
examples renamed 04.bmi_fail to 04.bmi_wait Jul 8, 2017
test Added test enviornment Jul 8, 2017
.gitignore Added library Jul 8, 2017
.travis.yml Added test enviornment Jul 8, 2017
LICENSE Initial commit Jul 7, 2017
README.md Added readme Jul 8, 2017
index.js BugFix Sep 18, 2017
package.json 0.4.15 Sep 18, 2017

README.md

needjs

Build Status

needjs is a module that will help you satisfy your needs and handles their requirement.

Installation

$ npm install --save needjs

Getting Started

// import needjs
var NeedJS = require('needjs');
var sys = new NeedJS();
var Need = NeedJS.Need;

// Now let's define our needs.
sys.register(new Need({
  name: 'audience',
  post: function(inputs){
    this.done('world');
  }
}));

sys.register(new Need({
  name: 'hello',
  req: ['audience'],
  post: function(inputs){
  console.log("Hello " + inputs['audience'] + "!");
  }
}));

// Finally trigger the hello Need
sys.trigger('hello');
You can’t perform that action at this time.