Skip to content

Commit 32d9ba0

Browse files
committed
chore: self vendor boolean@3.2.0
1 parent e70c6b7 commit 32d9ba0

10 files changed

Lines changed: 172 additions & 16 deletions

File tree

ts-binary-wrapper/package-lock.json

Lines changed: 48 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ts-binary-wrapper/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,13 @@
5252
"dependencies": {
5353
"@sentry/node": "^7.36.0",
5454
"global-agent": "^3.0.0"
55-
}
55+
},
56+
"overrides": {
57+
"boolean": "file:vendor/boolean"
58+
},
59+
"bundleDependencies": [
60+
"global-agent",
61+
"roarr",
62+
"boolean"
63+
]
5664
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2014-2022 the native web.
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const boolean: (value: any) => boolean;
2+
export { boolean };
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
Object.defineProperty(exports, '__esModule', { value: true });
3+
exports.boolean = void 0;
4+
const boolean = function (value) {
5+
switch (Object.prototype.toString.call(value)) {
6+
case '[object String]':
7+
return ['true', 't', 'yes', 'y', 'on', '1'].includes(
8+
value.trim().toLowerCase(),
9+
);
10+
case '[object Number]':
11+
return value.valueOf() === 1;
12+
case '[object Boolean]':
13+
return value.valueOf();
14+
default:
15+
return false;
16+
}
17+
};
18+
exports.boolean = boolean;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { boolean } from './boolean';
2+
import { isBooleanable } from './isBooleanable';
3+
export { boolean, isBooleanable };
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict';
2+
Object.defineProperty(exports, '__esModule', { value: true });
3+
exports.isBooleanable = exports.boolean = void 0;
4+
const boolean_1 = require('./boolean');
5+
Object.defineProperty(exports, 'boolean', {
6+
enumerable: true,
7+
get: function () {
8+
return boolean_1.boolean;
9+
},
10+
});
11+
const isBooleanable_1 = require('./isBooleanable');
12+
Object.defineProperty(exports, 'isBooleanable', {
13+
enumerable: true,
14+
get: function () {
15+
return isBooleanable_1.isBooleanable;
16+
},
17+
});
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const isBooleanable: (value: any) => boolean;
2+
export { isBooleanable };
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
Object.defineProperty(exports, '__esModule', { value: true });
3+
exports.isBooleanable = void 0;
4+
const isBooleanable = function (value) {
5+
switch (Object.prototype.toString.call(value)) {
6+
case '[object String]':
7+
return [
8+
'true',
9+
't',
10+
'yes',
11+
'y',
12+
'on',
13+
'1',
14+
'false',
15+
'f',
16+
'no',
17+
'n',
18+
'off',
19+
'0',
20+
].includes(value.trim().toLowerCase());
21+
case '[object Number]':
22+
return [0, 1].includes(value.valueOf());
23+
case '[object Boolean]':
24+
return true;
25+
default:
26+
return false;
27+
}
28+
};
29+
exports.isBooleanable = isBooleanable;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "boolean",
3+
"version": "3.2.0",
4+
"description": "boolean converts lots of things to boolean.",
5+
"contributors": [
6+
{
7+
"name": "Golo Roden",
8+
"email": "golo.roden@thenativeweb.io"
9+
},
10+
{
11+
"name": "Matthias Wagler",
12+
"email": "matthias.wagler@thenativeweb.io"
13+
},
14+
{
15+
"name": "Ryan Smith",
16+
"email": "ryan.smith@ht2labs.com"
17+
},
18+
{
19+
"name": "Thomas Schaaf",
20+
"email": "schaaf@komola.de"
21+
},
22+
{
23+
"name": "Sebastian Mares",
24+
"email": "camil.sebastian@mares.email"
25+
}
26+
],
27+
"main": "build/lib/index.js",
28+
"types": "build/lib/index.d.ts",
29+
"dependencies": {},
30+
"scripts": {},
31+
"repository": {
32+
"type": "git",
33+
"url": "git://github.com/thenativeweb/boolean.git"
34+
},
35+
"license": "MIT"
36+
}

0 commit comments

Comments
 (0)