Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kbrashears5/typescript-helper-functions
Typescript Helper Functions
https://github.com/kbrashears5/typescript-helper-functions
functions helper helper-functions helpers javascript typescript
Last synced: 2 months ago
JSON representation
Typescript Helper Functions
- Host: GitHub
- URL: https://github.com/kbrashears5/typescript-helper-functions
- Owner: kbrashears5
- License: mit
- Created: 2020-05-27T01:18:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T04:30:43.000Z (8 months ago)
- Last Synced: 2024-05-01T05:30:47.923Z (8 months ago)
- Topics: functions, helper, helper-functions, helpers, javascript, typescript
- Language: TypeScript
- Homepage: https://github.com/kbrashears5/typescript-helper-functions#readme
- Size: 84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
typescript-helper-functions
Helper functions for Typescript
[![CI/CD](https://github.com/kbrashears5/typescript-helper-functions/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/kbrashears5/typescript-helper-functions/actions/workflows/ci-cd.yml)
[![codecov](https://codecov.io/gh/kbrashears5/typescript-helper-functions/branch/master/graph/badge.svg?token=2CVWSV7X7L)](https://codecov.io/gh/kbrashears5/typescript-helper-functions)
[![npm](https://img.shields.io/npm/v/typescript-helper-functions)](https://img.shields.io/npm/v/typescript-helper-functions)
[![npm](https://img.shields.io/npm/dt/typescript-helper-functions)](https://img.shields.io/npm/dt/typescript-helper-functions)## Install
```
npm install typescript-helper-functions@latest
```## Usage
### Base Class
Inherit from this class to get some extra functionality
```javascript
public class Class1 extends BaseClass{}
```### LogHelper
Helper class to log in a consistent way
```javascript
const logHelper = new LogHelper(LogLevel.Trace);logHelper.LogInputs('functionName', new { param1, param2 }());
```### ObjectOperations
Helper class to invoke operations on object types
```javascript
const objectOperations = new ObjectOperations();logHelper.ToString(true);
```### Orchestrator
Helper class to invoke operations on object types
```javascript
const logger = new Logger(LogLevel.Trace);const orchestrator = new Orchestrator(logger);
orchestrator.Orchestrate(() => {
console.log('function');
});
```## Development
Clone the latest and run
```npm
npm run prep
```to install packages and prep the git hooks