Merge pull request #5 from omphalos/defineProperty

Use Object.defineProperty not __defineGetter__
This commit is contained in:
AJ ONeal 2018-03-27 22:57:05 -06:00 committed by GitHub
commit a13644945f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -88,8 +88,10 @@
return Object.keys(this)[i];
};
Storage.prototype.__defineGetter__('length', function () {
Object.defineProperty(Storage.prototype, 'length', {
get: function() {
return Object.keys(this).length;
}
});
Storage.prototype.___save___ = function () {