Skip to content

Commit 201f876

Browse files
authored
Remove unused bind and sum utilities. NFC (#21544)
Move `range` utility to `parseTools_legacy.js` which is the only place it was used.
1 parent ca49672 commit 201f876

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/parseTools_legacy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ function stripCorrections(param) {
6565

6666
const UNROLL_LOOP_MAX = 8;
6767

68+
function range(size) {
69+
return Array.from(Array(size).keys());
70+
}
71+
6872
function makeCopyValues(dest, src, num, type, modifier, align, sep = ';') {
6973
warn('use of legacy parseTools function: makeCopyValues');
7074
assert(typeof align === 'undefined');

src/utility.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,6 @@ function error(msg) {
7878
printErr(`error: ${errorPrefix()}${msg}`);
7979
}
8080

81-
function range(size) {
82-
return Array.from(Array(size).keys());
83-
}
84-
85-
function bind(self, func) {
86-
return function(...args) {
87-
func.apply(self, args);
88-
};
89-
}
90-
91-
function sum(x) {
92-
return x.reduce((a, b) => a + b, 0);
93-
}
94-
9581
// options is optional input object containing mergeInto params
9682
// currently, it can contain
9783
//

0 commit comments

Comments
 (0)