transform

Dynamic

checkCondition

Return true if condition matches

import { checkCondition } from '@jonibach/transform'

const result = checkCondition(query-array)

params:

  1. params

async: no

Demo not found

checkConditions

Return true if condition matches across multiple arrays

import { checkConditions } from '@jonibach/transform'

const result = checkConditions(query-arrays)

params:

  1. conditions

async: no

Demo not found

filterByObjectCondition

Return objects if condition matches across an array

import { filterByObjectCondition } from '@jonibach/transform'

const result = filterByObjectCondition(data,query-array)

params:

  1. objects

  2. condition

async: no

Demo not found

filterByObjectConditions

Return objects if condition matches across multiple arrays

import { filterByObjectConditions } from '@jonibach/transform'

const result = filterByObjectConditions(data,query-arrays)

params:

  1. objects

  2. conditions

async: no

Demo not found

Data

objectToArray

Converts an object to an array of key-value pairs.

import { objectToArray } from '@jonibach/transform'

const result = objectToArray([object Object])

params:

  1. obj

async: no

Demo not found

arrayToObject

Converts an array of key-value pairs to an object.

import { arrayToObject } from '@jonibach/transform'

const result = arrayToObject(key1,value1,key2,value2)

params:

  1. array

async: no

Demo not found

mapToObject

Converts a map to an object.

import { mapToObject } from '@jonibach/transform'

const result = mapToObject([object Map])

params:

  1. map

async: no

objectToMap

Converts an object to a map.

import { objectToMap } from '@jonibach/transform'

const result = objectToMap([object Object])

params:

  1. obj

async: no

setToArray

Converts a set to an array.

import { setToArray } from '@jonibach/transform'

const result = setToArray([object Set])

params:

  1. set

async: no

arrayToSet

Converts an array to a set.

import { arrayToSet } from '@jonibach/transform'

const result = arrayToSet(value1,value2)

params:

  1. array

async: no

arrayToFlatArray

Converts a nested array to a flat array.

import { arrayToFlatArray } from '@jonibach/transform'

const result = arrayToFlatArray(1,2,3,4,5)

params:

  1. array

async: no

arrayToGroup

Groups an array of objects by a key.

import { arrayToGroup } from '@jonibach/transform'

const result = arrayToGroup([object Object],[object Object],[object Object],category)

params:

  1. array

  2. key

async: no

Demo not found

Array Filtering

objectArrayToArrayOfString

Converts an array of objects into an array of strings.

import { objectArrayToArrayOfString } from '@jonibach/transform'

const result = objectArrayToArrayOfString([object Object],[object Object])

params:

  1. array

async: no

Demo not found

nestedObjectArrayValuesToString

Flattens a nested array of objects and concatenates all values into a single string.

import { nestedObjectArrayValuesToString } from '@jonibach/transform'

const result = nestedObjectArrayValuesToString([object Object],[object Object],Developer)

params:

  1. array

async: no

Demo not found

nestedObjectArrayKeysToString

Flattens a nested array of objects and concatenates all keys into a single string.

import { nestedObjectArrayKeysToString } from '@jonibach/transform'

const result = nestedObjectArrayKeysToString([object Object],[object Object],Developer)

params:

  1. array

async: no

Demo not found

nestedObjectArrayToString

Flattens a nested array of objects and converts each object to a string representation.

import { nestedObjectArrayToString } from '@jonibach/transform'

const result = nestedObjectArrayToString([object Object],[object Object],Developer)

params:

  1. array

async: no

Demo not found

nestedObjectArrayToQueryString

Flattens a nested array of objects and converts each object to a query string representation.

import { nestedObjectArrayToQueryString } from '@jonibach/transform'

const result = nestedObjectArrayToQueryString([object Object],[object Object],Developer)

params:

  1. array

async: no

Demo not found

arrayWithObjectAndString

Converts an array of objects into an array with each object accompanied by its string representation.

import { arrayWithObjectAndString } from '@jonibach/transform'

const result = arrayWithObjectAndString([object Object],[object Object],Developer)

params:

  1. array

async: no

Demo not found

searchString

Searches a string for a partial match regardless of case.

import { searchString } from '@jonibach/transform'

const result = searchString(fox,The quick brown fox jumps over the lazy dog.)

params:

  1. text

  2. searchTerm

async: no

Demo not found

filterArrayByString

Filters an array of transformed objects, returning only those that match the search term, in their original format.

import { filterArrayByString } from '@jonibach/transform'

const result = filterArrayByString([object Object],[object Object],Developer)

params:

  1. array

  2. searchTerm

async: no

Demo not found

filterArrayByStringRaw

Filters an array of transformed objects based on a search term, retaining the transformed format.

import { filterArrayByStringRaw } from '@jonibach/transform'

const result = filterArrayByStringRaw([object Object],[object Object],Developer)

params:

  1. array

  2. searchTerm

async: no