Skip to content

Instantly share code, notes, and snippets.

@phun-ky
Last active September 9, 2015 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phun-ky/655ae6c9f29ce544069b to your computer and use it in GitHub Desktop.
Save phun-ky/655ae6c9f29ce544069b to your computer and use it in GitHub Desktop.
var milk = require('milk');
var customer = require('customer');
var store = require('grocery-store');
// Buy one gallon
customer
.buy()
.product(milk)
.quantity(1)
.unit('gallon');
if(store.gotEggs()){
// 12 more gallons
customer
.buy()
.product(milk)
.quantity(12)
.unit('gallon');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment