https://github.com/duplojs/utils
@duplojs/utils is the TypeScript utility toolbox used across the DuploJS ecosystem. It focuses on strong typing, good DX, and small composable primitives that scale from simple helpers to full validation pipelines.
https://github.com/duplojs/utils
array-utils clean-architecture curried data-parser date-utils ddd duplojs either functional-programming immutable monad object-utils pattern-matching pipe string-utils typescript utils
Last synced: 12 days ago
JSON representation
@duplojs/utils is the TypeScript utility toolbox used across the DuploJS ecosystem. It focuses on strong typing, good DX, and small composable primitives that scale from simple helpers to full validation pipelines.
- Host: GitHub
- URL: https://github.com/duplojs/utils
- Owner: duplojs
- Created: 2025-02-08T20:22:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-26T10:58:17.000Z (23 days ago)
- Last Synced: 2026-02-26T16:40:52.128Z (22 days ago)
- Topics: array-utils, clean-architecture, curried, data-parser, date-utils, ddd, duplojs, either, functional-programming, immutable, monad, object-utils, pattern-matching, pipe, string-utils, typescript, utils
- Language: TypeScript
- Homepage: http://utils.duplojs.dev/
- Size: 6.56 MB
- Stars: 12
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# @duplojs/utils
[](https://www.npmjs.com/package/@duplojs/utils)
`@duplojs/utils` is the TypeScript utility toolbox used across the DuploJS ecosystem. It focuses on **strong typing**, **god DX**, and **small composable primitives** that scale from simple helpers to full validation pipelines.
## What’s inside?
- **Common functional utilities**: `pipe`/`asyncPipe`, `when`, `memo`, `clone`, `escapeRegExp`, etc.
- **Typed runtime tagging**: `kind` helpers to discriminate data without polluting public shapes.
- **Either**: a typed success/error container with mandatory “information” for precise pattern matching.
- **DataParser**: schema-based validation with checkers, coercion (`DP.coerce.*`), transforms, async support, and a fluent “extended” API (`DPE`).
- **Clean-domain building blocks**: `newType`, `entity`, constraints, repositories, and use-cases.
- **Pure helpers by domain**: `array`, `object`, `string`, `number`, `date`, `generator`, `pattern` (match/exhaustive).
## Documentation
- https://utils.duplojs.dev
## Install
```bash
npm install @duplojs/utils
```