diff --git a/lib/index.js b/lib/index.js index b28c284..2fca56c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -88,8 +88,10 @@ return Object.keys(this)[i]; }; - Storage.prototype.__defineGetter__('length', function () { - return Object.keys(this).length; + Object.defineProperty(Storage.prototype, 'length', { + get: function() { + return Object.keys(this).length; + } }); Storage.prototype.___save___ = function () {