tel
tel is designed to provide a similar feature to RSpec's let function in mocha. For more information on why this is useful, see this stackoverflow question "When to use RSpec let"
Install
tel can be used with Node.js and in modern browsers
Install via npm
npm install tel --save
Or simply copy tel.js
into the desired location
Usage
var Tel = ;var tel = ; // Set a value;;telalso = 'as property'; // Set a lazy value; // Access values by property5 === telnumber; // Refer to other values; // Values can also be calculated asynchronously; // But make sure you access them asynchronously tootel;
Lazy and async values are only ever calculated once per tel()
instance.
For more examples, see the unit tests