Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xotic750/create-array-fix-x

Address Safari 10.1 array bug: https://bugs.webkit.org/show_bug.cgi?id=170264
https://github.com/xotic750/create-array-fix-x

array browser bugfix javascript nodejs opera

Last synced: 7 days ago
JSON representation

Address Safari 10.1 array bug: https://bugs.webkit.org/show_bug.cgi?id=170264

Awesome Lists containing this project

README

        


Travis status


Dependency status


devDependency status


npm version

## create-array-fix-x
Address Safari 10.1 array bug: https://bugs.webkit.org/show_bug.cgi?id=170264

**Version**: 0.1.0
**Author**: Xotic750
**License**: [MIT](<https://opensource.org/licenses/MIT>)
**Copyright**: Xotic750

### `module.exports([parameters])` ⇒ Object
Address Safari 10.1 array bug: https://bugs.webkit.org/show_bug.cgi?id=170264

**Kind**: Exported function
**Returns**: Object - An array or array subclass if array is broken.

| Param | Type | Description |
| --- | --- | --- |
| [parameters] | number \| \* | The construction parameters. |

**Example**
```js
var createArray = require('create-array-fix-x');

createArray(); // []
createArray(5); // [, , , , , ]
createArray(1, 2, 3, 4, 5); // [1, 2, 3, 4, 5]

// adressed bug
var testArray = createArrayFix(0, 2147483648); // Note: the second number is greater than a signed 32bit int
testArray.shift(); // remove the first element so arr is [2147483648]
testArray[1] = 1; // Safari fails to add the new element and the array is unchanged
testArray; // [2147483648, 1]
```