Skip to content

Commit

Permalink
test: logicalOperators #96
Browse files Browse the repository at this point in the history
  • Loading branch information
201flaviosilva committed Oct 26, 2022
1 parent 00440d4 commit b2a15d9
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 307 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -11,6 +11,11 @@ Just some simple JavaScript Utils.
npm i 201flaviosilva-utils
```

or
```sh
npm i https://github.com/201flaviosilva-labs/javascript-utils#v1.2.10
```

#### Import to the project
```js
import { randomNumber } from "201flaviosilva-utils";
Expand Down
9 changes: 5 additions & 4 deletions jest.config.js
Expand Up @@ -79,7 +79,7 @@ module.exports = {

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// "node_modules"
// "node_modules"
// ],

// An array of file extensions your modules use
Expand Down Expand Up @@ -166,9 +166,10 @@ module.exports = {
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],
testPathIgnorePatterns: [
"_ignore",
"/node_modules/"
],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -10,6 +10,7 @@
"build/",
"src/",
"types/",
"LICENSE",
"package.json",
"README.md",
"CHANGELOG.md"
Expand All @@ -23,7 +24,7 @@
"compile": "webpack --mode production",
"compile:css": "css-minify -d src/CSS/ -o build",
"build": "npm run clear && npm run compile && npm run compile:css && npm run jsDoc && npm run types",
"bump": "npm run build && np --no-tests"
"bump": "npm run build && np"
},
"devDependencies": {
"@babel/core": "^7.19.6",
Expand Down
44 changes: 0 additions & 44 deletions src/Deprecated/FIFO.js

This file was deleted.

44 changes: 0 additions & 44 deletions src/Deprecated/LIFO.js

This file was deleted.

35 changes: 0 additions & 35 deletions src/Deprecated/camelCase.js

This file was deleted.

34 changes: 0 additions & 34 deletions src/Deprecated/capitalizeCase.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/Deprecated/index.js

This file was deleted.

33 changes: 0 additions & 33 deletions src/Deprecated/kebabCase.js

This file was deleted.

46 changes: 0 additions & 46 deletions src/Deprecated/screamingSnakeCase.js

This file was deleted.

35 changes: 0 additions & 35 deletions src/Deprecated/snakeCase.js

This file was deleted.

2 changes: 2 additions & 0 deletions src/Maths/index.js
Expand Up @@ -14,6 +14,7 @@ import { makeNegative } from "./makeNegative.js";
import { map } from "./map.js";
import { median } from "./median.js";
import { mode } from "./mode.js";
import { percentage } from "./percentage.js";
import { multiplication } from "./multiplication.js";
import { radiansToDegrees } from "./radiansToDegrees.js";
import { range } from "./range.js";
Expand Down Expand Up @@ -42,6 +43,7 @@ export {
map,
median,
mode,
percentage,
multiplication,
radiansToDegrees,
range,
Expand Down
16 changes: 16 additions & 0 deletions src/Maths/percentage.js
@@ -0,0 +1,16 @@
/**
* Return the value between 2 value based in a given percentage (decimal midpoint)
*
* @example
* percentage(10, 100); // 10
* percentage(40, 40); // 100
* percentage(40, 20); // 200
* @param {number} value - the value to compare
* @param {number} total - total value
* @returns {number} the result
*
* @function percentage
* @memberof Maths
*/
export function percentage(value, total) { return (100 * value) / total; }

0 comments on commit b2a15d9

Please sign in to comment.