1 | var idCounter = 0; // eslint-disable-next-line @typescript-eslint/ban-types
|
2 |
|
3 | export function isFunction(value) {
|
4 | return typeof value === 'function';
|
5 | }
|
6 | export function isString(value) {
|
7 | return typeof value === 'string';
|
8 | } // eslint-disable-next-line @typescript-eslint/no-empty-function
|
9 |
|
10 | export function noop() {}
|
11 | export function pick(obj, keys) {
|
12 | // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
13 | var result = {};
|
14 | keys.forEach(function (key) {
|
15 | result[key] = obj[key];
|
16 | });
|
17 | return result;
|
18 | }
|
19 | export function uniqueId(prefix) {
|
20 | idCounter += 1;
|
21 | return (prefix == null ? '' : String(prefix)) + idCounter;
|
22 | } |
\ | No newline at end of file |