Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
imaustink committed Nov 1, 2017
1 parent f790593 commit 21eca68
Show file tree
Hide file tree
Showing 2 changed files with 1,522 additions and 0 deletions.
55 changes: 55 additions & 0 deletions dist/amd/can-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*can-types@1.1.3#can-types*/
define([
'require',
'exports',
'module',
'can-namespace',
'can-reflect',
'can-symbol',
'can-log/dev'
], function (require, exports, module) {
var namespace = require('can-namespace');
var canReflect = require('can-reflect');
var canSymbol = require('can-symbol');
var dev = require('can-log/dev');
var types = {
isMapLike: function (obj) {
return canReflect.isObservableLike(obj) && canReflect.isMapLike(obj);
},
isListLike: function (obj) {
return canReflect.isObservableLike(obj) && canReflect.isListLike(obj);
},
isPromise: function (obj) {
return canReflect.isPromise(obj);
},
isConstructor: function (func) {
return canReflect.isConstructorLike(func);
},
isCallableForValue: function (obj) {
return obj && canReflect.isFunctionLike(obj) && !canReflect.isConstructorLike(obj);
},
isCompute: function (obj) {
return obj && obj.isComputed;
},
get iterator() {
return canSymbol.iterator || canSymbol.for('iterator');
},
DefaultMap: null,
DefaultList: null,
queueTask: function (task) {
var args = task[2] || [];
task[0].apply(task[1], args);
},
wrapElement: function (element) {
return element;
},
unwrapElement: function (element) {
return element;
}
};
if (namespace.types) {
throw new Error('You can\'t have two versions of can-types, check your dependencies');
} else {
module.exports = namespace.types = types;
}
});
Loading

0 comments on commit 21eca68

Please sign in to comment.