1.2.5 • Published 1 year ago

alvitre-obelisk v1.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Obelisk

Functions for any projects Typescript Modules and function for global use typescript using jest for tests.

Instalation

npm i alvitre-obelisk yarn add alvitre-obelisk

Functions

Convert dates from JS, US or PTBR

dateFormatPtbr

Date US and JS to PTBR format > dateFormatPtbr("1992-06-10") return 10/06/1992

dateFormatUs

Date JS to US format > dateFormatUs(new Date("1992,06,10")) return 1992-06-10

dateFormatJs

Date US to JS full format > dateFormatJS(new Date("1992-06-10")) return 1992-06-10T03:00:00.000Z

Other functions to use

validarToken

Verify with token is valid string > validarToken(null) return false > validarToken(undefined) return false

calcYearsOldWithMounths

Calculate age with months of life > calcYearsOldWithMounths("1993-06-10") return "28 anos e 6 meses"

limitText

Cut string adding points > limitText("lorem ipsum", 3) return "lor ..."

1.2.5

1 year ago

1.2.4

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago