Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

typescript-toolbox

1.3.1 • Public • Published

Typescript-Toolbox

GitHub issues GitHub release Build Status Coverage Status

Typescript-Toolbox is a collection of everything that your TypeScript project needs. It consists of a bunch of helpful method and classes, which make your life easier while developing a project using TypeScript.

Including classes like: Optional and Predicate, which are well known to Java developers. Also there are a bunch of nice typing utilities, to correctly type your project. Those types ensure, you do not run out of type safety.

Installation

Typescript-Toolbox is available as npm package.

// Installation using NPM
npm install typescript-toolbox

// Installation using YARN
yarn add typescript-toolbox

Available Tools / API

Optional

Added in v1.2.0: Optional inspired by Java 8 implementation of Optional.

Utility class to abstract the handling of possibly null or undefined values.

For a detailed documentation with samples, please see Optional docs

Predicate

Added in v1.2.0: Predicate inspired by the Java Standard implementation of Predicate.

Utility class to abstract boolean expressions and test() for the result.

For a detailed documentation with samples, please see: Predicate docs

Array utils

Added in 0.1.0: Array utils is a collection of useful array methods.

It consists of: mergeArray, mergeArrays, mergeSet.

For a detailed documentation with samples, please see: Array utils docs

Object utils

Added in 0.1.0: Object utils is a collection of useful object methods.

It consists of: merge.

For a detailed documentation with samples, please see: Object utils docs

Variable utils

Added in 0.1.0: Variable utils is a collection of useful methods for checking on variables.

It consists of: isString, isArray, isNil, isAssigned, ifAssigned.

For a detailed documentation with samples, please see: Variable utils docs

Typings

Added in 0.1.0: Typings contain a bunch of useful types.

It consists of: OptionalRecord, OptionalNullRecord.

For a detailed documentation with samples, please see: Typings docs

String utils

Added in 0.1.0: String utils is a collection of useful methods for checking a string variable.

It consists of: isStringEmpty, isTrimmedStringEmpty.

For a detailed documentation with samples, please see: String utils docs

Math utils

Added in 0.1.0: Math utils is a collection of some mathematical functions.

For a detailed documentation with samples, please see: Math utils docs

Helper methods

Added in 0.1.0: Helper methods is collection of some helpful methods which can be used for convenience.

For a detailed documentation with samples, please see: Helper methods

Browser Support

Cross-browser support is very important. Therefore this library has even support for Internet Explorer 11.

Chrome Firefox Safari Opera Edge IE
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔ 11 ✔

Donate

If you like this library and would like to support this work feel free to donate here:

paypal

License

This library is licensed under the MIT license.

Contribute

Feel free to submit your PR, to help this library grow. The more helpful methods this library bundles the more it helps developing TypeScript projects.

Install

npm i typescript-toolbox

DownloadsWeekly Downloads

3

Version

1.3.1

License

MIT

Unpacked Size

44.3 kB

Total Files

35

Last publish

Collaborators

  • avatar