1
0
Fork 0
Go to file
Sean Sube faeff2c645 feat(build): remove rollup, do not bundle the output
BREAKING CHANGE: the library will now be published as loose ES modules.
Library users are better informed on bundling needs, and repeated bundling introduces extra boilerplate code.
2022-10-08 15:02:40 -05:00
.github fix(docs): comment header in PR template 2020-03-02 18:48:34 -06:00
.gitlab feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00
config feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00
docs/api fix(types): mark newer array functions as public 2022-02-14 14:53:15 +00:00
scripts feat(build): add alpine image job from salty-dog 2019-11-09 20:17:20 -06:00
src fix(types): mark newer array functions as public 2022-02-14 14:53:15 +00:00
test feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00
vendor/rollup-resources fix: declare resource modules 2019-09-28 10:42:41 -05:00
.codeclimate.yml feat(build): replace tslint with eslint 2019-11-09 16:50:30 -06:00
.dockerignore fix(build): add yarn lock to image before installing, add tmp files to docker ignore 2019-09-17 19:05:46 -05:00
.eslintrc.json feat: full es module build, fix up eslint and sinon imports 2021-07-26 10:12:14 -05:00
.gitignore feat(reflect): handle missing prototypes 2021-03-27 18:22:36 -05:00
.gitlab-ci.yml fix(build): add docker TLS options, remove codecov job 2021-08-05 22:25:17 -05:00
.npmignore fix(build): omit git from package, ignore pid files 2019-11-10 09:47:10 -06:00
.npmrc feat(config): configure npm to use nexus mirror 2019-09-17 08:18:09 -05:00
CHANGELOG.md chore(release): 0.4.1 2022-02-14 14:55:47 +00:00
LICENSE.md feat: copy template from other projects 2019-09-17 07:45:15 -05:00
Makefile feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00
README.md more function signature docs 2021-08-08 15:11:23 -05:00
package.json feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00
renovate.json feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00
tsconfig.json feat: copy template from other projects 2019-09-17 07:45:15 -05:00
yarn.lock feat(build): remove rollup, do not bundle the output 2022-10-08 15:02:40 -05:00

README.md

JS Utils

This project is a collection of utilities, collected from my other Typescript projects, lightly documented and heavily tested.

Contents

Status

Pipeline status Lines of Code Test coverage MIT license FOSSA Status

Open bug count Open issue count Closed issue count

Renovate badge Dependency status Dev dependency status Known vulnerabilities

Maintainability score Technical debt ratio Quality issues Language grade: JavaScript Total alerts

Releases

github release link github release version github commits since release

npm package link npm release version Typescript definitions

Usage

Install:

yarn add -D @apextoaster/js-utils

And import:

import { mustExist } from '@apextoaster/js-utils';

The library is bundled and has no dependencies.

Features

Please see the complete API docs for the full function list.

Features utilities and helpers for:

  • Array
    • assertions/guards:
      • hasItems
      • isArray for both Array/ReadonlyArray
      • isEmpty
      • lengthOf
    • conversion
      • filterZip
      • toArray
  • Array Mapper
    • array-to-map converter, reduces an array of values to a map, using an array of keys
  • Async
    • timed promises
      • defer/deferValue
      • deferUntil
      • timeout
  • Buffer
    • concatenation
      • concat
      • encode
  • Checklist
    • allow/deny list
  • Child Process
    • childResult
    • writeInput
  • Env Vars
    • isDebug
  • Errors
    • nestable, typed error
      • ChildProcessError
      • InvalidArgumentError
      • MissingKeyError
      • NotFoundError
      • NotImplementedError
      • TimeoutError
  • Logger
    • test logging helpers
  • Map
    • types
      • MapLike
    • assertions/guards:
      • mustGet
    • null-safe helpers
      • getOrDefault
    • helpers for Map<K, Array<V>>
      • getHead/getHeadOrDefault
      • setOrPush
    • concat/merge
      • mergeMap
      • pushMergeMap
    • conversion
      • entriesOf
      • makeDict
      • makeMap
      • pairsToMap
  • Math
    • predicates for functional methods
      • sum
  • Maybe
    • types
      • Maybe
      • None
    • assertions/guards
      • doesExist
      • mustExist
      • mustDefault
      • mustFind
      • removeNone
    • null-safe helpers
      • isNone
      • isSome
  • Predicate
    • types for functional methods
  • Reflect
    • getConstructor
    • getMethods
  • Signal
    • wait for OS signal
      • signal
  • String
    • leftPad
    • trim with suffix