Excersice completed

This commit is contained in:
Vishu Bhardwaj 2024-01-01 21:57:39 +05:30
parent b8b1ae4eda
commit f3788209cf
24 changed files with 273 additions and 151 deletions

View File

@ -1,5 +1,5 @@
const helloWorld = function() {
return ''
return 'Hello, World!'
};
module.exports = helloWorld;

View File

@ -1,5 +1,15 @@
const repeatString = function() {
const repeatString = function(someString, num) {
let returnString = ""
if (num > 0){
for (let i = 0; i < num; i++){
returnString += someString;
}
return returnString;
} else if (num == 0){
return returnString
} else {
return 'ERROR'
}
};
// Do not edit below this line

View File

@ -4,19 +4,19 @@ describe('repeatString', () => {
test('repeats the string', () => {
expect(repeatString('hey', 3)).toEqual('heyheyhey');
});
test.skip('repeats the string many times', () => {
test('repeats the string many times', () => {
expect(repeatString('hey', 10)).toEqual('heyheyheyheyheyheyheyheyheyhey');
});
test.skip('repeats the string 1 times', () => {
test('repeats the string 1 times', () => {
expect(repeatString('hey', 1)).toEqual('hey');
});
test.skip('repeats the string 0 times', () => {
test('repeats the string 0 times', () => {
expect(repeatString('hey', 0)).toEqual('');
});
test.skip('returns ERROR with negative numbers', () => {
test('returns ERROR with negative numbers', () => {
expect(repeatString('hey', -1)).toEqual('ERROR');
});
test.skip('repeats the string a random amount of times', function () {
test('repeats the string a random amount of times', function () {
/*The number is generated by using Math.random to get a value from between
0 to 1, when this is multiplied by 1000 and rounded down with Math.floor it
equals a number between 0 to 999 (this number will change everytime you run
@ -31,7 +31,7 @@ describe('repeatString', () => {
was randomly generated. */
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(number);
});
test.skip('works with blank strings', () => {
test('works with blank strings', () => {
expect(repeatString('', 10)).toEqual('');
});
});

View File

@ -1,6 +1,10 @@
const reverseString = function() {
const reverseString = function(someString) {
let reverseString = ''
for (let i = 1; i <= someString.length ; i++){
reverseString += someString.at(someString.length - i)
}
return reverseString
};
console.log(reverseString('hello'))
// Do not edit below this line
module.exports = reverseString;

View File

@ -5,14 +5,14 @@ describe('reverseString', () => {
expect(reverseString('hello')).toEqual('olleh');
});
test.skip('reverses multiple words', () => {
test('reverses multiple words', () => {
expect(reverseString('hello there')).toEqual('ereht olleh')
})
test.skip('works with numbers and punctuation', () => {
test('works with numbers and punctuation', () => {
expect(reverseString('123! abc!')).toEqual('!cba !321')
})
test.skip('works with blank strings', () => {
test('works with blank strings', () => {
expect(reverseString('')).toEqual('')
})
});

View File

@ -1,6 +1,16 @@
const removeFromArray = function() {
const removeFromArray = function(arr, ...val) {
let returnArr = arr
for (let i = 0; i < val.length; i++){
if (!arr.includes(val[i])){
console.log('not in array')
} else {
let index = arr.indexOf(val[i]);
returnArr.splice(index, 1)
}
}
return returnArr
};
console.log(removeFromArray(['a','b','c','d'],'c','d','hey',0,null,undefined))
// Do not edit below this line
module.exports = removeFromArray;

View File

@ -4,22 +4,22 @@ describe('removeFromArray', () => {
test('removes a single value', () => {
expect(removeFromArray([1, 2, 3, 4], 3)).toEqual([1, 2, 4]);
});
test.skip('removes multiple values', () => {
test('removes multiple values', () => {
expect(removeFromArray([1, 2, 3, 4], 3, 2)).toEqual([1, 4]);
});
test.skip('ignores non present values', () => {
test('ignores non present values', () => {
expect(removeFromArray([1, 2, 3, 4], 7, "tacos")).toEqual([1, 2, 3, 4]);
});
test.skip('ignores non present values, but still works', () => {
test('ignores non present values, but still works', () => {
expect(removeFromArray([1, 2, 3, 4], 7, 2)).toEqual([1, 3, 4]);
});
test.skip('can remove all values', () => {
test('can remove all values', () => {
expect(removeFromArray([1, 2, 3, 4], 1, 2, 3, 4)).toEqual([]);
});
test.skip('works with strings', () => {
test('works with strings', () => {
expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]);
});
test.skip('only removes same type', () => {
test('only removes same type', () => {
expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]);
});
});

View File

@ -1,6 +1,18 @@
const sumAll = function() {
const sumAll = function(minimum, maximum) {
let sum=0;
let min = minimum
let max = maximum
if (typeof(min) !== 'number' || typeof(max) !== 'number' || min < 0 || max < 0){
return 'ERROR'
} else if(min > max){
min = maximum
max = minimum
}
for (let i = min;i <= max; i++){
sum += i
}
return sum
};
console.log(sumAll(1,5) === 15?true:false)
// Do not edit below this line
module.exports = sumAll;

View File

@ -4,19 +4,19 @@ describe('sumAll', () => {
test('sums numbers within the range', () => {
expect(sumAll(1, 4)).toEqual(10);
});
test.skip('works with large numbers', () => {
test('works with large numbers', () => {
expect(sumAll(1, 4000)).toEqual(8002000);
});
test.skip('works with larger number first', () => {
test('works with larger number first', () => {
expect(sumAll(123, 1)).toEqual(7626);
});
test.skip('returns ERROR with negative numbers', () => {
test('returns ERROR with negative numbers', () => {
expect(sumAll(-10, 4)).toEqual('ERROR');
});
test.skip('returns ERROR with non-number parameters', () => {
test('returns ERROR with non-number parameters', () => {
expect(sumAll(10, "90")).toEqual('ERROR');
});
test.skip('returns ERROR with non-number parameters', () => {
test('returns ERROR with non-number parameters', () => {
expect(sumAll(10, [90, 1])).toEqual('ERROR');
});
});

View File

@ -1,6 +1,10 @@
const leapYears = function() {
const leapYears = function(year) {
if (!Number.isInteger(year)){
return 'not int'
} else {
return (year % 4 == 0 && year % 100 !=0 || year % 400 == 0)?true:false
}
};
console.log(leapYears(1996))
// Do not edit below this line
module.exports = leapYears;

View File

@ -4,19 +4,19 @@ describe('leapYears', () => {
test('works with non century years', () => {
expect(leapYears(1996)).toBe(true);
});
test.skip('works with non century years', () => {
test('works with non century years', () => {
expect(leapYears(1997)).toBe(false);
});
test.skip('works with ridiculously futuristic non century years', () => {
test('works with ridiculously futuristic non century years', () => {
expect(leapYears(34992)).toBe(true);
});
test.skip('works with century years', () => {
test('works with century years', () => {
expect(leapYears(1900)).toBe(false);
});
test.skip('works with century years', () => {
test('works with century years', () => {
expect(leapYears(1600)).toBe(true);
});
test.skip('works with century years', () => {
test('works with century years', () => {
expect(leapYears(700)).toBe(false);
});
});

View File

@ -1,7 +1,13 @@
const convertToCelsius = function() {
const convertToCelsius = function(num) {
// °C = (°F 32) x 5/9
let celcius = (num-32)*5/9
return Math.round(celcius * 10)/10
};
const convertToFahrenheit = function() {
const convertToFahrenheit = function(num) {
//°F = (°C × 9/5) + 32
let fahrenheit = (num*9/5)+32
return Math.round(fahrenheit * 10)/10
};
// Do not edit below this line

View File

@ -4,22 +4,22 @@ describe('convertToCelsius', () => {
test('works', () => {
expect(convertToCelsius(32)).toEqual(0);
});
test.skip('rounds to 1 decimal', () => {
test('rounds to 1 decimal', () => {
expect(convertToCelsius(100)).toEqual(37.8);
});
test.skip('works with negatives', () => {
test('works with negatives', () => {
expect(convertToCelsius(-100)).toEqual(-73.3);
});
});
describe('convertToFahrenheit', () => {
test.skip('works', () => {
test('works', () => {
expect(convertToFahrenheit(0)).toEqual(32);
});
test.skip('rounds to 1 decimal', () => {
test('rounds to 1 decimal', () => {
expect(convertToFahrenheit(73.2)).toEqual(163.8);
});
test.skip('works with negatives', () => {
test('works with negatives', () => {
expect(convertToFahrenheit(-10)).toEqual(14);
});
});

View File

@ -1,25 +1,35 @@
const add = function() {
const add = function(num1, num2) {
if (!Number.isInteger(num1) || !Number.isInteger(num2)){
return
}
return num1 + num2
};
const subtract = function() {
const subtract = function(num1, num2) {
if (!Number.isInteger(num1) || !Number.isInteger(num2)){
return
}
return (num1 > num2)?num1 - num2:num2 - num1
};
const sum = function() {
const sum = function(args) {
return Number(args.reduce((prev, curr)=>prev+curr,0))
};
const multiply = function() {
const multiply = function(args) {
return args.reduce((prev,curr)=>prev * curr)
};
const power = function() {
const power = function(num1, num2) {
if (!Number.isInteger(num1) || !Number.isInteger(num2)){
return
}
return num1**num2
};
const factorial = function() {
const factorial = function(num) {
if (num === 0){return 1}
return num * factorial(num-1)
};
// Do not edit below this line

View File

@ -5,73 +5,73 @@ describe('add', () => {
expect(calculator.add(0, 0)).toBe(0);
});
test.skip('adds 2 and 2', () => {
test('adds 2 and 2', () => {
expect(calculator.add(2, 2)).toBe(4);
});
test.skip('adds positive numbers', () => {
test('adds positive numbers', () => {
expect(calculator.add(2, 6)).toBe(8);
});
});
describe('subtract', () => {
test.skip('subtracts numbers', () => {
test('subtracts numbers', () => {
expect(calculator.subtract(10, 4)).toBe(6);
});
});
describe('sum', () => {
test.skip('computes the sum of an empty array', () => {
test('computes the sum of an empty array', () => {
expect(calculator.sum([])).toBe(0);
});
test.skip('computes the sum of an array of one number', () => {
test('computes the sum of an array of one number', () => {
expect(calculator.sum([7])).toBe(7);
});
test.skip('computes the sum of an array of two numbers', () => {
test('computes the sum of an array of two numbers', () => {
expect(calculator.sum([7, 11])).toBe(18);
});
test.skip('computes the sum of an array of many numbers', () => {
test('computes the sum of an array of many numbers', () => {
expect(calculator.sum([1, 3, 5, 7, 9])).toBe(25);
});
});
describe('multiply', () => {
test.skip('multiplies two numbers', () => {
test('multiplies two numbers', () => {
expect(calculator.multiply([2, 4])).toBe(8);
});
test.skip('multiplies several numbers', () => {
test('multiplies several numbers', () => {
expect(calculator.multiply([2, 4, 6, 8, 10, 12, 14])).toBe(645120);
});
});
describe('power', () => {
test.skip('raises one number to the power of another number', () => {
test('raises one number to the power of another number', () => {
expect(calculator.power(4, 3)).toBe(64); // 4 to third power is 64
});
});
describe('factorial', () => {
test.skip('computes the factorial of 0', () => {
test('computes the factorial of 0', () => {
expect(calculator.factorial(0)).toBe(1); // 0! = 1
});
test.skip('computes the factorial of 1', () => {
test('computes the factorial of 1', () => {
expect(calculator.factorial(1)).toBe(1);
});
test.skip('computes the factorial of 2', () => {
test('computes the factorial of 2', () => {
expect(calculator.factorial(2)).toBe(2);
});
test.skip('computes the factorial of 5', () => {
test('computes the factorial of 5', () => {
expect(calculator.factorial(5)).toBe(120);
});
test.skip('computes the factorial of 10', () => {
test('computes the factorial of 10', () => {
expect(calculator.factorial(10)).toBe(3628800);
});
});

View File

@ -1,6 +1,9 @@
const palindromes = function () {
const palindromes = function (string) {
let strng = string.replace(/[^\w\']|_/g,'').toLowerCase()
let reverse = strng.split('').reverse().join('');
return (reverse === strng)
};
palindromes('ASDsdfsdf!!')
// Do not edit below this line
module.exports = palindromes;

View File

@ -4,25 +4,25 @@ describe('palindromes', () => {
test('works with single words', () => {
expect(palindromes('racecar')).toBe(true);
});
test.skip('works with punctuation ', () => {
test('works with punctuation ', () => {
expect(palindromes('racecar!')).toBe(true);
});
test.skip('works with upper-case letters ', () => {
test('works with upper-case letters ', () => {
expect(palindromes('Racecar!')).toBe(true);
});
test.skip('works with multiple words', () => {
test('works with multiple words', () => {
expect(palindromes('A car, a man, a maraca.')).toBe(true);
});
test.skip('works with multiple words', () => {
test('works with multiple words', () => {
expect(palindromes('Animal loots foliated detail of stool lamina.')).toBe(true);
});
test.skip('doesn\'t just always return true', () => {
test('doesn\'t just always return true', () => {
expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false);
});
test.skip('works with numbers in a string', () => {
test('works with numbers in a string', () => {
expect(palindromes('rac3e3car')).toBe(true);
});
test.skip('works with unevenly spaced numbers in a string', () => {
test('works with unevenly spaced numbers in a string', () => {
expect(palindromes('r3ace3car')).toBe(false);
});
});

View File

@ -1,6 +1,19 @@
const fibonacci = function() {
const fibonacci = function(position) {
let fib = [0,1]
let count = Number(position)
if (count < 0) return 'OOPS'
else if (count === 0) return 0
else if (count === 1) return 1
else {
let num = 0
for (let i = 2; i <= count; i++){
num = fib[0] + fib[1]
fib[0] = fib[1]
fib[1] = num
}
return num
}
};
console.log(fibonacci(6))
// Do not edit below this line
module.exports = fibonacci;

View File

@ -4,34 +4,34 @@ describe('fibonacci', () => {
test('4th fibonacci number is 3', () => {
expect(fibonacci(4)).toBe(3);
});
test.skip('6th fibonacci number is 8', () => {
test('6th fibonacci number is 8', () => {
expect(fibonacci(6)).toBe(8);
});
test.skip('10th fibonacci number is 55', () => {
test('10th fibonacci number is 55', () => {
expect(fibonacci(10)).toBe(55);
});
test.skip('15th fibonacci number is 610', () => {
test('15th fibonacci number is 610', () => {
expect(fibonacci(15)).toBe(610);
});
test.skip('25th fibonacci number is 75025', () => {
test('25th fibonacci number is 75025', () => {
expect(fibonacci(25)).toBe(75025);
});
test.skip('0th fibonacci number is 0', () => {
test('0th fibonacci number is 0', () => {
expect(fibonacci(0)).toBe(0);
});
test.skip('doesn\'t accept negatives', () => {
test('doesn\'t accept negatives', () => {
expect(fibonacci(-25)).toBe("OOPS");
});
test.skip('DOES accept strings', () => {
test('DOES accept strings', () => {
expect(fibonacci("0")).toBe(0);
});
test.skip('DOES accept strings', () => {
test('DOES accept strings', () => {
expect(fibonacci("1")).toBe(1);
});
test.skip('DOES accept strings', () => {
test('DOES accept strings', () => {
expect(fibonacci("2")).toBe(1);
});
test.skip('DOES accept strings', () => {
test('DOES accept strings', () => {
expect(fibonacci("8")).toBe(21);
});
});

View File

@ -1,5 +1,5 @@
const getTheTitles = function() {
const getTheTitles = function(array) {
return array.map((book)=>book.title)
};
// Do not edit below this line

View File

@ -1,6 +1,18 @@
const findTheOldest = function() {
const findTheOldest = function(array) {
return array.reduce((prev, curr)=>{
const prevAge = getAge(prev.yearOfBirth, prev.yearOfDeath)
const currAge = getAge(curr.yearOfBirth, curr.yearOfDeath)
return (prevAge < currAge)?curr:prev;
});
};
function getAge(birth, death){
if (!death){
death = new Date().getFullYear()
}
return death - birth
}
// Do not edit below this line
module.exports = findTheOldest;

View File

@ -21,7 +21,7 @@ describe('findTheOldest', () => {
]
expect(findTheOldest(people).name).toBe('Ray');
});
test.skip('finds the person with the greatest age if someone is still living', () => {
test('finds the person with the greatest age if someone is still living', () => {
const people = [
{
name: "Carly",
@ -40,7 +40,7 @@ describe('findTheOldest', () => {
]
expect(findTheOldest(people).name).toBe('Ray');
});
test.skip('finds the person with the greatest age if the OLDEST is still living', () => {
test('finds the person with the greatest age if the OLDEST is still living', () => {
const people = [
{
name: "Carly",

137
package-lock.json generated
View File

@ -11,6 +11,7 @@
"devDependencies": {
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-xo-space": "^0.34.0",
"eslint-plugin-import": "^2.28.1",
"jest": "^29.6.4",
"jest-cli": "^29.6.4"
@ -39,12 +40,12 @@
}
},
"node_modules/@babel/code-frame": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz",
"integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==",
"version": "7.23.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
"integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",
"dev": true,
"dependencies": {
"@babel/highlight": "^7.22.10",
"@babel/highlight": "^7.23.4",
"chalk": "^2.4.2"
},
"engines": {
@ -177,12 +178,12 @@
}
},
"node_modules/@babel/generator": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz",
"integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==",
"version": "7.23.6",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",
"integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
"dev": true,
"dependencies": {
"@babel/types": "^7.22.10",
"@babel/types": "^7.23.6",
"@jridgewell/gen-mapping": "^0.3.2",
"@jridgewell/trace-mapping": "^0.3.17",
"jsesc": "^2.5.1"
@ -217,22 +218,22 @@
}
},
"node_modules/@babel/helper-environment-visitor": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz",
"integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-function-name": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz",
"integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
"dev": true,
"dependencies": {
"@babel/template": "^7.22.5",
"@babel/types": "^7.22.5"
"@babel/template": "^7.22.15",
"@babel/types": "^7.23.0"
},
"engines": {
"node": ">=6.9.0"
@ -315,18 +316,18 @@
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
"version": "7.23.4",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",
"integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",
"integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@ -356,12 +357,12 @@
}
},
"node_modules/@babel/highlight": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz",
"integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==",
"version": "7.23.4",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
"integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",
"dev": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
@ -441,9 +442,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz",
"integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==",
"version": "7.23.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz",
"integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@ -630,34 +631,34 @@
}
},
"node_modules/@babel/template": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz",
"integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==",
"version": "7.22.15",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.22.5",
"@babel/parser": "^7.22.5",
"@babel/types": "^7.22.5"
"@babel/code-frame": "^7.22.13",
"@babel/parser": "^7.22.15",
"@babel/types": "^7.22.15"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz",
"integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==",
"version": "7.23.7",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz",
"integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.22.10",
"@babel/generator": "^7.22.10",
"@babel/helper-environment-visitor": "^7.22.5",
"@babel/helper-function-name": "^7.22.5",
"@babel/code-frame": "^7.23.5",
"@babel/generator": "^7.23.6",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
"@babel/helper-hoist-variables": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
"@babel/parser": "^7.22.11",
"@babel/types": "^7.22.11",
"debug": "^4.1.0",
"@babel/parser": "^7.23.6",
"@babel/types": "^7.23.6",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
"engines": {
@ -674,13 +675,13 @@
}
},
"node_modules/@babel/types": {
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"version": "7.23.6",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz",
"integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.5",
"@babel/helper-string-parser": "^7.23.4",
"@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
},
"engines": {
@ -2245,6 +2246,42 @@
"semver": "bin/semver.js"
}
},
"node_modules/eslint-config-xo": {
"version": "0.43.1",
"resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.43.1.tgz",
"integrity": "sha512-azv1L2PysRA0NkZOgbndUpN+581L7wPqkgJOgxxw3hxwXAbJgD6Hqb/SjHRiACifXt/AvxCzE/jIKFAlI7XjvQ==",
"dev": true,
"dependencies": {
"confusing-browser-globals": "1.0.11"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
},
"peerDependencies": {
"eslint": ">=8.27.0"
}
},
"node_modules/eslint-config-xo-space": {
"version": "0.34.0",
"resolved": "https://registry.npmjs.org/eslint-config-xo-space/-/eslint-config-xo-space-0.34.0.tgz",
"integrity": "sha512-8ZI0Ta/loUIL1Wk/ouWvk2ZWN8X6Un49MqnBf2b6uMjC9c5Pcfr1OivEOrvd3niD6BKgMNH2Q9nG0CcCWC+iVA==",
"dev": true,
"dependencies": {
"eslint-config-xo": "^0.43.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
},
"peerDependencies": {
"eslint": ">=8.27.0"
}
},
"node_modules/eslint-import-resolver-node": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",

View File

@ -16,6 +16,7 @@
"devDependencies": {
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-xo-space": "^0.34.0",
"eslint-plugin-import": "^2.28.1",
"jest": "^29.6.4",
"jest-cli": "^29.6.4"