Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
990 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
---|
4 | const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
|
---|
5 | if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
|
---|
6 | throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
---|
7 | }
|
---|
8 | const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
|
---|
9 | const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
|
---|
10 | const SUPPORTED_MAJOR_VERSION = 10;
|
---|
11 | const SUPPORTED_MINOR_VERSION = 10;
|
---|
12 | const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
|
---|
13 | const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
|
---|
14 | /**
|
---|
15 | * IS `true` for Node.js 10.10 and greater.
|
---|
16 | */
|
---|
17 | exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.