Skip to content

karloespiritu/random-key-obj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-key-obj Build Status

Pick a random key from an object

Install

npm install --save random-key-obj

Usage

const randomKey = require('random-key-obj')
const obj = {a: 1, b: 'two', c: 3, d: 4}

randomKey(obj)
// => b

randomKey(obj)
// => d

About

Pick a random key from an object

Resources

Stars

Watchers

Forks

Packages

No packages published