Giter Site home page Giter Site logo

serrin / celestra Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 18.72 MB

A helper JavaScript library with useful functions and polyfills and zero dependencies.

License: MIT License

HTML 43.20% JavaScript 39.22% CSS 17.58%
js javascript library javascript-library es5 selector celestra cheatsheets cheatsheet es6

celestra's Introduction

        ___  ____  __    ____  ___  ____  ____    __
       / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\
      ( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\
       \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)

Celestra

Download

A helper JavaScript library with useful functions and polyfills and zero dependencies.

This library isn't compatible with the Node.js.

Latest version: 5.6.1

Date: 2024-06-06T19:12:17.009Z

Tested on these browsers:

  • Windows Firefox
  • Windows Chrome
  • Windows Edge
  • iOS Safari
  • iOS Firefox
  • iOS Chrome
  • iOS Edge
  • Android Firefox
  • Android Chrome
  • Android Samsung Internet
  • Android Edge

The functions are available in the celestra and/or CEL object.

Edition Filename
developer celestra.dev.js
minified celestra.min.js
ES6 module celestra.esm.js
CUT testpage
Celestra Unit Tester
unittest.html
Version history CHANGELOG.md

DEV and MIN editions: If the CEL global variable is used before the loading of the library, then the value of the variable is saved and you can restore with the noConflict(); function.

Removed polyfills

Some polyfills have been removed in v3.1.0 and v3.8.0 and v5.6.0. With these files can be reusued the old polyfills if needed.

edition filename
developer celestra-polyfills.dev.js
minified celestra-polyfills.min.js

Cheatsheets

Celestra cheatsheet: celestra-cheatsheet.pdf

JavaScript cheatsheet: js-cheatsheet.pdf

Apps

BTC standalone app: btc.app.html

RPG dice roller: testgame.html

Demo plugin documentation: celestra-demo-plugin.html

Demo plugin developer source: celestra-demo-plugin.dev.js

Demo plugin minified source: celestra-demo-plugin.min.js

How to import the ESM edition

<script type="module">

// import the celestra object
import { celestra } from "./celestra.esm.js";
window.celestra = celestra;
window.CEL = celestra;

// import with default with name
import { default as celestra } from "./celestra.esm.js";
window.celestra = celestra;
window.CEL = celestra;

// import with default export
import defaultExport from "./celestra.esm.js";
window.celestra = defaultExport;
window.CEL = defaultExport;

</script>

Celestra v3.0.0 (Hera) changes

  • Only modern browsers (ES6+) are supported. The Internet Explorer 11 and W10M Edge have been removed from the supported browsers.

  • If you would like to use Celestra with older browsers, then you can download the latest v2.x version here: https://github.com/Serrin/Celestra/releases

  • The library sources have been merged and all of the ES6E functions are available in the celestra.dev.js and celestra.min.js.

  • Many functions have been deprecated or removed.

Celestra v3.6.0 (Galactica) changes

  • CommonJS and AMD module compatibility have been removed.

  • In the ESM (ECMAScript 6 module) edition only the whole celestra object is exported as default export and as standalone object.

  • Many functions have been deprecated or removed.

Celestra v5.0.0 (Defiant) changes

  • The underscore _ short object name has been changed to CEL to avoid the compatibility issues.
    If need to use the old short name, then with this code will be available again: window._ = window.celestra;.

Celestra v5.3.0 (Voyager) changes

  • Added a new code section: Abstract functions and new functions.

Celestra v5.5.0 changes

  • The Math functions are available in the main code files (dev, min, esm) instead of the Math plugins.

Functions

Core API

These functions are available in the celestra and/or CEL objects.

Example: CEL.sleep();

Name Description
celestra.noConflict(); Restore the previous CEL object value and return the celestra object to create a new alias.
Tip: You can make a new alias without this function too. Example: window._cel = window.celestra;
In the ESM edition only returns the celestra object.
celestra.VERSION; The library version.
BASE16; "0123456789ABCDEF"
Can be used with the ID generator functions.
BASE32; "234567ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Can be used with the ID generator functions.
BASE36; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Can be used with the ID generator functions.
BASE58; "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
Can be used with the ID generator functions.
BASE62; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Can be used with the ID generator functions.
WORDSAFEALPHABET; "23456789CFGHJMPQRVWXcfghjmpqvwx"
Can be used with the ID generator functions.
b64Encode(<string>); Unicode compatible string to base64 converter. Return the encoded string.
b64Decode(<string>); Unicode compatible base64 to string converter. Return the original string.
assertEq(<msg>,<value1>,<value2>[,strict=true]); This function throws an error with the message if the value1 and value2 aren't equals. The message parameter is mandatory and has to be a string. The strict parameter is optional and can be a booelan. The return value is true, when the test was success.
assertFalse(<msg>,<value>); This function throws an error with the message if the value is true. The message parameter is mandatory and has to be a string. The return value is true, when the test was success.
assertNotEq(<msg>,<value1>,<value2>[,strict=true]); This function throws an error with the message if the value1 and value2 are equals. The message parameter is mandatory and has to be a string. The strict parameter is optional and can be a booelan. The return value is true, when the test was success.
assertTrue(<msg>,<value>); This function throws an error with the message if the value is false. The message parameter is mandatory and has to be a string. The return value is true, when the test was success.
bind(<function>,<context>); Returns a function that is bound to a context. Both of the parameters are mandatory.
classof(<variable>[,type[,throw=false]]); Old name before v5.4.0: getType.
Get the real type of a variable. If this is an object, then the return value is the detailed object type (e.g.: array). If the type (string) parameter is given, then the return value (boolean) is the equality of the type of the variable and the second parameter. If the third parameter (boolean) is true and the type of the variable and the second parameter aren't equals, then the function is throwing a TypeError();, else the return value is true.
constant(<value>); A one time assignment function to create a constant value in ES5. This returns a function, which returns the given value. (In math: f(x)=x)
delay(<ms>).then(<callback>); A promise based delay function. The ms (milliseconds) parameter is mandatory and have to be an integer.
Sample:
CEL.sleep(5000).then(() => alert("5 seconds")).catch(console.log.bind(console)).finally(() => alert("done"));
extend([deep,]<target>,<source1>[,sourceN]); This is an enhanced version of the Object.assign method. The deep parameter (boolean) is optional and sets the deep copy (recursive) of the sources.
F(); This function returns false.
filterIn(<object>,<callback>); The filterIn() function executes a provided function once for each object property and returns a new object with the properties which were be filtered. The object parameter is mandatory and has to be an object. The callback parameter is mandatory and has to be a function. The parameter function will be called with these arguments: key value, key, object.
Example:
var o1 = {"a": 1, "b": 2, "c": 3};
console.log(o1);
// Object { a: 1, b: 2, c: 3 }
var o2 = CEL.filterIn(o1, (v, p, o) => (v > 1));
console.log(o2);
// Object { b: 2, c: 3 }
forIn(<object>,<callback>); The forIn() function executes a provided function once for each object property. The object parameter is mandatory and has to be an object. The callback parameter is mandatory and has to be a function. The parameter function will be called with these arguments: key value, key, object.
getUrlVars([str=location.search]); Get the values of the url variables in an object from the location.search (default value) or another given url. The str parameter name is optional and can be a string. Example: "?showall=true&order_by=updated&o=asc" -> Object { showall: "true", order_by: "updated", o: "asc" }
identity(<value>); Return the given value. (In math: f(x)=x)
inherit(<subclass>,<superclass>); Prototype inheritance.
javaHash(<data>[,hexa=false]); Java String.hashCode() implementation in Javascript - this is a non-cryptographic hash function. The data parameter is mandatory and can be any type. The hexa parameter is optional and can be a boolean and sets the hexadecimal conversion of the return value and the default value is false. Return the generated integer hash.
nanoid([size=21[,alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-"]]); Generate a nanoid. The size parameter is optional and the default value is 21. The alphabet parameter is optional and the default value is "A-Za-z0-9_-". The return value is the generated nanoid (string).
noop(); It's an empty function (no operation) that returns undefined and usable for optional callback arguments.
obj2string(<object>); Convert object to a querystring. The return value is the string. The object parameter is mandatory.
randomBoolean(); Get a random boolean value. The return value is true or false.
randomID([hyphens=true][,usedate=false]); DEPRECATED in v5.5.4
REMOVED in v5.6.0
Can be replaced with the crypto.randomUUID();, which is polyfilled in this library.
Generate a GUID/UUID v4 random ID. The hyphens and useDate parameters are optional and can be a boolean. The return value is a string.
randomString([length[,specialCharactersEnabled=false]]); DEPRECATED in v5.5.2
REMOVED in v5.6.0
Can be replaced with the CEL.nanoid();.
Generate a random string. The length parameter is optional and can be a number and the default value is 100. The specialCharactersEnabled parameter is optional and can be a boolean and the default value is false. Return the generated string.
Example ID: "QsZA2VVTgFIF3D-qFk5oc"
sizeIn(<object>); Returns the count of the owned properties of the given object. The object parameter is mandatory.
popIn(<object>,<property>); The popIn() function deletes the property in the object and returns the value of the deleted property. If the property doesn't exist in the object, then the return value is undefined. The object parameter is mandatory and has to be an object. The property parameter is mandatory.
sleep(<ms>).then(<callback>); This is an alias of the delay(<ms>).then(<callback>);.
T(); This function returns true.
timestampID([size=21[,alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"]]); Generate a timestamp based sortable ID. The size parameter is optional and the default value is 21, but if the given value smaller than 12, then the value will be 12. The alphabet parameter is optional and the default value is "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", same as BASE58. The return value is the generated id (string).
Example ID:"00lirtqi4e-wgGn8vGPyY"
unBind(<function>); Old name before v5.4.1: toFunction.
Returns an unbinded function from an object method. The function parameter is mandatory.

String API

These functions are available in the celestra and/or CEL objects.

Example: CEL.strPropercase();

Name Description
strAt(<string>,<index>[,newChar]); If the newchar is undefined, then returns the unicode character, which has to be on the given index in the string. The index can be negative value (-1 -> last). If the index is out of the string length, then the return value is an empty string. All of the parameters are mandatory and index has to be an integer.
If the newChar is not undefined, then the indexed character will be replaced with the newChar and returns the modified string.
strCapitalize(<string>); This function is unicode compatible and converts the first character to uppercase and the other characters to lowercase. The string parameter is mandatory. The return value is a string.
strCodePoints(<string>); Returns the array of the unicode codepoints of characters of the given string. The string parameter is mandatory.
strDownFirst(<string>); This function is unicode compatible and converts the first character to lowercase. The string parameter is mandatory. The return value is a string.
strFromCodePoints(<collection>); Returns the joined string of the given unicode codepoints. The collection parameter is mandatory.
strHTMLEscape(<string>); This function escapes these characters: <, >, &, ", '. The String parameter is mandatory. The return value is the escaped string.
strHTMLRemoveTags(<string>); Remove HTML tags from the given string. The string parameter is mandatory. The return value is the new string.
strHTMLUnEscape(<string>); This function unescapes these characters: <, >, &, ", '. The String parameter is mandatory. The return value is the unescaped string.
strReverse(<string>); Returns the reversed variant of the given string. In the ES6 compatible browsers the result will be unicode compatible. The string parameter is mandatory.
strPropercase(<string>); This function is unicode compatible and capitalizes every word of the given string. The string parameter is mandatory. The return value is a string.
Example:
strSplice(<str>,<index>,<count>[,add]); This function works like the Array.prototype.splice();, but with strings and can remove characters on the index or replace with other string. The return value is the modified string.
strTitlecase(<string>); Alias of the strPropercase(<string>);.
strUpFirst(<string>); This function is unicode compatible and converts the first character to uppercase. The string parameter is mandatory. The return value is a string.

DOM API

These functions are available in the celestra and/or CEL objects.

Example: CEL.domCreate();

Name Description
createFile(<filename>,<content>[,dataType]); Create and save file without a server. The filename and content parameters are mandatory and have to be a string. The dataType parameter is optional and can be a string. The default value of the dataType parameter is "text/plain". Doesn't work in iOS browsers (Safari, Firefox and Chrome) and W10M Edge 14.
domCreate(<type>[,properties[,innerHTML]]); Create a new HTML element. The type is mandatory and has to be a string. The properties object is optional and sets the element properties. (class, style object/string, data-*, etc.) The innerHTML is optional and can be a string.
domCreate(<element descriptive object>); Since v2.0.5, a new element can be created with an object. In this case the element descriptive object is mandatory. The style can be a subobject or a string. Sample code: CEL.domCreate({elementType: "a", href: "https://developer.mozilla.org/en-US/", target: "_blank", style: {"background-color": "red", "color": "white"}, innerHTML: "MDN Sample url"});
domFadeIn(<element>[,duration[,display]]); Fade in and show animation for an element. The element is mandatory and has to be a HTML element. The duration parameter is optional and sets the animation time in millisecond (the default is 500ms). The display is optional and can be a string (CSS display property values).
domFadeOut(<element>[,duration]); Fade out and hide animation for an element. The element is mandatory and has to be a HTML element. The duration parameter is optional and sets the animation time in millisecond (the default is 500ms).
domFadeToggle(<element>[,duration[,display]]); Fade in or fade out animation which depends on the state of the element. The element is mandatory and has to be a HTML element. The duration parameter is optional and sets the animation time in millisecond (the default is 500ms). The display is optional and can be a string (CSS display property values).
domGetCSS(<element>[,property]); Get a CSS property value of an element or all of the css properties in an object. The element is mandatory and has to be a HTML element. The property is optional and can be a string.
domGetCSSVar(<name>); This function returns a value of a CSS variable or an empty string, if the variable is unset. The name parameter is mandatory and has to be a string. If the "--" characters are missing at the begin of the variable name, then the function will add these.
domHide(<element>); Hide an element. The element is mandatory and has to be a HTML element.
domIsHidden(<element>); This function determines whether the element is hidden. The element is mandatory and has to be a HTML element. The return value is boolean.
domReady(<callback>); Set the document ready (content fully loaded) event.
domSetCSS(<element>,<property>,<value>); Set a CSS property value of an element. The element is mandatory and has to be a HTML element. The property is mandatory and has to be a string. The value is mandatory and has to be a string.
domSetCSS(<element>,<properties>); Set CSS property values of an element. The element is mandatory and has to be a HTML element. The properties object is mandatory. The object properties can be the CSS properties and the property values will be applied to the element.
domSetCSSVar(<name>,<value>); This function set a value of a CSS variable. Both of the parameters are mandatory and have to be a string. If the "--" characters are missing at the begin of the variable name, then the function will add these.
domShow(<element>[,display]); Show an element. The element is mandatory and has to be a HTML element. The display is optional and can be a string (CSS display values).
domScrollToBottom(); Old name before v5.5.4: domToBottom.
This function is scrolling to the bottom of the page.
domScrollToElement(<element>[,top=true]); This function is scrolling to top or the bottom of element. The element parameter is mandatory and the top parameter is optional and can be boolean.
domScrollToTop(); Old name before v5.5.4: domToTop.
This function is scrolling to the top of the page.
domSiblings(<element>); Get the siblings of an element. The element parameter is mandatory and the return value is the array.
domSiblingsLeft(<element>); Alias of the domSiblingsPrev(<element>);.
domSiblingsNext(<element>); Get the nextsiblings of an element. The element parameter is mandatory and the return value is the array.
domSiblingsPrev(<element>); Get the previous siblings of an element. The element parameter is mandatory and the return value is the array.
domSiblingsRight(<element>); Alias of the domSiblingsNext(<element>);.
domToElement(<htmlString>); This function returns a HTML element which is created from the htmlString parameter. The htmlString parameter is mandatory and has to be a string.
domToggle(<element>[,display]); Show or hide an element. The element is mandatory and has to be a HTML element. The display is optional and can be a string (CSS display values).
importScript(<script1>[,scriptN]); Load JavaScript files. The first parameter is mandatory and has to be a string. The other parameters are optional and can be a string.
Tip:
To prevent the caching of a js/css file use versioning in the file url. Example: mylib.js?version=1.10.0
importStyle(<style1>[,styleN]); Load CSS files. The first parameter is mandatory and has to be a string. The other parameters are optional and can be a string.
form2array(<form>); Convert (serialize) form input tag names and values to an array with object elements (name and value properties). The return value is the array. The form parameter is mandatory and has to be a html form element.
form2string(<form>); Convert (serialize) form input tag names and values to a query string. The return value is the string. The form parameter is mandatory and has to be a html form element.
getDoNotTrack(); Return the DoNotTrack setting (boolean) of the browser.
getFullscreen(); Get the fullscreen element. If this isn't set, then the return value is undefined. Please check the incompatibility issues on the http://caniuse.com/#search=fullscreen page.
getLocation(<success>[,error]); Get the current location as an object with the coordinates. The success is mandatory and has to be a function. The error is optional and can be a function.
setFullscreenOff(); Set off the fullscreen.
setFullscreenOn(<selector>); Set the fullscreen element. The selector can be a css selector string or an element.
qs(<selector>[,context]); Get the first matched HTML element. The context is optional and can be an element or a selector string.
qsa(<selector>[,context]); Get matched HTML elements in an array. The context is optional and can be an element or a selector string.

AJAX and CORS API

These functions aren't deprecated, but it's recommend to use the Fetch API, because it's supported in every modern browsers.

These functions are available in the celestra and/or CEL objects.

Example: CEL.getJson();

Name Description
ajax(<Options object>); Get content and send data via AJAX and CORS.
getJson(<url>,<success>); Get JSON content via AJAX. A shorthand function to the ajax() function.
getText(<url>,<success>); Get TEXT content via AJAX. A shorthand function to the ajax() function.

Options object properties:

  • The queryType is optional and can be a string with these values: "ajax" or "cors". The default value is "ajax".
  • The type is optional and can be a string with these values: "get" or "post". The default value is "get".
  • The url is mandatory and has to be a string.
  • The data is optional and has to be a string if the type === "post".
  • The format is optional and can be a string with these values: "text" or "json" or "xml". The default value is "text".
  • The success is mandatory and has to be a function.
  • The error is optional and can be a function.
  • The user is optional and can be a string.
  • The password is optional, but mandatory if the user is set. This parameter can be a string.

Type checking API

These functions are available in the celestra and/or CEL objects.

Example: CEL.isString();

Name Description
isArrayBuffer(<value>); This function determines whether the provided value is an arraybuffer. The return value is boolean.
isArraylike(<value>); This function determines whether the provided value is an iterable object. The return value is boolean.
isAsyncFn(<value>); This function determines whether the provided value is an async function. The return value is boolean.
isAsyncGeneratorFn(<value>); This function determines whether the provided value is an async generator function. The return value is boolean.
isBigInt(<value>); This function determines whether the provided value is a BigInt. The return value is boolean.
isBoolean(<value>); This function determines whether the provided value is a boolean. The return value is boolean.
isCallable(<value>); Alias of the isFunction(<value>);.
isChar(<value>); This function determines whether the provided value is a string with length 1 character. This function is unicode compatible. The return value is boolean.
isConstructorFn(<value>); This function determines whether the provided value is a constructable function. The return value is boolean.
isDataView(<value>); This function determines whether the provided value is an DataView object. The return value is boolean.
isDate(<value>); This function determines whether the provided value is a date. The return value is boolean.
isElement(<value>); This function determines whether the provided value is a HTML element. The return value is boolean.
isEmptyArray(<value>); This function determines whether the provided value is an empty array (without values). The return value is boolean.
isEmptyIterator(<value>); This function determines whether the provided value is an iterator array (without values). The return value is boolean.
isEmptyMap(<value>); This function determines whether the provided value is an empty map (without properties). The return value is boolean.
isEmptyObject(<value>); This function determines whether the provided value is an empty object (without properties). The return value is boolean.
isEmptySet(<value>); This function determines whether the provided value is an empty set (without values). The return value is boolean.
isError(<value>); This function determines whether the provided value is an error. The return value is boolean.
isFalsy(<value>); This function determines whether the provided value is falsy. The return value is boolean. For more information please read the MDN Article!
isFloat(<value>); This function determines whether the provided value is a float number. The return value is boolean.
isFunction(<value>); This function determines whether the provided value is a function. The return value is boolean.
isGeneratorFn(<value>); This function determines whether the provided value is a generator function. The return value is boolean.
isIterable(<value>); This function determines whether the provided value is an iterable collection. The return value is boolean.
isIterator(<value>); This function determines whether the provided value is an iterator. The return value is boolean.
isMap(<value>); This function determines whether the provided value is a map. The return value is boolean.
isNil(<value>); This function determines whether the provided value is null or undefined or NaN. The return value is boolean.
isNull(<value>); This function determines whether the provided value is null. The return value is boolean.
isNullOrUndefined(<value>); This function determines whether the provided value is null or undefined. The return value is boolean.
isNumber(<value>); This function determines whether the provided value is a number. The return value is boolean.
isNumeric(<value>); This function determines whether the provided value is a number or can be converted to number. The return value is boolean.
isObject(<value>); This function determines whether the provided value is an object and not null. The return value is boolean.
isPlainObject(<value>); This function determines whether the provided value is an object, which own prototype is the Object.prototype or null. The return value is boolean.
isPrimitive(<value>); This function determines whether the provided value is not null, not object and not function. The return value is boolean.
isPromise(<value>); This function determines whether the provided value is a promise object. The return value is boolean.
isRegexp(<value>); This function determines whether the provided value is a regexp. The return value is boolean.
isSameArray(<array1>,<array2>); This function checks the value equality of the given arrays. The return value is boolean and both of the parameters are mandatory and have to be an array.
isSameIterator(<iter1>,<iter2>); This function checks the value equality of the given iterator. The return value is boolean and both of the parameters are mandatory and have to be a collection (iterator / iterable object).
isSameMap(<map1>,<map2>); This function checks the property and value equality of the given maps. The return value is boolean and both of the parameters are mandatory and have to be a map.
isSameObject(<object1>,<object2>); This function checks the property and value equality of the given objects. The return value is boolean and both of the parameters are mandatory and have to be an object.
isSameSet(<set1>,<set2>); This function checks the value equality of the given sets. The return value is boolean and both of the parameters are mandatory and have to be a set.
isSet(<value>); This function determines whether the provided value is a set. The return value is boolean.
isString(<value>); This function determines whether the provided value is a string. This function is unicode compatible. The return value is boolean.
isSymbol(<value>); This function determines whether the provided value is a symbol. The return value is boolean.
isTruthy(<value>); This function determines whether the provided value is truthy. The return value is boolean. For more information please read the MDN Article!
isTypedArray(<value>); This function determines whether the provided value is an typedarray. The return value is boolean.
isUndefined(<value>); This function determines whether the provided value is undefined. The return value is boolean.
isWeakMap(<value>); This function determines whether the provided value is a weakmap. The return value is boolean.
isWeakSet(<value>); This function determines whether the provided value is a weakset. The return value is boolean.

Cookie API

These functions are available in the celestra and/or CEL objects.

Example: CEL.setCookie();

Cookie values help: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie, https://web.dev/samesite-cookies-explained

Name Description
clearCookies([path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]); Clear all of the cookies. The path is optional and can be a string (default value: "/"). To the local path set the "" value! The domain is optional and can be a string. The secure is optional and can be a boolean. The SameSite is optional and can be a string ("Lax", "Strict", "None", default value: "Lax"). The HttpOnly is optional and can be a boolean.
clearCookies(<Options object>); In this case the names of object properties are the same as the function arguments and the default values are the same too.
getCookie([name]); Get a cookie value or all cookies in an object. With the name parameter (string) the return value is the current cookie value or null. Without the parameter the return value is an object with the values or an empty object.
hasCookie(<name>); This function determines whether the cookie is set with the name. The return value is boolean.
removeCookie(<name>[,path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]); Remove a cookie. The name is mandatory and has to be a string. The path is optional and can be a string (default value: "/"). The To the local path set the "" value! The domain is optional and can be a string. The secure is optional and can be a boolean. The SameSite is optional and can be a string ("Lax", "Strict", "None", default value: "Lax"). The HttpOnly is optional and can be a boolean. The return value (boolean) is determines whether the cookie was set with the name before the removing.
removeCookie(<Options object>); In this case the names of object properties are the same as the function arguments and the default values are the same too.
setCookie(<name>,<value>[,hours=8760[,path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]]); Set a cookie. The name is mandatory and has to be a string. The value is mandatory and has to be a string. The hours is the expire value and optional and can be a number (default value: 8760 = 1 year). The path is optional and can be a string (default value: "/"). To the local path set the "" value! The domain is optional and can be a string. The secure is optional and can be a boolean. The SameSite is optional and can be a string ("Lax", "Strict", "None", default value: "Lax"). The HttpOnly is optional and can be a boolean.
setCookie(<Options object>); In this case the names of object properties are the same as the function arguments and the default values are the same too.

Collections API

These functions are available in the celestra and/or CEL objects.

Example: CEL.arrayUnion();

Name Description
arrayAdd(<array>,<value>); Push the value to the array if the array doesn't contain the value. The return value is true, when the value is added and false, when not added.
arrayClear(<array>); Clear the array and returns the empty array. The array parameter is mandatory.
arrayCreate([length=0]); This function returns an array with the given length and can handle the -0 as length. The length parameter will be converted to number and if the new value is not an integer number or out of the array size range, then a rangeerror will be thrown.
arrayCycle(<collection>[,n=100]); Cycle the given collection and returns an array with these elements. The collection parameter is mandatory and can be any type of JavaScript collections. The n parameter is optional and can be an integer. Default parameter value: n = 100.
arrayDeepClone(<array>); This function deeply (recursively) clones an array. The return value is the cloned array.
arrayDifference(<collection1>,<collection2>); Returns the array of unique values that are in the collection1, excluding the values that are also in the collection2. All of the parameters are mandatory and can be any type of JavaScript collections. The return value is an Array.
arrayIntersection(<collection1>,<collection2>); Returns the array of unique values that are in both of the given collections. All of the parameters are mandatory and can be any type of JavaScript collections. The return value is an Array.
arrayMerge(<target>,<source1>[,sourceN]); Merge two or more arrays or push any values in the target array. The return value is the target array.
arrayRange([start=0[,end=99[,step=1]]]); Returns the array of values between the start and end parameters. All of the parameters are mandatory and have to be a number. Default parameter values: start = 0, end = 99, step = 1.
Example:
CEL.arrayRange("A".codePointAt(0),"Z".codePointAt(0)).map((v)=>String.fromCodePoint(v));
->
Array(26) [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ]
arrayRemove(<array>,<value>[,all=false]); Remove the first or all equivalent values from the array. Returns true, when the value was found and false when not found. The array and value parameters are mandatory. The all parameter is optional and has to be a boolean.
arrayRemoveBy(<array>,<callback>[,all=false]); Remove the first or all values from the array with which the given function returns true. Returns true, when the value was found and false when not found. The array and value parameters are mandatory. The all parameter is optional and has to be a boolean.
arrayRepeat(<value>[,n=100]); Returns an array with same repeatedly elements. The value parameter is mandatory and the n parameter is optional and can be an integer. Default parameter value: n = 100.
arraySymmetricDifference(<collection1>,<collection2>); Returns the array of unique values that are only in one of given collections. All of the parameters are mandatory and can be any type of JavaScript collections. The return value is an Array.
arrayUnion(<collection1>[,collectionN]); Returns the array of unique values including all values from the given collections. The first parameter is mandatory and all parameters can be any type of JavaScript collections. The return value is an Array.
arrayUnique(<collection>); This function returns a new array with unique values. The value parameter is mandatory and can be any type, that can be converted to array. In modern browsers you can use ES6 types too (Map, Set and iterators).
concat(<collection1>[,collectionN]); This function merges the collections and yields the elements of the merged collection. The given collections will be not changed. At least one collection has to been given.
contains(<collection>,<value>); This is an alias of the includes(<collection>,<value>);.
drop(<collection>[,n=1]); Drop the first N elements of a collection and yield the remained elements. The original collection will be not changed. The collection parameter is mandatory. The n parameter is optional and can be an integer. Default parameter value: n = 1
dropRight(<collection>[,n=1]); Drop the last N elements of a collection and return the remained elements in an array. The original collection will be not changed. The collection parameter is mandatory. The n parameter is optional and can be an integer. Default parameter value: n = 1.
dropRightWhile(<collection>,<callback>); Drop the elements from the end of a collection while the callback (filter) function returns true and yield the remained elements. The original collection will be not changed. The callback function will be called with the actual element of the collection. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function.
dropWhile(<collection>,<callback>); Drop the elements of a collection while the callback (filter) function returns true and yield the remained elements. The original collection will be not changed. The callback function will be called with the actual element of the collection. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function.
entries(<collection>[,offset=0]); An alias of the enumerate(<collection>);.
enumerate(<collection>[,offset=0]); Yield generated pairs (arrays) from the elements of a collection and a counter. The collection parameter is mandatory. The offset parameter is optional and can be an integer and it's default value is 0.
Example:
CEL.enumerate(["Picard", "Riker", "Data"], 2); -> [2, "Picard"], [3, "Riker"], [4, "Data"]
every(<collection>,<callback>); This function whether all elements in the collection pass the test implemented by the provided function. It returns a Boolean value and all of the parameters are mandatory. If the collection is empty, then the return value is false.
filter(<collection>,<callback>); Filter and yield elements of a collection. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function and called with two parameters: the item and the index of the item (only a counter).
find(<collection>,<callback>); This function returns the value of the first element in the collection that satisfies the provided testing function. Otherwise undefined is returned. All of the parameters are mandatory.
findLast(<collection>,<callback>); This function returns the value of the last element in the collection that satisfies the provided testing function. Otherwise undefined is returned. All of the parameters are mandatory.
first(<collection>); This function returns the first element of the given collection. The collection parameter is mandatory.
forEach(<collection>,<callback>); This function executes a provided function once for each collection element. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function and called with two parameters: the item and the index of the item (only a counter).
forEachRight(<collection>,<callback>); This function executes a provided function once for each collection element in reversed order. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function and called with two parameters: the item and the index of the item (only a reversed counter).
group(<collection>,<callback>[,map=false]); Deprecated in v5.6.0. Will be removed in 5.7.0.
Can be replaced with the Object.groupBy(); and Map.groupBy();.
Old name before v5.4.4: groupBy.
Returns an Object or Map with array properties. The keys are the returned values of the given function. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function. The map parameter is optional and has to be a boolean and if it is true, then the return value is a Map instead of Object.
Example:
CEL.group([1,2,3,4,5], (i) => (i % 2 === 0 ? "even" : "odd");
->
{ "even": [ 2, 4 ], "odd": [ 1, 3, 5 ] }
head(<collection>); This is an alias of the first(<collection>);.
includes(<collection>,<value>); This function determines whether a collection includes a certain value among its entries, returning true or false as appropriate. All of the parameters are mandatory.
initial(<collection>); Returns an array with the values of the given collection, but without the last value.
Example:
CEL.initial([-5, 2, -9, 7, 34]);
->
[-5, 2, -9, 7]
isSuperset(<superCollection>,<subCollection>); This function determines whether the first provided collection is superset of the second collection. The parameters are mandatory and all parameters can be any type of JavaScript collections. The return value is a boolean.
item(<collection>,<index>); This function returns the item from the given collection on the given index. The collection parameter is mandatory and has to be any type of JavaScript collections. The index is mandatory and can be positive number (examples: 0 = the first item, 1 = the second item, 2 = the third item, etc.) Compatible with the Unicode strings.
iterCycle(<iter>[,n=Infinity]); Yield the items of an iterator over and over. The iter parameter is mandatory and the n parameter is optional and can be an integer. Default parameter value: n = Infinity Note: PLease don't use with infinite iterators!
iterRange([start=0[,step=1[,end=Infinity]]]); Yield a range (counter) iterator. All of the parameters are optional. Default parameter values: start = 0, step = 1, end = Infinity.
iterRepeat(<value>[,n=Infinity]); Yield a value over and over. The value parameter is mandatory and the n parameter is optional and can be an integer. Default parameter value: n = Infinity
join(<collection>[,separator=","]); This function creates and returns a new string by concatenating all of the elements in a collection, separated by commas or a specified separator string. The separator is converted to a string if necessary. If the collection has only one item, then that item will be returned without using the separator. The collection parameter is mandatory.
flat(<collection>); Yield the subelements of the elements of the given collection. The collection parameter is mandatory and all of the elements have to be an iterator or iterable.
last(<collection>); This function returns the last element of the given collection. The collection parameter is mandatory.
map(<collection>,<callback>); This function creates a new iterator with the results of calling a provided function on every element in the calling collection. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function and called with two parameters: the item and the index of the item (only a counter).
max(<value1>[,valueN]); Returns the maximum value of the given values. The first value parameter is mandatory and can be any type. Works with any type of values, not only with numbers.
min(<value1>[,valueN]); Returns the minimum value of the given values. The first value parameter is mandatory and can be any type. Works with any type of values, not only with numbers.
none(<collection>,<callback>); This function whether all elements in the collection do not pass the test implemented by the provided function. It returns a Boolean value and all of the parameters are mandatory. If the collection is empty, then the return value is false.
nth(<collection>,<index>); This is an alias of the item(<collection>,<index>);.
partition(<collection>,<callback>); Returns an array, with filtered and negative filtered groups of the elements of the original collection. All of the parameters are mandatory.
Example:
CEL.partition([-5, 2, -9, 7, 34], (e) => (e > 0) );
->
[[2, 7, 34], [-5, -9]]]
reduce(<collection>,<callback>[,initialvalue]); This function executes a reducer function (that you provide) on each element of the collection, returning in a single output value. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function. The initialvalue parameter is optional and can be any variable type of the Javascript.
reject(<collection>,<callback>); This is the opposite of the function filter(<collection>,<callback>);. The elements to which the given callback gives a false will be yield. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function and called with two parameters: the item and the index of the item (only a counter).
reverse(<collection>); This function returns an array with values of the given collection in reverse order. The collection parameter is mandatory.
setDifference(<set1>,<set2>); Returns the set of unique values that are in the collection1, excluding the values that are also in the collection2. All of the parameters are mandatory and have to be a Set. The return value is a Set.
setIntersection(<set1>,<set2>); Returns the set of unique values that are in both of the given collections. All of the parameters are mandatory and have to be a Set. The return value is a Set.
setSymmetricDifference(<set1>,<set2>); Returns the set of unique values that are only in one of given collections. All of the parameters are mandatory and have to be a Set. The return value is a Set.
setUnion(<collection1>[,collectionN]); Returns the set of unique values including all values from the given collections. The first parameter is mandatory and all parameters can be any type of JavaScript collections. The return value is a Set.
size(<collection>); This function returns the count of the elements in the given collection. The collection parameter is mandatory. The return value is an integer.
shuffle(<collection>); Returns an array with the values of the given collection, but in shuffled order.
Example:
CEL.shuffle(["first",4,5,6,7,8,9,"last"]);
->
[4,8,5,6,"last",9,7,"first"]
slice(<collection>[,begin=0[,end=Infinity]]); Take a slice of a collection and yield the elements. The collection parameter is mandatory. The begin parameter is optional and can be a number and the default value is 0. The end parameter is optional and can be a number and the default value is Infinity.
some(<collection>,<callback>); This function tests whether at least one element in the array passes the test implemented by the provided function. It returns a Boolean value and all of the parameters are mandatory. If the collection is empty, then the return value is false.
sort(<collection>[,numbers=false]); This function sorts the values of the given collection. The collection parameter is mandatory. The numbers paramater is optional (boolean) and set true, if the collection contains only numbers. The return value is an array.
tail(<collection>); Yield the values of a collection but without the first value. The collection parameter is mandatory.
take(<collection>[,n=1]); Yield the first N elements of a collection. The collection parameter is mandatory. The n parameter is optional and can be an integer. Default parameter value: n = 1
takeRight(<collection>[,n=1]); Take the last N elements of a collection. The collection parameter is mandatory. The n parameter is optional and can be an integer. Default parameter value: n = 1. The return value is an array.
takeRightWhile(<collection>,<callback>); Yield the elements from the end of a collection while the callback (filter) function returns true. The callback function will be called with the actual element of the collection. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function.
takeWhile(<collection>,<callback>); Yield the elements of a collection while the callback (filter) function returns true. The callback function will be called with the actual element of the collection. The collection parameter is mandatory. The callback parameter is mandatory and has to be a function.
unzip(<collection>); Returns the array of arrays of unpaired values. In the modern browsers compatible with finite iterators.
Example:
CEL.unzip([ [ "a", 3 ], [ "b", 4 ], [ "c", 5 ], [ "d", 6 ] ]);
->
Array (2) [ ["a","b","c","d"], [3,4,5,6] ]
withOut(<collection>,<filterCollection>); Returns an array with the values of the first collection, but without the values of the filterCollection. All of the parameters are mandatory and can be any type of JavaScript collections.
Example:
CEL.withOut(["a","b","c","d"], ["b","d"]);
->
["a","c"]
zip(<collection1>[,collectionN]); Returns the array of paired values of the given collections. All of the parameters can be any type of JavaScript collections. In the modern browsers compatible with finite iterators. The return value is an Array.
Example:
CEL.zip(["a","b","c","d"], [3,4,5,6,7,8,9]);
->
Array (4) [ [ "a", 3 ], [ "b", 4 ], [ "c", 5 ], [ "d", 6 ] ]
zipObj(<collection1>,<collection2>); Returns an object, whose properties are from the first collection and its values are from the second collection. The two collections must be the same size. In the modern browsers compatible with finite iterators.
Example:
zipObj(["a","b","c"],[1,2,3])
->
{"a":1,"b":2,"c":3}

Abstract API

These functions are available in the celestra and/or CEL objects.

Example: CEL.getIn();

Name Description
createDataProperty(<object>,<property>,<value>); This function creates a writable, configurable and enumerable property with the given value in the object. The return value is the modified object.
createMethodProperty(<object>,<property>,<value>); This function is useful for create a polyfill, because creates a writable, configurable, non-enumerable property with the given value in the object. The return value is the modified object.
Example:
if (!("at" in Array.prototype)) { CEL.createMethodProperty(Array.prototype, "at ", function(...){...}); }
getIn(<object>,<property>); This function return the property value of the given object. If the property doesn't exist, then the return value is undefined. The object parameter is mandatory and has to be an object. The property parameter is mandatory and has to be a property type.
getInV(<value>,<property>); This function return the property value of the given value and the given value will be converted to object. If the property doesn't exist, then the return value is undefined. The object parameter is mandatory and has to be any value. The property parameter is mandatory and has to be a property type.
hasIn(<object>,<property>); This function determines whether the property is in the given object, but this can be inherited property too, not only the owned. The object parameter is mandatory and has to be an object. The property parameter is mandatory and has to be a property type. The return value is boolean.
isIndex(<value>); This function determines whether the provided value is a valid arraylike index number. The return value is boolean.
isPropertyKey(<value>); This function determines whether the provided value is a valid propertx key (string or symbol). The return value is boolean.
isSameValue(<value1>,<value2>); This function uses the SameValue algorithm and determines whether the provided values are the same values and -0 and +0 values will be not equal. The NaN values will be equal. The return value is boolean.
TIP: The Object.is(); uses the SameValue algorithm.
isSameValueNonNumber(<value1>,<value2>); This function uses the SameValueNonNumber algorithm and determines whether the provided values are the same values and -0 and +0 values will be equal. The NaN values will be not equal. The return value is boolean.
isSameValueZero(<value1>,<value2>); This function uses the SameValueZero algorithm and determines whether the provided values are the same values and -0 and +0 values will be equal. The NaN values will be equal. The return value is boolean.
setIn(<object>,<property>,<value>); This function set the property value of the given object. The object parameter is mandatory and has to be an object. The property parameter is mandatory and has to be a property type. The value is mandatory and can be any type.
toArray(<value>); If the value is an array, then this function returns the value else converts the value to array or the return value is an empty array.
toIndex(<value>); This function converts the provided value to a valid arraylike index number. The return value is an unsigned integer (number).
toInteger(<value>); This function always converts the provided value to an integer. If the value cannot be converted to an integer, then the return value is 0.
toObject(<value>); If the given value is not null or undefined, then the return value is an object, which has been converted from the value, else a TypeError() will be throwned.
toPropertyKey(<value>); This function convert the given value to a valid property key. If the value is not symbol, then will be converted to string, else the symbol will be returned.
type(<value>); This function returns the typeof operator result of the given value, except the null object ("null" instead of "object").

Math API

These functions are available in the celestra and/or CEL objects.

Example: CEL.sum();

Name Description
avg(<value1>[,valueN]); This function returns the average value from the parameter values.
clamp(<value>,<min>,<max>); If the given value is between the min and max values, then this function returns the value. If smaller then the min value, then the return value is the min. If greater then the max value, then the return value is the max.
inRange(<value>,<min>,<max>); This function determines whether the provided value is between the min and max values. All of the parameters are mandatory and have to be number. The return value is boolean.
isEven(<value>); This function determines whether the provided value is an even number. The return value is boolean.
isBigInt64(<value>); This function determines whether the provided value is a BigInt (Int64) value between -2^63 and 2^63 - 1. The return value is boolean.
isBigUInt64(<value>); This function determines whether the provided value is a BigInt (Int64) value between 0 and 2^64 - 1. The return value is boolean.
isInt8(<value>); This function determines whether the provided value is an integer between -128 and 127. The return value is boolean.
isInt16(<value>); This function determines whether the provided value is an integer between -32768 and 32767. The return value is boolean.
isInt32(<value>); This function determines whether the provided value is an integer between -2147483648 and 2147483647. The return value is boolean.
isOdd(<value>); This function determines whether the provided value is an odd number. The return value is boolean.
isUInt8(<value>); This function determines whether the provided value is an integer between 0 and 255. The return value is boolean.
isUInt16(<value>); This function determines whether the provided value is an integer between 0 and 65535. The return value is boolean.
isUInt32(<value>); This function determines whether the provided value is an integer between 0 and 4294967295. The return value is boolean.
minmax(<value>,<min>,<max>); This is an alias of the clamp(<value>,<min>,<max>);.
product(<value1>[,valueN]); This function returns the product value from the parameter values.
randomFloat([max]); Get a random float number value within 0 and max value. Without parameter the maximum value is 100.
randomFloat(<min>,<max>); Get a random float number value within min and max value.
randomInt([max]); Get a random integer number value within 0 and max value. Without parameter the maximum value is 100.
randomInt(<min>,<max>); Get a random integer number value within min and max value.
signbit(<value>); This function is based on this proposal:
https://github.com/tc39/proposal-Math.signbit
Returns whether the sign bit of x is set.
If n is NaN, the result is false.
If n is -0, the result is true.
If n is negative, the result is true.
Otherwise, the result is false.
The value parameter is mandatory.
sum(value1>[,valueN]); This function returns the sum value from the parameter values.
toBigInt64(<value>); This function clamps ("minmax") the given value to BigInt (Int64) value (-2^63 to 2^63 - 1).
toBigUInt64(<value>); This function clamps ("minmax") the given value to unsigned BigInt (Int64) value (0 to 2^64 - 1).
toFloat32(<value>); This function clamps ("minmax") the given value to float 32 value (-3.4e38 to 3.4e38).
toInt8(<value>); This function clamps ("minmax") the given value to integer 8 value (-127 to 128).
toInt16(<value>); This function clamps ("minmax") the given value to integer 16 value (-32768 to 32767).
toInt32(<value>); This function clamps ("minmax") the given value to integer 32 value (-2147483648 to 2147483647).
toUInt8(<value>); This function clamps ("minmax") the given value to unsigned integer 8 value (0 to 255).
toUInt16(<value>); This function clamps ("minmax") the given value to unsigned integer 16 value (0 to 65535).
toUInt32(<value>); This function clamps ("minmax") the given value to unsigned integer 32 value (0 to 4294967295).

Polyfills

Name Description
Array.fromAsync(); The Array.fromAsync() static method creates a new, shallow-copied Array instance from an async iterable, iterable, or array-like object. For more information please read the MDN Article!
Array.prototype.toReversed(); The toReversed() method of an Array instance is the copying counterpart of the reverse() method. It returns a new array with the elements in reversed order. For more information please read the MDN Article!
Array.prototype.toSorted(); The toSorted() method of an Array instance is the copying version of the sort() method. It returns a new array with the elements sorted in ascending order. For more information please read the MDN Article!
Array.prototype.toSpliced(); The toSpliced() method of an Array instance is the copying version of the splice() method. It returns a new array with some elements removed and/or replaced at a given index. For more information please read the MDN Article!
Array.prototype.with(); The with() method of an Array instance is the copying version of using the bracket notation to change the value of a given index. It returns a new array with the element at the given index replaced with the given value. For more information please read the MDN Article!
crypto.randomUUID(); The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator. For more information please read the MDN Article!
globalThis; The "global" property of the global object, a writable, configurable, non-enumerable alias of window/self. For more information please read the MDN Article!
Map.groupBy(); The Map.groupBy() static method groups the elements of a given iterable using the values returned by a provided callback function. The final returned Map uses the unique values from the test function as keys, which can be used to get the array of elements in each group. For more information please read the MDN Article!
Object.groupBy(); The Object.groupBy() static method groups the elements of a given iterable according to the string values returned by a provided callback function. The returned object has separate properties for each group, containing arrays with the elements in the group. For more information please read the MDN Article!
Object.hasOwn(); The Object.hasOwn() static method returns true if the specified object has the indicated property as its own property. If the property is inherited, or does not exist, the method returns false. For more information please read the MDN Article!
TypedArray.prototype.toReversed(); The toReversed() method is the copying counterpart of the reverse() method. It returns a new array with the elements in reversed order. This method has the same algorithm as Array.prototype.reverse(). For more information please read the MDN Article!
TypedArray.prototype.toSorted(); The toSorted() method is the copying version of the sort() method. It returns a new array with the elements sorted in ascending order. This method has the same algorithm as Array.prototype.toSorted(), except that it sorts the values numerically instead of as strings by default. For more information please read the MDN Article!
TypedArray.prototype.with(); The with() method is the copying version of using the bracket notation to change the value of a given index. It returns a new array with the element at the given index replaced with the given value. This method has the same algorithm as Array.prototype.with(). For more information please read the MDN Article!
REMOVED polyfills in v3.1.0 Array.from();
Array.of();
Array.prototype.fill();
Array.prototype.find();
Array.prototype.findIndex();
Object.create();
String.prototype.startsWith();
String.prototype.endsWith();
Array.prototype.copyWithin();
String.fromCodePoint();
String.prototype.codePointAt();
Number.EPSILON;
Number.isNaN();
isNaN();
Number.isInteger();
Number.isFinite();
Number.isSafeInteger();
Number.parseInt();
Number.parseFloat();
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();
REMOVED polyfills in v3.8.0 Array.prototype.values();
Array.prototype.includes();
String.prototype.includes();
String.prototype.repeat();
String.prototype[Symbol.iterator]();
Object.assign();
Object.entries();
Object.values();
Object.getOwnPropertyDescriptors();
RegExp.prototype.flags;
NodeList.prototype.forEach();
ChildNode.after();
ChildNode.before();
ChildNode.remove();
ChildNode.replaceWith();
ParentNode.append();
ParentNode.prepend();
Element.prototype.matches();
Element.prototype.closest();
Element.prototype.toggleAttribute();
Element.prototype.getAttributeNames();
window.screenLeft;
window.screenTop;
REMOVED polyfills in v5.6.0 Array.prototype.at();
Array.prototype.findLast();
Array.prototype.findLastIndex();
Array.prototype.flat();
Array.prototype.flatMap();
Array.prototype.group();
Array.prototype.groupToMap();
Number.MIN_SAFE_INTEGER;
Number.MAX_SAFE_INTEGER;
Object.fromEntries();
Object.is();
String.prototype.at();
String.prototype.matchAll();
String.prototype.padStart();
String.prototype.padEnd();
String.prototype.replaceAll();
String.prototype.trimStart();
String.prototype.trimLeft();
String.prototype.trimEnd();
String.prototype.trimRight();
Typedarray.prototype.at();
TypedArray.prototype.findLast();
TypedArray.prototype.findLastIndex();

Non-standard polyfills

Name Description
BigInt.prototype.toJSON(); Using JSON.stringify(); with any BigInt value will raise a TypeError as BigInt values aren't serialized in JSON by default. This added method can fix this. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)
window.AsyncFunction(); The AsyncFunction constructor creates a new async function object. In JavaScript, every asynchronous function is actually an AsyncFunction object. Note that AsyncFunction is not a global object, but in the Celestra this is available in the window object.
window.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, but in the Celestra this is available in the window object.

Samples

There are code samples in the celestra.html and unittest.js.


License

https://opensource.org/licenses/MIT

MIT License

SPDX short identifier: MIT

Copyright (c) 2017 Ferenc Czigler

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

celestra's People

Contributors

serrin avatar

Watchers

 avatar  avatar  avatar

Forkers

archways404

celestra's Issues

Celestra 3.6.0 Galactica

Celestra 3.6.0 Galactica

  1. Documentation and pdf fixes.

  2. Remove the CommonJS and AMD module codes!

  3. In the ESM version remove the export of the standalone functions, only the whole object export and default export have to be remained.

  4. Remove these functions: getUrlVar([name]);, getUrlVarFromString(<querystr>[,name]);

  5. Rename the function isGenerator(<value>); to isGeneratorFn(<value>);

  6. Add Fetch samples in the js-cheatsheet.pdf.

Celestra 3.5.2

  1. Documentation and pdf fixes.

  2. Add new functions: getUrlVars([str=location.search]);, isAsyncFn(<value>);

  3. Add a new polyfill: window.AsyncFunction();

  4. Deprecate these functions: getUrlVar([name]);, getUrlVarFromString(<querystr>[,name]);

  5. Rename the GeneratorFunction(); to window.GeneratorFunction(); in the documentation and celestra-cheatsheet.pdf.

  6. Replace the spread operator with Array.from(); in the function qsa();

Celestra 3.5.1

  1. Documentation and pdf fixes.

  2. Celestra Unit Tester (CUT) v0.8.12 - only fixes

  3. u87.css v0.9.18

  4. Add a polyfill: String.prototype.replaceAll();

  5. Remove the description of the CommonJS and AMD module only from the documentation!

Celestra 3.5.0.2

  1. u87.css v0.9.17

Celestra 3.5.0.1

  1. u87.css v0.9.16

Celestra 3.5.0

  1. Documentation and pdf fixes.

  2. Modify the license text to the default MIT text.

  3. Remove the Edge 12-18 from the supported browsers.

  4. u87.css v0.9.15

  5. Remove these functions: isEqual(<value1>,<value2>);, random();

  6. Add unicode string functions: strCodePoints();, strFromCodePoints();, strAt();

Celestra 3.4.2

  1. Documentation and pdf fixes.

  2. u87.css v0.9.14 (20K): This is the last version which supports the IE11. New utility classes, default text color changed to black from #333333, new print styles, fixes in themes, -ms vendor prefixed flex values have been removed (used only in IE10) and many fixes in the flex grid. The .row (.flex) and .col-XX (.flex-XX) aliases have been removed from the flex grid. CSS GRID classes has been added as experimental tools in the u87-0.9.14-cssgrid.css file.

  3. Celestra Unit Tester (CUT) v0.8.11 - function iter2JSON(); has been removed and CSS changes. The u87.css blue theme is the new default theme, not the light.

  4. Add these functions: isSameArray(<array1>,<array2>);, randomFloat();

  5. Replace these functions: noop();, uniqueArray();, isIterable();, T();, F();

  6. Rename the function random(); to randomInt(); and add an alias with the name random();

  7. Deprecate these functions: isEqual(<value1>,<value2>);, random();

  8. Redesign the testcors.html

Celestra 3.4.1

  1. Documentation and pdf fixes.

  2. u87.css v0.9.13: New utility classes, new print styles and many fixes in the grid (restructured to "mobile first").

  3. Replace these functions: isNullOrUndefined(); and isNil();

  4. Fix the function forIn(); - use the celestra.hasOwn();

  5. Fix the polyfill Object.fromEntries(); - use the for...of loop

  6. Redesign the testcors.html

Celestra v2.8.0 Roy Batty

Celestra v2.8.0 Roy Batty

  1. Documentation fixes.
  2. Replace the function isEmptyArray(v) with a smaller size function
  3. Add type checking of the arguments to the Array.from() polyfill
  4. Fix the function isArrayLike(v) (string, null)
  5. Replace the function getDoNotTrack() with a smaller size function
  6. Replace the Array.prototype.includes() polyfill with a smaller size function
  7. Replace the String.prototype.includes() polyfill with a smaller size function
  8. Deprecated the toPairs(<collection1>,<collection2>);
  9. Add the zip(<collection1>[,collectionN]);
  10. Add the unzip(<collection>);
  11. Rename the range(<start>,<end>[,step]); to arrayRange(<start>,<end>[,step]);
  12. Add the alias range(<start>,<end>[,step]); to the arrayRange(<start>,<end>[,step]);
  13. Add the arrayRepeat(<value>[,n]);
  14. Add the arrayCycle(<collection>[,n]);
  15. Add the clearCookies([path[,domain[,secure[,HttpOnly]]]]);
  16. Fixes in unittest.js
  17. Replace the build of the celestra object with a faster, smaller method
  18. Add the isSuperset(<superset>,<subset>);
  19. Close the milestone "2.8.0 Roy Batty"

Celestra v2.7.2

  1. Add domIsHidden(<element>);
  2. Replace the T(); with a smaller size function
  3. Replace the F(); with a smaller size function
  4. Small text changes
  5. Add itemOf(<collection>,<index>); in ES6E
  6. Add isBigInt(<value>);

Celestra v2.7.1

  1. Remove the extra spaces at the function isGenerator() in the celestra-es6.min.js - bug
  2. Add the RegExp.prototype.flags polyfill
  3. Add the String.prototype.matchAll() polyfill in ES6E

Celestra v2.7.0

  1. Remove the merge([deep,]<target>,<source1>, ...sources);
  2. Remove the tap(<object>,<callback>);
  3. Move the FP testcases to Core API in the unittest.html
  4. Add the alias isNil(<value>); to the isNullOrUndefined(<value>);
  5. Add the takeWhile(<collection>,<callback>); in ES6E
  6. Add the dropWhile(<collection>,<callback>); in ES6E
  7. Add the Beta Edge (chromium) to the test devices
  8. Replace the Array.from() with celestra.__toArray__() in the min(<collection>);, minIndex(<collection>);, max(<collection>);, maxIndex(<collection>);

Celestra v2.6.2

  1. Deprecate the function tap()
  2. Update the u87.css to v0.9.9
  3. Remove changes infos before v2.5.0 in the celestra.html and readme.md
  4. Replace the function noop() with this: function noop () {}

Celestra v2.6.1

  1. Move the functions from the Functional programming to Core API
  2. Move the merge([deep,]<target>,<source1>[,srcN]); from Core API to Collections
  3. Rename the merge([deep,]<target>,<source1>[,srcN]); to arrayMerge([deep,]<target>,<source1>[,srcN]);
  4. Create the old alias for the arrayMerge([deep,]<target>,<source1>[,srcN]);

Celestra v2.6.0

  1. Replace the qsa(); with the smaller version
  2. Replace the qs(); with the smaller version
  3. Remove iterTake(<collection>,<n>); from ES6E
  4. Remove iterDrop(<collection>,<n>); from ES6E
  5. Move the forEach(<collection>,<callback>); from FP to Collections
  6. Move the map(<collection>,<callback>); from FP to Collections
  7. Move the forIn(<object>,<callback>); from FP to Core API
  8. Move the mapIn(<object>,<callback>); from FP to Core API

Celestra v2.5.2

  1. Add isIterable(<value>);
  2. Deprecate the "each()" method of the "qsa()" and the context as selector string of qsa(); and qs();
    -> https://github.com/Serrin/Celestra/issues/98
  3. Replace the uniqueArray(); with a celestra.__toArray__(); based function.
  4. Replace the strReverse(); with a Array.from(); based function.
  5. Replace the (""+s) with String(s) in the strRemoveTags(s);
  6. Replace the domOn(); with a smaller function
  7. Replace the domOff(); with a smaller function
  8. Replace the (Array.from ? ...) code to Array.from() in the forEach(a,fn);
  9. Replace the (Array.from ? ...) code to Array.from() in the map(a,fn);

Function changes in ES6E:

  1. Add function isGenerator()
  2. Add function filterOf()
  3. Add function sliceOf()
  4. Rename the function iterTake(<collection>,<n>); to function takeOf(<collection>,<n>);
  5. Add the alias function iterTake(<collection>,<n>); for the function takeOf(<collection>,<n>);
  6. Rename the function iterDrop(<collection>,<n>); to function dropOf(<collection>,<n>);
  7. Add the alias function iterDrop(<collection>,<n>); for the function dropOf(<collection>,<n>);

Celestra v2.5.1

  1. Add iterTake(<collection>,<n>); in ES6E
  2. Add iterDrop(<collection>,<n>); in ES6E
  3. Move the forOf() and mapOf() functions in the ES6E and replace with for..of functions

Celestra v2.5.0 Tamara

Celestra v2.5.0 Tamara - add the ES6 extension

  1. Add new files: celestra-es6.js, celestra-es6.min.js, unittest-es6.js

  2. Add the iterRange([start[,step[,end]]]);

  3. Add the iterCycle(<iter>[,n]);

  4. Add the iterRepeat(<value>[,n]);

  5. Add the GeneratorFunction

  6. Modify all of the documentation files.

  7. Add new testcases and test loader buttons in the CUT (unittest.js).

  8. Close the milestone 2.5.0 Tamara after the publishing of the v2.5.0.

Celestra v2.4.1

  1. Add Array.prototype.values() - Missing in Samsung Android browser.
  2. Add the MDN link of the globalThis

Celestra v2.4.0

  1. Remove removeTags();
  2. Remove getScript();
  3. Remove getScripts();
  4. Remove getStyle();
  5. Remove getStyles();
  6. Fix the importStyles(); in the development version
  7. Add the item(<collection>,<index>);

Celestra v2.3.0

  1. Add the strReverse(<string>);
  2. Rename the removeTags(<string>); to strRemoveTags(<string>);
  3. Add and mark as deprecated the old alias for the strRemoveTags(<string>);
  4. Add a new arguments handling for the getScripts(<script1>[,scriptN]);
  5. Add a new arguments handling for the getStyles(<style1>[,styleN]);
  6. Fix the String return value of the forEach(<collection>,<callback>);
  7. Rename the getScript(); to importScript();
  8. Rename the getScripts(); to importScripts();
  9. Rename the getScript(); to importStyle();
  10. Rename the getScripts(); to importStyles();
  11. Add and mark as deprecated the old alias for the importScript(); and importScripts(); and importStyle(); and importStyles();
  12. Add the __toArray__(<collection>);, only for inner use
  13. Add Collection functions:

ES5

  • arrayUnion(<collection1>, [collection2] ... [collectionN]);
  • arrayIntersection(<collection1>,<collection2>);
  • arrayDifference(<collection1>,<collection2>);
  • arraySymmetricDifference(<collection1>,<collection2>);
  • arrayKeys(<collection>);
  • arrayValues(<collection>);
  • arrayEntries(<collection>);
  • min(<collection>);
  • minIndex(<collection>);
  • max(<collection>);
  • maxIndex(<collection>);
  • range(<start>,<end>[,step]);
  • toPairs(<collection1>,<collection2>);

ES6

  • setUnion(<collection1>, [collection2] ... [collectionN]);
  • setIntersection(<set1>,<set2>);
  • setDifference(<set1>,<set2>);
  • setSymmetricDifference(<set1>,<set2>);

Celestra v2.2.2 (1998)

  1. Add 2 functions:
  • isEqual(<value1>,<value2>);
  • isIterator(<value>);
  1. Add or modify 4 polyfills:
  • globalThis
  • Fix the Math.hypot();
  • Replace the Object.values(); with a Object.keys(o).map(...);
  • Replace the Object.entries(); with a Object.keys(o).map(...);

Celestra v2.2.1

  1. Modify the "function forIn (o, fn)" to return the object

  2. Add 3 functions:

  • arrayClear(<array>);
  • arrayRemove(<array>,<value>[,all]);
  • tap(<object>,<callback>);
  1. CUT v0.8.7 changes:
  • Add function log(<innerHTML>); - this is a shorthand to the addElement("p", innerHTML);
  • Add function clear (); - this will clear all of the results

Celestra v2.2.0

  1. Add 7 functions:
  • isWeakMap() - ES6
  • isWeakSet() - ES6
  • forOf() - ES6
  • mapOf() - ES6
  • T()
  • F()
  • domToElement()
  1. Remove 3 functions:
  • each()
  • toArray()
  • toObject()
  1. Replace the "function forEach()" and "function map()" with ES6 compatible functions

Celestra v2.1.2

  • Add polyfill window.screenLeft

  • Add polyfill window.screenTop

  • Add domSiblings()

  • Add uniquePush()

  • Add uniqueArray()

  • Deprecate the each()

  • Add DOMParser in the js-cheatsheet.pdf

  • Fix the page structure in the celestra-cheatsheet.pdf

  • Upgrade the u87.css to 0.9.7

  • Add dark mode links in the celestra.html header and footer

  • Add dark mode links in the CUT (unittest.html) header and footer

  • Small text changes and fixes

Celestra v2.1.1

  1. Fix the createFile()
    Changes this line
    console.log("Celestra createFile error: too few parameters.");
    to
    throw "Celestra createFile error: too few parameters.";

  2. Add merge()

  3. Deprecate these functions:

  • function toArray(<object>);
  • function toObject(<array>);
  1. Remove these sections and informations:
  • Object name changes
  • Functional programming (FP) variant
  • function celToWindow();
  • function fromEntries(<entries>);

Celestra v5.6.0 Razorback

Celestra v5.6.0 Razorback

  1. Documentation and pdf fixes.
HTML - minmax(<value>,<min>,<max>); - This is an alias of the minmax(<value>,<min>,<max>);.
HTML - REMOVED polyfills in v3.1.0 - String.prototype.codePointAt();7 
  1. Remove these aliases: domToTop();, domToBottom();

  2. Remove these functions: randomString();, randomID();

  3. Add these polyfills:

Object.groupBy();
Map.groupBy();
  1. Fix the function group(<collection>,<callback>[,map=false]); with the new, standard function calls.

  2. Deprecate this function: group(<collection>,<callback>[,map=false]);

  3. Add the 4th page in the celestra-cheatsheet.odt and celestra-cheatsheet.pdf with the removed polyfills.

  4. Move these polyfills in the celestra-polyfills.dev.js and celestra-polyfills.min.js

Array.prototype.at();
Array.prototype.findLast();
Array.prototype.findLastIndex();
Array.prototype.flat();
Array.prototype.flatMap();
Array.prototype.group();
Array.prototype.groupToMap();

Number.MIN_SAFE_INTEGER;
Number.MAX_SAFE_INTEGER;

Object.fromEntries();
Object.is();

String.prototype.at();
String.prototype.matchAll();
String.prototype.padStart();
String.prototype.padEnd();
String.prototype.replaceAll();
String.prototype.trimStart();
String.prototype.trimLeft();
String.prototype.trimEnd();
String.prototype.trimRight();

Typedarray.prototype.at();
TypedArray.prototype.findLast();
TypedArray.prototype.findLastIndex();
  1. Close the milestone 5.6.0 Razorback.

Celestra v5.5.5

  1. Documentation and pdf fixes.

  2. Add Array.fromAsync(); in the js-cheatsheet.pdf

  3. Add a polyfill: Array.fromAsync(<arrayLike>[,mapFn[,thisArg]]);

  4. Add an alias of the function clamp();: minmax();

  5. Fix these functions:

Function Fix
isSameIterator(); Remove the method sort();
isSuperset(); Replace the method includes(); with indexOf();
arrayIntersection(); Replace the method includes(); with indexOf();
arrayDifference(); Replace the method includes(); with indexOf();
arraySymmetricDifference(); Replace the method includes(); with indexOf();

Celestra v5.5.4

  1. Documentation and pdf fixes.

  2. Rename this sections:

Old name New name
DOM DOM API
Type checking Type checking API
Collections Collections API
Math functions Math API
Abstract Abstract API
Cookie Cookie API
AJAX and CORS AJAX and CORS API
  1. Add a new section: String API

  2. Move these functions in the section String API:

strPropercase(<string>);
strTitlecase(<string>);
strCapitalize(<string>);
strUpFirst(<string>);
strDownFirst(<string>);
strReverse(<string>);
strCodePoints(<string>);
strFromCodePoints(<collection>);
strAt(<string>,<index>[,newChar]);
strSplice(<str>,<index>,<count>[,add]);
strHTMLRemoveTags(<string>);
strHTMLEscape(<string>);
strHTMLUnEscape(<string>);
  1. Add these alphabets:
const BASE16 = "0123456789ABCDEF";
const BASE32 = "234567ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const BASE36 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
const BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
const WORDSAFEALPHABET= "23456789CFGHJMPQRVWXcfghjmpqvwx";
  1. Add these functions:
  • strSplice(<string>,<index: integer>,<count: integer>[,add: string]): string
  • domScrollToElement(<element>[,top=true]): undefined
  • timestampID([size=21[,alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"]]): string
  1. Replace the function strAt(<string>,<index: integer>): string
    to strAt(<string>,<index: integer>[,newChar: string]): string

  2. Move this functions from Core API to Math functions:

signbit();
randomInt();
randomFloat();
inRange();
  1. Deprecate this function: randomID();

  2. Rename these functions and add an alias with the old name:

Old name New name
domToTop(); domScrollToTop();
domToBottom(); domScrollToBottom();

Celestra v5.5.3

  1. Documentation and pdf fixes.

  2. Add these functions: domToTop();, domToBottom();

  3. Add these polyfills:

Array.prototype.toReversed();
Array.prototype.toSorted();
Array.prototype.toSpliced();
Array.prototype.with();
TypedArray.prototype.toReversed();
TypedArray.prototype.toSorted();
TypedArray.prototype.with();

Celestra v5.5.2

  1. Documentation and pdf fixes.

  2. Add Map and Set objects in the js-cheatsheet.odt and js-cheatsheet.pdf.

  3. Rename these files:

Old name New name
celestra-demoPlugin.html celestra-demo-plugin.html
celestra-demoPlugin.dev.js celestra-demo-plugin.dev.js
celestra-demoPlugin.min.js celestra-demo-plugin.min.js
history.md CHANGELOG.md
  1. Deprecate the function randomString([length[,specialCharactersEnabled=false]]);

  2. Add a new function: nanoid([size=21[,alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-"]]);

  3. Celestra Unit Tester (CUT) v0.8.25:

  • CSS and text changes
  • UP & DOWN buttons have been removed, because these caused errors on the test server.
  • Added UTC, local and Epoch time in the log.

Celestra v5.5.1

  1. Documentation and pdf fixes.

Celestra v5.5.0

  1. Documentation and pdf fixes.

  2. globalThis; documentation text change: "window/self" -> "window/self"

  3. Remove this line in the celestra.dev.js: //const find = ([...a], fn) => a.find((v, i) => fn(v, i));

  4. Remove these aliases:

Alias Function
getType(); classof();
toFunction(); unBind();
groupBy(); group();
  1. Remove the Math plugin and move the functions in the celestra.dev.js, celestra.min.js and celestra.esm.js

  2. Add a demo plugin with these files: celestra-demoPlugin.html, celestra-demoPlugin.dev.js and celestra-demoPlugin.min.js

Celestra v5.4.4

  1. Documentation and pdf fixes.

  2. Fix the description of these polyfills with MDN links:

Array.prototype.findLast();
Array.prototype.findLastIndex();
TypedArray.prototype.findLast();
TypedArray.prototype.findLastIndex();
  1. Rename these prototypes:
Array.prototype.groupBy(); -> Array.prototype.group();
Array.prototype.groupByToMap(); -> Array.prototype.groupToMap();
  1. Rename the function groupBy(<collection>,<callback>[,map=false]); to group(<collection>,<callback>[,map=false]); and add an alias with the old name.

Celestra v5.4.3

  1. Documentation and pdf fixes.

  2. Remove this line in the README.md:

Celestra Math plugin cheatsheet: __celestra-math.pdf__
  1. Add the Reflect object in the js-cheatsheet.odt and js-cheatsheet.pdf

  2. Fix these MDN links at the polyfills in the celestra.html and README.md:

Polyfill Link
Array.prototype.groupBy(); https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/groupBy
Array.prototype.groupByToMap(); https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/groupByToMap
  1. Add an alias: sleep(<ms>).then(<callback>); -> delay(<ms>).then(<callback>);

  2. Revert these functions to old versions -> use the for of instead of the array conversion:

includes(<collection>,<value>);
contains(<collection>,<value>);
find(<collection>,<callback>);
findLast(<collection>,<callback>);
every(<collection>,<callback>);
some(<collection>,<callback>);
none(<collection>,<callback>);
join(<collection>[,separator=","]);
  1. Fix these polyfills to use the Object.defineProperty();:
Array.prototype.flat();
Array.prototype.flatMap();
String.prototype.matchAll();
String.prototype.trimStart();
String.prototype.trimLeft();
String.prototype.trimEnd();
String.prototype.trimRight();
String.prototype.padStart();
String.prototype.padEnd();

Celestra v5.4.2

  1. Documentation and pdf fixes.

  2. Add a third page in the celestra-cheatsheet.odt and celestra-cheatsheet.pdf

  3. Delete these files and move the content in the celestra-cheatsheet.odt and celestra-cheatsheet.pdf:

  • celestra-math.odt
  • celestra-math.pdf
  1. Replace the BigInt Xn literals to BigInt(X) in the unittest.js

  2. Fix the function isSameValue(<value1>,<value2>);: This is a standalone function instead of an alias of the Object.is();.

  3. Celestra Unit Tester (CUT) v0.8.24: CSS and text changes

Celestra v5.4.1

  1. Documentation and pdf fixes.

  2. Add these functions:

  • toArray(<value>); - in abstract
  1. Add these polyfills:
  • Array.prototype.groupBy(<fn>[,thisArg]);
  • Array.prototype.groupByToMap(<fn>[,thisArg]);
  • Number.MIN_SAFE_INTEGER;
  • Number.MAX_SAFE_INTEGER;
  • Object.is();
  1. Fix these functions:
Function Fix
groupBy(<collection>,<callback>); Add a parameter: map=false
isChar(<value>); Make this function unicode compatible
isNil(<value>); Add handle of value of NaN
toFunction(<function>); Rename to unBind(<function>); and add an alias with the old name

Celestra v5.4.0

  1. Documentation and pdf fixes.

  2. CSS changes in the testgame.html and btc.app.html

  3. Add these buttons in the celestra-math.html:

  • load celestra-math.js
  • load celestra-math.min.js
  • reset page
  1. Add these topics in the js-cheatsheet.odt and js-cheatsheet.pdf:
  • Nullish coalescing operator (??)
  • Logical nullish assignment (??=)
  • Logical AND assignment (&&=)
  • Logical OR assignment (||=)
  1. Rename these files:
Old name New name
celestra.js celestra.dev.js
celestra-math.js celestra-math.dev.js
celestra-polyfills.js celestra-polyfills.dev.js
  1. Add these aliases:
Alias Function
isCallable(<value>); isFunction(<value>);
strTitlecase(<string>); strPropercase(<string>);
  1. Add these functions:
  • isTruthy(<value>);
  • isFalsy(<value>);
  • getInV(<value>,<property>);
  1. Function fixes:
Function Fix
arrayAdd(<array>,<value>); Small fixes.
arrayMerge(<target>,<source1>[,sourceN]); Remove the [flat=false,] parameter.
getType(<variable>[,type][,throw=false]); Rename to classof(<variable>[,type][,throw=false]); and add an alias with the old name.
isElement(<value>); Use null/undefined checking.
isIterable(<value>); Use null/undefined checking.
isIterator(<value>); Use null/undefined checking.
isPromise(<value>); Use null/undefined checking.
randomInt([max] or <min>,<max>); Small fixes.
randomFloat([max] or <min>,<max>); Use null/undefined checking.

Celestra v5.3.2

  1. Documentation and pdf fixes.

  2. Deprecate the [flat=false,] parameter in the arrayMerge([flat=false,]<target>,<source1>[,sourceN]);

  3. Add these files:

  • celestra-math.min.js
  • celestra-math.odt
  • celestra-math.pdf
  1. Add these functions:
  • arrayCreate([length=0]);
  • arrayDeepClone(<array>);
  • createDataProperty(<object>,<property>,<value>);
  • isAsyncGeneratorFn(<value>);
  • isSameValue(<value1>,<value2>);
  • isSameValueNonNumber(<value1>,<value2>);
  1. Add autotests in the celestra-math.html

  2. Add these functions in the Math plugin:

  • toInt8(<value>); and isInt8(<value>);
  • toUInt8(<value>); and isUInt8(<value>);
  • toInt16(<value>); and isInt16(<value>);
  • toUInt16(<value>); and isUInt16(<value>);
  • toInt32(<value>); and isInt32(<value>);
  • toUInt32(<value>); and isUInt32(<value>);
  • toBigInt64(<value>); and isBigInt64(<value>);
  • toBigUInt64(<value>); and isBigUInt64(<value>);
  • toFloat32(<value>); (There is the isFloat(<value>); in the main code.)
  1. Function fixes
Function Fix
arrayMerge([flat=false,]<target>,<source1>[,sourceN]); Only optimizations.
arrayRange([start=0[,end=99[,step=1]]]); Change end default value to 99 instead of 100.
createMethodProperty(<obj>,<pr>,<v>); Only optimizations.
extend([deep,]<target>,<source1>[,sourceN]); Only optimizations.
getIn(<o>,<pr>); Only optimizations.
hasIn(<obj>,<prop>); Only optimizations.
setIn(<object>,<property>,<value>); Only optimizations.
toIndex(<value>); Fix the handle of Infinity
toInteger(<value>); Fix the handle of Infinity and -Infinity

Celestra v5.3.1

  1. Documentation and pdf fixes.

  2. Add a new file: history.md

  3. Add a new polyfill: crypto.randomUUID();

  4. Add these functions:

  • isIndex(<value>);
  • toIndex(<value>);
  • toInteger(<value>);
  • isConstructorFn(<value>);
  1. Function fixes
Function Fix
contains(<collection>,<value>); Replace the alias code with the original function.
domSiblingsLeft(<element>); Replace the alias code with the original function.
domSiblingsRight(<element>); Replace the alias code with the original function.
entries(<collection>[,offset=0]); Replace the alias code with the original function.
head(<collection>); Replace the alias code with the original function.
isNil(<value>); Replace the alias code with the original function.
isObject(<value>); Small fixes.
nth(<collection>,<index>); Replace the alias code with the original function.
randomID([hyphens=true][,usedate=false]); Use the crypto.getRandomValues();.

Celestra v3.0.0 Hera

Celestra v3.0.0-debug

Debug these testcases with unittest.js:

  • In desktop Chrome: domGetCSS(<element>,<property>);, domSetCSS(<element>,<property>,<value>);, domSetCSS(<element>,<properties>);
    => not a bug: Result / Expected: "299.991px" / "300px" and Result / Expected: "349.997px" / "350px"
  • In Android Samsung Internet: Object.is();
    => not a bug: In the browser the return value of the Object.is(0, -0); is true. In every other browsers the return value is false.

The changes of the unittest.js will be merged in the next version of Celestra.

Celestra v3.0.0 Hera

  • Deprecate these functions: arrayKeys(<collection>);, arrayValues(<collection>);, arrayEntries(<collection>);

  • Replace these functions with new ES6 versions: qsa();, qs();, constant();, identity();, T();, F();, arrayKeys();, arrayValues();, arrayEntries();, strReverse();, uniqueArray();, toFunction();, bind();, hasOwn();, domHide();, domShow();, domOn();, domOff();, domTrigger();, isString();, isNumber();, isInteger();, isFloat();, isBoolean();, isObject();, isFunction();, isArray();, isNull();, isUndefined();, isNil();, isNullOrUndefined();, isSymbol();, isIterable();, isMap();, isSet();, isWeakSet();, isIterator();, isDate();, isRegexp();, isElement();, isArrayBuffer();, isBigInt();, arrayRepeat();, arrayCycle();, isEmptyArray();, hasCookie();, isChar();, arrayCycle();, item();, random();, randomString();

  • Move these functions from Core API to DOM: createFile(<filename>,<content>[,dType]);, getFullscreen();, setFullscreenOn(<selector> or <element>);, setFullscreenOff();

  • Remove the const somethingOf = at the ES6E functions, where the function is not a fat arrow function

  • Merge the code of the celestra.js and celestra-es6.js and minimized sources too.

  • Merge the content of the unittest.js and unittest-es6.js

  • Remove the version;

  • Remove the IE11 from the tested browsers

  • Remove the W10M EDGE 14 from the tested browsers

  • Remove the ES6E labels and text comment in the celestra-cheatsheet.pdf

  • Remove the ES6E section in the documentation and place the content in the other sections (Collections, Type checking, Polyfills)

  • Insert a new section about the changes in v3.0.0

  • Rename the open milestones from v2.x to v3.x

  • Create a new branch for the v2.x code

  • Close the milestone 3.0.0 Hera

Celestra v2.9.1

  1. Add these functions in ES6E:
  • sizeOf(<collection>);
  • lastOf(<collection>);
  • reverseOf(<collection>);
  • firstOf(<collection>);
  • hasOf(<collection>,<value>);
  • findOf(<collection>,<callback>);
  • everyOf(<collection>,<callback>);
  • someOf(<collection>,<callback>);
  • noneOf(<collection>,<callback>);
  • concatOf(<collection1>[,collectionN]);
  • reduceOf(<collection>,<callback>[,initialvalue]);
  • takeRight(<collection>[,n]);
  • takeRightWhile(<collection>,<callback>);
  • dropRight(<collec.>[,n]);
  • dropRightWhile(<collection>,<callback>);
  1. Move these functions from Core API to DOM:
  • qsa(<selector>[,context]).forEach(<fn>);
  • qs(<selector>[,context]).argument;
  • domReady(<function>);
  • importScript(<url>[,success]);
  • importScripts(<scripts> or <script1>[,scrN]);
  • importStyle(<href>[,success]);
  • importStyles(<styles> or <style1>[,styleN]);
  • getLocation(<success>[,error]);
  • form2array(<form>);
  • form2string(<form>);
  • getDoNotTrack();
  1. Redesign the celestra-cheatsheet.pdf: Move the ES6E content to other categories (Collections, Type checking, Polyfills)

  2. Add the default value 1 to the n parameter in these functions: takeOf(<collection>[,n]);, dropOf(<collection>[,n]) in ES6E

  3. Add the VERSION; and deprecate the version;

  4. Rename the version; to VERSION; in CUT v0.8.8

  5. Replace the isGenerator(<value>); with a fat arrow function in ES6E

Celestra v2.9.0

  1. Documentation and PDF fixes.

  2. Remove the toPairs(<collection1>,<collection2>); - beta.1

  3. Remove the range(<start>,<end>[,step]); - beta.1

  4. Add the isArrayBuffer(<value>); - beta.1

  5. Add the isTypedArray(<value>); - beta.1

  6. Add __objType__(<value>); - Only for internal use. - beta.1

  7. Use the __objType__(<value>); in these functions: isMap(<value>);, isSet(<value>);, isWeakMap(<value>); isWeakSet(<value>);, isIterator(<value>);, isDate(<value>);, isRegexp(<value>); isArrayBuffer(<value>);, isTypedArray(<value>); - beta.2

  8. Add the "unittest-dev.html" file on the github. - beta.2

Celestra v3.8.0 Odo

Celestra v3.8.0 Odo

  1. Documentation and pdf fixes.

  2. Add new files: celestra-polyfills.js, celestra-polyfills.min.js

  3. Remove these functions: minIndex(<collection>);, maxIndex(<collection>);

  4. Modify the 3 assert functions to return true, when the test was success

  5. Add these functions: arrayPartition(<array>,<callback>);, arrayGroupBy(<array>,<callback>);, isPromise(<value>);

  6. Add this polyfill: Object.hasOwn();

  7. Depracate this function: hasOwn(<object>,<property>);

  8. Add the "dev"/"min"/"esm" string in the celestra.VERSION property

  9. Fix the description of the globalThis;

  10. Rename the uniqueArray(<value>); function to arrayUnique(<value>);

  11. Rename the uniquePush(<array>,<value>); function to arrayAdd(<array>,<value>);

  12. Close the milestone 3.8.0 Odo

  13. Move these polyfills into the celestra-polyfills.js and celestra-polyfills.min.js:

Array.prototype.values();
Array.prototype.includes();
String.prototype.includes();
String.prototype.repeat();
String.prototype[Symbol.iterator]();
Object.assign();
Object.entries();
Object.values();
Object.getOwnPropertyDescriptors();
RegExp.prototype.flags;
NodeList.prototype.forEach();
ChildNode.after();
ChildNode.before();
ChildNode.remove();
ChildNode.replaceWith();
ParentNode.append();
ParentNode.prepend();
Element.prototype.matches();
Element.prototype.closest();
Element.prototype.toggleAttribute();
Element.prototype.getAttributeNames();
window.screenLeft;
window.screenTop;

Celestra v3.7.0

  1. Documentation and pdf fixes.

  2. Fixes in the demo plugin.

  3. Collect the non-standard polyfills into a new section in the celestra.html, readme.md, celestra-cheatsheet.odt and celestra-cheatsheet.pdf

  4. Add handle of the Options object in these cookie functions: setCookie(<name>,<value>[,hours=8760[,path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]]);, removeCookie(<name>[,path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]);, clearCookies([path="/"[,domain[,sec[,SameSite="Lax"[,HttpOnly]]]]]);

  5. Add default value Lax of the SameSite parameter in these cookie functions: setCookie(<name>,<value>[,hours=8760[,path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]]);, removeCookie(<name>[,path="/"[,domain[,secure[,SameSite="Lax"[,HttpOnly]]]]]);, clearCookies([path="/"[,domain[,sec[,SameSite="Lax"[,HttpOnly]]]]]);

  6. Add a new function: delay(<ms>).then(<callback>);

  7. Modify the domGetCSS(<element>,<property>); to return the all css properties as an object (without property parameter) and remain the old method too.

  8. Fix the isObject(<value>); and isEmptyObject(<value>); - The return value has to be false when the given object is null.

  9. Replace these functions with a smaller size function: min(<collection>);, max(<collection>);, joinOf(<collection>[,separator=","]);, arrayRemove(<array>,<value>[,all]);, strFromCodePoints(<collection>);, getType(<variable>[,type]);

  10. Add new testcases in the unittest.js:

_cut.isEqual("min(); number test", _.min([5, 10, 3]), 3);
_cut.isEqual("max(); number test", _.max([5, 10, 3]), 10);
  1. Deprecate these functions: minIndex(<collection>);, maxIndex(<collection>);

  2. CUT v0.8.13

  • Removed functions: isNotIE11();, isNotEdge(); - The IE11 and the old EDGE have been removed from the supported browsers.
  • Fixes under the hood.

Celestra v3.6.1

  1. u87.css v0.9.19

  2. Documentation and pdf fixes.

  3. Add new functions: assert(<condition>[,message]);, assertLog(<condition>[,message]);, assertAlert(<condition>[,message]);

  4. Replace the function arrayRange([start=0[,end=100[,step=1]]]); with the Array.from(); based function!

  5. Fix the documentation of these functions: arrayRange([start=0[,end=100[,step=1]]]);, iterRange([start=0[,step=1[,end]]]);, arrayRemove(<array>,<value>[,all]);

  6. Fix the function isSameArray(<array1>,<array2>); - Remove the ...slice().sort() lines!

  7. Replace the functions of the demo plugin with new ES6 functions: sum(); and avg();

Celestra v3.4.0 Blackbird

Celestra v3.4.0 Blackbird

  1. Documentation and pdf fixes.

  2. Remove these functions: domOn();, domOff();, domTrigger(); and remove testcases in the CUT

  3. Add DOM events in the js-cheatsheet.pdf

  4. Add default parameter values (start = 0, end = 100, step = 1) to the function arrayRange(); and add new testcases in the CUT

  5. Replace these functions with smaller size functions: zip();, unzip();

  6. Add new functions: domGetCSSVar(<name>);, domSetCSSVar(<name>,<value>);

  7. u87.css v0.9.12: New utility classes and fixes in grid and flex-w-* classes.

  8. Close the milestone 3.40.0 Blackbird

Celestra v3.3.0

  1. Documentation and pdf fixes.

  2. Remove the function mapIn();

  3. Add the handle of SameSite=value parameter in the cookie functions
    https://www.chromestatus.com/feature/5088147346030592
    https://web.dev/samesite-cookies-explained
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
    values: "; SameSite=Strict", "; SameSite=Lax", "; SameSite=None"
    + (typeof SameSite === "string" && SameSite.length > 0 ? "; SameSite="+SameSite : "")

  4. Deprecate these functions: domOn();, domOff();, domTrigger();

  5. Replace these functions with smaller size functions: domGetCSS();, domFadeToggle();, domToggle();, domIsHidden();

  6. u87.css v0.9.11: add new themes (blue, dark, light) and new flexbox based grid

Celestra v3.2.0

  1. Documentation and pdf fixes.

  2. Fix the version numbers in the celestra-demo-plugin.js

  3. Deprecate the function mapIn(<object>,<callback>);

  4. Replace the function forEach(<collection>,<callback>); with an alias of the forOf(<collection>,<callback>);

  5. Replace the function map(<collection>,<callback>); with an alias of the mapOf(<collection>,<callback>);

  6. Replace these functions with smaller size functions: removeCookie();, arrayRemove();

Celestra v3.1.2

  1. Documentation and pdf fixes.

  2. Code and performance optimizations.

  3. Add BigInt in js-cheatsheet.pdf

  4. Add the polyfill BigInt.prototype.toJSON();

  5. Add these functions: flatOf(<collection>);, joinOf(<collection>[,separator]);

  6. Replace these functions with smaller size functions: iterCycle();, iterRepeat();, getType();, uniquePush();, strRemoveTags();, isEqual();, setSymmetricDifference();, isTypedArray();, arrayIntersection();, arrayDifference();, arraySymmetricDifference();, getCookie();, hasCookie();, setcookie();

  7. Fix the testcase isNumeric() false in unittest.js

  8. Add the BigInt to the testcases of the getType(); in unittest.js

  9. Remove the undocumented function __objType__();

  10. Replace the calls of __objType__(); with the getType();

  11. Update the u87.css to v0.9.10

Celestra v3.1.1

  1. Documentation and PDF fixes.

  2. Add the function strReplaceAll(<string>,<search>,<replace>);

  3. CUT v0.8.10: Add the function iter2JSON(<iter>);

  4. Add the file testcors.html

  5. In Samsung browser the handle of the unicode strings with iterator can causes error, so replace the strReverse(); with this function: const strReverse=(s)=>Array.from(String(s)).reverse().join("");

  6. In the unittest.js log the results of the strReverse(); testcases

  7. Add the String.prototype[Symbol.iterator]() polyfill

  8. In the unittest.js log the results of the String.prototype[Symbol.iterator]() testcases

  9. Fix the function isIterator();

Celestra v3.1.0

  1. Documentation and PDF fixes.

  2. Remove these functions: getAjax(<url>,<format>,<success>[,error[,user,<password>]]);, postAjax(<url>,<data>,<format>,<success>[,error[,user,<password>]]);, getCors(<url>,<format>,<success>[,error[,user,<password>]]);, postCors(<url>,<data>,<format>,<success>[,error[,user,<password>]]);, isInteger(<value>);, isArray(<value>);, arrayKeys(<collection>);, arrayValues(<collection>);, arrayEntries(<collection>);

  3. Remove these polyfills: 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.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();

  4. Store the VERSION; in a constant and use this in the object building and ESM export.

  5. Add the function enumerateOf();

  6. Implement the ESM v2:

  • Add export default celestra;
  • Add function exports
  • Modify the documentation
  • Add new testcases

Celestra v3.0.2

  1. Documention and PDF fixes.

  2. Deprecate these polyfills: 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.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();

  3. Add a new minimized file, which uses the ES6 modules: celestra.esm.js

  4. Modify the function noConflict(); in the ESM: The function only returns the celestra object.

  5. Update the CUT to v0.8.9: add new HTML file for the ESM version and rename the existing files to have consistent name.

Celestra v3.0.1

  1. Documentation and pdf fixes.

  2. Add a new AJAX function (ajax();) which can replace the existing funtions.

  3. Deprecate the old AJAX functions, except the shorthands.

  4. Replace a the old AJAX shorthands functions with new functions which use the ajax();

  5. Deprecate these functions: isArray(<value>);, isInteger(<value>);

  6. Replace these functions with new versions: arrayUnion();, arrayIntersection();, arrayDifference();, arraySymmetricDifference();, setUnion();, setIntersection();, setDifference();, setSymmetricDifference();, isSuperset();, min();, minIndex();, max();, maxIndex();, arrayRange();, unzip();, reverseOf();, sortOf();, domSiblings();, getDoNotTrack();, isPrimitive();, isArraylike();

  7. Remove the undocumented function __toArray__();

Celestra v2.1.0 Lacy

Celestra v2.1.0 Lacy

  1. Remove window.Celestra;

  2. Remove celestra.celToWindow();

  3. Remove celestra.fromEntries(<entries>);

  4. Create a new Github branch (Celestra-2.0.x) from v2.0.8

  5. CUT v0.8.6 changes: Add browser information (navigator.appName, etc.) in the top of the CUT html file.

  6. Close the "2.1.0 Lacy" milestone in v2.1.0

Celestra v2.0.8

  1. Deprecate the function celToWindow() - beta.1

  2. Add Object.fromEntries() - beta.1

  3. Deprecate the celestra.fromEntries() - beta.1

Celestra v2.0.7

  1. Add or replace 21 polyfills:
  • Array.prototype.copyWithin() - beta 1
  • String.fromCodePoint() - beta 2
  • String.prototype.codePointAt() - beta 2
  • Math.acosh() - beta 3
  • Math.asinh() - beta 3
  • Math.atanh() - beta 3
  • Math.cbrt() - beta 3
  • Math.clz32() - beta 3
  • Math.cosh() - beta 3
  • Math.expm1() - beta 3
  • Math.fround() - beta 3
  • Math.hypot() - beta 3
  • Math.imul() - beta 3
  • Math.log1p() - beta 3
  • Math.log10() - beta 3
  • Math.log2() - beta 3
  • Math.sign() - beta 3
  • Math.sinh() - beta 3
  • Math.tanh() - beta 3
  • Math.trunc() - beta 3
  • NodeList.prototype.forEach() - replaced with the official polyfill - beta 4

Celestra v2.0.6

  1. Modify and fix the function getUrlVar() and function getUrlVarFromString():
  • The not found return value will be null, not undefined.
  • Fix the empty object error: {"":"undefined"}
  • Add new manual testcases for the not found return value.
  • Add new CUT testcases for the not found return value.
  1. Add 7 polyfills:
  • Element.prototype.toggleAttribute()
  • Element.prototype.matches()
  • Element.prototype.closest()
  • Element.prototype.getAttributeNames()
  • Number.parseInt()
  • Number.parseFloat()
  • Object.getOwnPropertyDescriptors()
  1. Update the u87.css to v0.9.6

  2. CUT v0.8.5 changes

  • Add a new function: function isNotEdge (); and use this at the domCreate() - style string test cases, because there is error in the W10M Edge 14.
  • In the function addElement (type, innerHTML); the innerHTML parameter will be optional.
  • Rename the function addTest (); to function __addTest__ (); and use this only for inner calls and in the selftest section.
  • Change the function isEqual (step, expected, expression, strict) from alias of the function __addTest__ (); to call of the function __addTest__ ();. The function isEqual (...); will replace the function addTest (); in the testcases.

Celestra v2.0.5

  1. Add 3 polyfills:
    String.prototype.padStart() - str.padStart(targetLength[,padString])
    String.prototype.padEnd() - str.padEnd(targetLength[,padString])
    String.prototype.repeat() - str.repeat(count);

  2. Add 4 functions:

Name Description
randomString([length[,specialCharactersEnabled]]); Generate a random string. The length parameter is optional and can be a number and the default value is 100. The specialCharactersEnabled parameter is optional and can be a boolean and the default value is false. Return the generated string.
b64Encode(<string>); Unicode compatible string to base64 converter. Return the encoded string.
b64Decode(<string>); Unicode compatible base64 to string converter. Return the original string.
javaHash(<data>[,hexa]); Java String.hashCode() implementation in Javascript - this is a non-cryptographic hash function. The data parameter is mandatory and can be any type. The hexa parameter is optional and can be a boolean and sets the hexadecimal conversion of the return value and the default value is false. Return the generated integer hash.
  1. Modify function domCreate();:
  • use with a single object too
    {
       elementType: "p",
       id: "p1",
       innerHTML: "...",
       style: {"background-color": "red", "color": "white"},
       ...
    }
  • the style can be a string too
    {
       elementType: "p",
       id: "p1",
       innerHTML: "...",
       style: "background-color: red; color: white;",
       ...
    }
  1. CUT v0.8.4 changes:
  • Add celTest.isTrue("step", expr, true|false );
  • Add celTest.isFalse"step", expr, true|false );
  • Add celTest.isEqual("step", true, expr, true|false );
  • Add celTest.isNotEqual("step", true, expr, true|false );
  • Rename the "Sample testcases" section to "CUT Selftest"

Celestra v2.0.4

  • Recreate the "Celestra demo plugin"
  • Add 2 files: celestra-demo-plugin.html, celestra-demo-plugin.js

Celestra v2.0.3

  1. Add 5 polyfills:
  • Object.entries()
  • Object.values()
  • Object.is()
  • Array.prototype.flat([depth]) - mark as proposal
  • Array.prototype.flatMap(callback) - mark as proposal
  1. Add fromEntries(<entries>);

  2. CUT v0.8.3 changes:

  • Change the date format after the library and CUT versions to ISO string
  • Add new testcases

Celestra v2.0.2

  1. Add 5 polyfills:
  • Array.prototype.fill()
  • String.prototype.trimStart()/trimLeft()
  • String.prototype.trimEnd()/trimRight()
  • String.prototype.startsWith()
  • String.prototype.endsWith()
  1. Rename wrapper object from Celestra to celestra
    Add a line window.Celestra = celestra; for compatibility reasons.
    This line will be removed in the Celestra v3.0.

    /* global scope */
    if (typeof window !== "undefined") {
    window.celestra = celestra;
    window.Celestra = celestra;
    celestra.prevUnderscore = window.;
    window.
    = celestra;
    }

  • Find the name "Celestra" in the code samples in the full documentation and replace it, where it's used as object name.
  • Write a description about the changing.
  • Add new testcases and CUT testcases to test the object names. (celestra, Celestra, _)
  1. Add the Android Microsoft Edge to the tested browsers

  2. Remove the description of the removed "doc" variable and removed functions

    doc = document
    repeat(<iteration>,<callback>);
    initArray();
    initObject();
    initString();
    initTrue();
    initFalse();
  1. CUT v0.8.2 changes
    A. CUT tool
  • Rename the Celestra unit tester to Celestra Unit Tester (CUT) in the documentation headers (celestra.html, README.md, unittest.html, unittest-fp.html)
  • Change the CUT version to 0.8.2
  • Change the object name from _ct to _cut
    B. Testcases
  • Change the domCreate() and qs (core api) textcase to domCreate()
  • Change the alert() calls to _cut.addTest() failed in the AJAX testcases, test in Chrome
  • Add testcases for the new polyfills
  • Add testcases to test the object names. (celestra, Celestra, _)

Celestra v2.0.1

  1. Add Array.prototype.find()

  2. Add Array.prototype.findIndex()

  3. Add removeTags(s)

  4. Fix the text of the celestra-cheatsheet.pdf, remove the description of the variable doc

  5. Rename the "Basic API" to "Core API"

  6. CUT v0.8.1 changes:

  • Developed in beta 3 (v0.8.0) and added in beta 4 (v0.8.1)
  • Celestra unit tester - Add new HTML and JS files

Celestra v4.4.0 Trinium

Celestra v4.4.0 Trinium

  1. Documentation and pdf fixes.

  2. Fix an error message in the function ajax(<Options object>);

  3. Rename the function strRemoveTags(<string>); to strHTMLRemoveTags(<string>);

  4. Add these functions:

  • signbit(<value>);
  • randomBoolean();
  • strHTMLEscape(<string>);
  • strHTMLUnEscape(<string>);
  1. CUT v0.8.17:
  • Change the HTML titles like this: Celestra Unit Tester (CUT) - ??? -> ??? - Celestra Unit Tester (CUT)
  • Add a (settings object) notation in the testcases of the section cookie with settings object in the unittest.js
  1. Close the milestone 4.4.0 Trinium

Celestra v4.3.2

  1. Documentation and pdf fixes.

  2. Add a second offset parameter in these functions:

  • enumerate(<collection>[,offset=0]);
  • entries(<collection>[,offset=0]);
  1. Add these functions:
  • domSiblingsPrev(<element>); and an alias domSiblingsLeft(<element>);
  • domSiblingsNext(<element>); and an alias domSiblingsRight(<element>);
  1. Demo Plugin changes:
  • Replace these functions with a new version: sum();, avg();
  • Add 2 new testcases for the avg(); function in the celestra-demo-plugin.html

Celestra v4.3.1

  1. Documentation and pdf fixes:
  • Collect the downloadable editions (dev, min, esm) and CUT files in a table in the celestra.html and README.md
  • Collect the removed polyfill editions (dev, min) in a table in the celestra.html and README.md
  • Add a description about the polyfill files in the celestra.html and README.md
  • Recommend the use of the FETCH at the AJAX documentation in the celestra.html and README.md
  • Fix the description of the isSuperset(<superset>,<subset>); -> isSuperset(<superCollection>,<subCollection>);
  • Other fixes
  1. Replace the strAt(<string>,<index>); function with a new version, which can handle the negative indexes

  2. Change the order of the error messages (v1-v2-msg -> msg-v1-v2) in these functions: assertEq();, assertNotEq();

  3. CUT v0.8.16:

  • Add a new section: Manual testcases
  • Move the delay (2x alert) button in the section Manual testcases
  • Add the assert functions (1x alert, 6x cases) button in the section Manual testcases
  • Add the importStyles button in the section Manual testcases
  • Add the importStyle button in the section Manual testcases
  • Add the noConflict (1x alert) button in the section Manual testcases
  • Rename the Save result in HTML button to try createFile() - Save result in HTML
  • The v3.8.1 aliases removed in v4.0.0 steps convert to one step and move it in the core api and DOM section in the unittest.js
  • Replace the assertSomething(); auto testcases in the unittest.js
  • Other fixes

Celestra v4.3.0

  1. Documentation and pdf fixes.

  2. Add an alias: entries(<collection>); -> enumerate(<collection>);

  3. Fix the sort of the yielded elements of the enumerate(<collection>);: [item, index] -> [index, item]

  4. Fix the String.prototype.at(); polyfill: replace the return String(this)[n]; with return String(this)[String(n)];

  5. Replace this function with a new version: isSameArray(<array1>,<array2>);

  6. Remove this function: strReplaceAll(<str>,<search>,<replace>);

  7. Add these functions:

  • string: strCapitalize(<string>);, strUpFirst(<string>);, strDownFirst(<string>);
  • object: sizeIn(<object>);, filterIn(<object>,<callback>);, popIn(<object>,<property>);
  1. CUT v0.8.15:
  • Add a new testcase in the unittest.js: Array.prototype.at.call(); with an arraylike object - (test passed)
  • Comment many log messages (return values, etc.) in the unittest.js
  • Move the try delay button from the unittest.js to unittest.dev.html, unittest.min.html and unittest.esm.html
  • Fixes under the hood.

Celestra v4.2.0

  1. Documentation and pdf fixes.

  2. PDF design changes in celestra-cheatsheet.odt and celestra-cheatsheet.pdf: move the Cookie section to the second page

  3. Fix the testcors.html

  4. Fix the description of the strAt(<string>,<pos>); -> strAt(<string>,<index>);

  5. Add these polyfills:

  • Array.prototype.at();
  • TypedArray.prototype.at();
  • String.prototype.at();
  1. Add these functions:
  • isEmptyMap(<value>);
  • isEmptySet(<value>);
  • isEmptyIterator(<value>);
  • assertEq(<msg>,<value1>,<value2>[,strict=true]);
  • assertNotEq(<msg>,<value1>,<value2>[,strict=true]);
  • assertTrue(<msg>,<value>);
  • assertFalse(<msg>,<value>);
  1. Remove these functions:
  • assert(<condition>[,message]);
  • assertLog(<condition>[,message]);
  • assertAlert(<condition>[,message]);

Celestra v4.1.0

  1. Documentation and pdf fixes.

  2. PDF design change: split in two columns the Collection section in the celestra-cheatsheet.odt and celestra-cheatsheet.pdf

  3. Add these functions:

  • isDataView(<value>);
  • withOut(<collection>,<filterCollection>);
  • shuffle(<collection>);
  • initial(<collection>);
  • tail(<collection>);
  • isSameObject(<object1>,<object2>);
  • isSameMap(<map1>,<map2>);
  • isSameSet(<set1>,<set2>);
  • isSameIterator(<iter1>,<iter2>);
  1. Add these aliases:
alias function
head(<collection>); first(<collection>);
nth(<collection>,<index>); item(<collection>,<index>);
  1. Fix these functions: reverse(<collection>); and sort(<collection>); - return array instead of array.values();

  2. Modify the sort(<collection>); function: add a second parameter -> sort(<collection>[,numberSort]);

  3. CUT v0.8.14

  • Collect the failed testcases in new section above the browser information.
  • Fixes under the hood.

Celestra v4.0.0 Rocinante

Celestra v4.0.0 Rocinante

  1. Documentation and pdf fixes.

  2. Make a new branch for the v3.x

  3. Close the milestone 4.0.0 Rocinante

  4. Remove these functions: item(<collection>,<index>);, hasOwn(<object>,<property>);

  5. Rename the itemOf(<collection>,<index>); function to item(<collection>,<index>);

  6. Fix these functions: forIn(<object>,<callback>);, obj2string(<object>);, extend([deep,]<target>,<source1>[,srcN]);, deepAssign(<target>,<source1>[,srcN]);

  7. Remove these aliases:

forOf(<collection>,<callback>);
mapOf(<collection>,<callback>);
sizeOf(<collection>);
filterOf(<collection>,<callback>);
hasOf(<collection>,<value>);
findOf(<collection>,<callback>);
everyOf(<collection>,<callback>);
someOf(<collection>,<callback>);
noneOf(<collection>,<callback>);
firstOf(<collection>);
lastOf(<collection>);
sliceOf(<collection>[,begin[,end]]);
reverseOf(<collection>);
sortOf(<collection>);
reduceOf(<collection>,<callback>[,initialvalue]);
concatOf(<collection1>[,collectionN]);
flatOf(<collection>);
enumerateOf(<collection>);
joinOf(<collection>[,separator=","]);
takeOf(<collection>[,n]);
dropOf(<collection>[,n]);

Celestra v3.8.1

  1. Documentation and pdf fixes.

  2. Design changes in the celestra-cheatsheet.odt and celestra-cheatsheet.pdf.

  3. Add a new function: isError(<value>);

  4. Function name changes:

forOf(<collection>,<callback>);
forEach(<collection>,<callback>);
  -> rename forOf(); to forEach();
  -> add old alias

mapOf(<collection>,<callback>);
map(<collection>,<callback>);
  -> rename mapOf(); to map();
  -> add old alias

sizeOf(<collection>);
  -> rename to size();
  -> add old alias

filterOf(<collection>,<callback>);
  -> rename to filter();
  -> add old alias

hasOf(<collection>,<value>);
  -> rename to includes();
  -> add old alias

findOf(<collection>,<callback>);
  -> rename to find();
  -> add old alias

everyOf(<collection>,<callback>);
  -> rename to every();
  -> add old alias

someOf(<collection>,<callback>);
  -> rename to some();
  -> add old alias

noneOf(<collection>,<callback>);
  -> rename to none();
  -> add old alias

firstOf(<collection>);
  -> rename to first();
  -> add old alias

lastOf(<collection>);
  -> rename to last();
  -> add old alias

sliceOf(<collection>[,begin[,end]]);
  -> rename to slice();
  -> add old alias

reverseOf(<collection>);
  -> rename to reverse();
  -> add old alias

sortOf(<collection>);
  -> rename to sort();
  -> add old alias

reduceOf(<collection>,<callback>[,initialvalue]);
  -> rename to reduce();
  -> add old alias

concatOf(<collection1>[,collectionN]);
  -> rename to concat();
  -> add old alias

flatOf(<collection>);
  -> rename to flat();
  -> add old alias

enumerateOf(<collection>);
  -> rename to enumerate();
  -> add old alias

joinOf(<collection>[,separator=","]);
  -> rename to join();
  -> add old alias

takeOf(<collection>[,n]);
  -> rename to take();
  -> add old alias

dropOf(<collection>[,n]);
  -> rename to drop();
  -> add old alias

Celestra v1.17.0 Caprica

Celestra v1.17.0 Caprica

Make a wrapper object and modify the code and the documentation

qsa(); -> Celestra.qsa(); and/or _.qsa();
domSetCSS(); -> Celestra.domSetCSS(); and/or _.domSetCSS();

Celestra v1.16.3

  • Fix the identity() function testcase

Celestra v1.16.2

  • Add each(); function

Celestra v1.16.1

  • Remove the deprecated and removed functions
  • Add testgame2.html

Celestra v1.16.0

  • Add type checking functions
  • Add cheatsheet.pdf

Celestra v1.15.6

  • Documentation fix - remove the links to the migrate-1.12.1.js file

Celestra v1.15.5

Fix the function obj2string (o)

Celestra v1.15.4

  • Add obj2string(<object>);
  • Add getUrlVarFromString(<querystr>[,name]);

Celestra v1.15.2

  • Remove the renamined info at the domFadeIn, domFadeOut, domFadeToggle functions
  • Fix: README.MD bug - double entry: getLocation([,error]);

Celestra v1.15.1

  • Add identity function: function identity (v) { return v; }

Celestra v1.15.0

  • New project name: Celestra

Celestra v2.0 Zoe

Celestra v2.0 Zoe

  • Rename the milestones in Github
  • Remove the FP version
  • Make a new code base from the Main and FP variants in celestra.js
  • Add a new celToWindow() function to emulate the FP version
  • Reminimalize the code in the in celestra.min.js
  • Regression test with the celestra.html, celestra-fp.html, testgame.html, testgame-fp.html
  • Changes of the cookie testcases
  • Replace the function repeat() with a for loop in the testgames.
  • Number.isInteger() documentation fixed, this was the same text as at the Number.isSafeInteger()
  • Rename the testcase of the function deepAssign() from try to deepAssign()
  • Add a default value (100) to the max parameter of the function random() + add a new testcase without parameter + update the documentation
  • Add a new getCookie() function testcase without parameter -> return object, alert with the JSON.stringify()
  • Replace the setCookie() function teststring with the unicode version
  • Remove the deprecated functions
doc = document
repeat(<iteration>,<callback>);
initArray();
initObject();
initString();
initTrue();
initFalse(); 

Celestra v1.21.1

  1. Change the deprecated label at the doc variable in the README.md

  2. Change these testcase names: qsa(selector,qs(selector)).innerHTML, qsa(selector,context).innerHTML

  3. Update the u87.css to v0.9.5

  4. Fix the testcases of the cookie functions

  5. Other small text changes.

  6. Deprecate functions:

repeat(<iteration>,<callback>);
initArray();
initObject();
initString();
initTrue();
initFalse(); 

Celestra v1.21.0

  1. Replace the function form2string() with a standalone function

  2. Rename the "_prevUnderscore" variable to __ prevUnderscore __

  3. Change the result of the function form2array()
    Array: name=foo%20%C3%A9%C3%A1%C5%B1%C5%91%C3%BA%C3%B6%C3%BC%C3%B3%C3%AD%C3%A9%C3%A1%C5%B1%C5%91%C3%BA%C3%B6%C3%BC%C3%B3%C3%AD,password=bar,number=97,radio=male,animals=dog,animals-multiple=dog,animals-multiple=hippos,checkbox1=true,textarea1=textarea1
    The array elements will objects with name or id and value properties.
    => {"name": "animals-multiple", "value": "dog"}

  4. Fix the testcase of the function toObject()
    Replace the typeof o1 with getType(o1), because typeof [1,2,3] -> "object".

  5. Deprecate the doc global variable

Celestra v1.20.1 - v1.20.6

  • u87.css v0.9.4
  • Simplify the code of the getDoNotTrack()
  • Archive the demo plugin
  • Fix the Ajax function parameters notations
  • Remove the testgame1
  • Add library version in the js-cheatsheet.pdf
  • Add functions: createFile();, isNumeric();, hasOwn();
  • Fix the incompatibility list of the function createFile()
    Change from: Doesn't work in iOS Safari and W10M Edge.
    To: Doesn't work in iOS browsers (Safari, Firefox and Chrome) and W10M Edge.

Celestra v1.20.0 Zephyr

Celestra 1.20.0 Zephyr

  • Add function deepAssign()
  • Close the Zephyr milestone

Celestra v1.19.2

Add hasOwnProperty() object method in the extend function

Celestra v1.19.1

Change the default cookie path to "/" (entire site)

Celestra v1.19.0

Fix the removeCookie() function

If not found the cookie, then remove in this case too.
Path, httponly, etc. can cause the hidden cookie.

  1. fix the function
  2. fix the sample code

Celestra v1.18.4

  1. Remove the Classic plugin removing information in the download section!

  2. Remove the v1.17.0 variants information in the download section!

  3. Update the u87.css and the testgame2 custom css!

  4. Add ASCII logo in the HTML files and in the README.md!

  5. Merge the main and the FP cheatsheets!

Celestra v1.18.3

  1. Add "initType" functions:
    function initArray () { return []; }
    function initObject () { return {}; }
    function initString () { return ""; }
    function initTrue () { return true; }
    function initFalse () { return false; }
  1. Change the default css to the external u87.css in the HTML documentations and sample files

Celestra v1.18.2

Add js-cheatsheet.pdf

Celestra v1.18.1

  • Add form2array()
  • Add form2string()

Celestra v1.18.0

  1. Modify the type functions:
  • Add getType() testcase in the documentation for date
  • Add getType() testcase in the documentation for regexp
  • Add function isDate()
  • Add function isRegexp()
  • Add function isElement()
  1. Add cookie functions
  2. Fix geturlvar functions

Celestra v1.17.2

  • Fix the versions

Celestra v1.17.1

  • Rename module*.* test files to testmodule*.*
  • Remove the Plugins section
  • Remove the Classic plugin
  • Change the "can be" texts to "has to be" where the FN parameters are mandatory

Celestra Wiki

      ___  ____  __    ____  ___  ____  ____    __       _
     / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\     / )
    ( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   / _ \
     \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  \___/

Celestra Wiki

Table of contents

  • Notations
  • Planned changes
  • Completed changes
  • Dropped changes
  • ASCII logos
  • Test strings
  • Dropped proposals

Notations

Mark Description
ADD add
DPD deprecate
MOD modify
REM remove
REN rename
=> this has been done
-> this is a plan/question/todo

Planned changes

/*
https://github.com/tc39/proposal-set-methods

Set.prototype.intersection(other)
Set.prototype.union(other)
Set.prototype.difference(other)
Set.prototype.symmetricDifference(other)
Set.prototype.isSubsetOf(other)
Set.prototype.isSupersetOf(other)
Set.prototype.isDisjointFrom(other)
  diszjunkt halmazok
  In mathematics, two sets are said to be disjoint sets if they have no element in common.
*/

/* Set.prototype.intersection(<other>); */
if (!("intersection" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "intersection", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      var r = new Set();
      for (const item of this.keys()) {
        if (other.has(item)) { r.add(item); }
      }
      for (const item of other.keys()) {
        if (this.has(item)) { r.add(item); }
      }
      return r;
    }
  });
}

/* Set.prototype.union(<other>); */
if (!("union" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "union", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      var r = new Set();
      for (const item of this.keys()) { r.add(item); }
      for (const item of other.keys()) { r.add(item); }
      return r;
    }
  });
}

/* Set.prototype.difference(<other>); */
if (!("difference" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "difference", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      var r = new Set();
      for (const item of this.keys()) {
        if (!(other.has(item))) { r.add(item); }
      }
      return r;
    }
  });
}

/* Set.prototype.symmetricDifference(<other>); */
if (!("symmetricDifference" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "symmetricDifference", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      var r = new Set();
      for (const item of this.keys()) {
        if (!(other.has(item))) { r.add(item); }
      }
      for (const item of other.keys()) {
        if (!(this.has(item))) { r.add(item); }
      }
      return r;
    }
  });
}

/* Set.prototype.isSubsetOf(<other>); */
if (!("isSubsetOf" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "isSubsetOf", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      if (this.size > other.size) { return false; }
      for (const item of this.keys()) {
        if (!(other.has(item))) { return false; }
      }
      return true;
    }
  });
}

/* Set.prototype.isSupersetOf(<other>); */
if (!("isSupersetOf" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "isSupersetOf", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      if (other.size > this.size) { return false; }
      for (const item of other.keys()) {
        if (!(this.has(item))) { return false; }
      }
      return true;
    }
  });
}

/* Set.prototype.isDisjointFrom(<other>); */
if (!("isDisjointFrom" in Set.prototype)) {
  Object.defineProperty(Set.prototype, "isDisjointFrom", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (other) {
      if (this.size === 0 && other.size === 0) { return false; }
      for (const item of this.keys()) {
        if (other.has(item)) { return false; }
      }
      for (const item of other.keys()) {
        if (this.has(item)) { return false; }
      }
      return true;
    }
  });
}


var setA  = new Set([1,2,3,4]);
var setA2 = new Set([1,2,3,4]);
var setB  = new Set([3,4,5,6]);
var setAX = new Set([1,2]);
var setBX = new Set([5,6]);

console.log(setA.intersection(setB));  // 3,4
console.log(setA.intersection(setBX)); // empty
console.log(setA.union(setB)); // 1,2,3,4,5,6
console.log(setA.union(setAX)); // 1,2,3,4
console.log(setA.difference(setB)); // 1,2
console.log(setA.difference(setBX)); // 1,2,3,4
console.log(setA.difference(new Set())); // 1,2,3,4
console.log(setA.symmetricDifference(setB)); // 1,2,5,6
console.log(setA.symmetricDifference(setAX)); // 3,4
console.log(setAX.isSubsetOf(setA)); // true
console.log(setBX.isSubsetOf(setA)); // false
console.log(setA.isSubsetOf(setB));  // false
console.log(setA.isSupersetOf(setAX)); // true
console.log(setA.isSupersetOf(setBX)); // false
console.log(setB.isSupersetOf(setA));  // false
console.log(setA.isDisjointFrom(setBX)); // true
console.log(setA.isDisjointFrom(setA2)); // false
console.log(new Set().isDisjointFrom(new Set())); // false
// https://github.com/js-choi/proposal-function-un-this

if (!("unThis" in Function.prototype)) {
  Object.defineProperty(Function.prototype, "unThis", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function () { return Function.prototype.call.bind(this); }
  });
}

var slice = Array.prototype.slice.unThis();
console.log( slice({"length": 3, 0: "a", 1: "b", 2: "c"}) );
// Array(3) [ "a", "b", "c" ]

In Celestra v5.4.4:

/* unBind(<function>): function */
const unBind = (fn) => Function.prototype.call.bind(fn);
// https://github.com/tc39-transfer/proposal-array-filtering
// https://tc39.es/proposal-array-filtering/

if (!("filterReject" in Array.prototype)) {
  Object.defineProperty(Array.prototype, "filterReject", {
    "configurable": true, "writable": true, "enumerable": false,
    "value": function (fn, thisArg) {
      "use strict";
      function toArray (O) { return (Array.isArray(O) ? O : Array.from(O)); }
      return toArray(this).filter(
        function (v,i,t) { return !(fn.call(thisArg,v,i,t)); }
      );
    }
  });
}


/* testcases */

var arrFilterReject = [4,9,5,8,6,7];
const fnFilterReject = (v) => v >= 6;

console.log( arrFilterReject.filter(fnFilterReject) );
// Array(3) [ 9, 8, 6, 7 ]

console.log( arrFilterReject.filterReject(fnFilterReject) );
// Array(2) [4, 5]
console.log( Array.prototype.filterReject.call(arrFilterReject, fnFilterReject) );
// Array(2) [4, 5]

console.log( Array.prototype.filterReject.call({"length":3, 0:5, 1:6, 2:7}, fnFilterReject) );
// Array [ 5 ]
if (!("uniqueBy" in Array.prototype)) {
  Object.defineProperty(Array.prototype, "uniqueBy", {
    "configurable": true, "writable": true, "enumerable": false,
    value: function (fn) {
      if (fn == null) { return [...new Set(this)]; }
      const key = typeof fn !== "function" && fn, map = new Map();
      fn = key
        ? (item) => {
            var iKey;
            return (iKey = item === null
              || item === void 0 ? void 0 : item[key]) !== null
              && iKey !== void 0 ? iKey : item;
          }
        : fn;
      for (const item of this) {
        const key = fn(item);
        if (!map.has(key)) { map.set(key, item); }
      }
      return [...map.values()];
    }
  });
}

console.log([1, 2, 3, 3, 2, 1].uniqueBy());
// Array(3) [ 1, 2, 3 ]

const data = [
    { id: 1, uid: 10000 },
    { id: 2, uid: 10000 },
    { id: 3, uid: 10001 }
];

console.log(data.uniqueBy("uid"));
/*
Array [ {รขโ‚ฌยฆ}, {รขโ‚ฌยฆ} ]
0: Object { id: 1, uid: 10000 }
1: Object { id: 3, uid: 10001 }
length: 2
<prototype>: Array []
*/

console.log(data.uniqueBy(({ id, uid }) => `${id}-${uid}`));
/*
Array(3) [ {รขโ‚ฌยฆ}, {รขโ‚ฌยฆ}, {รขโ‚ฌยฆ} ]
0: Object { id: 1, uid: 10000 }
1: Object { id: 2, uid: 10000 }
2: Object { id: 3, uid: 10001 }
length: 3
<prototype>: Array []
*/
function isSameArray (a, b) {
  if (Array.isArray(a) && Array.isArray(b) && a.length === b.length) {
    for (var i = 0, l = a.length; i < l; i++) {
      if (a[i] !== b[i]) { return false; }
    }
    return true;
  }
  return false;
}
/* Map.from(); */
(!Map.from&&(Map.from=(o)=>new Map(Array.from(o))));
/* Map.of(); */
(!Map.of&&(Map.of=(...a)=>new Map(a)));
/* Set.from(); */
(!Set.from&&(Set.from=(o)=>new Set(Array.from(o))));
/* Set.of(); */
(!Set.of&&(Set.of=(...a)=>new Set(a)));

console.log(Set.from([4,5,6,7,4,5,2]));
// Set(5) [ 4, 5, 6, 7, 2 ]
console.log(Set.of(4,5,6,7,4,5,2));
// Set(5) [ 4, 5, 6, 7, 2 ]

console.log(Map.from([[4,5],[6,7],[3,4],[5,2]]));
// Map(4) { 4 โ†’ 5, 6 โ†’ 7, 3 โ†’ 4, 5 โ†’ 2 }
console.log(Map.of([4,5],[6,7],[3,4],[5,2]));
// Map(4) { 4 โ†’ 5, 6 โ†’ 7, 3 โ†’ 4, 5 โ†’ 2 }
/*
If n is NaN, the result is false.
If n is -0, the result is true.
If n is negative, the result is true.
Otherwise, the result is false.
*/
if (!Math.signbit) {
  Math.signbit = function (v) {
    return (((v = +v) !== v) ? !1 : ((v < 0) || Object.is(v, -0)));
  };
}

console.log("str       - " + Math.signbit("str") );
console.log("\"5\"       - " + Math.signbit("5") );
console.log("\"-5\"      - " + Math.signbit("-5") );
console.log("\"4.2\"     - " + Math.signbit("4.2") );
console.log("\"-4.2\"    - " + Math.signbit("-4.2") );
console.log("-3.14     - " + Math.signbit(-3.14) );
console.log("3.14      - " + Math.signbit(3.14) );
console.log("-1        - " + Math.signbit(-1) );
console.log("1         - " + Math.signbit(1) );
console.log("0         - " + Math.signbit(0) );
console.log("-0        - " + Math.signbit(-0) );
console.log("+0        - " + Math.signbit(+0) );
console.log("Infinity  - " + Math.signbit(Infinity) );
console.log("-Infinity - " + Math.signbit(-Infinity) );
console.log("+Infinity - " + Math.signbit(+Infinity) );

/*
str       - false - ok
"5"       - false - ok
"-5"      - true  - ok
"4.2"     - false - ok
"-4.2"    - true  - ok 
-3.14     - true  - ok
3.14      - false - ok
-1        - true  - ok
1         - false - ok
0         - false - ok
-0        - true  - ok
+0        - false - ok
Infinity  - false - ok
-Infinity - true  - ok
+Infinity - false - ok
*/
Array.from(stringVar, (v, i) => [i, v.codePointAt(0)]).values();
// or
[...stringVar].map((v, i) => [i, v.codePointAt(0)]).values();

-> check again, Stage 1, no MDN docs

if (!String.prototype.codePoints) {
  String.prototype.codePoints = function* () {
    let i = 0;
    for (let ch of this) { yield [i++, ch.codePointAt(0)]; }
  };
}

var icons = "ab01โ˜ƒโ˜…โ™ฒcd23";
[...icons.codePoints()];
/*
Array(11)
0: Array [ 0, 97 ]
โ€‹1: Array [ 1, 98 ]
โ€‹2: Array [ 2, 48 ]
โ€‹3: Array [ 3, 49 ]
โ€‹4: Array [ 4, 9731 ]
โ€‹5: Array [ 5, 9733 ]
โ€‹6: Array [ 6, 9842 ]
โ€‹7: Array [ 7, 99 ]
โ€‹8: Array [ 8, 100 ]
โ€‹9: Array [ 9, 50 ]
โ€‹10: Array [ 10, 51 ]
โ€‹length: 11
*/
if (!Math.imulh) {
  Math.imulh = function imulh(u, v) {
    var u0 = u & 0xFFFF, u1 = u >> 16;
    var v0 = v & 0xFFFF, v1 = v >> 16;
    var w0 = u0 * v0;
    var t = ((u1 * v0) >>> 0) + (w0 >>> 16);
    var w1 = t & 0xFFFF;
    var w2 = t >> 16;
    w1 = ((u0 * v1) >>> 0) + w1;
    return u1 * v1 + w2 + (w1 >> 16);
  };
}

if (!Math.umulh) {
  Math.umulh = function umulh (u, v) {
    var u0 = u & 0xFFFF, u1 = u >>> 16;
    var v0 = v & 0xFFFF, v1 = v >>> 16;
    var w0 = u0 * v0;
    var t = ((u1 * v0) >>> 0) + (w0 >>> 16);
    var w1 = t & 0xFFFF;
    var w2 = t >>> 16;
    w1 = ((u0 * v1) >>> 0) + w1;
    return u1 * v1 + w2 + (w1 >>> 16);
  };
}

if (!Math.iaddh) {
  Math.iaddh = function iaddh (x0, x1, y0, y1) {
    x0 = x0 >>> 0; x1 = x1 >>> 0; y0 = y0 >>> 0; y1 = y1 >>> 0;
    var z0 = (x0 + y0) >>> 0;
    var c = ((x0 & y0) | (x0 | y0) & ~z0) >>> 31;
    var z1 = x1 + y1 + c;
    return z1 | 0;
  };
}

if (!Math.isubh) {
  Math.isubh = function isubh (x0, x1, y0, y1) {
    x0 = x0 >>> 0; x1 = x1 >>> 0; y0 = y0 >>> 0; y1 = y1 >>> 0;
    var z0 = (x0 - y0) >>> 0;
    var b = ((~x0 & y0) | (~(x0 ^ y0) & z0)) >>> 31;
    var z1 = x1 - y1 - b;
    return z1 | 0;
  };
}

Completed changes

https://github.com/Serrin/Celestra/issues

https://github.com/Serrin/Celestra/issues?q=is%3Aissue+is%3Aclosed

includes(<collection>,<value>);
contains(<collection>,<value>);
find(<collection>,<callback>);
findLast(<collection>,<callback>);
every(<collection>,<callback>);
some(<collection>,<callback>);
none(<collection>,<callback>);
join(<collection>[,separator=","]);
  • 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:

forOf(<collection>,<callback>);
mapOf(<collection>,<callback>);
sizeOf(<collection>);
filterOf(<collection>,<callback>);
hasOf(<collection>,<value>);
findOf(<collection>,<callback>);
everyOf(<collection>,<callback>);
someOf(<collection>,<callback>);
noneOf(<collection>,<callback>);
firstOf(<collection>);
lastOf(<collection>);
sliceOf(<collection>[,begin[,end]]);
reverseOf(<collection>);
sortOf(<collection>);
reduceOf(<collection>,<callback>[,initialvalue]);
concatOf(<collection1>[,collectionN]);
flatOf(<collection>);
enumerateOf(<collection>);
joinOf(<collection>[,separator=","]);
takeOf(<collection>[,n]);
dropOf(<collection>[,n]);

=> Function changes:

item(<collection>,<index>)
  -> remove

itemOf(<collection>,<index>);
  -> rename to item();
  • 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(); 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 - 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

const arrayLastIndex = (a) =>
  (Array.isArray(a) ? (a.length > 0 ? a.length - 1 : 0) : null);

const arrayLastIndex=(a)=>(Array.isArray(a)?(a.length>0?a.length-1:0):null);

console.log(arrayLastIndex([]) + " - 0");
// 0 - 0
console.log(arrayLastIndex([4,5,6]) + " - 2");
// 2 - 2
console.log(arrayLastIndex(new Set([4,5,6])) + " - null");
// null - null
// test passed
// https://github.com/tc39/proposal-array-last

Object.defineProperty(Array.prototype, "lastItem", {
  enumerable: false,
  configurable: false,
  get () {
    var O = Object(this);
    var len = O.length > 0 ? parseInt(O.length) : 0;
    if (len === 0) {
      return undefined;
    } else if (len > 0) {
      return O[String(len - 1)];
    }
  },
  set (value) {
    var O = Object(this);
    var len = O.length > 0 ? parseInt(O.length) : 0;
    return O[String(len > 0 ? len - 1 : len)] = value;
  }
});
Object.defineProperty(Array.prototype, "lastIndex", {
  enumerable: false,
  configurable: false,
  get () {
    var O = Object(this);
    var len = O.length > 0 ? parseInt(O.length) : 0;
    return len > 0 ? len - 1 : 0;
  }
});


var a1 = [4,5,6,7,8];
console.log(a1.lastItem); // 8
a1.lastItem = 9;
console.log(a1.lastItem); // 9
console.log(a1.lastIndex); // 4

a1 = [];
console.log(a1.lastItem); // undefined
console.log(a1.lastIndex); // 0
a1.lastItem = 3;
console.log(a1.lastIndex); // 0;
console.log(a1.lastItem); // 3
a1.push(10);
console.log(a1.lastIndex); // 1
console.log(a1.lastItem); // 10
// https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/replaceChildren

var x = 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>" elements
x.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>

ASCII logos


http://patorjk.com/software/taag/#p=display&f=Bulbhead&t=Celestra%202.0

bulbhead


(31357|24


  _  ___  __  ___  ___  ___ /\ ___   __  
 / )(__ )/  )(__ )| __)(__ )||(__ \ /. | 
( (  (_ \ )(  (_ \|__ \ / / || / _/(_  _)
 \_)(___/(__)(___/(___/(_/  \/(____) (_) 



  _  ___  __  ___  ___  ___    ___   __  
 / )(__ )/  )(__ )| __)(__ )||(__ \ /. | 
( (  (_ \ )(  (_ \|__ \ / / || / _/(_  _)
 \_)(___/(__)(___/(___/(_/  ||(____) (_) 



  ___  ____  __    ____  ___  ____  ____    __   
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\  
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\ 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)


  ___  ____  __    ____  ___  ____  ____    __      __    _  _ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    /  )  ( \/ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )(    )  ( 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (__)()(_/\_)


  ___  ____  __    ____  ___  ____  ____    __      __ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    /  )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )( 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (__)


  ___  ____  __    ____  ___  ____  ____    __      ___     ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ \   / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    / _/  ( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (____)()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    / _/ 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (____)


  ___  ____  __    ____  ___  ____  ____    __      ___     __ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ \   /  )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    / _/    )( 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (____)()(__)


  ___  ____  __    ____  ___  ____  ____    __      ___     __    ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ \   /  )  / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    / _/    )(  ( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (____)()(__)()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___    ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ )  / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    (_ \ ( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (___/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    (_ \
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (___/


  ___  ____  __    ____  ___  ____  ____    __       __    ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\     /. |  / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   (_  _)( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)    (_)()\___/ 


  ___  ____  __    ____  ___  ____  ____    __       __  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\     /. | 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   (_  _)
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)    (_) 

 
  ___  ____  __    ____  ___  ____  ____    __      ___    ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    | __)  / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   |__ \ ( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (___/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    | __)
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   |__ \
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (___/


  ___  ____  __    ____  ___  ____  ____    __       _     ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\     / )   / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   / _ \ ( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  \___/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __       _  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\     / ) 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   / _ \
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  \___/


  ___  ____  __    ____  ___  ____  ____    __      ___  ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ )/ _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    / /( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (_/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    (__ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    / / 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (_/  


  ___  ____  __    ____  ___  ____  ____    __      ___    ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( _ )  / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   / _ \ ( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  \___/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( _ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   / _ \
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  \___/


  ___  ____  __    ____  ___  ____  ____    __      ___   ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    / _ \ / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   \_  /( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)   (_/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      ___ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    / _ \
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\   \_  /
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)   (_/ 


  ___  ____  __    ____  ___  ____  ____    __      __  ___    ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    /  )/ _ \  / _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )(( (_) )( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (__)\___/()\___/ 


  ___  ____  __    ____  ___  ____  ____    __      __  ___  
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    /  )/ _ \ 
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )(( (_) )
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (__)\___/ 
 
 
  ___  ____  __    ____  ___  ____  ____    __    _  _ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\  ( \/ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\  )  ( 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)(_/\_)


  ___  ____  __    ____  ___  ____  ____    __      _  _ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( \/ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )  ( 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (_/\_)


  ___  ____  __    ____  ___  ____  ____    __      _  _ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( \/ )
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )  ( 
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)()(_/\_)


  ___  ____  __    ____  ___  ____  ____    __      _  _  ____  _  _  ____ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( \( )( ___)( \/ )(_  _)
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )  (  )__)  )  (   )(  
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (_)\_)(____)(_/\_) (__) 


  ___  ____  __    ____  ___  ____  ____    __      _  _  ____  _  _  ____ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( \( )( ___)( \/ )(_  _)
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )  (  )__)  )  (   )(  
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)()(_)\_)(____)(_/\_) (__) 


  ___  ____  __    ____  ___  ____  ____    __      _  _  _  _  ____ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( \( )( \/ )(_  _)
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )  (  )  (   )(  
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)  (_)\_)(_/\_) (__) 


  ___  ____  __    ____  ___  ____  ____    __      _  _  _  _  ____ 
 / __)( ___)(  )  ( ___)/ __)(_  _)(  _ \  /__\    ( \( )( \/ )(_  _)
( (__  )__)  )(__  )__) \__ \  )(   )   / /(__)\    )  (  )  (   )(  
 \___)(____)(____)(____)(___/ (__) (_)\_)(__)(__)()(_)\_)(_/\_) (__) 


  __  ___   ___   __   ___   _   ___  ___  ___   ___  
 /  )(__ \ (__ ) /. | | __) / ) (__ )( _ )/ _ \ / _ \ 
  )(  / _/  (_ \(_  _)|__ \/ _ \ / / / _ \\_  /( (_) )
 (__)(____)(___/  (_) (___/\___/(_/  \___/ (_/  \___/ 


  __    ___     ___     __     ___ 
 /  )  (__ \   (__ )   /. |   | __)
  )(    / _/    (_ \  (_  _)  |__ \
 (__)  (____)  (___/    (_)   (___/
  _     ___    ___    ___     ___  
 / )   (__ )  ( _ )  / _ \   / _ \ 
/ _ \   / /   / _ \  \_  /  ( (_) )
\___/  (_/    \___/   (_/    \___/ 

 
 ____   __   ____  _   _  ____  ____  _  _  ____  ____  ____ 
(  _ \ /__\ (_  _)( )_( )( ___)(_  _)( \( )(  _ \( ___)(  _ \
 )___//(__)\  )(   ) _ (  )__)  _)(_  )  (  )(_) ))__)  )   /
(__) (__)(__)(__) (_) (_)(__)  (____)(_)\_)(____/(____)(_)\_)
 
 
  ___  _____  ____  ____ 
 / __)(  _  )(  _ \( ___)
( (__  )(_)(  )(_) ))__) 
 \___)(_____)(____/(____)


Test strings

// ASCII = 
"\t\n\r  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
//127  7F  01111111  DEL  delete  &#127;

// ANSI
"\t\n\r  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~โ‚ฌโ€šฦ’โ€žโ€ฆโ€ โ€กห†โ€ฐล โ€นล’ลฝโ€˜โ€™โ€œโ€โ€ขโ€“โ€”หœโ„ขลกโ€บล“ลพลธ ยกยขยฃยคยฅยฆยงยจยฉยชยซยฌยญยฎยฏยฐยฑยฒยณยดยตยถยทยธยนยบยปยผยฝยพยฟร€รร‚รƒร„ร…ร†ร‡รˆร‰รŠร‹รŒรรŽรรร‘ร’ร“ร”ร•ร–ร—ร˜ร™รšร›รœรรžรŸร รกรขรฃรครฅรฆรงรจรฉรชรซรฌรญรฎรฏรฐรฑรฒรณรดรตรถรทรธรนรบรปรผรฝรพรฟ"

// combined
"\t\n\r  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~โ‚ฌโ€šฦ’โ€žโ€ฆโ€ โ€กห†โ€ฐล โ€นล’ลฝโ€˜โ€™โ€œโ€โ€ขโ€“โ€”หœโ„ขลกโ€บล“ลพลธ ยกยขยฃยคยฅยฆยงยจยฉยชยซยฌยญยฎยฏยฐยฑยฒยณยดยตยถยทยธยนยบยปยผยฝยพยฟร€รร‚รƒร„ร…ร†ร‡รˆร‰รŠร‹รŒรรŽรรร‘ร’ร“ร”ร•ร–ร—ร˜ร™รšร›รœรรžรŸร รกรขรฃรครฅรฆรงรจรฉรชรซรฌรญรฎรฏรฐรฑรฒรณรดรตรถรทรธรนรบรปรผรฝรพรฟ &#60;&#62; โœ“ล‚ลห˜ห›รทห™ห‡ \\ \/ รกrvรญztลฑrล‘ tรผkรถrfรบrรณgรฉp รRVรZTลฐRล TรœKร–RFรšRร“Gร‰P"

// unicode 
"\t\n\r  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~โ‚ฌโ€šฦ’โ€žโ€ฆโ€ โ€กห†โ€ฐล โ€นล’ลฝโ€˜โ€™โ€œโ€โ€ขโ€“โ€”หœโ„ขลกโ€บล“ลพลธ ยกยขยฃยคยฅยฆยงยจยฉยชยซยฌยญยฎยฏยฐยฑยฒยณยดยตยถยทยธยนยบยปยผยฝยพยฟร€รร‚รƒร„ร…ร†ร‡รˆร‰รŠร‹รŒรรŽรรร‘ร’ร“ร”ร•ร–ร—ร˜ร™รšร›รœรรžรŸร รกรขรฃรครฅรฆรงรจรฉรชรซรฌรญรฎรฏรฐรฑรฒรณรดรตรถรทรธรนรบรปรผรฝรพรฟ &#60;&#62; โœ“ล‚ลห˜ห›รทห™ห‡ \\ \/ รกrvรญztลฑrล‘ tรผkรถrfรบrรณgรฉp รRVรZTลฐRล TรœKร–RFรšRร“Gร‰P \uD834\uDF06 \u00E0\u00E8\u00EC\u00F2\u00F9"

// Blade Runner
"I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhรคuser Gate. All those moments will be lost in time, like tears in rain. Time to die."

// lorem ipsum short 
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium."

// lorem ipsum medium
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci."

// lorem ipsum long
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis. Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero. Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In dui magna, posuere eget, vestibulum et, tempor auctor, justo. In ac felis quis tortor malesuada pretium. Pellentesque auctor neque nec urna. Proin sapien ipsum, porta a, auctor quis, euismod ut, mi. Aenean viverra rhoncus pede. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut non enim eleifend felis pretium feugiat. Vivamus quis mi. Phasellus a est. Phasellus magna. In hac habitasse platea dictumst. Curabitur at lacus ac velit ornare lobortis. Curabitur a felis in nunc fringilla tristique. Morbi mattis ullamcorper velit. Phasellus gravida semper nisi. Nullam vel sem. Pellentesque libero tortor, tincidunt et, tincidunt eget, semper nec, quam. Sed hendrerit. Morbi ac felis. Nunc egestas, augue at pellentesque laoreet, felis eros vehicula leo, at malesuada velit leo quis pede. Donec interdum, metus et hendrerit aliquet, dolor diam sagittis ligula, eget egestas libero turpis vel mi. Nunc nulla. Fusce risus nisl, viverra et, tempor et, pretium in, sapien. Donec venenatis vulputate lorem. Morbi nec metus. Phasellus blandit leo ut odio. Maecenas ullamcorper, dui et placerat feugiat, eros pede varius nisi, condimentum viverra felis nunc et lorem. Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. In auctor lobortis lacus. Quisque libero metus, condimentum nec, tempor a, commodo mollis, magna. Vestibulum ullamcorper mauris at ligula. Fusce fermentum. Nullam cursus lacinia erat. Praesent blandit laoreet nibh. Fusce convallis metus id felis luctus adipiscing. Pellentesque egestas, neque sit amet convallis pulvinar, justo nulla eleifend augue, ac auctor orci leo non est. Quisque id mi. Ut tincidunt tincidunt erat. Etiam feugiat lorem non metus. Vestibulum dapibus nunc ac augue. Curabitur vestibulum aliquam leo. Praesent egestas neque eu enim. In hac habitasse platea dictumst. Fusce a quam. Etiam ut purus mattis mauris sodales aliquam. Curabitur nisi. Quisque malesuada placerat nisl. Nam ipsum risus, rutrum vitae, vestibulum eu, molestie vel, lacus. Sed augue ipsum, egestas nec, vestibulum et, malesuada adipiscing, dui. Vestibulum facilisis, purus nec pulvinar iaculis, ligula mi congue nunc, vitae euismod ligula urna in dolor. Mauris sollicitudin fermentum libero. Praesent nonummy mi in odio. Nunc interdum lacus sit amet orci. Vestibulum rutrum, mi nec elementum vehicula, eros quam gravida nisl, id fringilla neque ante vel mi. Morbi mollis tellus ac sapien. Phasellus volutpat, metus eget egestas mollis, lacus lacus blandit dui, id egestas quam mauris ut lacus. Fusce vel dui. Sed in libero ut nibh placerat accumsan. Proin faucibus arcu quis ante. In consectetuer turpis ut velit. Nulla sit amet est. Praesent metus tellus, elementum eu, semper a, adipiscing nec, purus. Cras risus ipsum, faucibus ut, ullamcorper id, varius ac, leo. Suspendisse feugiat. Suspendisse enim turpis, dictum sed, iaculis a, condimentum nec, nisi. Praesent nec nisl a purus blandit viverra. Praesent ac massa at ligula laoreet iaculis. Nulla neque dolor, sagittis eget, iaculis quis, molestie non, velit. Mauris turpis nunc, blandit et, volutpat molestie, porta ut, ligula. Fusce pharetra convallis urna. Quisque ut nisi. Donec mi odio, faucibus at, scelerisque quis."

Dropped proposals

"use strict";

/*
https://github.com/DavidBruant/Map-Set.prototype.toJSON
This proposal was brought before the committee in the March 2016 meeting, and thoroughly rejected.

https://github.com/DavidBruant/Map-Set.prototype.toJSON/issues/16
In 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.
*/
// V0
Map.prototype.toJSON = function toJSON() {
  return [...Map.prototype.entries.call(this)];
}
Set.prototype.toJSON = function toJSON() {
  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-compatible

if (!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) { var f = 0; } return (this.indexOf(v,f) > -1); }
  );
}
if (!String.prototype.contains) {
  String.prototype.contains = (
    String.prototype.includes ||
    function (v, f) { if (!f) { var f = 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) { return this.querySelector(s); };
    }
    if (!p.queryAll) {
      p.queryAll = function (s) {
        return Array.prototype.slice.call(this.querySelectorAll(s));
      };
    }
    if (!p.find) {
      p.find = function (s) { return this.querySelector(s); };
    }
    if (!p.findAll) {
      p.findAll = function (s) {
        return Array.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)) {
      throw new TypeError("pushAll error: Argument must be an array.");
    }
    //this.push.apply(this, items);
    var t = this;
    items.forEach(function (e) { t.push(e); });
    return this;
  };
}
// or
let arr1 = [0, 1, 2];
let arr2 = [3, 4, 5];
let arr3 = [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!)
var arrayMerge = Function.prototype.apply.bind(Array.prototype.push);
let arr1 = [0, 1, 2];
let arr2 = [3, 4, 5];
let arr3 = [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);
    return Array.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/back
if (!window.back) { window.back = function () { window.history.back(); }; }
// https://developer.mozilla.org/en-US/docs/Web/API/Window/forward
if (!window.forward) { window.forward=function() { window.history.forward(); };}


/*
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/quote

The 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 โ€” 37
if (!String.prototype.quote) {
  String.prototype.quote = function () { return JSON.stringify(this); };
}


/*
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/count

http://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 โ€” 32
if (!Object.prototype.__count__) {
  Object.defineProperty(Object.prototype, "__count__", {
    configurable: true,
    get: function () { return Object.keys(this).length; }
  });
}


/*
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toInteger

Number.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);     // 0
Number.toInteger(1);       // 1
Number.toInteger(Math.PI); // 3
Number.toInteger(null);    // 0
*/
//if (!Number.toInteger) { Number.toInteger = parseInt; }
if (!Number.toInteger) {
  Number.toInteger = function (v) { return parseInt(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-58
if (!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()); // false
console.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 broken
if ('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) {
    return function(start, length) {
      // call the original method
      return substr.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 value
        start < 0 ? this.length + start : start,
        length)
    }
  }(String.prototype.substr);
}

// my real polyfill:
if (!String.prototype.substr) {
  String.prototype.substr = function (start, length) {
    var start2 = start < 0 ? this.length + start : start;
    if (start2 < 0) { start2 = 0; }
    if (length !== undefined) {
      return this.slice(start2, start2 + length);
    } else {
      return this.slice(start2);
    }
  };
}


// https://github.com/tc39/proposal-array-last

Object.defineProperty(Array.prototype, "lastItem", {
  enumerable: false,
  configurable: false,
  get () {
    var O = Object(this);
    var len = O.length > 0 ? parseInt(O.length) : 0;
    if (len === 0) {
      return undefined;
    } else if (len > 0) {
      return O[String(len - 1)];
    }
  },
  set (value) {
    var O = Object(this);
    var len = O.length > 0 ? parseInt(O.length) : 0;
    return O[String(len > 0 ? len - 1 : len)] = value;
  }
});
Object.defineProperty(Array.prototype, "lastIndex", {
  enumerable: false,
  configurable: false,
  get () {
    var O = Object(this);
    var len = O.length > 0 ? parseInt(O.length) : 0;
    return len > 0 ? len - 1 : 0;
  }
});

var a1 = [4,5,6,7,8];
console.log(a1.lastItem); // 8
a1.lastItem = 9;
console.log(a1.lastItem); // 9
console.log(a1.lastIndex); // 4
a1 = [];
console.log(a1.lastItem); // undefined
console.log(a1.lastIndex); // 0
a1.lastItem = 3;
console.log(a1.lastIndex); // 0;
console.log(a1.lastItem); // 3
a1.push(10);
console.log(a1.lastIndex); // 1
console.log(a1.lastItem); // 10


// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSource

if (!Array.prototype.toSource) {
  Array.prototype.toSource = function () { return JSON.stringify(this); };
}


/*
Mozilla String generic methods polyfill
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics
*/
(function() {
  "use strict";
  var m = [
    "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) {
    var fn = String.prototype[n];
    String[n] = function (a1) {
      return fn.apply(""+a1, Array.prototype.slice.call(arguments, 1));
    };
  });
}());
// minified:
(function(){"use strict";var m=["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){var fn=String.prototype[n];String[n]=function(a1){return fn.apply(""+a1,Array.prototype.slice.call(arguments,1));};});}());
//console.log( String.slice("asasdsaads", 2, 8) );
// -> "asdsaa" OK


/*
Mozilla Array generic methods polyfill
https://bugzilla.mozilla.org/show_bug.cgi?id=1222547
*/
(function() {
  "use strict";
  var m = [
    "concat", "every", "filter", "forEach", "indexOf", "join",
    "lastIndexOf", "pop", "push", "reduce", "reduceRight", "reverse",
    "shift", "slice", "some", "sort", "splice", "unshift"
  ].forEach(function (n) {
    var fn = Array.prototype[n];
    Array[n] = function (a1) {
      return fn.apply(a1, Array.prototype.slice.call(arguments, 1));
    };
  });
}());
// minified:
(function(){"use strict";var m=["concat","every","filter","forEach","indexOf","join","lastIndexOf","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","unshift"].forEach(function(n){var fn=Array.prototype[n];Array[n]=function(a1){return fn.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

Celestra v5.0.0 Defiant

Celestra v5.0.0 Defiant

  1. Documentation and pdf fixes.

  2. Remove many manual testcases in the celestra.html

  3. Close the milestone 5.0.0 Defiant

  4. Replace the short object name _ with a new short name CEL in these files:

  • btc.app.html
  • celestra.html
  • celestra.js
  • celestra.min.js
  • celestra-cheatsheet.odt
  • celestra-cheatsheet.pdf
  • celestra-demo-plugin.html
  • README.md
  • testgame.html
  • unittest.html
  • unittest.js
  1. CUT v0.8.23
  • only fixes

Celestra v4.5.2

  1. Documentation and pdf fixes.

  2. Add v5.0.0 new short object name info in the celestra.html and readme.md.

  3. Add this function: randomID([hyphens=false]);

  4. Fix or replace these functions:

Function Fix
isEmptyObject(<value>); new ES6+ syntax
popIn(<object>,<property>); use the Object.hasOwn();
groupBy(<collection>,<callback>); use the Object.hasOwn();
extend([deep,]<target>,<source1>[,srcN]); use the Object.hasOwn();
deepAssign(<target>,<source1>[,srcN]); use the Object.hasOwn();
strCapitalize(<string>); add length check
strUpFirst(<string>); add length check
strDownFirst(<string>); add length check
  1. Add these functions in the Demo Plugin:
  • product(<value1>[,valueN]);
  • clamp(<value>,<min>,<max>);
  1. CUT v0.8.22
  • Rename the celTest object to CUT in the unittest.js
  • Remove the _cut alias of the CUT object to in the unittest.js
  • Add these buttons in fixed positions: goto top and goto bottom
  • Add Debug Console in the unittest.html

Celestra v4.5.1

  1. Documentation and pdf fixes.

  2. Add these functions:

  • arrayRemoveBy(<array>,<callback>[,all=false]);
  • inRange(<value>,<min>,<max>);
  • zipObj(<collection1>,<collection2>);
  • isPlainObject(<value>);
  1. Fix these functions and polyfills:
Function Fix
takeRightWhile(<collection>,<callback>); fix the counter
dropRightWhile(<collection>,<callback>); fix the counter
clearCookies(); iterate over only the own property keys
Array.prototype.findLast(<callback>); only documentation
Array.prototype.findLastIndex(<callback>); only documentation
TypedArray.prototype.findLast(<callback>); only documentation
TypedArray.prototype.findLastIndex(<callback>); only documentation
Array.prototype.at(<index>); only documentation
TypedArray.prototype.at(<index>); only documentation
String.prototype.at(<index>); only documentation
Object.hasOwn(<object>,<property>); only documentation
  1. Replace these functions with a smaller size version:
isNumeric(<value>):
forIn(<object>,<callback>);
every(<collection>,<callback>);
some(<collection>,<callback>);
none(<collection>,<callback>);
includes(<collection>,<value>);
contains(<collection>,<value>);
find(<collection>,<callback>);
findLast(<collection>,<callback>);
min(<collection>);
max(<collection>);
takeRight(<collection>[,n=1]);
dropRight(<collection>[,n=1]);
arrayAdd(<array>,<value>);
domSetCSS();
  1. CUT v0.8.21
  • Show a message on the page, when a Celestra edition and the unittest.js is loaded.

Celestra v4.5.0

  1. Documentation and pdf fixes.

  2. Fixes in these functions:

Function Fix
arrayRange([start=0[,end=100[,step=1]]]); only documentation
slice(<collection>[,begin=0[,end=Infinity]]); only documentation
sort(<collection>[,numbers=false]); only documentation
arrayMerge([flat=false,]<target>,<source1>[,sourceN]); only documentation
popIn(<object>,<property>); use the Object.prototype.hasOwnProperty.call();
domSetCSS(<element>,<property>,<value>); use the Object.prototype.hasOwnProperty.call();
arrayRange([start=0[,end=100[,step=1]]]); variable names
  1. Add a comment at every function and polyfill in the celestra.js

  2. Add a new function: strPropercase(<string>);

  3. Replace these functions:

Old function New function
importScript(<url>[,success]); importScript(<script1>[,scriptN]);
importStyle(<href>[,success]); importStyle(<style1>[,styleN]);
arrayMerge([flat=false,]<target>,<source1>[,sourceN]); new ES6+ function with same parameters
obj2string(<object>); new ES6+ function with same parameters
filterIn(<object>,<callback>); new ES6+ function with same parameters
  1. Remove these functions:
  • importScripts(<scripts> or <script1>[,scN]);
  • importStyles(<styles> or <style1>[,styleN]);
  1. CUT v0.8.20
  • Add a "reset page" button in the unittest.html

Celestra v4.4.3

  1. Documentation and pdf fixes.

  2. Add a new function: findLast(<collection>,<callback>);

  3. Add an alias: contains(<collection>,<value>); -> includes(<collection>,<value>);

  4. Fix the description of these functions:

arrayRemove(<array>,<value>[,all=false]);
arrayCycle(<collection>[,n=100]);
arrayRepeat(<value>[,n=100]);
iterRange([start=0[,step=1[,end=Infinity]]]);
iterCycle(<iter>[,n=Infinity]);
iterRepeat(<value>[,n=Infinity]);
take(<collection>[,n=1]);
takeRight(<collection>[,n=1]);
drop(<collection>[,n=1]);
dropRight(<collection>[,n=1]);
setUnion(<collection1>[,collectionN]);
randomString([length[,specChar=false]]);
javaHash(<data>[,hexa=false]);
  1. Remove the description of these removed function in celestra.html and readme.md and collect these function names in a new line of the Collections table:
forOf(<collection>,<callback>);
mapOf(<collection>,<callback>);
sizeOf(<collection>);
filterOf(<collection>,<callback>);
hasOf(<collection>,<value>);
findOf(<collection>,<callback>);
everyOf(<collection>,<callback>);
someOf(<collection>,<callback>);
noneOf(<collection>,<callback>);
firstOf(<collection>);
lastOf(<collection>);
sliceOf(<collection>[,begin[,end]]);
reverseOf(<collection>);
sortOf(<collection>);
reduceOf(<collection>,<callback>[,initialvalue]);
concatOf(<collection1>[,collectionN]);
flatOf(<collection>);
enumerateOf(<collection>);
joinOf(<collection>[,separator=","]);
takeOf(<collection>[,n]);
dropOf(<collection>[,n]);
  1. CUT v0.8.19
  • Replace the unittest.dev.html, unittest.min.html and unittest.esm.html files with the unittest.html

Celestra v4.4.2

  1. Documentation and pdf fixes.

  2. u87.css v0.9.19 update 1

  3. Add these functions in the Demo plugin: isEven(<value>);, isOdd(<value>);

  4. Replace the function groupBy(<collection>,<callback>); with a real groupBy function instead of the alias of the partition(<collection>,<callback>);

  5. Amend the description of these functions (stage 3):

  • Array.prototype.findLast(<callback>);
  • Array.prototype.findLastIndex(<callback>);
  • TypedArray.prototype.findLast(<callback>);
  • TypedArray.prototype.findLastIndex(<callback>);
  1. Remove manual testcases (removed polyfills) in the celestra.html:
Object.create();
String.prototype.startsWith();
String.prototype.endsWith();
Object.is();
String.fromCodePoint();
String.prototype.codePointAt();
Array.from();
Array.of();
Array.prototype.fill();
Array.prototype.find();
Array.prototype.findIndex();
Array.prototype.copyWithin();
Number.MIN_SAFE_INTEGER;
Number.MAX_SAFE_INTEGER;
Number.EPSILON;
Number.isNaN();
isNaN();
Number.isInteger();
Number.isFinite();
Number.isSafeInteger();
Number.parseInt();
Number.parseFloat();
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();
Array.prototype.values();
Array.prototype.includes();
String.prototype.includes();
String.prototype.repeat();
String.prototype[Symbol.iterator]();
Object.assign();
Object.entries();
Object.values();
Object.getOwnPropertyDescriptors();
RegExp.prototype.flags;
ChildNode.after();
ChildNode.before();
ChildNode.remove();
ChildNode.replaceWith();
ParentNode.append();
ParentNode.prepend();
Element.prototype.matches();
Element.prototype.closest();
Element.prototype.toggleAttribute();
Element.prototype.getAttributeNames();
window.screenLeft;
window.screenTop;

Celestra v4.4.1

  1. Documentation and pdf fixes.

  2. Replace the file testcors.html with btc.app.html

  3. Move the Non-starndard polyfills into a new section in these files: celestra.js, celestra.min.js, celestra.esm.js

  4. Add this function: reject(<collection>,<callback>);

  5. Add these polyfills:

  • Array.prototype.findLast();
  • Array.prototype.findLastIndex();
  • TypedArray.prototype.findLast();
  • TypedArray.prototype.findLastIndex();
  1. CUT v0.8.18
  • Simplify the testcases of these polyfills: Array.prototype.flat();, Array.prototype.flatMap();
  • Move the Non-starndard polyfills into a new section in the unittest.js
  • Remove unused and commented codes in the unittest.js
  • Rename these files:
old name new name
unittest-gs1.js unittest-is1.js
unittest-gs2.js unittest-is2.js
unittest-gsi.js unittest-is3.js
  • Remove these testcases (removed polyfills) in the unittest.js:
Object.create();
String.prototype.startsWith();
String.prototype.endsWith();
Object.is();
String.fromCodePoint();
String.prototype.codePointAt();
Array.from();
Array.of();
Array.prototype.fill();
Array.prototype.find();
Array.prototype.findIndex();
Array.prototype.copyWithin();
Number.MIN_SAFE_INTEGER;
Number.MAX_SAFE_INTEGER;
Number.EPSILON;
Number.isNaN();
isNaN();
Number.isInteger();
Number.isFinite();
Number.isSafeInteger();
Number.parseInt();
Number.parseFloat();
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();
Array.prototype.values();
Array.prototype.includes();
String.prototype.includes();
String.prototype.repeat();
String.prototype[Symbol.iterator]();
Object.assign();
Object.entries();
Object.values();
Object.getOwnPropertyDescriptors();
RegExp.prototype.flags;
ChildNode.after();
ChildNode.before();
ChildNode.remove();
ChildNode.replaceWith();
ParentNode.append();
ParentNode.prepend();
Element.prototype.matches();
Element.prototype.closest();
Element.prototype.toggleAttribute();
Element.prototype.getAttributeNames();
window.screenLeft;
window.screenTop;

Celestra v5.3.0 Voyager

Celestra v5.3.0 Voyager

  1. Documentation and pdf fixes.

  2. Fixes in the celestra-polyfills.js and celestra-polyfills.min.js

  3. Add a new code section: Abstract functions

  4. Move these functions to the code section Abstract functions:

  • hasIn(<object>,<property>);
  • getIn(<object>,<property>);
  • setIn(<object>,<property>,<value>);
  1. Add these functions in the code section Abstract functions:
  • isPropertyKey(<value>);
  • toPropertyKey(<value>);
  • toObject(<value>);
  • isSameValueZero(<value1>,<value2>);
  • createMethodProperty(<object>,<property>,<value>);
  • type(<value>);
  1. Close the milestone 5.3.0 Voyager

Celestra v5.2.1

  1. Documentation and pdf fixes.

  2. Non breaking changes and fixes in these functions:

Function Fix/Change
b64Decode(<string>); small fixes
b64Encode(<string>); small fixes
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]);
isArraylike(<value>); small fixes
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]);
isPlainObject(<value>); small fixes
isSameIterator(<iter1>,<iter2>); small fixes
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]);
reduce(<collection>,<callback>[,initialvalue]); small fixes
zipObj(<collection1>,<collection2>); Remove the internal call of the zip(<collection1>[,collectionN]);

Celestra v5.2.0

  1. Documentation and pdf fixes.

  2. Add the MDN links at the polyfills in the readme.md.

  3. Fix the function randomID([hyphens=true][,usedate=false]); to generate UUID/GUID v4 values.

  4. Add a second parameter in this function: randomID([hyphens=true][,usedate=false]);

  5. Add a third parameter in this function: getType(<variable>[,type][,throw=false]);

  6. Add this function: forEachRight(<collection>,<callback>);

Celestra v5.1.0

  1. Documentation and pdf fixes.

  2. Remove the deepAssign(<target>,<source1>[,srcN]); function

  3. Rename Demo Plugin to Math Plugin:

  • celestra-demo-plugin.html -> celestra-math.html
  • celestra-demo-plugin.js -> celestra-math.js
  1. Add these functions:
  • getIn(<object>,<property>);
  • setIn(<object>,<property>,<value>);
  • hasIn(<object>,<property>);
  1. Replace these functions:
Old function New function
min(<collection>); min(<value1>[,valueN]);
max(<collection>); max(<value1>[,valueN]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.