Function obj_keys_from_array

  • Create an object from array. Object's keys will made from Array's values. Use this to filter an array, keep only unique values, and maybe make something of them. This might be faster than using ES6 [ Set(...arr)], because it loops only once.


    • from array values. Duplicate array values have been removed.


    • arr: any[]

      array values will be used, keys ignored

    • value: any = true

      any value to assign to each new item in object. Default value = true.

    Returns Record<any, any>

Generated using TypeDoc