react-bootstrap-typeahead
Version:
React typeahead with Bootstrap styling
20 lines (19 loc) • 464 B
JavaScript
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;
}