apeframework 0.0.0-dev.10 → 0.0.0-dev.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apeframework",
3
- "version": "0.0.0-dev.10",
3
+ "version": "0.0.0-dev.11",
4
4
  "license": "MIT",
5
5
  "author": "Matthieu Symoens",
6
6
  "description": "Node.js app framework",
@@ -3,10 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseBoolean = void 0;
4
4
  const ParseError_1 = require("./errors/ParseError");
5
5
  const parseBoolean = (input) => {
6
- if ([true, 1, BigInt(1), '1'].includes(input)) {
6
+ if ([
7
+ true,
8
+ 1,
9
+ BigInt(1),
10
+ '1',
11
+ 'TRUE',
12
+ 'true',
13
+ ].includes(input)) {
7
14
  return true;
8
15
  }
9
- else if ([undefined, null, false, 0, BigInt(0), '', '0'].includes(input)) {
16
+ else if ([
17
+ undefined,
18
+ null,
19
+ false,
20
+ 0,
21
+ BigInt(0),
22
+ '',
23
+ '0',
24
+ 'FALSE',
25
+ 'false',
26
+ ].includes(input)) {
10
27
  return false;
11
28
  }
12
29
  throw new ParseError_1.ParseError('boolean');
@@ -2,9 +2,26 @@ import { ParseError } from './errors/ParseError'
2
2
  import type { Parser } from './Parser'
3
3
 
4
4
  const parseBoolean: Parser<boolean> = (input) => {
5
- if ([true, 1, BigInt(1), '1'].includes(input)) {
5
+ if ([
6
+ true,
7
+ 1,
8
+ BigInt(1),
9
+ '1',
10
+ 'TRUE',
11
+ 'true',
12
+ ].includes(input)) {
6
13
  return true
7
- } else if ([undefined, null, false, 0, BigInt(0), '', '0'].includes(input)) {
14
+ } else if ([
15
+ undefined,
16
+ null,
17
+ false,
18
+ 0,
19
+ BigInt(0),
20
+ '',
21
+ '0',
22
+ 'FALSE',
23
+ 'false',
24
+ ].includes(input)) {
8
25
  return false
9
26
  }
10
27