FeatureConstructor(...
features):CustomFeature
Creates a new feature object from the union of the specified features.
The constructor can be used with or without the new operator, e.g.
new JScrewIt.Feature(feature1, feature2) or JScrewIt.Feature(feature1, feature2).
If no arguments are specified, the new feature object will be equivalent to
`DEFAULT`.
...FeatureElementOrCompatibleArray[]
The following statements are equivalent, and will all construct a new feature object including both `DOCUMENT` and `WINDOW`.
new JScrewIt.Feature("DOCUMENT", "WINDOW");new JScrewIt.Feature(JScrewIt.Feature.DOCUMENT, JScrewIt.Feature.WINDOW);new JScrewIt.Feature([JScrewIt.Feature.DOCUMENT, JScrewIt.Feature.WINDOW]);An error is thrown if any of the specified features are not mutually compatible.
new FeatureConstructor(...
features):CustomFeature
Creates a new feature object from the union of the specified features.
The constructor can be used with or without the new operator, e.g.
new JScrewIt.Feature(feature1, feature2) or JScrewIt.Feature(feature1, feature2).
If no arguments are specified, the new feature object will be equivalent to
`DEFAULT`.
...FeatureElementOrCompatibleArray[]
The following statements are equivalent, and will all construct a new feature object including both `DOCUMENT` and `WINDOW`.
JScrewIt.Feature("DOCUMENT", "WINDOW");JScrewIt.Feature(JScrewIt.Feature.DOCUMENT, JScrewIt.Feature.WINDOW);JScrewIt.Feature([JScrewIt.Feature.DOCUMENT, JScrewIt.Feature.WINDOW]);An error is thrown if any of the specified features are not mutually compatible.
FeatureAll.constructor
readonlyALL:FeatureAll
An immutable mapping of all predefined feature objects accessed by name or alias.
This will produce an array with the names and aliases of all predefined features.
Object.keys(JScrewIt.Feature.ALL)This will determine if a particular feature object is predefined or not.
featureObj === JScrewIt.Feature.ALL[featureObj.name]ARRAY_ITERATOR:
ElementaryFeature
The property that the string representation of Array.prototype.entries() evaluates to "[object Array Iterator]".
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
ARROW:
ElementaryFeature
Support for arrow functions.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
Existence of the native functions Array.prototype.at and String.prototype.at.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
AUTO:
PredefinedFeature
Features available in the current environment.
BARPROP:
ElementaryFeature
Existence of the global object statusbar having the string representation "[object BarProp]".
Available in Chrome, Edge, Firefox, Safari, and Opera. This feature is not available inside web workers.
BROWSER:
PredefinedFeature
Features available in all browsers.
No support for Node.js.
CAPITAL_HTML:
ElementaryFeature
The property that the various string methods returning HTML code such as String.prototype.big or String.prototype.link have both the tag name and attributes written in capital letters.
Available in Internet Explorer.
CHROME:
PredefinedFeature
Features available in the current stable versions of Chrome, Edge and Opera.
An alias for CHROME_122.
CHROME_122:
PredefinedFeature
Features available in Chrome 122, Edge 122 and Opera 108 or later.
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use CHROME or CHROME_PREV instead of CHROME_122 for long term support.
CHROME_PREV:
PredefinedFeature
Features available in the previous to current versions of Chrome and Edge.
An alias for CHROME_122.
COMPACT:
PredefinedFeature
All new browsers' features.
Not compatible with Node.js, Internet Explorer, and old versions of supported browsers.
CONSOLE:
ElementaryFeature
Existence of the global object console having the string representation "[object Console]".
This feature may become unavailable when certain browser extensions are active.
Available in Internet Explorer.
DEFAULT:
PredefinedFeature
Minimum feature level, compatible with all supported engines in all environments.
DOCUMENT:
ElementaryFeature
Existence of the global object document whose string representation starts with "[object " and ends with "Document]".
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, and Opera. This feature is not available inside web workers.
readonlyELEMENTARY: readonlyElementaryFeature[]
An immutable array of all elementary feature objects ordered by name.
ESC_HTML_QUOT:
ElementaryFeature
The property that double quotation marks in the argument of String.prototype.fontcolor are escaped as """.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
Features available in the current stable version of Firefox.
An alias for FF_134.
FF_131:
PredefinedFeature
Features available in Firefox 131 to 133.
This feature may be replaced or removed in the near future when current browser versions become obsolete.
FF_134:
PredefinedFeature
Features available in Firefox 134 or later.
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use FF or FF_PREV instead of FF_134 for long term support.
FF_90:
PredefinedFeature
Features available in Firefox 90 to 130.
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use FF_ESR instead of FF_90 for long term support.
FF_ESR:
PredefinedFeature
Features available in the current version of Firefox ESR.
An alias for FF_90.
FF_PREV:
PredefinedFeature
Features available in the previous to current version of Firefox.
An alias for FF_134.
FF_SRC:
ElementaryFeature
A string representation of native functions typical for Firefox and Safari.
Remarkable traits are the lack of line feed characters at the beginning and at the end of the string and the presence of a line feed followed by four whitespaces ("\n ") before the "[native code]" sequence.
Available in Firefox and Safari.
FLAT:
ElementaryFeature
Existence of the native function Array.prototype.flat.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
FROM_CODE_POINT:
ElementaryFeature
Existence of the function String.fromCodePoint.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
FUNCTION_19_LF:
ElementaryFeature
A string representation of dynamically generated functions where the character at index 19 is a line feed ("\n").
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
FUNCTION_22_LF:
ElementaryFeature
A string representation of dynamically generated functions where the character at index 22 is a line feed ("\n").
Available in Internet Explorer.
IE_11:
PredefinedFeature
Features available in Internet Explorer 11.
IE_11_WIN_10:
PredefinedFeature
Features available in Internet Explorer 11 on Windows 10.
IE_11_WIN_7:
PredefinedFeature
Features available in Internet Explorer 11 on Windows 7.
IE_11_WIN_8:
PredefinedFeature
Features available in Internet Explorer 11 on Windows 8.
IE_SRC:
ElementaryFeature
A string representation of native functions typical for Internet Explorer.
Remarkable traits are the presence of a line feed character ("\n") at the beginning and at the end of the string and a line feed followed by four whitespaces ("\n ") before the "[native code]" sequence.
Available in Internet Explorer.
INCR_CHAR:
ElementaryFeature
The ability to use unary increment operators with string characters, like in ( ++"some string"[0] ): this will result in a TypeError in strict mode in ECMAScript compliant engines.
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Node.js. This feature is not available when strict mode is enforced in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Node.js.
ITERATOR_HELPER:
ElementaryFeature
Availability of iterator helpers having the string representation "[object Iterator Helper]".
Available in Chrome, Edge, Firefox 131+, Safari 18.4+, Opera, and Node.js 22.0+.
LOCALE_INFINITY:
ElementaryFeature
Language sensitive string representation of Infinity as "∞".
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari, Opera, and Node.js.
LOCALE_NUMERALS_BN:
ElementaryFeature
Localized number formatting for Bengali.
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari before 18.4, Opera, and Node.js.
LOCALE_NUMERALS_EXT:
ElementaryFeature
Extended localized number formatting.
Localized number formatting including the output of the first three letters in the second word of the Arabic string representation of NaN ("رقم"), the letters in the Russian string representation of NaN ("не число") and the letters in the Persian string representation of NaN ("ناعدد").
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari, Opera, and Node.js.
FeatureAll.LOCALE_NUMERALS_EXT
LOCALE_NUMERALS_IE11_WIN7:
ElementaryFeature
Localized number formatting exclusive to Internet Explorer 11 on Windows 7.
Available in Internet Explorer 11 on Windows 7.
FeatureAll.LOCALE_NUMERALS_IE11_WIN7
LOCALE_NUMERALS_IE11_WIN7_8:
ElementaryFeature
Localized number formatting exclusive to Internet Explorer 11 on Windows 7 and 8.
Available in Internet Explorer 11 on Windows 7 and on Windows 8.
FeatureAll.LOCALE_NUMERALS_IE11_WIN7_8
NAME:
ElementaryFeature
Existence of the name property for functions.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
NO_FF_SRC:
ElementaryFeature
A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari.
Available in Chrome, Edge, Internet Explorer, Opera, and Node.js.
NO_IE_SRC:
ElementaryFeature
A string representation of native functions typical for most engines with the notable exception of Internet Explorer.
A remarkable trait of this feature is the lack of line feed characters at the beginning and at the end of the string.
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
NO_V8_SRC:
ElementaryFeature
A string representation of native functions typical for Firefox, Internet Explorer and Safari.
A most remarkable trait of this feature is the presence of a line feed followed by four whitespaces ("\n ") before the "[native code]" sequence.
Available in Firefox, Internet Explorer, and Safari.
NODE_20:
PredefinedFeature
Features available in Node.js 20 to 21.
NODE_22:
PredefinedFeature
Features available in Node.js 22.0 to 22.11 and Node.js 23.0 to 23.2.
NODE_22_12:
PredefinedFeature
Features available in Node.js 22.12 to 22.14 and Node.js 23.3 or later.
OBJECT_ARRAY_ENTRIES_CTOR:
ElementaryFeature
The property that the Array.prototype.entries().constructor is the Object constructor.
Available in Firefox before 131, Safari before 18.4, and Node.js before 22.0.
FeatureAll.OBJECT_ARRAY_ENTRIES_CTOR
OBJECT_W_SELF:
ElementaryFeature
The property that the string representation of the global object self starts with "[object W".
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, and Opera. This feature is not available inside web workers in Chrome, Edge, Firefox, Safari, and Opera.
PLAIN_INTL:
ElementaryFeature
Existence of the global object Intl having the string representation "[object Object]".
Available in Internet Explorer.
REGEXP_STRING_ITERATOR:
ElementaryFeature
The property that the string representation of String.prototype.matchAll() evaluates to "[object RegExp String Iterator]".
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
FeatureAll.REGEXP_STRING_ITERATOR
RUSSIAN_INFINITY:
ElementaryFeature
Russian string representation of Infinity as "∞".
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 8 and on Windows 10, Safari, Opera, and Node.js.
SAFARI:
PredefinedFeature
Features available in the current stable version of Safari.
An alias for SAFARI_18_4.
SAFARI_17_4:
PredefinedFeature
Features available in Safari 17.4 to 17.6.
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use SAFARI_PRE_PREV instead of SAFARI_17_4 for long term support.
SAFARI_18_0:
PredefinedFeature
Features available in Safari 18.0 to 18.3.
This feature may be replaced or removed in the near future when current browser versions become obsolete.
SAFARI_18_4:
PredefinedFeature
Features available in Safari 18.4 or later.
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use SAFARI or SAFARI_PREV instead of SAFARI_18_4 for long term support.
SAFARI_PRE_PREV:
PredefinedFeature
Features available in the previous to previous version of Safari.
An alias for SAFARI_17_4.
SAFARI_PREV:
PredefinedFeature
Features available in the previous to current version of Safari.
An alias for SAFARI_18_4.
SELF:
ElementaryFeature
Existence of the global object self whose string representation starts with "[object ".
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, and Opera.
SHORT_LOCALES:
ElementaryFeature
Support for the two-letter locale name "ar" to format decimal numbers as Arabic numerals.
Available in Firefox before 134, Internet Explorer, Safari before 18.0, and Node.js before 22.12–22.14 and 23.3.
STATUS:
ElementaryFeature
Existence of the global string status.
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, and Opera. This feature is not available inside web workers.
V8_SRC:
ElementaryFeature
A string representation of native functions typical for the V8 engine.
Remarkable traits are the lack of line feed characters at the beginning and at the end of the string and the presence of a single whitespace before the "[native code]" sequence.
Available in Chrome, Edge, Opera, and Node.js.
WINDOW:
ElementaryFeature
Existence of the global object self having the string representation "[object Window]".
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, and Opera. This feature is not available inside web workers.
areCompatible(...
features):boolean
Determines whether the specified features are mutually compatible.
...FeatureElement[]
boolean
true if the specified features are mutually compatible; otherwise, false.
If less than two features are specified, the return value is true.
// false: only one of "V8_SRC" or "IE_SRC" may be available.
JScrewIt.Feature.areCompatible("V8_SRC", "IE_SRC")// true
JScrewIt.Feature.areCompatible(JScrewIt.Feature.DEFAULT, JScrewIt.Feature.FLAT)areEqual(...
features):boolean
Determines whether all of the specified features are equivalent.
Different features are considered equivalent if they include the same set of elementary features, regardless of any other difference.
...FeatureElementOrCompatibleArray[]
boolean
true if all of the specified features are equivalent; otherwise, false.
If less than two arguments are specified, the return value is true.
// false
JScrewIt.Feature.areEqual(JScrewIt.Feature.CHROME, JScrewIt.Feature.FF)// true
JScrewIt.Feature.areEqual("DEFAULT", [])commonOf(...
features):CustomFeature|null
Creates a new feature object equivalent to the intersection of the specified features.
...FeatureElementOrCompatibleArray[]
CustomFeature | null
A feature object, or null if no arguments are specified.
The following declaration creates a new feature object equivalent to `NAME`.
const newFeature = JScrewIt.Feature.commonOf(["AT", "NAME"], ["NAME", "WINDOW"]);The following declaration creates a new feature object equivalent to `NO_IE_SRC`. This is because both `FF_SRC` and `V8_SRC` imply `NO_IE_SRC`.
const newFeature = JScrewIt.Feature.commonOf("FF_SRC", "V8_SRC");descriptionFor(
name):string
Returns a short description of a predefined feature in plain English.
keyof FeatureAll
A name or alias of a predefined feature.
string
Different names or aliases of the same feature may have different descriptions.
An error is thrown if the specified argument is not a name or alias of a predefined feature.