Skip to content

Commit 0392a0f

Browse files
committed
Delete the TypedArray polyfill
The `polyFill()` for TypedArray was causing problems with `purs bundle` v0.14.4. #34 The link which the `polyFill()` function referred to is dead. This link shows what appears to be a fully-functional TypedArray polyfill, which is not what we had in our library. Was our `polyFill()` even working at all? I don't know. https://github.com/zloirock/core-js#ecmascript-typed-arrays
1 parent 20f4de1 commit 0392a0f

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## Unreleased
6+
7+
@jamesdbrock Delete the `TypedArray` polyfill which was preventing this
8+
library from working with `purs bundle` v0.14.4.
9+
https://github.com/purescript-contrib/purescript-arraybuffer/issues/34
10+
511
## v11.0.0
612

713
Jorge Acereda has graciously donated this package to __purescript-contrib__.

src/Data/ArrayBuffer/Typed.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
"use strict";
22

3-
4-
5-
// Lightweight polyfill for ie - see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Methods_Polyfill
6-
function polyFill () {
7-
var typedArrayTypes =
8-
[ Int8Array, Uint8Array, Uint8ClampedArray, Int16Array
9-
, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array
10-
];
11-
12-
for (var k in typedArrayTypes) {
13-
for (var v in Array.prototype) {
14-
if (Array.prototype.hasOwnProperty(v) && !typedArrayTypes[k].prototype.hasOwnProperty(v))
15-
typedArrayTypes[k].prototype[v] = Array.prototype[v];
16-
}
17-
}
18-
};
19-
20-
polyFill();
21-
223
// module Data.ArrayBuffer.Typed
234

245
exports.buffer = function buffer (v) {

0 commit comments

Comments
 (0)