Chain identities
When manipulating a chain (including Promise), we could always change, at any moment, the chain's API (so its identity) by calling any "identity method".
deep.fs("/my/root") // identity method 1 : we start a "file system" chain (nodejs)
.from("myjsonfile.json") // read a json file
.done(function(success){ // manipulate loaded json
success.myProp = "hello world";
//...
})
.restful("myService") // identity method 2 : we take the "restful chain" API, we keep current success
.post() // post current success (the maniplated loaded json) to myService
.fail(function(error){
// handle any error produced somewhere in the chain
});