Function.prototype.createInterceptor = function createInterceptor(fn) {
    var scope = {};
    return function() {
        if (fn.apply(scope, arguments)) {
return this.apply(scope, arguments);
        }
        else {
            return null;
        }
    };
};
var interceptMe = function cube(x) {
    console.info(x);
    return Math.pow(x, 3);
};
var cube = interceptMe.createInterceptor(function(x) {
    return typeof x === "number";
});