create_buffer.js 380 B

1234567891011121314
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _buffer = require('buffer');
  6. var createBuffer = _buffer.Buffer.from && _buffer.Buffer.alloc && _buffer.Buffer.allocUnsafe && _buffer.Buffer.allocUnsafeSlow ? _buffer.Buffer.from : // support for Node < 5.10
  7. function (val) {
  8. return new _buffer.Buffer(val);
  9. };
  10. exports.default = createBuffer;