//here's an AJAX request and a chain of promises
m.request({method: "GET", url: "/api/projects"})
.then(console.log) // log all projects
.then(pastItems) // filter past projects
.then(console.log) // log past projects only
The calls to console.log will not work.You need to do this:
.then(function() { console.log(arguments); })
Or this: .then(console.log.bind(console))