1.0.2 • Published 1 year ago

nyt-util v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Session Info

export type SessionInfo = {
  id: string;
  email?: string;
  mobile?: string;
  name?: string;
  role: string;
  requestId: string;
  token: string;
};

ErrorResponse

new ErrorResponse(message): {
    status: 0,
    message: 'ERROR',
    data: message
}

util

UniqueCode();
UniqueByType(name, type) =>  key give Upper case without special char by type
Key(name) =>  key give Upper case without special char
DaysBack(date, addDays, isDays)
AddDays(date, addDays, isDays)

Crypto encrypt

crypto.encrypt(text, key) :: string

Crypto decrypt

crypto.decrypt(text, key) :: string
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago