1.2.0 • Published 4 years ago

@mikelgo/ts-utils v1.2.0

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

npm npm npm codecov

Ts-utils

Ts-utils is a small library providing some TypeScript utility functions to deal with objects and arrays.

Installation

Use npm to install:

    $ npm i @mikelgo/ts-utils

Usage

Just import the util-function you want to use by importing it from the lib.

Example:

import {isValid} from '@mikelgo/ts-utils/common-utils'

    if(isValid(somethingToCheck){
        // ...execute some code
    })

Overview

Currently the library does support 12 utility-functions.

Common utils

  • isValid
  • isNotValid
  • isObject
  • isNotObject
  • isObjectOrArray
  • isNotObjectOrArray
  • noNullValues
  • notNull

Array utils

  • isArray
  • isNotArray
  • isEmptyArray
  • isNotEmptyArray
  • allValuesInArrayAreEqual
  • allValuesInArrayAreNotEqual

For the full documentation see:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.2.0

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago