Skip to content

Commit

Permalink
chore: update devDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jun 7, 2022
1 parent fd88754 commit 5d95f92
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 26 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@
"trailingComma": "all"
},
"devDependencies": {
"@types/jest": "^27.5.0",
"@types/jest": "^28.1.1",
"cheminfo-build": "^1.1.11",
"eslint": "^8.14.0",
"eslint-config-cheminfo-typescript": "^10.4.0",
"eslint": "^8.17.0",
"eslint-config-cheminfo-typescript": "^11.0.1",
"esm": "^3.2.25",
"jest": "^28.0.3",
"jest": "^28.1.1",
"jest-matcher-deep-close-to": "^3.0.2",
"jscpd": "^3.4.5",
"ml-spectra-fitting": "^4.0.2",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"ts-jest": "^28.0.1",
"typedoc": "^0.22.15",
"typescript": "^4.6.4"
"ts-jest": "^28.0.4",
"typedoc": "^0.22.17",
"typescript": "^4.7.3"
},
"dependencies": {
"binary-search": "^1.3.6",
"cheminfo-types": "^1.1.0",
"fft.js": "^4.0.4",
"is-any-array": "^2.0.0",
"median-quickselect": "^1.0.1",
"ml-matrix": "^6.10.0",
"ml-matrix": "^6.10.1",
"ml-xsadd": "^2.0.0",
"spline-interpolator": "^1.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/matrix/matrixCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DoubleMatrix } from '..';

export function matrixCheck(data: DoubleMatrix) {
if (data.length === 0 || data[0].length === 0) {
throw RangeError('matrix should contain data');
throw new RangeError('matrix should contain data');
}

const firstLength = data[0].length;
Expand Down
2 changes: 1 addition & 1 deletion src/matrix/matrixPQN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ export function matrixPQN(

return {
data: matrixB.to2DArray(),
medianOfQuotients: medianOfQuotients,
medianOfQuotients,
};
}
13 changes: 5 additions & 8 deletions src/utils/createFromToArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,17 @@ export function createFromToArray(
const array = new Float64Array(length);

let div = length;
if (includeFrom === true && includeTo === true) {
if (includeFrom && includeTo) {
div = length - 1;
} else if (
(includeFrom === false && includeTo === true) ||
(includeFrom === true && includeTo === false)
) {
} else if ((!includeFrom && includeTo) || (includeFrom && !includeTo)) {
div = length;
} else if (includeFrom === false && includeTo === false) {
} else if (!includeFrom && !includeTo) {
div = length + 1;
}

let delta = (to - from) / div;
if (distribution === 'uniform') {
if (includeFrom === true) {
if (includeFrom) {
let index = 0;
while (index < length) {
array[index] = from + delta * index;
Expand All @@ -74,7 +71,7 @@ export function createFromToArray(
let base = (to / from) ** (1 / div);
let firstExponent = Math.log(from) / Math.log(base);

if (includeFrom === true) {
if (includeFrom) {
let index = 0;
while (index < length) {
array[index] = base ** (firstExponent + index);
Expand Down
3 changes: 2 additions & 1 deletion src/x/xMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export function xMode(input: NumberArray) {
counts[element]++;
count++;
} else {
counts[element] = count = 1;
counts[element] = 1;
count = 1;
}

if (count > maxCount) {
Expand Down
2 changes: 1 addition & 1 deletion src/xreim/xreimSortX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function xreimSortX(data: DataXReIm): DataXReIm {
const { x, re, im } = data;

if (x.length !== re.length || x.length !== im.length) {
throw TypeError('xreimSortX: length of x, re and im must be identical');
throw new TypeError('xreimSortX: length of x, re and im must be identical');
}

if (x.length < 2 || x[0] < x[1]) return data;
Expand Down
8 changes: 3 additions & 5 deletions src/xy/xyFilterX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ export function xyFilterX(
) {
newX.push(x[position]);
newY.push(y[position]);
} else {
if (x[position] > normalizedZones[currentZoneIndex].to) {
currentZoneIndex++;
if (!normalizedZones[currentZoneIndex]) break;
}
} else if (x[position] > normalizedZones[currentZoneIndex].to) {
currentZoneIndex++;
if (!normalizedZones[currentZoneIndex]) break;
}
position++;
}
Expand Down
2 changes: 1 addition & 1 deletion src/xy/xyGrowingX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function xyGrowingX(data: DataXY): DataXY {
const { x, y } = data;

if (x.length !== y.length) {
throw TypeError('sortX: length of x and y must be identical');
throw new TypeError('sortX: length of x and y must be identical');
}

if (x.length < 2 || x[0] < x[1]) return data;
Expand Down

0 comments on commit 5d95f92

Please sign in to comment.