NOTE This libraray does not actually construct an oil pipeline
This libraray will take an array of objects and safely place them in your global scope as follows:
Non-Leaky Pipes:
{foo: 'bar'} -> IfooI = 'bar';
Leaky Pipes:
{foo: 'bar'} -> foo = 'bar';
There is a 50% chance that your pipeline will leak, but don't worry, we have a leak detector that works ~20% of the time, so you can at least get an early warning (you lucky dog, you).
Working Example
var dapl = new (require('dapl')); // start your project
dapl.construct({ // lay down dome pipe
foo: 'bar'
});
var safe = dapl.flush(); //flush some oil through them pipes, what could go wrong, returns false if leaks were detected by super advanced leak detection sensors!!!
console.log('SAFE:', safe);
try{
console.log(IfooI); // Should log 'bar' if yo pipes ain't leaky!
}catch(e){
console.log('Whoops, we were wrong...it leaked!'); // This is what happens if we were unable to catch your leakiness in time... Don't worry... ... .. we're pretty sure the EPA or someone will help...maybe.
}