Notable Pottery Manufacturer
Miss any of our Open RFC calls?Watch the recordings here! »

needjs

0.4.15 • Public • Published

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');

Keywords

none

Install

npm i needjs

DownloadsWeekly Downloads

25

Version

0.4.15

License

GPL-3.0

Last publish

Collaborators

  • avatar