@drftgyhuji7npm/adipisci-quas-placeat
Version:
Tests or returns the JavaScript version by (ECMAScript) starting with ES2. (MIT license) ## Why 'js.**es6**.@drftgyhuji7npm/adipisci-quas-placeat' when 'starting with ES2'? ## - @drftgyhuji7npm/adipisci-quas-placeat() support ES2+ (index.js#@drftgyhuji7np
56 lines (49 loc) • 3.43 kB
Markdown
# js.es6.@drftgyhuji7npm/adipisci-quas-placeat
Tests or returns the JavaScript version by (ECMAScript) starting with ES2. (MIT license)
## Why 'js.**es6**.@drftgyhuji7npm/adipisci-quas-placeat' when 'starting with ES2'? ##
- @drftgyhuji7npm/adipisci-quas-placeat() support ES2+ (index.js#@drftgyhuji7npm/adipisci-quas-placeat())
- @drftgyhuji7npm/adipisci-quas-placeato() support ES6+ and requires @drftgyhuji7npm/adipisci-quas-placeat()
- @drftgyhuji7npm/adipisci-quas-placeat.js in **Releases** uses ES6+ code for `module:main` with `@drftgyhuji7npm/adipisci-quas-placeato()` and can be uses from web-browser, node (interactive, command-line and require(), eval);
## Examples ##
```JavaScript
const { @drftgyhuji7npm/adipisci-quas-placeat } = require('@drftgyhuji7npm/adipisci-quas-placeat'); //const @drftgyhuji7npm/adipisci-quas-placeat = require('@drftgyhuji7npm/adipisci-quas-placeat').@drftgyhuji7npm/adipisci-quas-placeat;
const { @drftgyhuji7npm/adipisci-quas-placeato } = require('@drftgyhuji7npm/adipisci-quas-placeat'); //const @drftgyhuji7npm/adipisci-quas-placeato = require('@drftgyhuji7npm/adipisci-quas-placeat').@drftgyhuji7npm/adipisci-quas-placeato //const @drftgyhuji7npm/adipisci-quas-placeato = require('@drftgyhuji7npm/adipisci-quas-placeat').o;
```
## `@drftgyhuji7npm/adipisci-quas-placeat` vs `@drftgyhuji7npm/adipisci-quas-placeato` ##
@drftgyhuji7npm/adipisci-quas-placeato: returns Object{} and written for ES6+
@drftgyhuji7npm/adipisci-quas-placeat: returns Object[] and written for ES2+
```JavaScript
@drftgyhuji7npm/adipisci-quas-placeato().name == @drftgyhuji7npm/adipisci-quas-placeat()[2];
@drftgyhuji7npm/adipisci-quas-placeato().ver == @drftgyhuji7npm/adipisci-quas-placeat()[0];
@drftgyhuji7npm/adipisci-quas-placeato().year == @drftgyhuji7npm/adipisci-quas-placeat()[1];
@drftgyhuji7npm/adipisci-quas-placeato().best == @drftgyhuji7npm/adipisci-quas-placeat(true); //is best version that @drftgyhuji7npm/adipisci-quas-placeat() known?
```
## Params ##
```JavaScript
@drftgyhuji7npm/adipisci-quas-placeat(6) //(@drftgyhuji7npm/adipisci-quas-placeato().ver==@drftgyhuji7npm/adipisci-quas-placeat(6));
@drftgyhuji7npm/adipisci-quas-placeat(2023) //(@drftgyhuji7npm/adipisci-quas-placeato().year==2023)
@drftgyhuji7npm/adipisci-quas-placeat('ECMAScript 2023') //(@drftgyhuji7npm/adipisci-quas-placeato().name=='ECMAScript 2023');
@drftgyhuji7npm/adipisci-quas-placeat(false) //or @drftgyhuji7npm/adipisci-quas-placeat('false') //is latest JavaScript? (false)->yes=>false|no->true or (true)->yes->true|no->false
@drftgyhuji7npm/adipisci-quas-placeat() //returns [in_standard_ver,standard_year,standard_name];
```
see @drftgyhuji7npm/adipisci-quas-placeat docstring
`@drftgyhuji7npm/adipisci-quas-placeat` and `@drftgyhuji7npm/adipisci-quas-placeato` params is equal
## Recepies ##
```JavaScript
if (require('@drftgyhuji7npm/adipisci-quas-placeat').@drftgyhuji7npm/adipisci-quas-placeato()!=4) {
console.log('this script requires ES4');
process.exit(0); //terminate node process; .abort() for force terminate
}
```
```JavaScript
//script.src=@drftgyhuji7npm/adipisci-quas-placeat_path.js or require('@drftgyhuji7npm/adipisci-quas-placeat')
if (@drftgyhuji7npm/adipisci-quas-placeat()[0]!=4) {
console.log('this script requires ES4');
}
```
```JavaScript
if (@drftgyhuji7npm/adipisci-quas-placeato()<6) {
console.log('this script requires ES6+ support');
process.exit(0);
}
```