The check for typeof Buffer !== 'undefined' is unnecessary since is-buffer already works fine in environments where Buffer is not defined. Removing it will prevent kind-of from causing this package (which pulls in a lot of code) to bloat the consumer's bundle.
Rel substack/node-browserify#1228
I found this code, which causes browserify to bundle the
buffer
package:The check for
typeof Buffer !== 'undefined'
is unnecessary sinceis-buffer
already works fine in environments whereBuffer
is not defined. Removing it will preventkind-of
from causing this package (which pulls in a lot of code) to bloat the consumer's bundle.