1.1.4 • Published 11 months ago

@probablyduncan/common v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

These are some common functions and types I use in my projects.

// math utilities
import { clamp, unclamp, lerp, unlerp, resolveMinMax } from "@probablyduncan/common/math";

// vector2 class with basic vector math
import Vec2 from "@probablyduncan/common/vec2";

// ts helper to handle T | T[] types.
import { toSeveral, type SingleOrSeveral } from "@probablyduncan/common/sos";

// node cmd runner utility
import { cmd } from "@probablyduncan/common/cmd";

// functions to shuffle arrays
import { shuffle, shuffleRef } from "@probablyduncan/common/shuffle";

// DateDiff class for parsing time components between dates.
import DateDiff from "@probablyduncan/common/datediff

// reduceToObject for converting arrays of object to key/value record, and an object to an array of that object's values
import { reduceToObject, reduceToArray } from "@probablyduncan/common/reduceToObject

Publish changes:

> pnpm publish

Run tests:

> pnpm test
1.1.4

11 months ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago