@mikelgo/ts-guava
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

npm npm npm codecov

Ts-guava

Ts-guava is a small library providing some TypeScript utility functions to deal with objects and arrays. The libraries aim is to provide the Google Guava utilities to the TypeScript world.

Installation

Use npm to install:

    $ npm i @mikelgo/ts-guava

Usage

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

Example:

import {isValid} from '@mikelgo/ts-guava/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
  • assignValid

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

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i @mikelgo/ts-guava

    Weekly Downloads

    3

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    18.9 kB

    Total Files

    38

    Last publish

    Collaborators

    • mikelgo