1.2.13 • Published 1 year ago

@consus/js-utils v1.2.13

Weekly downloads
5
License
MIT
Repository
bitbucket
Last release
1 year ago

@consus/js-utils

ArrayUtils

removeByProperty(array, value, property): void
replaceOrPushById(array, newElement, idProperty = '_id'): void
removeById(array, value): void
removeByMongoId(array, value): void
removeByNormalId(array, value): void
removeByIndex(array, index): any

DisplayUtils

displayString(item): string
displayObject(item, property): string
normalizeDisplay(displayForm): string

FuncUtils

emptyFunc(): func
memoize(func): func

GenerateUtils

generateDomId(): string

MathUtils

roundToTwoDecimals(number): number

ObjectUtils

ObjectUtils.isEmpty(object): bool
ObjectUtils.isObjectEmpty(object): bool
/** devuelve un valor a traves de un accessor generado por puntos (.)
ObjectUtils.normalizeAccessor(baseObject, accessor, limit = 0): any
/** devuelve el objeto que contiene al valor final **/
ObjectUtils.normalizeContainerAccessor(baseObject, accessor): any
ObjectUtils.lastAccessor(accessor): string

PaginationUtils

PaginationUtils.pageCount(elementsCount, pageSize): number
PaginationUtils.normalizePageSelected(elementsCount, pageSize, pageNumber): number
PaginationUtils.areNavigationNecesary(pageCount): bool
PaginationUtils.pageState(pageNumber, pageSize, elements) => [elementsOfPage, pageNumber]

SortUtils

dynamicSort(property): func
dynamicSortMultiple(...arg): func

StrUtils

StrUtils.removeAccents(str): string
/** Convierte a minusculas y elimina los tildes **/
StrUtils.normalize(str): string
StrUtils.normalizedCompare(str1, str2): bool
StrUtils.firstCapitalize(str): string
StrUtils.lastCaracter(str): string
StrUtils.removeLastChar(str): string
StrUtils.isEmpty(str): bool
StrUtils.count(str, caracter): number
StrUtils.isCharNumber(str): bool
StrUtils.toNumber(str): number
StrUtils.isString(str): bool
1.2.13

1 year ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago