promisify.js
function promisify_value(result_transformer) {
    result_transformer = result_transformer || identity;

    var transformer = function (promise) {
        result_transformer(promise);
    };

    transformer.for_property = function (obj_promise, prop) {
        return when(obj_promise, function (obj) {
            result_transformer(obj[prop]);
        });
    };

    return transformer;
}
function promisify_value(result_transformer) {
    result_transformer = result_transformer || identity;

    var transformer = function (promise) {
        result_transformer(promise);
    };

    transformer.for_property = function (obj_promise, prop) {
        return when(obj_promise, function (obj) {
            result_transformer(obj[prop]);
        });
    };

    return transformer;
}
function promisify_value ( result_transformer ) { result_transformer = result_transformer || identity ; var transformer = function ( promise ) { result_transformer ( promise ) ; } ; transformer . for_property = function ( obj_promise , prop ) { return when ( obj_promise , function ( obj ) { result_transformer ( obj [ prop ] ) ; } ) ; } ; return transformer ; }
Produces a transformer that takes a value and simply returns it.
Produces a transformer that takes a value and simply returns it .