mirror of
https://github.com/rhinstaller/node-cache.git
synced 2026-11-03 21:49:47 -09:00
18 lines
395 B
JavaScript
18 lines
395 B
JavaScript
'use strict';
|
|
|
|
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;
|
|
};
|