fix gcd and add test for fromCamelCase
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
module.exports = (...arr) => {
|
||||
const _gcd = (x, y) => (!y ? x : gcd(y, x % y));
|
||||
const _gcd = (x, y) => (!y ? x : _gcd(y, x % y));
|
||||
return [...arr].reduce((a, b) => _gcd(a, b));
|
||||
};
|
||||
Reference in New Issue
Block a user