candidate-test-neversitup
v1.0.4
Published
Neversitup candidate test
Readme
Neversitup Test
This package has the functions
- permutations
- findTheOddInt
- countSmileys
Installation
Install candidate-test-neversitup with npm
npm i candidate-test-neversitupor
yarn add candidate-test-neversitupHow to use
const {permutations, findTheOddInt, countSmileys} = require('candidate-test-neversitup');
// for function permutations
const input = "abc"
const result = permutations(input)
// result is ['abc','acb','bac','bca','cab','cba']
// for function findTheOddInt
const input = [1, 2, 2, 3, 3, 3, 4, 3, 3, 3, 2, 2, 1]
const result = findTheOddInt(input)
// result is 4
// for function countSmileys
const input = [':)', ';(', ';}', ':-D']
const result = countSmileys(input)
// result is 2Running Tests
Install dependency package first with command
yarn installTo run tests, run the following command
npm run testor
yarn testany test script in
src/*.test.jsRun with docker
docker-compose up -d --build