2.0.32 • Published 3 years ago

@fireflysemantics/is v2.0.32

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Build Status

@fireflysemantics/is

Typescript type testing and validation library. See API for all methods provided.

Install

The @fireflysemantics/is library declares @fireflysemantics/validatorts as a peer dependency.

Therefore both libraries must be installed by your application.

npm i -S @fireflysemantics/validatorts

npm i -S @fireflysemantics/is
Note that if you are using the `FESM5` package format the `tslib` peer dependency must also be installed.

npm i -S npm i tslib

# Supported Package Formats

The library is built with the Angular Package Format.  It therefore supports all these package formats (As can be seen in the provided `package.json`) and has integrated typescript definitions:

- "main": "bundles/fireflysemantics-validatorts.umd.js",
-  "module": "fesm5/fireflysemantics-validatorts.js",
-  "es2015": "fesm2015/fireflysemantics-validatorts.js",
-  "esm5": "esm5/fireflysemantics-validatorts.js",
-  "esm2015": "esm2015/fireflysemantics-validatorts.js",
-  "fesm5": "fesm5/fireflysemantics-validatorts.js",
-  "fesm2015": "fesm2015/fireflysemantics-validatorts.js",
-  "typings": "fireflysemantics-validatorts.d.ts"

## Typedoc

[Typedoc](https://fireflysemantics.github.io/is/doc/)

## Build

Run `ng build is` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build is`, go to the dist folder `cd dist/is` and run `npm publish`.

## Blog

- [Application Central Nervous System](https://medium.com/@ole.ersoy/application-central-nervous-system-37aba8e5e899)
- [Angular Application Central Nervous System Brain](https://medium.com/@ole.ersoy/angular-application-nervous-system-brain-685a684f357)

## Usage

We use this library to implement the validation decorators in [@fireflysemantics/validator](https://www.npmjs.com/package/@fireflysemantics/validator).  The functions can also be used to add semantic meaning to your test cases using [NPM Assert](https://www.npmjs.com/package/assert) or Jest and the same goes for general boolean logic in your source code.

For example instead of:
```ts
import { ok } from "assert";
ok(decorator != null, "The decorator is not null or undefined"); 

Use:

import { ok } from "assert";
import {isDefined} from "@fireflysemantics/is";

ok(isDefined(decorator)); 

See the test cases. For additional detail also see the validator.js test cases.

Running unit tests

Run npm t to execute the unit tests via Jest.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

2.0.32

3 years ago

2.0.31

3 years ago

2.0.28

3 years ago

2.0.29

3 years ago

2.0.26

3 years ago

2.0.27

3 years ago

2.0.24

3 years ago

2.0.25

3 years ago

2.0.22

4 years ago

2.0.20

4 years ago

2.0.19

4 years ago

2.0.16

4 years ago

2.0.13

4 years ago

2.0.12

4 years ago

2.0.11

4 years ago

2.0.10

4 years ago

2.0.7

4 years ago

2.0.5

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.4

4 years ago

2.0.0

4 years ago

1.8.24

4 years ago

1.8.22

5 years ago

1.8.21

5 years ago

1.8.20

5 years ago

1.8.19

5 years ago

1.8.18

5 years ago

1.8.17

5 years ago

1.8.16

5 years ago

1.8.15

5 years ago

1.8.13

5 years ago

1.8.12

5 years ago

1.8.11

5 years ago

1.8.10

5 years ago

1.8.9

5 years ago

1.8.8

5 years ago

1.8.7

5 years ago

1.8.6

5 years ago

1.8.5

5 years ago

1.8.4

5 years ago

1.8.3

6 years ago

1.8.2

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.7

6 years ago

1.7.6

6 years ago

1.7.5

6 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago