getKeyByValue

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.object

Return the key that correspond to the passed value in the passed object

Params

  1. object*-Object

    The object in which to search for the value

  2. value*-Mixed

    The value to find in the object

Return

  1. -String

    The key of the wanted value or false if not found

Example

import { getKeyByValue } from '@blackbyte/sugar/object';
getKeyByValue({ hello: 'world' }, 'world'); // => hello

Todo

  • testsnormal