1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

collect count and version information

This commit is contained in:
Dick Choi
2016-09-20 16:28:46 +09:00
parent 79d0006f3f
commit 123d5638cf
2 changed files with 22 additions and 0 deletions

View File

@@ -1,6 +1,12 @@
class MutableMap {
constructor (iterable) {
this._map = new Map(iterable)
Object.defineProperty(this, 'size', {
get: () => this._map.size,
set: function (value) {
this['size'] = value
}
})
}
get (...args) {
@@ -54,6 +60,12 @@ class MutableMap {
class MutableSet {
constructor (iterable) {
this._set = new Set(iterable)
Object.defineProperty(this, 'size', {
get: () => this._map.size,
set: function (value) {
this['size'] = value
}
})
}
add (...args) {