New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@porkyproductions/hat

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@porkyproductions/hat - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/print.js

25

dist/index.js

@@ -5,21 +5,13 @@ import { randomInRange } from './randomInRange';

import { wait } from './wait';
import * as print from './print';
export {
// fns
randomInRange, signedMod, randomInArray, wait, print, };
export const hat = {
randomInRange: (min, max) => {
return randomInRange(min, max);
},
signedMod: (num, modulator) => {
return signedMod(num, modulator);
},
randomInArray: (array) => {
return randomInArray(array);
},
wait: (seconds, callback) => {
return wait(seconds, callback);
},
sorters: {}
randomInRange: (min, max) => randomInRange(min, max),
signedMod: (num, modulator) => signedMod(num, modulator),
randomInArray: (array) => randomInArray(array),
wait: (seconds, callback) => wait(seconds, callback),
};
export class Hat {
constructor() {
this.sorters = {};
}
randomInRange(min, max) {

@@ -31,3 +23,2 @@ return randomInRange(min, max);

}
;
randomInArray(array) {

@@ -34,0 +25,0 @@ return randomInArray(array);

import { randomInRange } from './randomInRange';
export const randomInArray = (array) => array[randomInRange(0, array.length - 1)];
//# sourceMappingURL=randomInArray.js.map
export const randomInRange = (min, max) => Math.round(Math.random() * (max - min) + min);
//# sourceMappingURL=randomInRange.js.map

@@ -0,0 +0,0 @@ export function signedMod(num, modulator) {

@@ -1,3 +0,7 @@

interface Sorters {
}
import { randomInRange } from './randomInRange';
import { signedMod } from './signedMod';
import { randomInArray } from './randomInArray';
import { wait } from './wait';
import * as print from './print';
export { randomInRange, signedMod, randomInArray, wait, print, };
interface HAT {

@@ -8,3 +12,2 @@ randomInRange: (min: number, max: number) => number;

wait: (seconds: number, callback?: () => any) => void;
sorters: Sorters;
}

@@ -17,5 +20,4 @@ export declare const hat: HAT;

wait(seconds: number, callback?: () => any): number;
sorters: Sorters;
}
export default hat;
//# sourceMappingURL=index.d.ts.map
export declare const randomInArray: <T>(array: T[]) => T;
//# sourceMappingURL=randomInArray.d.ts.map
export declare const randomInRange: (min: number, max: number) => number;
//# sourceMappingURL=randomInRange.d.ts.map
export declare function signedMod(num: number, modulator: number): number;
//# sourceMappingURL=signedMod.d.ts.map
export declare const wait: (seconds: number, callback?: () => any) => number;
//# sourceMappingURL=wait.d.ts.map

@@ -1,2 +0,2 @@

export const wait = (seconds, callback = () => { }) => setTimeout(callback, seconds * 1000);
export const wait = (seconds, callback = () => { void (0); }) => setTimeout(callback, seconds * 1000);
//# sourceMappingURL=wait.js.map
{
"name": "@porkyproductions/hat",
"version": "1.0.0",
"version": "1.1.0",
"description": "A balzingly fast JavaScript library with a bunch of helper functions pretaining to hedgehogs and such ",

@@ -9,3 +9,4 @@ "type": "module",

"test": "node out/index.js",
"build": "tsc -p tsconfig.json"
"build": "tsc -p tsconfig.json",
"lint": "eslint ./src/* --fix"
},

@@ -26,13 +27,15 @@ "repository": {

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"eslint": "^8.28.0",
"typescript": "^4.9.3"
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"eslint": "^8.42.0",
"typescript": "^4.9.5"
},
"files": [
"./dist/**/*.js",
"./dist/types/**/*.d.ts"
"./dist/sorters/**/*.js",
"./dist/types/**/*.d.ts",
"./dist/types/sorters/**/*.d.ts"
],
"main": "./out/index.js",
"displayName": "(de)Motivator.js",
"main": "./dist/index.js",
"displayName": "HAT",
"contributors": [

@@ -39,0 +42,0 @@ "Tristan Winata",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc