方法兼容

1,Object.is() /* ES6 PolyFill */

if(!Object.js){
  Object.is=function(x,y){
    if(x===y){
      return x!==0 || 1/x===1/y
    }else{
      return x!==x && y!==y
    }
  }
}

posted @ 2016-03-09 16:50  we are young  阅读(166)  评论(0编辑  收藏  举报