Skip to content

Helps to create objects. This is part of the BPM project

Notifications You must be signed in to change notification settings

Nearsoft/eq-chainify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eq-chainify

A Builder library that provides a simple way to create complex objects using chaining pattern.

##Example

     var myCar = makeCar().color('red').brand('nissan');

    myCar.specifications(); // { color: 'red', brand: 'nissan' }

    function makeCar() {
        var car = {};
        return chainify
            .obj(car)
            .field('color', 'white') // by default all cars are white
            .field('brand')
            .method('switchEngine', () => car['on'] = !car['on'])
            .value();
    }

About

Helps to create objects. This is part of the BPM project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •