Skip to content

Commit ebe4000

Browse files
committed
refactor: rename variables
1 parent 4622ac2 commit ebe4000

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ import {Comparator, Comparison} from "@softwareventures/ordered";
22
import {Dictionary} from "dictionary-types";
33

44
// tslint:disable-next-line:no-unbound-method
5-
const internalSlice = Array.prototype.slice;
5+
const nativeSlice = Array.prototype.slice;
66

77
export const copy: <T>(array: ArrayLike<T>) => T[] =
88
Array.from != null
99
? Array.from // tslint:disable-line:no-unbound-method
10-
: array => internalSlice.call(array);
10+
: array => nativeSlice.call(array);
1111

1212
// tslint:disable-next-line:no-unbound-method
13-
const internalMap = Array.prototype.map;
13+
const nativeMap = Array.prototype.map;
1414

1515
export const map: <T, U>(array: ArrayLike<T>, f: (element: T, index: number) => U) => U[] =
1616
Array.from != null
1717
// tslint:disable-next-line:no-unbound-method
1818
? Array.from as any // TypeScript 3.2 incorrectly requires this cast to any.
19-
: (array, f) => internalMap.call(array, f);
19+
: (array, f) => nativeMap.call(array, f);
2020

2121
export function reverse<T>(array: ArrayLike<T>): T[] {
2222
const result = copy<T>({length: array.length});

0 commit comments

Comments
 (0)