Closed jamesplease closed 8 years ago
Actually – it could just use the callable
fn.
I've been doing this lately: browserify -r assert -s assert -o assert.js
and then:
var assert = require('./assert')
Granted this PR adds another file to commit, but it does work in browser/node.
That's pretty cool, @tbranyen ; I hadn't thought of doing that. With that said, sending down the entire assert module to the browser simply to verify that a variable is a function seems a lil inefficient to me. What do you think?
Yeah could be overkill, esp. if this module doesn't balloon out with edge case fixes.
I hadn't actually seen this until I had already done it. Thanks @jmeas
np ✌️
The tests prob. need to be updated, but this makes this thing work in browserz