JSPM

  • Created
  • Published
  • Downloads 290
  • Score
    100M100P100Q125312F
  • License MIT

Package Exports

  • @duplojs/utils
  • @duplojs/utils/array
  • @duplojs/utils/clean
  • @duplojs/utils/common
  • @duplojs/utils/dataParser
  • @duplojs/utils/dataParserCoerce
  • @duplojs/utils/dataParserExtended
  • @duplojs/utils/date
  • @duplojs/utils/either
  • @duplojs/utils/flow
  • @duplojs/utils/generator
  • @duplojs/utils/number
  • @duplojs/utils/object
  • @duplojs/utils/pattern
  • @duplojs/utils/string

Readme

@duplojs/utils

NPM version

@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

Install

npm install @duplojs/utils