Skip to content

Commit

Permalink
Merge pull request #7 from Raynos/patch-5
Browse files Browse the repository at this point in the history
Make methods non enumerable
  • Loading branch information
nrw committed Nov 28, 2014
2 parents c505264 + 182593c commit 98e7b8b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ function ObservVarhash (hash, createValue) {
}

var obs = Observ(initialState)
obs._removeListeners = {}
setNonEnumerable(obs, '_removeListeners', {})

obs.get = get.bind(obs)
obs.put = put.bind(obs, createValue)
obs.delete = del.bind(obs)
setNonEnumerable(obs, 'set', obs.set)
setNonEnumerable(obs, 'get', get.bind(obs))
setNonEnumerable(obs, 'put', put.bind(obs, createValue))
setNonEnumerable(obs, 'delete', del.bind(obs))

for (key in hash) {
obs[key] = typeof hash[key] === 'function' ?
Expand Down

0 comments on commit 98e7b8b

Please sign in to comment.