Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipskevin committed Jun 23, 2017
1 parent eb08530 commit f3cf7a5
Show file tree
Hide file tree
Showing 2 changed files with 804 additions and 0 deletions.
47 changes: 47 additions & 0 deletions dist/amd/can-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*can-types@1.1.0-pre.3#can-types*/
define(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 f3cf7a5

Please sign in to comment.