Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Oct 1, 2015
1 parent 1ff357a commit 02da3db
Show file tree
Hide file tree
Showing 19 changed files with 206 additions and 97 deletions.
84 changes: 44 additions & 40 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "core.js",
"main": "client/core.js",
"version": "1.2.0",
"version": "1.2.1",
"description": "Standard Library",
"keywords": [
"ES6",
Expand Down
50 changes: 39 additions & 11 deletions client/core.js
@@ -1,5 +1,5 @@
/**
* core-js 1.2.0
* core-js 1.2.1
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
Expand Down Expand Up @@ -609,7 +609,7 @@
/* 13 */
/***/ function(module, exports) {

var core = module.exports = {version: '1.2.0'};
var core = module.exports = {version: '1.2.1'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ },
Expand Down Expand Up @@ -943,6 +943,7 @@
, keyOf = __webpack_require__(35)
, $names = __webpack_require__(36)
, enumKeys = __webpack_require__(37)
, isArray = __webpack_require__(26)
, isObject = __webpack_require__(9)
, anObject = __webpack_require__(29)
, toIObject = __webpack_require__(30)
Expand All @@ -952,6 +953,8 @@
, _create = $.create
, getNames = $names.get
, $Symbol = global.Symbol
, $JSON = global.JSON
, _stringify = $JSON && $JSON.stringify
, setter = false
, HIDDEN = wks('_hidden')
, isEnum = $.isEnum
Expand Down Expand Up @@ -985,6 +988,10 @@
return sym;
};

var isSymbol = function(it){
return typeof it == 'symbol';
};

var $defineProperty = function defineProperty(it, key, D){
if(D && has(AllSymbols, key)){
if(!D.enumerable){
Expand Down Expand Up @@ -1034,17 +1041,42 @@
while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
return result;
};
var $stringify = function stringify(it){
var args = [it]
, i = 1
, replacer, $replacer;
while(arguments.length > i)args.push(arguments[i++]);
replacer = args[1];
if(typeof replacer == 'function')$replacer = replacer;
if($replacer || !isArray(replacer))replacer = function(key, value){
if($replacer)value = $replacer.call(this, key, value);
if(!isSymbol(value))return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
};
var buggyJSON = $fails(function(){
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
});

// 19.4.1.1 Symbol([description])
if(!useNative){
$Symbol = function Symbol(){
if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor');
if(isSymbol(this))throw TypeError('Symbol is not a constructor');
return wrap(uid(arguments[0]));
};
$redef($Symbol.prototype, 'toString', function toString(){
return this._k;
});

isSymbol = function(it){
return it instanceof $Symbol;
};

$.create = $create;
$.isEnum = $propertyIsEnumerable;
$.getDesc = $getOwnPropertyDescriptor;
Expand All @@ -1058,13 +1090,6 @@
}
}

// MS Edge converts symbol values to JSON as {}
if(!useNative || $fails(function(){
return JSON.stringify([$Symbol()]) != '[null]';
}))$redef($Symbol.prototype, 'toJSON', function toJSON(){
if(useNative && isObject(this))return this;
});

var symbolStatics = {
// 19.4.2.1 Symbol.for(key)
'for': function(key){
Expand Down Expand Up @@ -1120,6 +1145,9 @@
getOwnPropertySymbols: $getOwnPropertySymbols
});

// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $def($def.S + $def.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});

// 19.4.3.5 Symbol.prototype[@@toStringTag]
setTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
Expand Down Expand Up @@ -3242,7 +3270,7 @@
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScript){
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
defer = function(id){
global.postMessage(id + '', '*');
};
Expand Down
6 changes: 3 additions & 3 deletions client/core.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/core.min.js.map

Large diffs are not rendered by default.

50 changes: 39 additions & 11 deletions client/library.js
@@ -1,5 +1,5 @@
/**
* core-js 1.2.0
* core-js 1.2.1
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
Expand Down Expand Up @@ -605,7 +605,7 @@
/* 13 */
/***/ function(module, exports) {

var core = module.exports = {version: '1.2.0'};
var core = module.exports = {version: '1.2.1'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ },
Expand Down Expand Up @@ -894,6 +894,7 @@
, keyOf = __webpack_require__(35)
, $names = __webpack_require__(36)
, enumKeys = __webpack_require__(37)
, isArray = __webpack_require__(23)
, isObject = __webpack_require__(9)
, anObject = __webpack_require__(27)
, toIObject = __webpack_require__(28)
Expand All @@ -903,6 +904,8 @@
, _create = $.create
, getNames = $names.get
, $Symbol = global.Symbol
, $JSON = global.JSON
, _stringify = $JSON && $JSON.stringify
, setter = false
, HIDDEN = wks('_hidden')
, isEnum = $.isEnum
Expand Down Expand Up @@ -936,6 +939,10 @@
return sym;
};

var isSymbol = function(it){
return typeof it == 'symbol';
};

var $defineProperty = function defineProperty(it, key, D){
if(D && has(AllSymbols, key)){
if(!D.enumerable){
Expand Down Expand Up @@ -985,17 +992,42 @@
while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
return result;
};
var $stringify = function stringify(it){
var args = [it]
, i = 1
, replacer, $replacer;
while(arguments.length > i)args.push(arguments[i++]);
replacer = args[1];
if(typeof replacer == 'function')$replacer = replacer;
if($replacer || !isArray(replacer))replacer = function(key, value){
if($replacer)value = $replacer.call(this, key, value);
if(!isSymbol(value))return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
};
var buggyJSON = $fails(function(){
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
});

// 19.4.1.1 Symbol([description])
if(!useNative){
$Symbol = function Symbol(){
if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor');
if(isSymbol(this))throw TypeError('Symbol is not a constructor');
return wrap(uid(arguments[0]));
};
$redef($Symbol.prototype, 'toString', function toString(){
return this._k;
});

isSymbol = function(it){
return it instanceof $Symbol;
};

$.create = $create;
$.isEnum = $propertyIsEnumerable;
$.getDesc = $getOwnPropertyDescriptor;
Expand All @@ -1009,13 +1041,6 @@
}
}

// MS Edge converts symbol values to JSON as {}
if(!useNative || $fails(function(){
return JSON.stringify([$Symbol()]) != '[null]';
}))$redef($Symbol.prototype, 'toJSON', function toJSON(){
if(useNative && isObject(this))return this;
});

var symbolStatics = {
// 19.4.2.1 Symbol.for(key)
'for': function(key){
Expand Down Expand Up @@ -1071,6 +1096,9 @@
getOwnPropertySymbols: $getOwnPropertySymbols
});

// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $def($def.S + $def.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});

// 19.4.3.5 Symbol.prototype[@@toStringTag]
setTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
Expand Down Expand Up @@ -2951,7 +2979,7 @@
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScript){
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
defer = function(id){
global.postMessage(id + '', '*');
};
Expand Down
6 changes: 3 additions & 3 deletions client/library.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/library.min.js.map

Large diffs are not rendered by default.

50 changes: 39 additions & 11 deletions client/shim.js
@@ -1,5 +1,5 @@
/**
* core-js 1.2.0
* core-js 1.2.1
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
Expand Down Expand Up @@ -595,7 +595,7 @@
/* 13 */
/***/ function(module, exports) {

var core = module.exports = {version: '1.2.0'};
var core = module.exports = {version: '1.2.1'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ },
Expand Down Expand Up @@ -929,6 +929,7 @@
, keyOf = __webpack_require__(35)
, $names = __webpack_require__(36)
, enumKeys = __webpack_require__(37)
, isArray = __webpack_require__(26)
, isObject = __webpack_require__(9)
, anObject = __webpack_require__(29)
, toIObject = __webpack_require__(30)
Expand All @@ -938,6 +939,8 @@
, _create = $.create
, getNames = $names.get
, $Symbol = global.Symbol
, $JSON = global.JSON
, _stringify = $JSON && $JSON.stringify
, setter = false
, HIDDEN = wks('_hidden')
, isEnum = $.isEnum
Expand Down Expand Up @@ -971,6 +974,10 @@
return sym;
};

var isSymbol = function(it){
return typeof it == 'symbol';
};

var $defineProperty = function defineProperty(it, key, D){
if(D && has(AllSymbols, key)){
if(!D.enumerable){
Expand Down Expand Up @@ -1020,17 +1027,42 @@
while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
return result;
};
var $stringify = function stringify(it){
var args = [it]
, i = 1
, replacer, $replacer;
while(arguments.length > i)args.push(arguments[i++]);
replacer = args[1];
if(typeof replacer == 'function')$replacer = replacer;
if($replacer || !isArray(replacer))replacer = function(key, value){
if($replacer)value = $replacer.call(this, key, value);
if(!isSymbol(value))return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
};
var buggyJSON = $fails(function(){
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
});

// 19.4.1.1 Symbol([description])
if(!useNative){
$Symbol = function Symbol(){
if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor');
if(isSymbol(this))throw TypeError('Symbol is not a constructor');
return wrap(uid(arguments[0]));
};
$redef($Symbol.prototype, 'toString', function toString(){
return this._k;
});

isSymbol = function(it){
return it instanceof $Symbol;
};

$.create = $create;
$.isEnum = $propertyIsEnumerable;
$.getDesc = $getOwnPropertyDescriptor;
Expand All @@ -1044,13 +1076,6 @@
}
}

// MS Edge converts symbol values to JSON as {}
if(!useNative || $fails(function(){
return JSON.stringify([$Symbol()]) != '[null]';
}))$redef($Symbol.prototype, 'toJSON', function toJSON(){
if(useNative && isObject(this))return this;
});

var symbolStatics = {
// 19.4.2.1 Symbol.for(key)
'for': function(key){
Expand Down Expand Up @@ -1106,6 +1131,9 @@
getOwnPropertySymbols: $getOwnPropertySymbols
});

// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $def($def.S + $def.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});

// 19.4.3.5 Symbol.prototype[@@toStringTag]
setTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
Expand Down Expand Up @@ -3228,7 +3256,7 @@
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScript){
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
defer = function(id){
global.postMessage(id + '', '*');
};
Expand Down
6 changes: 3 additions & 3 deletions client/shim.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/shim.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion library/modules/$.core.js
@@ -1,2 +1,2 @@
var core = module.exports = {version: '1.2.0'};
var core = module.exports = {version: '1.2.1'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
2 changes: 1 addition & 1 deletion library/modules/es6.symbol.js
Expand Up @@ -122,7 +122,7 @@ var $stringify = function stringify(it){
if($replacer || !isArray(replacer))replacer = function(key, value){
if($replacer)value = $replacer.call(this, key, value);
if(!isSymbol(value))return value;
}
};
args[1] = replacer;
return _stringify.apply($JSON, args);
};
Expand Down
2 changes: 1 addition & 1 deletion modules/$.core.js
@@ -1,2 +1,2 @@
var core = module.exports = {version: '1.2.0'};
var core = module.exports = {version: '1.2.1'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
2 changes: 1 addition & 1 deletion modules/es6.symbol.js
Expand Up @@ -122,7 +122,7 @@ var $stringify = function stringify(it){
if($replacer || !isArray(replacer))replacer = function(key, value){
if($replacer)value = $replacer.call(this, key, value);
if(!isSymbol(value))return value;
}
};
args[1] = replacer;
return _stringify.apply($JSON, args);
};
Expand Down

0 comments on commit 02da3db

Please sign in to comment.