4 functions to make sure the new buffer methods work in older browsers.
7 var bufferShim = require('buffer-shims');
8 bufferShim.from('foo');
9 bufferShim.alloc(9, 'cafeface', 'hex');
10 bufferShim.allocUnsafe(15);
11 bufferShim.allocUnsafeSlow(21);
14 should just use the original in newer nodes and on older nodes uses fallbacks.
18 - this does not patch the buffer object, only the constructor stuff
19 - it's actually a polyfill
21 ![](https://i.imgur.com/zxII3jJ.gif)