@dekalabs/front-utils
v2.19.2
Published
Javascript utils for help us to develop faster
Downloads
280
Readme
front-utils
Javascript utils for help us to develop faster
Github Pages Docs
https://dekalabs.github.io/front-utils/
Packages
- Vanilla
- Vue
- VeeValidate
import { isEmpty, isObject, .... } from '@dekalabs/front-utils'
import { omitClassId, .... } from '@dekalabs/front-utils/vue'
import { testDecimal, .... } from '@dekalabs/front-utils/vee-validate'
Configuration File
By default the utils have this config:
- DateFormat
export const defaultDatesFormat: Intl.DateTimeFormatOptions = {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
}
export const defaultLanguage = 'es'
export const defaultPaginatedFilter: PaginatedFilter = {
page: 1,
page_size: 10,
}
You can change those values creating a configuration file like: Create front-utils.ts file
import FrontUtilsConfig from '@dekalabs/front-utils/config'
// Like default vanilla params methods for format or language that affect format
FrontUtilsConfig.setDateFormat({
year: 'numeric',
month: 'numeric',
day: 'numeric',
})
FrontUtilsConfig.setLanguage('en')
// Or Infra list() default page filter
FrontUtilsConfig.setPaginatedFilter({ page: 1, page_size: 5 })
Load it on main.ts
.
...
.....
import '@/plugins/front-utils'
.....
...
.
Check who is using our library
- https://github.com/search?q=%40dekalabs%2Ffront-utils+path%3Apackage.json&type=code