node-buffer-v6-shim
A shim for older versions of node < v6 for methods such as allow()
, from()
, etc
Install
# Latest v1.x
npm install --save git+https://git.daplie.com/Daplie/node-buffer-v6-shim.git#v1
# Whatever happens to be in npm
npm install --save buffer-v6-shim
Usage
'use strict';
require('buffer-v6-polyfill');
// all your codez ...
Show me the Code
'use strict'; if Numberprocessversion1 >= 60 return; { return data encoding len;} { var SlowBuffer = SlowBuffer; return data encoding len;} if !Bufferalloc Bufferalloc = newBuffer;if !BufferallocUnsafe BufferallocUnsafe = newBuffer;if !BufferallocUnsafeSlow BufferallocUnsafeSlow = newSlowBuffer;if !Bufferfrom Bufferfrom = newBuffer; try Buffer; catche // wish I could do something here to fix the broken Buffer.from try Bufferfrom = newBuffer; catche // but alas, I cannot console;