1.1.5 • Published 1 year ago

@ijx/utils v1.1.5

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

Utils

Generic functions library

Installation

Use the package manager npm to install utils.

npm install @ijx/utils

Usage

import "@ijx/utils"

List of prototypes

  • Array - filter2(func) - deleteElement(element) - concat2(...arrays) - mapAsync(func) - hasDuplicates()
  • Object - getKeyByValue(value) - clone() - assign(obj) - defObject(fuente) - forEach(fn, thisArg) - filter(fn, thisArg) - map(fn, thisArg) - getName() - getMethods()
  • String - camelToSnakeCase() - camelCase(sep="_", type=true) - rellenar(size, character=' ') - delExt() - getExt() - zeroPad(n = 2) - suspensivos(max, chars="...")
  • Number - zeroPad(n = 2)
  • Date - format(format="d/m/Y")

List of functions

  • isInteger(num)
  • isFloat(num)
  • isClass(entity)
  • isNullable(data)
  • isType(data, type)
  • isTypeNotNull(data, type)
  • isTypeStringNotEmpty(data)
  • wait(time=1)
  • thread(func)
  • echo(cad)
  • getTimestamp()
  • getDate(...t)
  • makeid(length=5)
  • decToHex(num)
  • base64_encode(data)
  • base64_decode(data)
  • decimalAdjust(value, exp=0, type="round")
  • secondsToDhms(seconds)
  • stringifyNoCircular(obj, space=null)
  • readArgs(validArgs: object, initChar="-", defaultBool=false)
  • replaceSqlValues(sqlQuery: string, data: (string | number | null)[])

List of functions with dependencies

  • createDirs(src: string)
  • readable(src: string)
  • writable(src: string)
  • readableAndWritable(src: string)
  • existsAsync(src: string)
  • getRelative(metaurl, ...file)
  • getImportPath(metaurl)
  • pathToImport(metaurl, ruta)
  • exec(command: string)
1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

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