Comply with ESM syntax.

This commit is contained in:
Eric Lavault
2021-10-09 13:18:40 +02:00
parent 5a290c3ae5
commit cbe7e0c89f
16 changed files with 50 additions and 62 deletions

View File

@ -41,4 +41,4 @@ const CheckKishnamurthyNumber = (number) => {
return sumOfAllDigitFactorial === number
}
module.exports = CheckKishnamurthyNumber
export { CheckKishnamurthyNumber }

View File

@ -37,4 +37,4 @@ const CoPrimeCheck = (firstNumber, secondNumber) => {
return GetEuclidGCD(firstNumber, secondNumber) === 1
}
module.exports = CoPrimeCheck
export { CoPrimeCheck }

View File

@ -29,4 +29,4 @@ const GetEuclidGCD = (arg1, arg2) => {
return (less)
}
module.exports = GetEuclidGCD
export { GetEuclidGCD }

View File

@ -26,4 +26,4 @@ const ReverseNumber = (number) => {
return reverseNumber
}
module.exports = ReverseNumber
export { ReverseNumber }

View File

@ -1,4 +1,4 @@
const { binaryExponentiation } = require('../BinaryExponentiationRecursive')
import { binaryExponentiation } from '../BinaryExponentiationRecursive'
describe('BinaryExponentiationRecursive', () => {
it('should calculate 2 to the power of 10 correctly', () => {