function isGenerator(obj) {
return 'function' == typeof obj.next && 'function' == typeof obj.throw;
}
why not use toString.call(obj)==="[object Generator]" to replace that?
I think this is a more definite judge solution than default way;
function isObject(val) {
return Object == val.constructor;
}
val.constrctor could be rewrited, I suggest that we can use toString.call(val)==="[object Object]" to get a more explicit check;