Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
3
test/toSafeInteger/toSafeInteger.js
Normal file
3
test/toSafeInteger/toSafeInteger.js
Normal file
@ -0,0 +1,3 @@
|
||||
const toSafeInteger = num =>
|
||||
Math.round(Math.max(Math.min(num, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER));
|
||||
module.exports = toSafeInteger;
|
||||
Reference in New Issue
Block a user