Skip to content

It's a utility for wrapping generators for complete execution without calling next everytime.

License

Notifications You must be signed in to change notification settings

Rohail1/gen-djinn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generator-wrapper

It's utility for wrapping generators for complete executiong without calling next everytime. ##Installation

npm install gen-djinn --save

How to use

    let genDjinn = require('gen-djinn'); 
    
    let genSum = function*(num1,num2) {
      let number =  yield num1;
      let number2 =  yield num2;
      let result = yield number + number2;
      return result;
    };

    let gen = genDjinn(genSum);
    
    let result  = gen(2,4);  // result = 6;

###Tests

npm test

###Issues

Create an issue if there are any bugs.

For Any Queries

Feel free to contact me via email or on my website lumous.pk

About

It's a utility for wrapping generators for complete execution without calling next everytime.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published