Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax was breaking our app build #215

Closed
wants to merge 1 commit into from

Conversation

Dilhando
Copy link

Hello, this function syntax makes our app crash. This fix is purely syntactic and fixes the problem.

Please check: https://github.com/FormidableLabs/victory-native/issues/653

Thanks for your consideration,
Thomas Zimmermann

@Dilhando
Copy link
Author

yarn run v1.22.10
$ mocha 'test/**/*-test.js' && eslint src test

✓ ascending(a, b) returns a negative number if a < b
✓ ascending(a, b) returns a positive number if a > b
✓ ascending(a, b) returns zero if a >= b and a <= b
✓ ascending(a, b) returns NaN if a and b are not comparable
✓ histogram is a deprecated alias for bin
✓ bin() returns a default bin generator
✓ bin(data) computes bins of the specified array of data
✓ bin(iterable) is equivalent to bin(array)
✓ bin.value(number) sets the constant value
✓ bin(data) does not bin null, undefined, or NaN
✓ bin.value(function) sets the value accessor
✓ bin.domain(array) sets the domain
✓ bin.domain(function) sets the domain accessor
✓ bin.thresholds(number) sets the approximate number of bin thresholds
✓ bin.thresholds(array) sets the bin thresholds
✓ bin.thresholds(array) ignores thresholds outside the domain
✓ bin.thresholds(function) sets the bin thresholds accessor
✓ bin(data) uses nice thresholds
✓ bin()() returns bins whose rightmost bin is not too wide
✓ bin(data) coerces values to numbers as expected
✓ bisect is an alias for bisectRight
✓ bisectLeft(array, value) returns the index of an exact match
✓ bisectLeft(array, value) returns the index of the first match
✓ bisectLeft(empty, value) returns zero
✓ bisectLeft(array, value) returns the insertion point of a non-exact match
✓ bisectLeft(array, value) has undefined behavior if the search value is unorderable
✓ bisectLeft(array, value, lo) observes the specified lower bound
✓ bisectLeft(array, value, lo, hi) observes the specified bounds
✓ bisectLeft(array, value) handles large sparse d3
✓ bisectRight(array, value) returns the index after an exact match
✓ bisectRight(array, value) returns the index after the last match
✓ bisectRight(empty, value) returns zero
✓ bisectRight(array, value) returns the insertion point of a non-exact match
✓ bisectRight(array, value, lo) observes the specified lower bound
✓ bisectRight(array, value, lo, hi) observes the specified bounds
✓ bisectRight(array, value) handles large sparse d3
✓ bisector(comparator).left(array, value) returns the index of an exact match
✓ bisector(comparator).left(array, value) returns the index of the first match
✓ bisector(comparator).left(empty, value) returns zero
✓ bisector(comparator).left(array, value) returns the insertion point of a non-exact match
✓ bisector(comparator).left(array, value) has undefined behavior if the search value is unorderable
✓ bisector(comparator).left(array, value, lo) observes the specified lower bound
✓ bisector(comparator).left(array, value, lo, hi) observes the specified bounds
✓ bisector(comparator).left(array, value) handles large sparse d3
✓ bisector(comparator).right(array, value) returns the index after an exact match
✓ bisector(comparator).right(array, value) returns the index after the last match
✓ bisector(comparator).right(empty, value) returns zero
✓ bisector(comparator).right(array, value) returns the insertion point of a non-exact match
✓ bisector(comparator).right(array, value, lo) observes the specified lower bound
✓ bisector(comparator).right(array, value, lo, hi) observes the specified bounds
✓ bisector(comparator).right(array, value) handles large sparse d3
✓ bisector(accessor).left(array, value) returns the index of an exact match
✓ bisector(accessor).left(array, value) returns the index of the first match
✓ bisector(accessor).left(array, value) returns the insertion point of a non-exact match
✓ bisector(accessor).left(array, value) has undefined behavior if the search value is unorderable
✓ bisector(accessor).left(array, value, lo) observes the specified lower bound
✓ bisector(accessor).left(array, value, lo, hi) observes the specified bounds
✓ bisector(accessor).left(array, value) handles large sparse d3
✓ bisector(accessor).right(array, value) returns the index after an exact match
✓ bisector(accessor).right(array, value) returns the index after the last match
✓ bisector(accessor).right(array, value) returns the insertion point of a non-exact match
✓ bisector(accessor).right(array, value, lo) observes the specified lower bound
✓ bisector(accessor).right(array, value, lo, hi) observes the specified bounds
✓ bisector(accessor).right(array, value) handles large sparse d3
✓ bisector(accessor).center(array, value) returns the closest index
✓ bisector(comparator).center(array, value) returns the closest index
✓ bisector(comparator).center(empty, value) returns zero
✓ bisector(ascending).center(array, value) returns the left value
✓ bisector(ordinalAccessor).center(array, value) returns the left value
✓ count() accepts an iterable
✓ count() ignores NaN, null
✓ count() coerces to a number
✓ count() accepts an accessor
✓ cross() returns an empty array
✓ cross([]) returns an empty array
✓ cross([1, 2], []) returns an empty array
✓ cross({length: weird}) returns an empty array
✓ cross(...strings) returns the expected result
✓ cross(a) returns the expected result
✓ cross(a, b) returns Cartesian product a×b
✓ cross(a, b, c) returns Cartesian product a×b×c
✓ cross(a, b, f) invokes the specified function for each pair
✓ cross(a, b, c, f) invokes the specified function for each triple
✓ cross(a, b) returns Cartesian product a×b of generators
✓ cumsum(array) returns the cumulative sum of the specified numbers
✓ cumsum(array) observes values that can be coerced to numbers
✓ cumsum(array) ignores non-numeric values
✓ cumsum(array) ignores null, undefined and NaN
✓ cumsum(array) returns zeros if there are no numbers
✓ cumsum(array, f) returns the cumsum of the specified numbers
✓ cumsum(array, f) observes values that can be coerced to numbers
✓ cumsum(array, f) ignores non-numeric values
✓ cumsum(array, f) ignores null, undefined and NaN
✓ cumsum(array, f) returns zeros if there are no numbers
✓ cumsum(array, f) passes the accessor d, i, and array
✓ cumsum(array, f) uses the undefined context
✓ descending(a, b) returns a positive number if a < b
✓ descending(a, b) returns a negative number if a > b
✓ descending(a, b) returns zero if a >= b and a <= b
✓ descending(a, b) returns NaN if a and b are not comparable
✓ deviation(array) returns the standard deviation of the specified numbers
✓ deviation(array) ignores null, undefined and NaN
✓ deviation(array) can handle large numbers without overflowing
✓ deviation(array) returns undefined if the array has fewer than two numbers
✓ deviation(array, f) returns the deviation of the specified numbers
✓ deviation(array, f) ignores null, undefined and NaN
✓ deviation(array, f) can handle large numbers without overflowing
✓ deviation(array, f) returns undefined if the array has fewer than two numbers
✓ difference(values, other) returns a set of values
✓ difference(...values) accepts iterables
✓ disjoint(values, other) returns true if sets are disjoint
✓ disjoint(values, other) allows values to be infinite
✓ disjoint(values, other) allows other to be infinite
✓ every(values, test) returns true if all tests pass
✓ every(values, test) returns true if values is empty
✓ every(values, test) accepts an iterable
✓ every(values, test) enforces that test is a function
✓ every(values, test) enforces that values is iterable
✓ every(values, test) passes test (value, index, values)
✓ every(values, test) short-circuts when test returns falsey
✓ every(values, test) does not skip sparse elements
✓ extent(array) returns the least and greatest numeric values for numbers
✓ extent(array) returns the least and greatest lexicographic value for strings
✓ extent(array) ignores null, undefined and NaN
✓ extent(array) compares heterogenous types as numbers
✓ extent(array) returns undefined if the array contains no numbers
✓ extent(array, f) returns the least and greatest numeric value for numbers
✓ extent(array, f) returns the least and greatest lexicographic value for strings
✓ extent(array, f) ignores null, undefined and NaN
✓ extent(array, f) compares heterogenous types as numbers
✓ extent(array, f) returns undefined if the array contains no observed values
✓ extent(array, f) passes the accessor d, i, and array
✓ extent(array, f) uses the undefined context
✓ fcumsum(array) returns a Float64Array of the expected length
✓ fcumsum(array) is an exact cumsum
✓ fcumsum(array) returns the fsum of the specified numbers
✓ fcumsum(array) observes values that can be coerced to numbers
✓ fcumsum(array) ignores non-numeric values
✓ fcumsum(array) ignores null, undefined and NaN
✓ fcumsum(array) returns an array of zeros if there are no numbers
✓ fcumsum(array, f) returns the fsum of the specified numbers
✓ fcumsum(array, f) observes values that can be coerced to numbers
✓ fcumsum(array, f) ignores non-numeric values
✓ fcumsum(array, f) ignores null, undefined and NaN
✓ fcumsum(array, f) returns zero if there are no numbers
✓ fcumsum(array, f) passes the accessor d, i, and array
✓ fcumsum(array, f) uses the undefined context
✓ filter(values, test) returns the values that pass the test
✓ filter(values, test) accepts an iterable
✓ filter(values, test) accepts a typed array
✓ filter(values, test) enforces that test is a function
✓ filter(values, test) enforces that values is iterable
✓ filter(values, test) passes test (value, index, values)
✓ filter(values, test) does not skip sparse elements
✓ flatGroup(data, accessor, accessor) returns the expected array
✓ flatRollup(data, reduce, accessor) returns the expected array
✓ flatRollup(data, reduce, accessor, accessor) returns the expected array
✓ new Adder() returns an Adder
✓ +adder can be applied several times
✓ fsum(array) is an exact sum
✓ fsum(array) returns the fsum of the specified numbers
✓ fsum(array) observes values that can be coerced to numbers
✓ fsum(array) ignores non-numeric values
✓ fsum(array) ignores null, undefined and NaN
✓ fsum(array) returns zero if there are no numbers
✓ fsum(array, f) returns the fsum of the specified numbers
✓ fsum(array, f) observes values that can be coerced to numbers
✓ fsum(array, f) ignores non-numeric values
✓ fsum(array, f) ignores null, undefined and NaN
✓ fsum(array, f) returns zero if there are no numbers
✓ fsum(array, f) passes the accessor d, i, and array
✓ fsum(array, f) uses the undefined context
✓ greatest(array) compares using natural order
✓ greatest(array, compare) compares using the specified compare function
✓ greatest(array, accessor) uses the specified accessor function
✓ greatest(array) returns undefined if the array is empty
✓ greatest(array) returns undefined if the array contains only incomparable values
✓ greatest(array) returns the first of equal values
✓ greatest(array) ignores null and undefined
✓ greatest(array, accessor) ignores null and undefined
✓ greatestIndex(array) compares using natural order
✓ greatestIndex(array, compare) compares using the specified compare function
✓ greatestIndex(array, accessor) uses the specified accessor function
✓ greatestIndex(array) returns -1 if the array is empty
✓ greatestIndex(array) returns -1 if the array contains only incomparable values
✓ greatestIndex(array) returns the first of equal values
✓ greatestIndex(array) ignores null and undefined
✓ greatestIndex(array, accessor) ignores null and undefined
✓ group(data, accessor) returns the expected map
✓ group(data, accessor, accessor) returns the expected map
✓ group(data, accessor) interns keys
✓ groups(data, accessor) returns the expected array
✓ groups(data, accessor, accessor) returns the expected array
✓ groupSort(data, reduce, key) returns sorted keys when reduce is an accessor
✓ groupSort(data, reduce, key) returns sorted keys when reduce is a comparator
✓ indexes(data, ...keys) returns the expected nested arrays
✓ index(data, ...keys) returns the expected map
✓ index(data, ...keys) throws on a non-unique key
✓ intersection(values) returns a set of values
✓ intersection(values, other) returns a set of values
✓ intersection(...values) returns a set of values
✓ intersection(...values) accepts iterables
✓ least(array) compares using natural order
✓ least(array, compare) compares using the specified compare function
✓ least(array, accessor) uses the specified accessor function
✓ least(array) returns undefined if the array is empty
✓ least(array) returns undefined if the array contains only incomparable values
✓ least(array) returns the first of equal values
✓ least(array) ignores null and undefined
✓ least(array, accessor) ignores null and undefined
✓ leastIndex(array) compares using natural order
✓ leastIndex(array, compare) compares using the specified compare function
✓ leastIndex(array, accessor) uses the specified accessor function
✓ leastIndex(array) returns -1 if the array is empty
✓ leastIndex(array) returns -1 if the array contains only incomparable values
✓ leastIndex(array) returns the first of equal values
✓ leastIndex(array) ignores null and undefined
✓ leastIndex(array, accessor) ignores null and undefined
✓ map(values, mapper) returns the mapped values
✓ map(values, mapper) accepts an iterable
✓ map(values, mapper) accepts a typed array
✓ map(values, mapper) enforces that test is a function
✓ map(values, mapper) enforces that values is iterable
✓ map(values, mapper) passes test (value, index, values)
✓ map(values, mapper) does not skip sparse elements
✓ max(array) returns the greatest numeric value for numbers
✓ max(array) returns the greatest lexicographic value for strings
✓ max(array) ignores null, undefined and NaN
✓ max(array) compares heterogenous types as numbers
✓ max(array) returns undefined if the array contains no numbers
✓ max(array, f) returns the greatest numeric value for numbers
✓ max(array, f) returns the greatest lexicographic value for strings
✓ max(array, f) ignores null, undefined and NaN
✓ max(array, f) compares heterogenous types as numbers
✓ max(array, f) returns undefined if the array contains no observed values
✓ max(array, f) passes the accessor d, i, and array
✓ max(array, f) uses the undefined context
✓ maxIndex(array) returns the index of the greatest numeric value for numbers
✓ maxIndex(array) returns the greatest lexicographic value for strings
✓ maxIndex(array) ignores null, undefined and NaN
✓ maxIndex(array) compares heterogenous types as numbers
✓ maxIndex(array) returns -1 if the array contains no numbers
✓ maxIndex(array, f) returns the greatest numeric value for numbers
✓ maxIndex(array, f) returns the greatest lexicographic value for strings
✓ maxIndex(array, f) ignores null, undefined and NaN
✓ maxIndex(array, f) compares heterogenous types as numbers
✓ maxIndex(array, f) returns -1 if the array contains no observed values
✓ maxIndex(array, f) passes the accessor d, i, and array
✓ maxIndex(array, f) uses the undefined context
✓ mean(array) returns the mean value for numbers
✓ mean(array) ignores null, undefined and NaN
✓ mean(array) returns undefined if the array contains no observed values
✓ mean(array) coerces values to numbers
✓ mean(array) coerces values exactly once
✓ mean(array, f) returns the mean value for numbers
✓ mean(array, f) ignores null, undefined and NaN
✓ mean(array, f) returns undefined if the array contains no observed values
✓ mean(array, f) coerces values to numbers
✓ mean(array, f) coerces values exactly once
✓ mean(array, f) passes the accessor d, i, and array
✓ mean(array, f) uses the undefined context
✓ median(array) returns the median value for numbers
✓ median(array) ignores null, undefined and NaN
✓ median(array) can handle large numbers without overflowing
✓ median(array) returns undefined if the array contains no observed values
✓ median(array) coerces strings to numbers
✓ median(array) coerces values exactly once
✓ median(array, f) returns the median value for numbers
✓ median(array, f) ignores null, undefined and NaN
✓ median(array, f) can handle large numbers without overflowing
✓ median(array, f) returns undefined if the array contains no observed values
✓ median(array, f) coerces strings to numbers
✓ median(array, f) coerces values exactly once
✓ median(array, f) passes the accessor d, i, and array
✓ median(array, f) uses the undefined context
✓ merge(arrays) merges an array of arrays
✓ merge(arrays) returns a new array when zero arrays are passed
✓ merge(arrays) returns a new array when one array is passed
✓ merge(arrays) returns a new array when two or more arrays are passed
✓ merge(arrays) does not modify the input arrays
✓ min(array) returns the least numeric value for numbers
✓ min(array) returns the least lexicographic value for strings
✓ min(array) ignores null, undefined and NaN
✓ min(array) compares heterogenous types as numbers
✓ min(array) returns undefined if the array contains no numbers
✓ min(array, f) returns the least numeric value for numbers
✓ min(array, f) returns the least lexicographic value for strings
✓ min(array, f) ignores null, undefined and NaN
✓ min(array, f) compares heterogenous types as numbers
✓ min(array, f) returns undefined if the array contains no observed values
✓ min(array, f) passes the accessor d, i, and array
✓ min(array, f) uses the undefined context
✓ minIndex(array) returns the index of the least numeric value for numbers
✓ minIndex(array) returns the index of the least lexicographic value for strings
✓ minIndex(array) ignores null, undefined and NaN
✓ minIndex(array) compares heterogenous types as numbers
✓ minIndex(array) returns -1 if the array contains no numbers
✓ minIndex(array, f) returns the index of the least numeric value for numbers
✓ minIndex(array, f) returns the index of the least lexicographic value for strings
✓ minIndex(array, f) ignores null, undefined and NaN
✓ minIndex(array, f) compares heterogenous types as numbers
✓ minIndex(array, f) returns -1 if the array contains no observed values
✓ minIndex(array, f) passes the accessor d, i, and array
✓ minIndex(array, f) uses the undefined context
✓ mode(array) returns the most frequent value for numbers
✓ mode(array) returns the most frequent value for strings
✓ mode(array) returns the most frequent value for heterogenous types
✓ mode(array) returns the first of the most frequent values
✓ mode(array) ignores null, undefined and NaN
✓ mode(array) returns undefined if the array contains no comparable values
✓ mode(array, f) returns the most frequent value for numbers
✓ mode(array, f) returns the most frequent value for strings
✓ mode(array, f) returns the most frequent value for heterogenous types
✓ mode(array, f) returns the first of the most frequent values
✓ mode(array, f) ignores null, undefined and NaN
✓ mode(array, f) returns undefined if the array contains no comparable values
✓ mode(array, f) passes the accessor d, i, and array
✓ mode(array, f) uses the undefined context
✓ nice(start, stop, count) returns [start, stop] if any argument is NaN
✓ nice(start, stop, count) returns [start, stop] if start === stop
✓ nice(start, stop, count) returns [start, stop] if count is not positive
✓ nice(start, stop, count) returns [start, stop] if count is infinity
✓ nice(start, stop, count) returns the expected values
✓ pairs(array) returns the empty array if input array has fewer than two elements
✓ pairs(array) returns pairs of adjacent elements in the given array
✓ pairs(array, f) invokes the function f for each pair of adjacent elements
✓ pairs(array) includes null or undefined elements in pairs
✓ permute(…) permutes according to the specified index
✓ permute(…) does not modify the input array
✓ permute(…) can duplicate input values
✓ permute(…) can return more elements
✓ permute(…) can return fewer elements
✓ permute(…) can return undefined elements
✓ permute(…) can take an object as the source
✓ permute(…) can take a typed array as the source
✓ permute(…) can take an iterable as the keys
✓ quantileSorted(array, p) requires sorted numeric input, quantile doesn't
✓ quantile() accepts an iterable
✓ quantile(array, p) uses the R-7 method
✓ quantile(array, p) coerces values to numbers
✓ quantile(array, p) returns an exact value for integer p-values
✓ quantile(array, p) returns the expected value for integer or fractional p
✓ quantile(array, p) returns the first value for p = 0
✓ quantile(array, p) returns the last value for p = 1
✓ quantile(array, p, f) observes the specified accessor
✓ range(stop) returns [0, 1, 2, … stop - 1]
✓ range(stop) returns an empty array if stop <= 0
✓ range(stop) returns an empty array if stop is NaN
✓ range(start, stop) returns [start, start + 1, … stop - 1]
✓ range(start, stop) returns an empty array if start or stop is NaN
✓ range(start, stop) returns an empty array if start >= stop
✓ range(start, stop, step) returns [start, start + step, start + 2 * step, … stop - step]
✓ range(start, stop, step) allows a negative step
✓ range(start, stop, step) returns an empty array if start >= stop and step > 0
✓ range(start, stop, step) returns an empty array if start >= stop and step < 0
✓ range(start, stop, step) returns an empty array if start, stop or step is NaN
✓ range(start, stop, step) returns an empty array if step is zero
✓ range(start, stop, step) returns exactly [start + step * i, …] for fractional steps
✓ range(start, stop, step) returns exactly [start + step * i, …] for very small fractional steps
✓ range(start, stop, step) returns exactly [start + step * i, …] for very large fractional steps
✓ reduce(values, reducer) returns the reduced value
✓ reduce(values, reducer, initial) returns the reduced value
✓ reduce(values, reducer) accepts an iterable
✓ reduce(values, reducer) enforces that test is a function
✓ reduce(values, reducer) enforces that values is iterable
✓ reduce(values, reducer) passes reducer (reduced, value, index, values)
✓ reduce(values, reducer, initial) passes reducer (reduced, value, index, values)
✓ reduce(values, reducer, initial) does not skip sparse elements
✓ reverse(values) returns a reversed copy
✓ reverse(values) returns an array
✓ reverse(values) accepts an iterable
✓ reverse(values) enforces that values is iterable
✓ reverse(values) does not skip sparse elements
✓ rollup(data, reduce, accessor) returns the expected map
✓ rollup(data, reduce, accessor, accessor) returns the expected map
✓ rollups(data, reduce, accessor) returns the expected array
✓ rollups(data, reduce, accessor, accessor) returns the expected array
✓ scan(array) compares using natural order
✓ scan(array, compare) compares using the specified compare function
✓ scan(array) returns undefined if the array is empty
✓ scan(array) returns undefined if the array contains only incomparable values
✓ scan(array) returns the first of equal values
✓ shuffle(array) shuffles the array in-place
✓ shuffler(random)(array) shuffles the array in-place
✓ shuffler(random)(array, start) shuffles the subset array[start:] in-place
✓ shuffler(random)(array, start, end) shuffles the subset array[start:end] in-place
✓ some(values, test) returns true if any test passes
✓ some(values, test) returns false if values is empty
✓ some(values, test) accepts an iterable
✓ some(values, test) enforces that test is a function
✓ some(values, test) enforces that values is iterable
✓ some(values, test) passes test (value, index, values)
✓ some(values, test) short-circuts when test returns truthy
✓ some(values, test) does not skip sparse elements
✓ sort(values) returns a sorted copy
✓ sort(values) defaults to ascending, not lexicographic
✓ sort(values, accessor) uses the specified accessor in natural order
✓ sort(values, ...accessors) accepts multiple accessors
✓ sort(values, comparator) uses the specified comparator
✓ sort(values) returns an array
✓ sort(values) accepts an iterable
✓ sort(values) enforces that values is iterable
✓ sort(values, comparator) enforces that comparator is a function
✓ sort(values) does not skip sparse elements
✓ subset(values, other) returns true if values is a subset of others
✓ sum(array) returns the sum of the specified numbers
✓ sum(array) observes values that can be coerced to numbers
✓ sum(array) ignores non-numeric values
✓ sum(array) ignores null, undefined and NaN
✓ sum(array) returns zero if there are no numbers
✓ sum(array, f) returns the sum of the specified numbers
✓ sum(array, f) observes values that can be coerced to numbers
✓ sum(array, f) ignores non-numeric values
✓ sum(array, f) ignores null, undefined and NaN
✓ sum(array, f) returns zero if there are no numbers
✓ sum(array, f) passes the accessor d, i, and array
✓ sum(array, f) uses the undefined context
✓ superset(values, other) returns true if values is a superset of others
✓ superset(values, other) allows values to be infinite
✓ superset(values, other) allows other to be infinite
✓ thresholdFreedmanDiaconis(values, min, max) returns the expected result
✓ thresholdScott(values, min, max) returns the expected result
✓ thresholdSturges(values, min, max) returns the expected result
✓ tickIncrement(start, stop, count) returns NaN if any argument is NaN
✓ tickIncrement(start, stop, count) returns NaN or -Infinity if start === stop
✓ tickIncrement(start, stop, count) returns 0 or Infinity if count is not positive
✓ tickIncrement(start, stop, count) returns -Infinity if count is infinity
✓ tickIncrement(start, stop, count) returns approximately count + 1 tickIncrement when start < stop
✓ ticks(start, stop, count) returns the empty array if any argument is NaN
✓ ticks(start, stop, count) returns the empty array if start === stop and count is non-positive
✓ ticks(start, stop, count) returns the empty array if start === stop and count is positive
✓ ticks(start, stop, count) returns the empty array if count is not positive
✓ ticks(start, stop, count) returns the empty array if count is infinity
✓ ticks(start, stop, count) does not include negative zero
✓ ticks(start, stop, count) remains within the domain
✓ ticks(start, stop, count) returns approximately count + 1 ticks when start < stop
✓ ticks(start, stop, count) returns the reverse of ticks(stop, start, count)
✓ ticks(start, stop, count) handles precision problems
✓ tickStep(start, stop, count) returns NaN if any argument is NaN
✓ tickStep(start, stop, count) returns NaN or 0 if start === stop
✓ tickStep(start, stop, count) returns 0 or Infinity if count is not positive
✓ tickStep(start, stop, count) returns 0 if count is infinity
✓ tickStep(start, stop, count) returns approximately count + 1 tickStep when start < stop
✓ tickStep(start, stop, count) returns -tickStep(stop, start, count)
✓ transpose([]) and transpose([[]]) return an empty array
✓ transpose([[a, b, …]]) returns [[a], [b], …]
✓ transpose([[a1, b1, …], [a2, b2, …]]) returns [[a1, a2], [b1, b2], …]
✓ transpose([[a1, b1, …], [a2, b2, …], [a3, b3, …]]) returns [[a1, a2, a3], [b1, b2, b3], …]
✓ transpose(…) ignores extra elements given an irregular matrix
✓ transpose(…) returns a copy
✓ union(values) returns a set of values
✓ union(values, other) returns a set of values
✓ union(...values) returns a set of values
✓ union(...values) accepts iterables
✓ variance(array) returns the variance of the specified numbers
✓ variance(array) ignores null, undefined and NaN
✓ variance(array) can handle large numbers without overflowing
✓ variance(array) returns undefined if the array has fewer than two numbers
✓ variance(array, f) returns the variance of the specified numbers
✓ variance(array, f) ignores null, undefined and NaN
✓ variance(array, f) can handle large numbers without overflowing
✓ variance(array, f) returns undefined if the array has fewer than two numbers
✓ variance(array, f) passes the accessor d, i, and array
✓ variance(array, f) uses the undefined context
✓ zip() and zip([]) return an empty array
✓ zip([a, b, …]) returns [[a], [b], …]
✓ zip([a1, b1, …], [a2, b2, …]) returns [[a1, a2], [b1, b2], …]
✓ zip([a1, b1, …], [a2, b2, …], [a3, b3, …]) returns [[a1, a2, a3], [b1, b2, b3], …]
✓ zip(…) ignores extra elements given an irregular matrix

469 passing (123ms)

@mbostock
Copy link
Member

If your parser won’t accept valid syntax as input, you should fix your parser rather than the input.

@mbostock mbostock closed this Jun 11, 2021
@IPWright83
Copy link

@mbostock while I agree in principle, there's quite a few people struggling to get this working where the tooling is outside of our control (e.g. if you're within a create-react-app scenario). Seems that a lot of people are monkey patching to this suggested implementation.

Is there any chance you'd reconsider to make it easier for a whole bunch of developers?

@mbostock
Copy link
Member

@IPWright83 No. I’m not going to take on additional maintenance burden to workaround bugs in another toolchain. This should be fixed in Babel, for the benefit of everyone that uses it, not here.

@mbostock
Copy link
Member

mbostock commented Aug 1, 2021

Related #147 babel/babel#7235 babel/babel#7234

@IPWright83
Copy link

Thanks @mbostock, I thought it worth at least asking, but totally get your stance. There's more linked issues than I've seen so I'll trawl through those later and see if I can find a better fix/upgrade something that'll sort it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants