You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ADD - proposal-array-grouping https://github.com/tc39/proposal-array-grouping
=> Added in v5.4.1: Array.prototype.groupBy(<fn>[,thisArg]); and Array.prototype.groupByToMap(<fn>[,thisArg]);
REM - Remove many internal function calls without breaking change, only the getJson(); and getText(); will remain shorthands in v5.2.1.
Function
Fix/Change
clearCookies();
Remove the internal calls of the getCookie(); and removeCookie();
domFadeToggle(<elem.>[,duration[,display]]);
Remove the internal calls of the domFadeIn(<element>[,duration[,display]]); and domFadeOut(<element>[,duration]);
extend([deep,]<target>,<source1>[,srcN]);
Make a function inside the extend(); function to remove the external recursion
isArrayBuffer(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isDataView(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isDate(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isEmptyMap(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isEmptySet(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isError(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isIterator(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isMap(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isRegexp(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isSameMap(<map1>,<map2>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isSameSet(<set1>,<set2>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isSet(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isTypedArray(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isWeakMap(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
isWeakSet(<value>);
Remove the internal calls of the getType(<variable>[,type][,throw=false]);
zipObj(<collection1>,<collection2>);
Remove the internal call of the zip(<collection1>[,collectionN]);
MOD - Celestra 5
=> Replace Collections functions with smaller size versions in v4.5.1 and v4.5.2
=> Rename the celTest object to CUT in the unittest.js in v4.5.2
=> Remove the _cut alias of the CUT object to in the unittest.js in v4.5.2
=> Replace the short object name _ with a new short name CEL
MOD - Celestra 4
=> Make a NodeJS prototype from the v3.1.2 (celestra.mjs)
=> The AMD and CommonJS descriptions have been removed from the documention in the v3.5.1.
=> The AMD and CommonJS module export codes have been removed in the v3.6.0.
=> In the ESM version remove the export of the standalone functions, only the whole object export and default export have to be remained in v3.6.0.
=> Make a new file in the Celestra repository with removed polyfills in v3.8.0.
=> Move polyfills into the celestra-polyfills.js and celestra-polyfills.min.js in v3.1.0 and v3.8.0.
=> Function name changes in v3.8.1: rename somethingOf(); functions to something();
=> Remove these aliases:
Use the ES6 modules (ESM v1)
=> Make a module prototype from the v3.0.1
=> Added in v3.0.2 in a new file and the exisiting (DEV and MIN) files are remaining.
=> Modify the CUT to handle the ESM
Removable polyfills:
In v3.0.1 the minimized size would be 35582 byte instead of 43052 byte - 7470 byte
=> Deprecated in v3.0.2
=> Archived in a new file and removed v3.1.0 Array.from();, Array.of();, Array.prototype.fill();, Array.prototype.find();, Array.prototype.findIndex();, Object.create();, String.prototype.startsWith();, String.prototype.endsWith();, Object.is();, Array.prototype.copyWithin();, String.fromCodePoint();, String.prototype.codePointAt();, Number.MIN_SAFE_INTEGER;, Number.MAX_SAFE_INTEGER();, Number.EPSILON;, Number.isNaN();, isNaN();, Number.isInteger();, Number.isFinite();, Number.isSafeInteger();, Number.parseInt();, Number.parseFloat(); MATH ES6 all:Math.acosh();, Math.asinh();, Math.atanh();, Math.cbrt();, Math.clz32();, Math.cosh();, Math.expm1();, Math.fround();, Math.hypot();, Math.imul();, Math.log1p();, Math.log10();, Math.log2();, Math.sign();, Math.sinh();, Math.tanh();, Math.trunc();
Unremovable polyfills in v3.1.0:
The old Edge andd Firefox versions support need this or missing in a supported browser. Array.prototype.values();, ChildNode API, ParentNode API, Object.assign();, ChildNode.after();, ChildNode.before();, ChildNode.before();, ChildNode.remove();, ChildNode.replaceWith();, ParentNode.append();, ParentNode.prepend();, Element.prototype.toggleAttribute();, Array.prototype.includes();, String.prototype.includes();, String.prototype.trimStart();, String.prototype.trimLeft();, String.prototype.trimEnd();, String.prototype.trimRight();, String.prototype.padStart();, String.prototype.padEnd();, String.prototype.repeat();, NodeList.prototype.forEach();, Object.Object.values();, Object.entries();, Object.fromEntries();, Array.prototype.flat();, Element.prototype.closest();, Element.prototype.getAttributeNames();, Object.getOwnPropertyDescriptors();, window.screenLeft;, window.screenTop;, globalThis;, RegExp.prototype.flags;, GeneratorFunction();, String.prototype.matchAll();
MOD - Change to ES6 (Celestra 3.0)
=> ADD - ES6 Extension (ES6E) added in v2.5.0
=> MOD - Move the FP functions to other modules until the v3.0
=> MOD - Build the 3.0 prototypes and the 3.0 x15 (ES6 code modifier) to test the combined ES6 code - Built and tested with v2.6.0
=> ADD - Add the VERSION;
=> DPD - Deprecate the version;
=> ADD - Build the ES6 content in the ES6E
=> REM - Remove the version;
=> REM - Remove the IE11 from the tested browsers
=> REM - Remove the W10M EDGE 14 from the tested browsers
MOD - Simplify the qsa(); and qs(); in v2.6.0
=> The each(callback); method and the context as selector string has been deprecated in v2.5.2
=> Remove the each(callback); method from the qsa() in v2.6.0
=> The second (container) parameter type can be only an element, not element and string in v2.6.0
REN - Rename the "Celestra" object to "celestra"
=> The alias "Celestra" deprecated in v2.0.2
=> The alias "Celestra" has been removed in v2.1.0
REM - Remove the "function celToWindow()"
=> Deprecated in v2.0.8
=> Removed in v2.1.0
ADD - /proposal-array-last https://github.com/tc39/proposal-array-last
=> Added the function lastOf (it) { let item; for (item of it) { } return item; }
=> stage 1 and never will be stage 2
ADD - proposal-object-iteration https://github.com/tc39/proposal-object-iteration
=> This proposal is being withdrawn in February 2020.
The Object.keys();, Object.values(); and Object.entries(); can replace this, because the return values of these functions are iterable (array).
// https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/replaceChildrenvarx=document.querySelector("p")console.log(x.innerHTML);// The <strong><code>ParentNode.replaceChildren()</code></strong> method replaces the existing children of a <a href="/en-US/docs/Web/API/Node"><code>Node</code></a> with a specified new set of children. These can be <a href="/en-US/docs/Web/API/DOMString"><code>DOMString</code></a> or <a href="/en-US/docs/Web/API/Node"><code>Node</code></a> objects.// clear the parent//x.replaceChildren();//console.log( x.innerHTML ); // empty string// replace all elements (except the "<strong>" elements ??????), with the "<code>" elementsx.replaceChildren(
...x.querySelectorAll("strong"),
...x.querySelectorAll("code"));console.log(x.innerHTML);// <strong></strong><code>ParentNode.replaceChildren()</code><code>Node</code><code>DOMString</code><code>Node</code>// remove all elements and add the new "<strong>" elements from the parent ??????x.replaceChildren( ...x.querySelectorAll("strong"));console.log(x.innerHTML);// <strong></strong>
ADD - ES6 iterators
=> no - Available in modern browsers and the for..of loop isn't polyfillable.
ADD - TextEncoder https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder
The Mozilla polyfill contains at least 2 bugs.
-> No, because this is available in the modern browsers and on mobiles and the Unicode support is very poor in the IE11.
"use strict";/*https://github.com/DavidBruant/Map-Set.prototype.toJSONThis proposal was brought before the committee in the March 2016 meeting, and thoroughly rejected.https://github.com/DavidBruant/Map-Set.prototype.toJSON/issues/16In the March 2016 TC39 meeting, I brought this proposal to the committee.It was thoroughly rejected, for a number of reasons. Primarily, that toJSON is a legacy artifact, and a better approach is to use a custom replacer that, for example, checks [Symbol.toStringTag] and dispatches to appropriate serializations.In addition, the committee did not want to bless the toJSON approach by adding what would be an incomplete representation - one that would not obviate the need for developers to define their own serialization format and revivification logic.*/// V0Map.prototype.toJSON=functiontoJSON(){return[...Map.prototype.entries.call(this)];}Set.prototype.toJSON=functiontoJSON(){return[...Set.prototype.values.call(this)];}/*var m1 = new Map([["a",2],["b",4]]);var s1 = new Set(["a",2,"b",4,8]);JSON.stringify(["a",2,"b",4,8]);// "[\"a\",2,\"b\",4,8]"JSON.stringify(m1);// "[[\"a\",2],[\"b\",4]]"JSON.stringify(s1); // "[\"a\",2,\"b\",4,8]"*//*// https://github.com/tc39/Array.prototype.includes// https://esdiscuss.org/topic/having-a-non-enumerable-array-prototype-contains-may-not-be-web-compatibleif (!Array.prototype.contains) { Array.prototype.contains = Array.prototype.includes;}if (!String.prototype.contains) { String.prototype.contains = String.prototype.includes;}"use strict";if(!Array.prototype.contains){Array.prototype.contains=Array.prototype.includes;}if(!String.prototype.contains){String.prototype.contains=String.prototype.includes;}*/if(!Array.prototype.contains){Array.prototype.contains=(Array.prototype.includes||function(v,f){if(!f){varf=0;}return(this.indexOf(v,f)>-1);});}if(!String.prototype.contains){String.prototype.contains=(String.prototype.includes||function(v,f){if(!f){varf=0;}return(this.indexOf(v,f)>-1);});}if(!document.all){document.all=document.getElementsByTagName("*");}// https://www.w3.org/TR/selectors-api2/[Element.prototype,document].forEach(function(p){if(!p.query){p.query=function(s){returnthis.querySelector(s);};}if(!p.queryAll){p.queryAll=function(s){returnArray.prototype.slice.call(this.querySelectorAll(s));};}if(!p.find){p.find=function(s){returnthis.querySelector(s);};}if(!p.findAll){p.findAll=function(s){returnArray.prototype.slice.call(this.querySelectorAll(s));};}});[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(p){if(!p.replace){p.replace=p.replaceWith;}});if(!Array.prototype.pushAll){Array.prototype.pushAll=function(items){if(!Array.isArray(items)){thrownewTypeError("pushAll error: Argument must be an array.");}//this.push.apply(this, items);vart=this;items.forEach(function(e){t.push(e);});returnthis;};}// orletarr1=[0,1,2];letarr2=[3,4,5];letarr3=[6,7,8];arr1.push(...arr2);console.log(arr1);// Array(6) [ 0, 1, 2, 3, 4, 5 ]arr1=[0,1,2];arr1.push(...arr2,42,"dna");console.log(arr1);// Array(8) [ 0, 1, 2, 3, 4, 5, 42, "dna" ]arr1=[0,1,2];arr1.push(...arr2, ...arr3);console.log(arr1);// Array(9) [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]// or (bug!)vararrayMerge=Function.prototype.apply.bind(Array.prototype.push);letarr1=[0,1,2];letarr2=[3,4,5];letarr3=[6,7,8];arrayMerge(arr1,arr2);console.log(arr1);// Array(6) [ 0, 1, 2, 3, 4, 5 ]arr1=[0,1,2];arrayMerge(arr1,arr2,arr3);console.log(arr1);// Array(6) [ 0, 1, 2, 3, 4, 5 ] -> bug!// https://github.com/jeresig/nodelist// Returns a plain JavaScript array containing all the nodes within the NodeList.if(window.NodeList&&!NodeList.prototype.toArray){NodeList.prototype.toArray=function(){//return [...this];//return Array.from(this);returnArray.prototype.slice.call(this);};}// https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/63// This was a Firefox-specific method and was removed in Firefox 31.// https://developer.mozilla.org/en-US/docs/Web/API/Window/backif(!window.back){window.back=function(){window.history.back();};}// https://developer.mozilla.org/en-US/docs/Web/API/Window/forwardif(!window.forward){window.forward=function(){window.history.forward();};}/*https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/quoteThe non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes ("). __Only in Firefox 1 — 37__ __This is Obsolete since Gecko 37 (Firefox 37 / Thunderbird 37 / SeaMonkey 2.34)__"Hello world!".quote() // "\"Hello world!\"""Hello\n\tworld!".quote() // "\"Hello\\n\\tworld!\"" - eval ok"\" \ — '".quote() // "\"\\\" — '\""*/// Only in Firefox 1 — 37if(!String.prototype.quote){String.prototype.quote=function(){returnJSON.stringify(this);};}/*https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/counthttp://whereswalden.com/2010/04/06/more-changes-coming-to-spidermonkey-the-magical-__count__-property-of-objects-is-being-removed/Object.prototype.__count__*/// Only in Firefox 16 — 32if(!Object.prototype.__count__){Object.defineProperty(Object.prototype,"__count__",{configurable: true,get: function(){returnObject.keys(this).length;}});}/*https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toIntegerNumber.toInteger() was part of the draft ECMAScript 6 specification, but has been removed on August 23, 2013 in Draft Rev 17.The Number.toInteger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.If the target value is NaN, null or undefined, 0 is returned. If the target value is false, 0 is returned and if true, 1 is returned.Number.toInteger(number)Number.toInteger(0.1); // 0Number.toInteger(1); // 1Number.toInteger(Math.PI); // 3Number.toInteger(null); // 0*///if (!Number.toInteger) { Number.toInteger = parseInt; }if(!Number.toInteger){Number.toInteger=function(v){returnparseInt(v)||0;};}/*Added later:Number.parseInt();Number.parseFloat();*/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction//The GeneratorFunction constructor creates a new generator function object. In JavaScript every generator function is actually a GeneratorFunction object. Note that GeneratorFunction is not a global object. It could be obtained by evaluating the following code.if(!window.GeneratorFunction){window.GeneratorFunction=Object.getPrototypeOf(function*(){}).constructor;}/*var g = new GeneratorFunction("a", "yield a * 2");var iterator = g(10);console.log(iterator.next().value); // 20*/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/isGenerator// The non-standard isGenerator() method used to determine whether or not a function is a generator. It has been removed from Firefox starting with version 58. It was part of an early Harmony proposal, but has not been included in the ECMAScript 2015 specification.// only FF 5-58if(!Function.prototype.isGenerator){Function.prototype.isGenerator=function(){return(Object.getPrototypeOf(this).constructor===Object.getPrototypeOf(function*(){}).constructor);};}/*function f() {}function* g() { yield 42; }console.log("f.isGenerator() = " + f.isGenerator()); // falseconsole.log("g.isGenerator() = " + g.isGenerator()); // true*/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr// The substr() method returns a portion of the string, starting at the specified index and extending for a given number of characters afterward.// DEPRECATED// Microsoft's JScript does not support negative values for the start index. To use this feature in JScript, you can use the following code:// only run when the substr() function is brokenif('ab'.substr(-1)!='b'){/** * Get the substring of a string * @param {integer} start where to start the substring * @param {integer} length how many characters to return * @return {string} */String.prototype.substr=function(substr){returnfunction(start,length){// call the original methodreturnsubstr.call(this,// did we get a negative start, calculate how much it is from the beginning of the string// adjust the start parameter for negative valuestart<0 ? this.length+start : start,length)}}(String.prototype.substr);}// my real polyfill:if(!String.prototype.substr){String.prototype.substr=function(start,length){varstart2=start<0 ? this.length+start : start;if(start2<0){start2=0;}if(length!==undefined){returnthis.slice(start2,start2+length);}else{returnthis.slice(start2);}};}// https://github.com/tc39/proposal-array-lastObject.defineProperty(Array.prototype,"lastItem",{enumerable: false,configurable: false,get(){varO=Object(this);varlen=O.length>0 ? parseInt(O.length) : 0;if(len===0){returnundefined;}elseif(len>0){returnO[String(len-1)];}},set(value){varO=Object(this);varlen=O.length>0 ? parseInt(O.length) : 0;returnO[String(len>0 ? len-1 : len)]=value;}});Object.defineProperty(Array.prototype,"lastIndex",{enumerable: false,configurable: false,get(){varO=Object(this);varlen=O.length>0 ? parseInt(O.length) : 0;returnlen>0 ? len-1 : 0;}});vara1=[4,5,6,7,8];console.log(a1.lastItem);// 8a1.lastItem=9;console.log(a1.lastItem);// 9console.log(a1.lastIndex);// 4a1=[];console.log(a1.lastItem);// undefinedconsole.log(a1.lastIndex);// 0a1.lastItem=3;console.log(a1.lastIndex);// 0;console.log(a1.lastItem);// 3a1.push(10);console.log(a1.lastIndex);// 1console.log(a1.lastItem);// 10// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSourceif(!Array.prototype.toSource){Array.prototype.toSource=function(){returnJSON.stringify(this);};}/*Mozilla String generic methods polyfillhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics*/(function(){"use strict";varm=["contains","substring","toLowerCase","toUpperCase","charAt","charCodeAt","indexOf","lastIndexOf","startsWith","endsWith","trim","trimLeft","trimRight","toLocaleLowerCase","normalize","toLocaleUpperCase","localeCompare","match","search","slice","replace","split","substr","concat","localeCompare"].forEach(function(n){varfn=String.prototype[n];String[n]=function(a1){returnfn.apply(""+a1,Array.prototype.slice.call(arguments,1));};});}());// minified:(function(){"use strict";varm=["contains","substring","toLowerCase","toUpperCase","charAt","charCodeAt","indexOf","lastIndexOf","startsWith","endsWith","trim","trimLeft","trimRight","toLocaleLowerCase","normalize","toLocaleUpperCase","localeCompare","match","search","slice","replace","split","substr","concat","localeCompare"].forEach(function(n){varfn=String.prototype[n];String[n]=function(a1){returnfn.apply(""+a1,Array.prototype.slice.call(arguments,1));};});}());//console.log( String.slice("asasdsaads", 2, 8) );// -> "asdsaa" OK/*Mozilla Array generic methods polyfillhttps://bugzilla.mozilla.org/show_bug.cgi?id=1222547*/(function(){"use strict";varm=["concat","every","filter","forEach","indexOf","join","lastIndexOf","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","unshift"].forEach(function(n){varfn=Array.prototype[n];Array[n]=function(a1){returnfn.apply(a1,Array.prototype.slice.call(arguments,1));};});}());// minified:(function(){"use strict";varm=["concat","every","filter","forEach","indexOf","join","lastIndexOf","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","unshift"].forEach(function(n){varfn=Array.prototype[n];Array[n]=function(a1){returnfn.apply(a1,Array.prototype.slice.call(arguments,1));};});}());//console.log( Array.slice({0: "a", 1: "b", 2: "c", length: 3}) );// -> Array(3) [ "a", "b", "c" ] OK
The text was updated successfully, but these errors were encountered:
Celestra Wiki
Table of contents
Notations
Planned changes
MOD - Celestra 6
-> ???
ADD - Set Methods for JavaScript
https://github.com/tc39/proposal-set-methods
-> Waiting for the first browser implementation.
https://github.com/js-choi/proposal-function-un-this
-> check again, Stage 0, no implementations, no MDN docs
In Celestra v5.4.4:
https://github.com/tc39-transfer/proposal-array-filtering
https://tc39.es/proposal-array-filtering/
-> check again, Stage 1, no implementations, no MDN docs
ADD - proposal-string-trim-characters
https://github.com/Kingwl/proposal-string-trim-characters
-> Check again!
ADD - proposal-array-unique
https://github.com/tc39/proposal-array-unique
-> Check again!
https://github.com/tc39/proposal-array-equality
-> Check again!
Function in Celestra:
ADD - Number.range and BigInt.range
https://github.com/tc39/proposal-Number.range
-> check again, Stage 1, no MDN docs
ADD - proposal-setmap-offrom
https://github.com/tc39/proposal-setmap-offrom
Stage 1, check again!
https://github.com/tc39/proposal-Math.signbit
https://tc39.es/proposal-Math.signbit/Math.signbit.html
https://github.com/tc39/proposals/blob/master/stage-1-proposals.md
=> Added is Celestra v4.4.0:
const signbit = (v) => (((v = +v) !== v) ? !1 : ((v < 0) || Object.is(v, -0)));
-> check again, Stage 1, no implementations, no MDN docs
https://github.com/tc39/proposal-string-prototype-codepoints
=> Added the
celestra.strCodePoints(<string>);
andcelestra.strFromCodePoints(<iter>);
.Can be replaced with this snippet:
-> check again, Stage 1, no MDN docs
https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-> Seems to be very abandoned.
Completed changes
https://github.com/Serrin/Celestra/issues
https://github.com/Serrin/Celestra/issues?q=is%3Aissue+is%3Aclosed
ADD - proposal-change-array-by-copy
https://github.com/rricard/proposal-change-array-by-copy
=> Added in v5.5.3
Revert these functions to old versions, which use the
forOf
instead of the array conversion in v5.4.3:ADD - proposal-array-grouping
https://github.com/tc39/proposal-array-grouping
=> Added in v5.4.1:
Array.prototype.groupBy(<fn>[,thisArg]);
andArray.prototype.groupByToMap(<fn>[,thisArg]);
REM - Remove many internal function calls without breaking change, only the
getJson();
andgetText();
will remain shorthands in v5.2.1.clearCookies();
getCookie();
andremoveCookie();
domFadeToggle(<elem.>[,duration[,display]]);
domFadeIn(<element>[,duration[,display]]);
anddomFadeOut(<element>[,duration]);
extend([deep,]<target>,<source1>[,srcN]);
extend();
function to remove the external recursionisArrayBuffer(<value>);
getType(<variable>[,type][,throw=false]);
isDataView(<value>);
getType(<variable>[,type][,throw=false]);
isDate(<value>);
getType(<variable>[,type][,throw=false]);
isEmptyMap(<value>);
getType(<variable>[,type][,throw=false]);
isEmptySet(<value>);
getType(<variable>[,type][,throw=false]);
isError(<value>);
getType(<variable>[,type][,throw=false]);
isIterator(<value>);
getType(<variable>[,type][,throw=false]);
isMap(<value>);
getType(<variable>[,type][,throw=false]);
isRegexp(<value>);
getType(<variable>[,type][,throw=false]);
isSameMap(<map1>,<map2>);
getType(<variable>[,type][,throw=false]);
isSameSet(<set1>,<set2>);
getType(<variable>[,type][,throw=false]);
isSet(<value>);
getType(<variable>[,type][,throw=false]);
isTypedArray(<value>);
getType(<variable>[,type][,throw=false]);
isWeakMap(<value>);
getType(<variable>[,type][,throw=false]);
isWeakSet(<value>);
getType(<variable>[,type][,throw=false]);
zipObj(<collection1>,<collection2>);
zip(<collection1>[,collectionN]);
MOD - Celestra 5
=> Replace Collections functions with smaller size versions in v4.5.1 and v4.5.2
=> Rename the
celTest
object toCUT
in the unittest.js in v4.5.2=> Remove the
_cut
alias of theCUT
object to in the unittest.js in v4.5.2=> Replace the short object name
_
with a new short nameCEL
MOD - Celestra 4
=> Make a NodeJS prototype from the v3.1.2 (celestra.mjs)
=> The AMD and CommonJS descriptions have been removed from the documention in the v3.5.1.
=> The AMD and CommonJS module export codes have been removed in the v3.6.0.
=> In the ESM version remove the export of the standalone functions, only the whole object export and default export have to be remained in v3.6.0.
=> Make a new file in the Celestra repository with removed polyfills in v3.8.0.
=> Move polyfills into the celestra-polyfills.js and celestra-polyfills.min.js in v3.1.0 and v3.8.0.
=> Function name changes in v3.8.1: rename
somethingOf();
functions tosomething();
=> Remove these aliases:
=> Function changes:
ADD - AJAX3 and REM - AJAX2
Could be a promise based, like the FETCH ...
Sample solutions:
https://ccoenraets.github.io/es6-tutorial-data/promisify/
https://stackoverflow.com/questions/30008114/how-do-i-promisify-native-xhr
... or make a FETCH polyfill like this: https://github.com/github/fetch
=> ... or the the current AJAX2 solution will remain because it works and FETCH will be recommended because it is supported everywhere in v4.3.1
Use the ES6 modules (ESM v1)
=> Make a module prototype from the v3.0.1
=> Added in v3.0.2 in a new file and the exisiting (DEV and MIN) files are remaining.
=> Modify the CUT to handle the ESM
Removable polyfills:
In v3.0.1 the minimized size would be 35582 byte instead of 43052 byte - 7470 byte
=> Deprecated in v3.0.2
=> Archived in a new file and removed v3.1.0
Array.from();
,Array.of();
,Array.prototype.fill();
,Array.prototype.find();
,Array.prototype.findIndex();
,Object.create();
,String.prototype.startsWith();
,String.prototype.endsWith();
,Object.is();
,Array.prototype.copyWithin();
,String.fromCodePoint();
,String.prototype.codePointAt();
,Number.MIN_SAFE_INTEGER;
,Number.MAX_SAFE_INTEGER();
,Number.EPSILON;
,Number.isNaN();
,isNaN();
,Number.isInteger();
,Number.isFinite();
,Number.isSafeInteger();
,Number.parseInt();
,Number.parseFloat();
MATH ES6 all:
Math.acosh();
,Math.asinh();
,Math.atanh();
,Math.cbrt();
,Math.clz32();
,Math.cosh();
,Math.expm1();
,Math.fround();
,Math.hypot();
,Math.imul();
,Math.log1p();
,Math.log10();
,Math.log2();
,Math.sign();
,Math.sinh();
,Math.tanh();
,Math.trunc();
Unremovable polyfills in v3.1.0:
The old Edge andd Firefox versions support need this or missing in a supported browser.
Array.prototype.values();
,ChildNode API
,ParentNode API
,Object.assign();
,ChildNode.after();
,ChildNode.before();
,ChildNode.before();
,ChildNode.remove();
,ChildNode.replaceWith();
,ParentNode.append();
,ParentNode.prepend();
,Element.prototype.toggleAttribute();
,Array.prototype.includes();
,String.prototype.includes();
,String.prototype.trimStart();
,String.prototype.trimLeft();
,String.prototype.trimEnd();
,String.prototype.trimRight();
,String.prototype.padStart();
,String.prototype.padEnd();
,String.prototype.repeat();
,NodeList.prototype.forEach();
,Object.Object.values();
,Object.entries();
,Object.fromEntries();
,Array.prototype.flat();
,Element.prototype.closest();
,Element.prototype.getAttributeNames();
,Object.getOwnPropertyDescriptors();
,window.screenLeft;
,window.screenTop;
,globalThis;
,RegExp.prototype.flags;
,GeneratorFunction();
,String.prototype.matchAll();
MOD - Change to ES6 (Celestra 3.0)
=> ADD - ES6 Extension (ES6E) added in v2.5.0
=> MOD - Move the FP functions to other modules until the v3.0
=> MOD - Build the 3.0 prototypes and the 3.0 x15 (ES6 code modifier) to test the combined ES6 code - Built and tested with v2.6.0
=> ADD - Add the
VERSION;
=> DPD - Deprecate the
version;
=> ADD - Build the ES6 content in the ES6E
=> REM - Remove the
version;
=> REM - Remove the IE11 from the tested browsers
=> REM - Remove the W10M EDGE 14 from the tested browsers
MOD - Simplify the
qsa();
andqs();
in v2.6.0=> The
each(callback);
method and the context as selector string has been deprecated in v2.5.2=> Remove the
each(callback);
method from theqsa()
in v2.6.0=> The second (container) parameter type can be only an element, not element and string in v2.6.0
REN - Rename the "Celestra" object to "celestra"
=> The alias "Celestra" deprecated in v2.0.2
=> The alias "Celestra" has been removed in v2.1.0
REM - Remove the "function celToWindow()"
=> Deprecated in v2.0.8
=> Removed in v2.1.0
ADD - Array.prototype.values()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values
=> Added in v2.4.1, Missing in Samsung Android browser.
Dropped changes
https://github.com/tc39/proposal-array-last
=> Added the
function lastOf (it) { let item; for (item of it) { } return item; }
=> stage 1 and never will be stage 2
ADD - String.prototype.at();
https://github.com/mathiasbynens/String.prototype.at
https://esdiscuss.org/topic/string-prototype-symbolat-improved-string-prototype-charat
=> Added the
celestra.strAt(<string>,<pos>);
.=> If need to know the real length (size) of a string, then the
celestra.size(<collection>);
is usable.=> The Github repo is now read-only. Please check the new https://github.com/tc39/proposal-relative-indexing-method!
ADD - proposal-object-iteration
https://github.com/tc39/proposal-object-iteration
=> This proposal is being withdrawn in February 2020.
The
Object.keys();
,Object.values();
andObject.entries();
can replace this, because the return values of these functions are iterable (array).ADD - ParentNode.replaceChildren()
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/replaceChildren
=> Not need to be added, because implemented in all modern browsers (Firefox, Chrome, Edge, Opera, Safari + mobile, Firefox, Webview Android, Opera, Safari, Samsung Internet).
ADD - ES6 iterators
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - NodeList.entries()
https://developer.mozilla.org/en-US/docs/Web/API/NodeList/entries
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - NodeList.keys()
https://developer.mozilla.org/en-US/docs/Web/API/NodeList/keys
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - NodeList.values()
https://developer.mozilla.org/en-US/docs/Web/API/NodeList/values
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - Array.prototype@@iterator
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - Array.prototype.keys()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - Array.prototype.entries()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries
=> no - Available in modern browsers and the
for..of
loop isn't polyfillable.ADD - String.raw()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw
=> no - template literals
ADD - Object.setPrototypeOf()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf
=> Available in IE11 and there is no polyfill for older IE versions.
ADD - String.prototype.trim()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
=> No, because this method is available in IE9.
ADD - Array.prototype.reduce()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce
=> No, because this method is available in IE9.
ADD - Array.prototype.reduceRight()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight
=> No, because this method is available in IE9.
ADD - Object.keys(obj)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
=> No, because this method is available in IE9.
ADD - Date.now()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now
http://kangax.github.io/compat-table/es5/#test-Date.now
if (!Date.now) { Date.now = function now () { return new Date().getTime(); }; }
=> No, because this method is available in IE9.
ADD - Function.prototype.name
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name
=> no
ADD - TextEncoder
https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder
The Mozilla polyfill contains at least 2 bugs.
-> No, because this is available in the modern browsers and on mobiles and the Unicode support is very poor in the IE11.
ADD - TextDecoder
https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
-> No, because this is available in the modern browsers and on mobiles and the Unicode support is very poor in the IE11.
ADD - String.prototype.normalize()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
-> No, because this is available in the modern browsers and on mobiles and the Unicode support is very poor in the IE11.
ASCII logos
Test strings
Dropped proposals
The text was updated successfully, but these errors were encountered: