Getting Started
Installation
Section titled “Installation”Install all helpers at once:
Or install only the categories you need:
Available packages: @helpers4/array, @helpers4/date, @helpers4/function, @helpers4/math, @helpers4/number, @helpers4/object, @helpers4/observable, @helpers4/promise, @helpers4/string, @helpers4/type, @helpers4/url, @helpers4/version.
Quick Start
Section titled “Quick Start”All imports are tree-shakable — your bundler will only include the functions you actually use.
CommonJS
Section titled “CommonJS”Resolving Name Conflicts
Section titled “Resolving Name Conflicts”Some helpers share the same name across categories (compact, compare, difference, shallowEquals). When you need two of them in the same file, rename at the import site using as — suffix with 4{category}:
See the full list and resolution patterns in Name Conflicts.
Ensure your tsconfig.json targets modern JavaScript:
TypeScript Support
Section titled “TypeScript Support”All helpers are fully typed with TypeScript and support strict mode:
Runtime Compatibility
Section titled “Runtime Compatibility”| Runtime | Support | Notes |
|---|---|---|
| Browser | ES2022+ | Chrome 93+, Firefox 90+, Safari 15+, Edge 93+ |
| Frameworks | ✅ | React, Vue, Svelte, Angular, and more |
| Node.js | >=24.0.0 | |
| Deno | ✅ | |
| Bun | ✅ |
Quality Standards
Section titled “Quality Standards”Every helper ships with:
- 100% code coverage (lines, branches, functions, statements)
- Property-based tests (fast-check) — invariants validated against thousands of random inputs
- Contract tests — formal behavioral guarantees
- Boundary tests — edge values and limit conditions covered explicitly
- Security edge case tests — inputs like prototype pollution or injected keys
- Mutation testing (Stryker) — >90% score; view dashboard
- Benchmarks (Vitest Bench) — performance tracked per build
- Dependency security audit —
pnpm auditon every PR and release - OpenSSF Scorecard — view report
Next Steps
Section titled “Next Steps”- Browse the Categories
- View the GitHub Repository
Contributing
Section titled “Contributing”Found a bug? Want to add a helper? Check out the GitHub repository for contribution guidelines.
License
Section titled “License”LGPL-3.0 — See LICENSE for details.