kriskowal/zip — pull request #12 by deathcap (2014-01-17 04:07:14+00:00)
Title: Add compatibility with browserify 3

Two fixes to allow zip to run under browserify 3.19.0:

1. isBuffer() check, per https://npmjs.org/package/native-buffer-browserify
> Use Buffer.isBuffer instead of instanceof Buffer. The Buffer constructor returns a Uint8Array (as discussed above) for performance reasons, so instanceof Buffer won't work. In node Buffer.isBuffer just does instanceof Buffer, but in browserify we use a Buffer.isBuffer shim that detects our special Uint8Array-based Buffers.

2. readUInt8() instead of get() on Buffer. Seems this method is available but undocumented http://nodejs.org/api/buffer.html in NodeJS (tested on 0.10.21), but in native-buffer-browserify it is not available and readUInt8 is equivalent (on both platforms)