"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/es5-ext/array/_sub-array-dummy-safe.js" (11 Apr 2017, 606 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 'use strict';
    2 
    3 var setPrototypeOf = require('../object/set-prototype-of')
    4   , isExtensible   = require('./_is-extensible');
    5 
    6 module.exports = (function () {
    7     var SubArray;
    8 
    9     if (isExtensible) return require('./_sub-array-dummy');
   10 
   11     if (!setPrototypeOf) return null;
   12     SubArray = function () {
   13         var arr = Array.apply(this, arguments);
   14         setPrototypeOf(arr, SubArray.prototype);
   15         return arr;
   16     };
   17     setPrototypeOf(SubArray, Array);
   18     SubArray.prototype = Object.create(Array.prototype, {
   19         constructor: { value: SubArray, enumerable: false, writable: true,
   20             configurable: true }
   21     });
   22     return SubArray;
   23 }());