1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.isFunction = isFunction;
|
7 | exports.isString = isString;
|
8 | exports.noop = noop;
|
9 | exports.pick = pick;
|
10 | exports.uniqueId = uniqueId;
|
11 | var idCounter = 0;
|
12 |
|
13 | function isFunction(value) {
|
14 | return typeof value === 'function';
|
15 | }
|
16 |
|
17 | function isString(value) {
|
18 | return typeof value === 'string';
|
19 | }
|
20 |
|
21 |
|
22 | function noop() {}
|
23 |
|
24 | function pick(obj, keys) {
|
25 |
|
26 | var result = {};
|
27 | keys.forEach(function (key) {
|
28 | result[key] = obj[key];
|
29 | });
|
30 | return result;
|
31 | }
|
32 |
|
33 | function uniqueId(prefix) {
|
34 | idCounter += 1;
|
35 | return (prefix == null ? '' : String(prefix)) + idCounter;
|
36 | } |
\ | No newline at end of file |