Home Identifier Source Test Repository
import Utils from 'buffer-node-api/src/utils.js'
public class | source

Utils

Static Method Summary

Static Public Methods
public static

mapObject(to: Object, from: Object)

Copies the object keys from one object and sets them on another

public static

Shuffles an array's indexes

Static Public Methods

public static mapObject(to: Object, from: Object) source

Copies the object keys from one object and sets them on another

Params:

NameTypeAttributeDescription
to Object

The object to add keys to

from Object

The object to get keys from

public static shuffleArray(array: Array): Array source

Shuffles an array's indexes

Params:

NameTypeAttributeDescription
array Array

The array to shuffle

Return:

Array

The shuffled array