Skip to content

Commit

Permalink
1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejewski committed Jul 31, 2017
1 parent 06c2f9d commit 2704161
Show file tree
Hide file tree
Showing 2 changed files with 1,268 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.0#can-types*/
define([
'require',
'exports',
'module',
'can-namespace',
'can-reflect',
'can-symbol',
'can-util/js/dev'
], function (require, exports, module) {
var namespace = require('can-namespace');
var canReflect = require('can-reflect');
var canSymbol = require('can-symbol');
var dev = require('can-util/js/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 2704161

Please sign in to comment.