@porkyproductions/hat
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -30,5 +30,7 @@ /** | ||
import { factorial } from './factorial'; | ||
import { matrixMultiply } from './matrixMultiplication'; | ||
import * as print from './print'; | ||
export type { Maybe, MaybeArray } from './types'; | ||
export { randomInRange, signedMod, randomInArray, wait, factorial, print, }; | ||
import type { Matrix } from './types'; | ||
export type { Maybe, MaybeArray, Matrix } from './types'; | ||
export { randomInRange, signedMod, randomInArray, wait, factorial, matrixMultiply, print, }; | ||
interface HAT { | ||
@@ -40,5 +42,7 @@ randomInRange: (min: number, max: number) => number; | ||
factorial: (number: number) => number; | ||
matrixMultiply: (matrixA: Matrix, matrixB: Matrix) => Matrix; | ||
} | ||
export declare const hat: HAT; | ||
export declare class Hat implements HAT { | ||
private __refresh; | ||
randomInRange(min: number, max: number): number; | ||
@@ -49,4 +53,5 @@ signedMod(num: number, modulator: number): number; | ||
factorial(number: number): number; | ||
matrixMultiply(matrixA: Matrix, matrixB: Matrix): Matrix; | ||
} | ||
export default hat; | ||
//# sourceMappingURL=index.d.ts.map |
11
index.js
@@ -30,6 +30,7 @@ /** | ||
import { factorial } from './factorial'; | ||
import { matrixMultiply } from './matrixMultiplication'; | ||
import * as print from './print'; | ||
export { | ||
// fns | ||
randomInRange, signedMod, randomInArray, wait, factorial, print, }; | ||
randomInRange, signedMod, randomInArray, wait, factorial, matrixMultiply, print, }; | ||
export const hat = { | ||
@@ -41,5 +42,10 @@ randomInRange: (min, max) => randomInRange(min, max), | ||
factorial: (number) => factorial(number), | ||
matrixMultiply: (matrixA, matrixB) => matrixMultiply(matrixA, matrixB), | ||
}; | ||
export class Hat { | ||
__refresh() { | ||
return new Hat(); | ||
} | ||
randomInRange(min, max) { | ||
this.__refresh(); | ||
return randomInRange(min, max); | ||
@@ -59,4 +65,7 @@ } | ||
} | ||
matrixMultiply(matrixA, matrixB) { | ||
return matrixMultiply(matrixA, matrixB); | ||
} | ||
} | ||
export default hat; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@porkyproductions/hat", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "A blazingly fast JavaScript library with a bunch of helper functions pretaining to hedgehogs and such ", | ||
@@ -5,0 +5,0 @@ "type": "module", |
export type Maybe<T, TArray> = true | false | null | undefined | string | number | object | Array<TArray> | T; | ||
export type MaybeArray<T, U> = Maybe<T, U>[]; | ||
export type Matrix = number[][]; | ||
//# sourceMappingURL=types.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34265
38
539