1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- define(['exports', './_getLength', './isFunction', './allKeys'], function (exports, _getLength, isFunction, allKeys) {
-
-
-
-
- function ie11fingerprint(methods) {
- var length = _getLength(methods);
- return function(obj) {
- if (obj == null) return false;
-
- var keys = allKeys(obj);
- if (_getLength(keys)) return false;
- for (var i = 0; i < length; i++) {
- if (!isFunction(obj[methods[i]])) return false;
- }
-
-
-
- return methods !== weakMapMethods || !isFunction(obj[forEachName]);
- };
- }
-
-
- var forEachName = 'forEach',
- hasName = 'has',
- commonInit = ['clear', 'delete'],
- mapTail = ['get', hasName, 'set'];
-
-
- var mapMethods = commonInit.concat(forEachName, mapTail),
- weakMapMethods = commonInit.concat(mapTail),
- setMethods = ['add'].concat(commonInit, forEachName, hasName);
- exports.ie11fingerprint = ie11fingerprint;
- exports.mapMethods = mapMethods;
- exports.setMethods = setMethods;
- exports.weakMapMethods = weakMapMethods;
- Object.defineProperty(exports, '__esModule', { value: true });
- });
|