Sha256: 9b207c8f87db4ff5787b6fb956bcb7c39adbc1e5d0bd8c4795b75a3b34952a83

Contents?: true

Size: 611 Bytes

Versions: 2

Compression:

Stored size: 611 Bytes

Contents

//     Emerson Util
//
//     ...

(function(ns){

  // Emerson Extension
  // --------------------------------------------------------------------------

  // util
  var util = ns.util = {
    // A reference to the namespace.
    ns   : ns,
    init : function init() {},

    // ...
    augment : function augment(object, name, fn) {
      var original = object[name];

      object[name] = function() {
        var result = (original && original.apply(this, arguments)) || this;
        return fn.apply(result, arguments);                                    // closure issue?
      }
    }
  };
})(Emerson);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
emerson-0.0.2 vendor/assets/javascripts/emerson/util.js
emerson-0.0.1 vendor/assets/javascripts/emerson/util.js