1 | 'use strict';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | const ms = require('ms');
|
8 | const mpath = require('mpath');
|
9 | const sliced = require('sliced');
|
10 | const Buffer = require('safe-buffer').Buffer;
|
11 | const Decimal = require('./types/decimal128');
|
12 | const ObjectId = require('./types/objectid');
|
13 | const PopulateOptions = require('./options/PopulateOptions');
|
14 | const clone = require('./helpers/clone');
|
15 | const isObject = require('./helpers/isObject');
|
16 | const isBsonType = require('./helpers/isBsonType');
|
17 | const getFunctionName = require('./helpers/getFunctionName');
|
18 | const isMongooseObject = require('./helpers/isMongooseObject');
|
19 | const promiseOrCallback = require('./helpers/promiseOrCallback');
|
20 | const specialProperties = require('./helpers/specialProperties');
|
21 |
|
22 | let Document;
|
23 |
|
24 | exports.specialProperties = specialProperties;
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | exports.toCollectionName = function(name, pluralize) {
|
37 | if (name === 'system.profile') {
|
38 | return name;
|
39 | }
|
40 | if (name === 'system.indexes') {
|
41 | return name;
|
42 | }
|
43 | if (typeof pluralize === 'function') {
|
44 | return pluralize(name);
|
45 | }
|
46 | return name;
|
47 | };
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | exports.deepEqual = function deepEqual(a, b) {
|
61 | if (a === b) {
|
62 | return true;
|
63 | }
|
64 |
|
65 | if (a instanceof Date && b instanceof Date) {
|
66 | return a.getTime() === b.getTime();
|
67 | }
|
68 |
|
69 | if ((isBsonType(a, 'ObjectID') && isBsonType(b, 'ObjectID')) ||
|
70 | (isBsonType(a, 'Decimal128') && isBsonType(b, 'Decimal128'))) {
|
71 | return a.toString() === b.toString();
|
72 | }
|
73 |
|
74 | if (a instanceof RegExp && b instanceof RegExp) {
|
75 | return a.source === b.source &&
|
76 | a.ignoreCase === b.ignoreCase &&
|
77 | a.multiline === b.multiline &&
|
78 | a.global === b.global;
|
79 | }
|
80 |
|
81 | if (typeof a !== 'object' && typeof b !== 'object') {
|
82 | return a == b;
|
83 | }
|
84 |
|
85 | if (a === null || b === null || a === undefined || b === undefined) {
|
86 | return false;
|
87 | }
|
88 |
|
89 | if (a.prototype !== b.prototype) {
|
90 | return false;
|
91 | }
|
92 |
|
93 |
|
94 | if (a instanceof Number && b instanceof Number) {
|
95 | return a.valueOf() === b.valueOf();
|
96 | }
|
97 |
|
98 | if (Buffer.isBuffer(a)) {
|
99 | return exports.buffer.areEqual(a, b);
|
100 | }
|
101 |
|
102 | if (isMongooseObject(a)) {
|
103 | a = a.toObject();
|
104 | }
|
105 | if (isMongooseObject(b)) {
|
106 | b = b.toObject();
|
107 | }
|
108 |
|
109 | let ka;
|
110 | let kb;
|
111 | let key;
|
112 | let i;
|
113 | try {
|
114 | ka = Object.keys(a);
|
115 | kb = Object.keys(b);
|
116 | } catch (e) {
|
117 |
|
118 | return false;
|
119 | }
|
120 |
|
121 |
|
122 |
|
123 | if (ka.length !== kb.length) {
|
124 | return false;
|
125 | }
|
126 |
|
127 |
|
128 | ka.sort();
|
129 | kb.sort();
|
130 |
|
131 |
|
132 | for (i = ka.length - 1; i >= 0; i--) {
|
133 | if (ka[i] !== kb[i]) {
|
134 | return false;
|
135 | }
|
136 | }
|
137 |
|
138 |
|
139 |
|
140 | for (i = ka.length - 1; i >= 0; i--) {
|
141 | key = ka[i];
|
142 | if (!deepEqual(a[key], b[key])) {
|
143 | return false;
|
144 | }
|
145 | }
|
146 |
|
147 | return true;
|
148 | };
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 | exports.last = function(arr) {
|
155 | if (arr.length > 0) {
|
156 | return arr[arr.length - 1];
|
157 | }
|
158 | return void 0;
|
159 | };
|
160 |
|
161 | exports.clone = clone;
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 | exports.promiseOrCallback = promiseOrCallback;
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 | exports.omit = function omit(obj, keys) {
|
174 | if (keys == null) {
|
175 | return Object.assign({}, obj);
|
176 | }
|
177 | if (!Array.isArray(keys)) {
|
178 | keys = [keys];
|
179 | }
|
180 |
|
181 | const ret = Object.assign({}, obj);
|
182 | for (const key of keys) {
|
183 | delete ret[key];
|
184 | }
|
185 | return ret;
|
186 | };
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 | exports.options = function(defaults, options) {
|
199 | const keys = Object.keys(defaults);
|
200 | let i = keys.length;
|
201 | let k;
|
202 |
|
203 | options = options || {};
|
204 |
|
205 | while (i--) {
|
206 | k = keys[i];
|
207 | if (!(k in options)) {
|
208 | options[k] = defaults[k];
|
209 | }
|
210 | }
|
211 |
|
212 | return options;
|
213 | };
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 | exports.random = function() {
|
222 | return Math.random().toString().substr(3);
|
223 | };
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 | exports.merge = function merge(to, from, options, path) {
|
234 | options = options || {};
|
235 |
|
236 | const keys = Object.keys(from);
|
237 | let i = 0;
|
238 | const len = keys.length;
|
239 | let key;
|
240 |
|
241 | path = path || '';
|
242 | const omitNested = options.omitNested || {};
|
243 |
|
244 | while (i < len) {
|
245 | key = keys[i++];
|
246 | if (options.omit && options.omit[key]) {
|
247 | continue;
|
248 | }
|
249 | if (omitNested[path]) {
|
250 | continue;
|
251 | }
|
252 | if (specialProperties.has(key)) {
|
253 | continue;
|
254 | }
|
255 | if (to[key] == null) {
|
256 | to[key] = from[key];
|
257 | } else if (exports.isObject(from[key])) {
|
258 | if (!exports.isObject(to[key])) {
|
259 | to[key] = {};
|
260 | }
|
261 | if (from[key] != null) {
|
262 | if (from[key].instanceOfSchema) {
|
263 | if (to[key].instanceOfSchema) {
|
264 | to[key].add(from[key].clone());
|
265 | } else {
|
266 | to[key] = from[key].clone();
|
267 | }
|
268 | continue;
|
269 | } else if (from[key] instanceof ObjectId) {
|
270 | to[key] = new ObjectId(from[key]);
|
271 | continue;
|
272 | }
|
273 | }
|
274 | merge(to[key], from[key], options, path ? path + '.' + key : key);
|
275 | } else if (options.overwrite) {
|
276 | to[key] = from[key];
|
277 | }
|
278 | }
|
279 | };
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 | exports.toObject = function toObject(obj) {
|
290 | Document || (Document = require('./document'));
|
291 | let ret;
|
292 |
|
293 | if (obj == null) {
|
294 | return obj;
|
295 | }
|
296 |
|
297 | if (obj instanceof Document) {
|
298 | return obj.toObject();
|
299 | }
|
300 |
|
301 | if (Array.isArray(obj)) {
|
302 | ret = [];
|
303 |
|
304 | for (let i = 0, len = obj.length; i < len; ++i) {
|
305 | ret.push(toObject(obj[i]));
|
306 | }
|
307 |
|
308 | return ret;
|
309 | }
|
310 |
|
311 | if (exports.isPOJO(obj)) {
|
312 | ret = {};
|
313 |
|
314 | for (const k in obj) {
|
315 | if (specialProperties.has(k)) {
|
316 | continue;
|
317 | }
|
318 | ret[k] = toObject(obj[k]);
|
319 | }
|
320 |
|
321 | return ret;
|
322 | }
|
323 |
|
324 | return obj;
|
325 | };
|
326 |
|
327 | exports.isObject = isObject;
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 | exports.isPOJO = function isPOJO(arg) {
|
342 | if (arg == null || typeof arg !== 'object') {
|
343 | return false;
|
344 | }
|
345 | const proto = Object.getPrototypeOf(arg);
|
346 |
|
347 |
|
348 |
|
349 | return !proto || proto.constructor.name === 'Object';
|
350 | };
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 | exports.isNativeObject = function(arg) {
|
358 | return Array.isArray(arg) ||
|
359 | arg instanceof Date ||
|
360 | arg instanceof Boolean ||
|
361 | arg instanceof Number ||
|
362 | arg instanceof String;
|
363 | };
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 | exports.isEmptyObject = function(val) {
|
370 | return val != null &&
|
371 | typeof val === 'object' &&
|
372 | Object.keys(val).length === 0;
|
373 | };
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 | exports.hasKey = function hasKey(obj, key) {
|
381 | const props = Object.keys(obj);
|
382 | for (const prop of props) {
|
383 | if (prop === key) {
|
384 | return true;
|
385 | }
|
386 | if (exports.isPOJO(obj[prop]) && exports.hasKey(obj[prop], key)) {
|
387 | return true;
|
388 | }
|
389 | }
|
390 | return false;
|
391 | };
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 | exports.args = sliced;
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 | exports.tick = function tick(callback) {
|
412 | if (typeof callback !== 'function') {
|
413 | return;
|
414 | }
|
415 | return function() {
|
416 | try {
|
417 | callback.apply(this, arguments);
|
418 | } catch (err) {
|
419 |
|
420 |
|
421 | process.nextTick(function() {
|
422 | throw err;
|
423 | });
|
424 | }
|
425 | };
|
426 | };
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 | exports.isMongooseType = function(v) {
|
434 | return v instanceof ObjectId || v instanceof Decimal || v instanceof Buffer;
|
435 | };
|
436 |
|
437 | exports.isMongooseObject = isMongooseObject;
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 | exports.expires = function expires(object) {
|
447 | if (!(object && object.constructor.name === 'Object')) {
|
448 | return;
|
449 | }
|
450 | if (!('expires' in object)) {
|
451 | return;
|
452 | }
|
453 |
|
454 | let when;
|
455 | if (typeof object.expires !== 'string') {
|
456 | when = object.expires;
|
457 | } else {
|
458 | when = Math.round(ms(object.expires) / 1000);
|
459 | }
|
460 | object.expireAfterSeconds = when;
|
461 | delete object.expires;
|
462 | };
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 | exports.populate = function populate(path, select, model, match, options, subPopulate, justOne, count) {
|
469 |
|
470 | let obj = null;
|
471 | if (arguments.length === 1) {
|
472 | if (path instanceof PopulateOptions) {
|
473 | return [path];
|
474 | }
|
475 |
|
476 | if (Array.isArray(path)) {
|
477 | const singles = makeSingles(path);
|
478 | return singles.map(o => exports.populate(o)[0]);
|
479 | }
|
480 |
|
481 | if (exports.isObject(path)) {
|
482 | obj = Object.assign({}, path);
|
483 | } else {
|
484 | obj = { path: path };
|
485 | }
|
486 | } else if (typeof model === 'object') {
|
487 | obj = {
|
488 | path: path,
|
489 | select: select,
|
490 | match: model,
|
491 | options: match
|
492 | };
|
493 | } else {
|
494 | obj = {
|
495 | path: path,
|
496 | select: select,
|
497 | model: model,
|
498 | match: match,
|
499 | options: options,
|
500 | populate: subPopulate,
|
501 | justOne: justOne,
|
502 | count: count
|
503 | };
|
504 | }
|
505 |
|
506 | if (typeof obj.path !== 'string') {
|
507 | throw new TypeError('utils.populate: invalid path. Expected string. Got typeof `' + typeof path + '`');
|
508 | }
|
509 |
|
510 | return _populateObj(obj);
|
511 |
|
512 |
|
513 |
|
514 |
|
515 | function makeSingles(arr) {
|
516 | const ret = [];
|
517 | arr.forEach(function(obj) {
|
518 | if (/[\s]/.test(obj.path)) {
|
519 | const paths = obj.path.split(' ');
|
520 | paths.forEach(function(p) {
|
521 | const copy = Object.assign({}, obj);
|
522 | copy.path = p;
|
523 | ret.push(copy);
|
524 | });
|
525 | } else {
|
526 | ret.push(obj);
|
527 | }
|
528 | });
|
529 |
|
530 | return ret;
|
531 | }
|
532 | };
|
533 |
|
534 | function _populateObj(obj) {
|
535 | if (Array.isArray(obj.populate)) {
|
536 | const ret = [];
|
537 | obj.populate.forEach(function(obj) {
|
538 | if (/[\s]/.test(obj.path)) {
|
539 | const copy = Object.assign({}, obj);
|
540 | const paths = copy.path.split(' ');
|
541 | paths.forEach(function(p) {
|
542 | copy.path = p;
|
543 | ret.push(exports.populate(copy)[0]);
|
544 | });
|
545 | } else {
|
546 | ret.push(exports.populate(obj)[0]);
|
547 | }
|
548 | });
|
549 | obj.populate = exports.populate(ret);
|
550 | } else if (obj.populate != null && typeof obj.populate === 'object') {
|
551 | obj.populate = exports.populate(obj.populate);
|
552 | }
|
553 |
|
554 | const ret = [];
|
555 | const paths = obj.path.split(' ');
|
556 | if (obj.options != null) {
|
557 | obj.options = exports.clone(obj.options);
|
558 | }
|
559 |
|
560 | for (let i = 0; i < paths.length; ++i) {
|
561 | ret.push(new PopulateOptions(Object.assign({}, obj, { path: paths[i] })));
|
562 | }
|
563 |
|
564 | return ret;
|
565 | }
|
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 | exports.getValue = function(path, obj, map) {
|
575 | return mpath.get(path, obj, '_doc', map);
|
576 | };
|
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 | exports.setValue = function(path, val, obj, map, _copying) {
|
587 | mpath.set(path, val, obj, '_doc', map, _copying);
|
588 | };
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 | exports.object = {};
|
599 | exports.object.vals = function vals(o) {
|
600 | const keys = Object.keys(o);
|
601 | let i = keys.length;
|
602 | const ret = [];
|
603 |
|
604 | while (i--) {
|
605 | ret.push(o[keys[i]]);
|
606 | }
|
607 |
|
608 | return ret;
|
609 | };
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 | exports.object.shallowCopy = exports.options;
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 | const hop = Object.prototype.hasOwnProperty;
|
625 | exports.object.hasOwnProperty = function(obj, prop) {
|
626 | return hop.call(obj, prop);
|
627 | };
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 | exports.isNullOrUndefined = function(val) {
|
636 | return val === null || val === undefined;
|
637 | };
|
638 |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 | exports.array = {};
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 | exports.array.flatten = function flatten(arr, filter, ret) {
|
657 | ret || (ret = []);
|
658 |
|
659 | arr.forEach(function(item) {
|
660 | if (Array.isArray(item)) {
|
661 | flatten(item, filter, ret);
|
662 | } else {
|
663 | if (!filter || filter(item)) {
|
664 | ret.push(item);
|
665 | }
|
666 | }
|
667 | });
|
668 |
|
669 | return ret;
|
670 | };
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 | const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
677 |
|
678 | exports.hasUserDefinedProperty = function(obj, key) {
|
679 | if (obj == null) {
|
680 | return false;
|
681 | }
|
682 |
|
683 | if (Array.isArray(key)) {
|
684 | for (const k of key) {
|
685 | if (exports.hasUserDefinedProperty(obj, k)) {
|
686 | return true;
|
687 | }
|
688 | }
|
689 | return false;
|
690 | }
|
691 |
|
692 | if (_hasOwnProperty.call(obj, key)) {
|
693 | return true;
|
694 | }
|
695 | if (typeof obj === 'object' && key in obj) {
|
696 | const v = obj[key];
|
697 | return v !== Object.prototype[key] && v !== Array.prototype[key];
|
698 | }
|
699 |
|
700 | return false;
|
701 | };
|
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 | const MAX_ARRAY_INDEX = Math.pow(2, 32) - 1;
|
708 |
|
709 | exports.isArrayIndex = function(val) {
|
710 | if (typeof val === 'number') {
|
711 | return val >= 0 && val <= MAX_ARRAY_INDEX;
|
712 | }
|
713 | if (typeof val === 'string') {
|
714 | if (!/^\d+$/.test(val)) {
|
715 | return false;
|
716 | }
|
717 | val = +val;
|
718 | return val >= 0 && val <= MAX_ARRAY_INDEX;
|
719 | }
|
720 |
|
721 | return false;
|
722 | };
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 | exports.array.unique = function(arr) {
|
737 | const primitives = {};
|
738 | const ids = {};
|
739 | const ret = [];
|
740 | const length = arr.length;
|
741 | for (let i = 0; i < length; ++i) {
|
742 | if (typeof arr[i] === 'number' || typeof arr[i] === 'string' || arr[i] == null) {
|
743 | if (primitives[arr[i]]) {
|
744 | continue;
|
745 | }
|
746 | ret.push(arr[i]);
|
747 | primitives[arr[i]] = true;
|
748 | } else if (arr[i] instanceof ObjectId) {
|
749 | if (ids[arr[i].toString()]) {
|
750 | continue;
|
751 | }
|
752 | ret.push(arr[i]);
|
753 | ids[arr[i].toString()] = true;
|
754 | } else {
|
755 | ret.push(arr[i]);
|
756 | }
|
757 | }
|
758 |
|
759 | return ret;
|
760 | };
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
769 | exports.buffer = {};
|
770 | exports.buffer.areEqual = function(a, b) {
|
771 | if (!Buffer.isBuffer(a)) {
|
772 | return false;
|
773 | }
|
774 | if (!Buffer.isBuffer(b)) {
|
775 | return false;
|
776 | }
|
777 | if (a.length !== b.length) {
|
778 | return false;
|
779 | }
|
780 | for (let i = 0, len = a.length; i < len; ++i) {
|
781 | if (a[i] !== b[i]) {
|
782 | return false;
|
783 | }
|
784 | }
|
785 | return true;
|
786 | };
|
787 |
|
788 | exports.getFunctionName = getFunctionName;
|
789 |
|
790 |
|
791 |
|
792 |
|
793 | exports.decorate = function(destination, source) {
|
794 | for (const key in source) {
|
795 | if (specialProperties.has(key)) {
|
796 | continue;
|
797 | }
|
798 | destination[key] = source[key];
|
799 | }
|
800 | };
|
801 |
|
802 |
|
803 |
|
804 |
|
805 |
|
806 |
|
807 |
|
808 |
|
809 |
|
810 | exports.mergeClone = function(to, fromObj) {
|
811 | if (isMongooseObject(fromObj)) {
|
812 | fromObj = fromObj.toObject({
|
813 | transform: false,
|
814 | virtuals: false,
|
815 | depopulate: true,
|
816 | getters: false,
|
817 | flattenDecimals: false
|
818 | });
|
819 | }
|
820 | const keys = Object.keys(fromObj);
|
821 | const len = keys.length;
|
822 | let i = 0;
|
823 | let key;
|
824 |
|
825 | while (i < len) {
|
826 | key = keys[i++];
|
827 | if (specialProperties.has(key)) {
|
828 | continue;
|
829 | }
|
830 | if (typeof to[key] === 'undefined') {
|
831 | to[key] = exports.clone(fromObj[key], {
|
832 | transform: false,
|
833 | virtuals: false,
|
834 | depopulate: true,
|
835 | getters: false,
|
836 | flattenDecimals: false
|
837 | });
|
838 | } else {
|
839 | let val = fromObj[key];
|
840 | if (val != null && val.valueOf && !(val instanceof Date)) {
|
841 | val = val.valueOf();
|
842 | }
|
843 | if (exports.isObject(val)) {
|
844 | let obj = val;
|
845 | if (isMongooseObject(val) && !val.isMongooseBuffer) {
|
846 | obj = obj.toObject({
|
847 | transform: false,
|
848 | virtuals: false,
|
849 | depopulate: true,
|
850 | getters: false,
|
851 | flattenDecimals: false
|
852 | });
|
853 | }
|
854 | if (val.isMongooseBuffer) {
|
855 | obj = Buffer.from(obj);
|
856 | }
|
857 | exports.mergeClone(to[key], obj);
|
858 | } else {
|
859 | to[key] = exports.clone(val, {
|
860 | flattenDecimals: false
|
861 | });
|
862 | }
|
863 | }
|
864 | }
|
865 | };
|
866 |
|
867 |
|
868 |
|
869 |
|
870 |
|
871 |
|
872 |
|
873 |
|
874 |
|
875 | exports.each = function(arr, fn) {
|
876 | for (let i = 0; i < arr.length; ++i) {
|
877 | fn(arr[i]);
|
878 | }
|
879 | };
|
880 |
|
881 |
|
882 |
|
883 |
|
884 |
|
885 | exports.getOption = function(name) {
|
886 | const sources = Array.prototype.slice.call(arguments, 1);
|
887 |
|
888 | for (const source of sources) {
|
889 | if (source[name] != null) {
|
890 | return source[name];
|
891 | }
|
892 | }
|
893 |
|
894 | return null;
|
895 | };
|
896 |
|
897 |
|
898 |
|
899 |
|
900 |
|
901 | exports.noop = function() {};
|