Skip to content

Commit 1a2607f

Browse files
author
Steve Thompson
committed
Modified the tests.
Modified package-lock.json. Made progress on reducing redundant dependency downloads, but still not finished.
1 parent a9327ef commit 1a2607f

File tree

3 files changed

+95
-424
lines changed

3 files changed

+95
-424
lines changed

dist/tests.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
var index_1 = require("./index");
4-
console.log('hello');
5-
//let arr = new PublicArrayReplacer([1, 2, 3, 4, 5, 6, 7, 8, 9]);
64
var arr = index_1.getPublicArray([1, 2, 3, 4, 5, 6, 7, 8, 9]);
7-
console.log(arr.remove.byIndex(0).byIndexes([1, 3, 5]).adjacentAt(1, 2)); // [2, 8, 9]
8-
var arrCopy = arr.copy;
9-
arrCopy.data = [1, 2];
10-
console.log(arrCopy.data);
5+
console.log(arr.remove
6+
.byIndexes([0, 2, 4, 6])
7+
.data); // [2, 4, 6, 8, 9]
8+
arr.replace.each(function (value) { return (value / 3); });
119
console.log(arr.data);
10+
console.log(arr.remove.between(1).data); // [2, 9]
11+
var arrCopy = arr.copy;
12+
arr.data = [1, 2];
13+
console.log(arrCopy.data); // [2, 9]
14+
console.log(arr.data); // [1, 2]
1215
/****************
1316
1417
15-
let otherArr = arr.data;
18+
let otherArr = arr.data;
1619
17-
otherArr.length = 0;
20+
otherArr.length = 0;
1821
19-
console.log(otherArr);
22+
console.log(otherArr);
2023
21-
console.log(arr.data);
24+
console.log(arr.data);
2225
*************/
2326
/************
2427
arr.remove.allAfterFirst(6);

lib/tests.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
import { getPublicArray } from './index';
2-
import { PublicArrayReplacer } from '@writetome51/public-array-replacer';
32

4-
console.log('hello');
5-
//let arr = new PublicArrayReplacer([1, 2, 3, 4, 5, 6, 7, 8, 9]);
3+
64
let arr = getPublicArray([1, 2, 3, 4, 5, 6, 7, 8, 9]);
7-
console.log(arr.remove.byIndex(0).byIndexes([1,3,5]).adjacentAt(1, 2));// [2, 8, 9]
8-
let arrCopy = arr.copy;
9-
arrCopy.data = [1,2];
10-
console.log(arrCopy.data);
5+
console.log(
6+
arr.remove
7+
.byIndexes([0, 2, 4, 6])
8+
.data
9+
);// [2, 4, 6, 8, 9]
10+
11+
arr.replace.each((value) => (value / 3));
1112
console.log(arr.data);
13+
console.log(arr.remove.between(1).data); // [2, 9]
14+
let arrCopy = arr.copy;
15+
arr.data = [1, 2];
16+
console.log(arrCopy.data); // [2, 9]
17+
console.log(arr.data);// [1, 2]
1218

1319
/****************
1420
1521
16-
let otherArr = arr.data;
22+
let otherArr = arr.data;
1723
18-
otherArr.length = 0;
24+
otherArr.length = 0;
1925
20-
console.log(otherArr);
26+
console.log(otherArr);
2127
22-
console.log(arr.data);
28+
console.log(arr.data);
2329
*************/
2430

2531

26-
2732
/************
2833
arr.remove.allAfterFirst(6);
2934
arr.remove.allBeforeFirst(3);

0 commit comments

Comments
 (0)