1.0.1 • Published 3 years ago
@dev.arlamend7/js-ts v1.0.1
Javascript && Typescript
I use a jest library to test all functions It`s a package with some extensions, functions and others things. Everything that a use almost every day.
I'll create a c# library too.
Common
Extensions providers by this package
interface Array<T> {
Distinct(): T[];
isNullOrEmpty(): boolean;
Sum(map?: (arg: T, index: number) => number, startValue?: number): number;
Max(map?: (arg: T, index: number) => number): number;
Min(map?: (arg: T, index: number) => number): number;
Remove(elem: (arg: T) => Boolean): void;
}
interface Date {
SameAs(Date: Date): boolean;
isBeetween(dateStart: Date, dateEnd: Date): boolean;
}
interface Number {
[Symbol.iterator]: () => Generator<number, void, number[]>;
}
interface String {
RemoveAccents(): string;
isNullOrWhiteSpace(): boolean;
JustNumbers(): string;
}
functions
function debounce(fn: Function, milissegundos: number, ...args: any[]): () => void;
function Paginar<T>(array: T[], request?: PaginacaoRequest): PaginacaoResponse<T>;
Utils
function isRequired: (value: any) => never;
class Validator {
CPF(str: string): boolean;
CNPJ(str: string): boolean;
CellPhone(str: string): boolean;
}
class Formatter {
get CONST_REGEX(): {
CPF: RegExp;
CNPJ: RegExp;
CELLPHONE: RegExp;
};
CPF(text: string): string;
CNPJ(text: string): string;
CellPhone(text: string): string;
}
Web
class NotificationService {
notifications: Map<string, Notification>;
addNotification(key: string, Title: string, options?: NotificationOptions): void;
Notify(notification: globalThis.Notification): void;
NotifyByKey(key: string): void;
}
1.0.1
3 years ago
1.0.0
3 years ago
0.3.8
3 years ago
0.3.7
3 years ago
0.3.2
3 years ago
0.3.1
3 years ago
0.3.3
3 years ago
0.3.0
3 years ago
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
3 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.9
3 years ago
0.2.8
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago