diff options
| author | jez | 2011-01-31 14:47:18 +0800 | 
|---|---|---|
| committer | jez | 2011-01-31 15:24:08 +0800 | 
| commit | f33844c7895c8cf72a020171ccc1b6de1c6c08fc (patch) | |
| tree | 2c57cdb0661eb4cf9634c42154df325bdc632346 /lib/utils.js | |
| parent | f8325f4de43121c81d17d3afcb93a647c28ae0d6 (diff) | |
| download | vimium-f33844c7895c8cf72a020171ccc1b6de1c6c08fc.tar.bz2 | |
Remove util functions that the refactor has rendered unnecessary
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 40 | 
1 files changed, 0 insertions, 40 deletions
| diff --git a/lib/utils.js b/lib/utils.js index 7fc2a6b9..0c992ad4 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,44 +1,4 @@  var utils = { -  // probably doesn't handle some cases correctly, but it works fine for what -  // we have now -  deepCopy: function(original) { -    var result; -    if (typeof original == 'object') { -      if (original === null) { -        result = null; -      } else { -        result = original.constructor === Array ? [] : {}; -        for (var i in original) -          if (original.hasOwnProperty(i)) -            result[i] = this.deepCopy(original[i]); -      } -    } else { -      result = original; -    } - -    return result; -  }, - -  /* -   * Extends 'original' with 'ext'. If a function in 'ext' also exists in -   * 'original', let the 'original' function be accessible in the new object -   * via a  ._super(functionName as String) method. _Cannot_ be used on its -   * result to achieve 'two-level' inheritance. -   */ -  extendWithSuper: function(original, ext) { -    var result = this.deepCopy(original); -    var tmpSuper = result._super; -    result._superFunctions = {}; -    result._super = function(fname) { return this._superFunctions[fname].bind(this); } -    for (var i in ext) -      if (ext.hasOwnProperty(i)) { -        if (typeof ext[i] == 'function' && typeof original[i] == 'function') -          result._superFunctions[i] = this.deepCopy(original[i]); -        result[i] = this.deepCopy(ext[i]); -      } -    return result; -  }, -    /*     * Takes a dot-notation object string and call the function     * that it points to with the correct value for 'this'. | 
