1.0.9 • Published 10 months ago

msrd-helper-lib v1.0.9

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

HelpersWorkspace

This library was generated with Angular CLI version 13.2.5.

Installation

Using npm:

$ npm i msrd-helper-lib

In Angular:

import { UtilsHelperService } from './utils-helper-lib.service';

class Consumer() {     private colors: string[]     constructor(private helper: UtilsHelperService) {       this.colors = this.helper.getRandomHexaColor()     } }

Library Methods

Dates

  • GetCurrentDayInterval(hour: number, minute: number, second: number): Interval: Get Interval from today to 24 hours later.

Utils

  • getRandomHexaColor(): string[]: Returns a random hexadecimal pair values (ex. '#f80404', '#c40303').
  • ObjectsAreEqual(a: object, b: object): boolean: Returns True if two objects are equal.
  • DeepClone(original_object: object): any Returns a deep clone of an object

Iterables

  • SortBy(iterable: any[], property_name: string): any[]: Sorts an iterable object by property name.
  • SortByDesc(iterable: any[], property_name: string): any[]: Same as above but descendingly.
  • GroupBy(iterable: any[], property_name: string): Map<any, any>: Returns a Map object, grouped by property name.
1.0.9

10 months ago

1.0.8

10 months ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago