UNPKG

react-bootstrap-typeahead

Version:
20 lines (19 loc) 464 B
let idCounter = 0; export function isFunction(value) { return typeof value === 'function'; } export function isString(value) { return typeof value === 'string'; } export function noop() { } export function pick(obj, keys) { const result = {}; keys.forEach((key) => { result[key] = obj[key]; }); return result; } export function uniqueId(prefix) { idCounter += 1; return (prefix == null ? '' : String(prefix)) + idCounter; }