Commit 20e4874688b4cc2a7e5dfdbad0fcc957c122dcdc
map: throw early error when lambda not provided
Matt McKegg committed on 2/22/2017, 10:44:55 PMParent: 2abf94ac0a2426a4fdd52b784e622a8e3f6645d0
Files changed
map.js | changed |
map.js | ||
---|---|---|
@@ -8,8 +8,10 @@ | ||
8 | 8 … | |
9 | 9 … | function Map (obs, lambda, opts) { |
10 | 10 … | // opts: comparer, maxTime, onRemove |
11 | 11 … | |
12 … | + if (typeof lambda !== 'function') throw new Error('mutant/map lambda must be a function') | |
13 … | + | |
12 | 14 … | var comparer = opts && opts.comparer || null |
13 | 15 … | var releases = [] |
14 | 16 … | var binder = LazyWatcher(update, listen, unlisten) |
15 | 17 … |
Built with git-ssb-web