npm.io
0.5.1 • Published 2 years ago

epdoc-util

Licence
MIT
Version
0.5.1
Deps
0
Size
75 kB
Vulns
0
Weekly
0

epdoc-util

Typescript utilities, mostly for type checking, with type-guards.

import { isBoolean } from 'epdoc-util';

if (isBoolean(value)) {
  doTask();
}
import { object as test } from 'epdoc-util';

let obj = { a: { b: 3 } };
test(obj)
  .property('a.b')
  .value(); // returns 3

u.path('a.c').setValue({}, 4); // results in { a: { c: 4 }}

test(obj)
  .property('a.b')
  .isInteger(); // returns true

Build

npm run clean
npm run build
npm run test

Publish

npm publish

Keywords