@aws/pdk
Version:
All documentation is located at: https://aws.github.io/aws-pdk
19 lines (14 loc) • 395 B
JavaScript
;
var define = require('define-properties');
var getPolyfill = require('./polyfill');
module.exports = function shimArrayBufferSlice() {
if (typeof ArrayBuffer === 'function') {
var polyfill = getPolyfill();
define(
ArrayBuffer.prototype,
{ slice: polyfill },
{ slice: function () { return ArrayBuffer.prototype.slice !== polyfill; } }
);
}
return polyfill;
};