Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

random-obj-prop

sindresorhus59MITdeprecated4.0.0TypeScript support: included

Renamed to random-object-value: https://www.npmjs.com/package/random-object-value

Get a random property from an object

random, randomize, math, object, property, prop, pick, select, choice

readme

random-obj-prop

Get a random property from an object

Install

$ npm install random-obj-prop

Usage

import randomObjectProperty from 'random-obj-prop';

randomObjectProperty({foo: '🐴', bar: '🦄'});
//=> '🦄'