@leismore/lmos-nodejs-primitives 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/src/index.d.ts +5 -1
- package/dist/src/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,12 +10,14 @@ Examples of all primitive values in JavaScript. Defined for writing unit test.
|
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import {
|
|
13
|
-
NULL
|
|
14
|
-
TRUE
|
|
15
|
-
INTEGER
|
|
16
|
-
FLOAT
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
NULL , UNDEFINED ,
|
|
14
|
+
TRUE , FALSE ,
|
|
15
|
+
INTEGER , INTEGER_NEGATIVE ,
|
|
16
|
+
FLOAT , FLOAT_NEGATIVE ,
|
|
17
|
+
ZERO , ZERO_NEGATIVE ,
|
|
18
|
+
BIGINT , BIGINT_NEGATIVE ,
|
|
19
|
+
BIGINT_ZERO , BIGINT_ZERO_NEGATIVE ,
|
|
20
|
+
STRING , STRING_EMPTY , STRING_MULTILINE,
|
|
19
21
|
SYMBOL
|
|
20
22
|
} from '@leismore/lmos-nodejs-primitives';
|
|
21
23
|
```
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,10 +9,14 @@ declare const INTEGER = 42;
|
|
|
9
9
|
declare const INTEGER_NEGATIVE = -42;
|
|
10
10
|
declare const FLOAT = 3.14;
|
|
11
11
|
declare const FLOAT_NEGATIVE = -3.14;
|
|
12
|
+
declare const ZERO = 0;
|
|
13
|
+
declare const ZERO_NEGATIVE = 0;
|
|
12
14
|
declare const BIGINT: bigint;
|
|
13
15
|
declare const BIGINT_NEGATIVE: bigint;
|
|
16
|
+
declare const BIGINT_ZERO: bigint;
|
|
17
|
+
declare const BIGINT_ZERO_NEGATIVE: bigint;
|
|
14
18
|
declare const STRING = "Hello, World!";
|
|
15
19
|
declare const STRING_EMPTY = "";
|
|
16
20
|
declare const STRING_MULTILINE: string;
|
|
17
21
|
declare const SYMBOL: unique symbol;
|
|
18
|
-
export { NULL, UNDEFINED, TRUE, FALSE, INTEGER, INTEGER_NEGATIVE, FLOAT, FLOAT_NEGATIVE, BIGINT, BIGINT_NEGATIVE, STRING, STRING_EMPTY, STRING_MULTILINE, SYMBOL };
|
|
22
|
+
export { NULL, UNDEFINED, TRUE, FALSE, INTEGER, INTEGER_NEGATIVE, FLOAT, FLOAT_NEGATIVE, ZERO, ZERO_NEGATIVE, BIGINT, BIGINT_NEGATIVE, BIGINT_ZERO, BIGINT_ZERO_NEGATIVE, STRING, STRING_EMPTY, STRING_MULTILINE, SYMBOL };
|
package/dist/src/index.js
CHANGED
|
@@ -14,9 +14,13 @@ const INTEGER = 42;
|
|
|
14
14
|
const INTEGER_NEGATIVE = -42;
|
|
15
15
|
const FLOAT = 3.14;
|
|
16
16
|
const FLOAT_NEGATIVE = -3.14;
|
|
17
|
+
const ZERO = 0;
|
|
18
|
+
const ZERO_NEGATIVE = -0;
|
|
17
19
|
// BigInt
|
|
18
20
|
const BIGINT = BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1);
|
|
19
21
|
const BIGINT_NEGATIVE = BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1);
|
|
22
|
+
const BIGINT_ZERO = BigInt(0);
|
|
23
|
+
const BIGINT_ZERO_NEGATIVE = BigInt(-0);
|
|
20
24
|
// String
|
|
21
25
|
const STRING = 'Hello, World!';
|
|
22
26
|
const STRING_EMPTY = '';
|
|
@@ -26,4 +30,4 @@ const STRING_MULTILINE = ('This is a string' + EOL +
|
|
|
26
30
|
// Symbol
|
|
27
31
|
const SYMBOL = Symbol();
|
|
28
32
|
// Export all defined primitive values
|
|
29
|
-
export { NULL, UNDEFINED, TRUE, FALSE, INTEGER, INTEGER_NEGATIVE, FLOAT, FLOAT_NEGATIVE, BIGINT, BIGINT_NEGATIVE, STRING, STRING_EMPTY, STRING_MULTILINE, SYMBOL };
|
|
33
|
+
export { NULL, UNDEFINED, TRUE, FALSE, INTEGER, INTEGER_NEGATIVE, FLOAT, FLOAT_NEGATIVE, ZERO, ZERO_NEGATIVE, BIGINT, BIGINT_NEGATIVE, BIGINT_ZERO, BIGINT_ZERO_NEGATIVE, STRING, STRING_EMPTY, STRING_MULTILINE, SYMBOL };
|