diff options
| author | Priyansh <[email protected]> | 2020-12-22 17:49:59 +0530 |
|---|---|---|
| committer | Priyansh <[email protected]> | 2020-12-22 17:49:59 +0530 |
| commit | e93da8b04da86773247aadb1cbb1912e4f4526b2 (patch) | |
| tree | eb4ef3203a92ed3dbd2252ddb1ea23bd2d670c98 /node_modules/boolean | |
| parent | a5743c293dcb435e4b159a4df791f8955a4110ec (diff) | |
| download | styx-e93da8b04da86773247aadb1cbb1912e4f4526b2.tar.xz styx-e93da8b04da86773247aadb1cbb1912e4f4526b2.zip | |
Rewriting Project
Diffstat (limited to 'node_modules/boolean')
| -rw-r--r-- | node_modules/boolean/.eslintrc.json | 3 | ||||
| -rw-r--r-- | node_modules/boolean/.releaserc.json | 3 | ||||
| -rw-r--r-- | node_modules/boolean/CHANGELOG.md | 13 | ||||
| -rw-r--r-- | node_modules/boolean/LICENSE.txt | 8 | ||||
| -rw-r--r-- | node_modules/boolean/README.md | 67 | ||||
| -rw-r--r-- | node_modules/boolean/build/lib/boolean.d.ts | 2 | ||||
| -rw-r--r-- | node_modules/boolean/build/lib/boolean.js | 16 | ||||
| -rw-r--r-- | node_modules/boolean/lib/boolean.ts | 17 | ||||
| -rw-r--r-- | node_modules/boolean/package.json | 70 | ||||
| -rw-r--r-- | node_modules/boolean/tsconfig.json | 16 |
10 files changed, 215 insertions, 0 deletions
diff --git a/node_modules/boolean/.eslintrc.json b/node_modules/boolean/.eslintrc.json new file mode 100644 index 0000000..0b7481d --- /dev/null +++ b/node_modules/boolean/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "es/node" +} diff --git a/node_modules/boolean/.releaserc.json b/node_modules/boolean/.releaserc.json new file mode 100644 index 0000000..ca62656 --- /dev/null +++ b/node_modules/boolean/.releaserc.json @@ -0,0 +1,3 @@ +{ + "extends": "semantic-release-configuration" +} diff --git a/node_modules/boolean/CHANGELOG.md b/node_modules/boolean/CHANGELOG.md new file mode 100644 index 0000000..5b32423 --- /dev/null +++ b/node_modules/boolean/CHANGELOG.md @@ -0,0 +1,13 @@ +## [3.0.2](https://github.com/thenativeweb/boolean/compare/3.0.1...3.0.2) (2020-11-03) + + +### Bug Fixes + +* Fix headline for robot section in readme. ([#191](https://github.com/thenativeweb/boolean/issues/191)) ([6b7b72b](https://github.com/thenativeweb/boolean/commit/6b7b72b6d5d5c1ad2251c5959b35c8c87b3421a5)) + +## [3.0.1](https://github.com/thenativeweb/boolean/compare/3.0.0...3.0.1) (2020-02-11) + + +### Bug Fixes + +* Simplify comparison code to not use unicode regexp flag ([#99](https://github.com/thenativeweb/boolean/issues/99)) ([2be2aeb](https://github.com/thenativeweb/boolean/commit/2be2aeb244c060eccb388dacc6903bbad193e745)) diff --git a/node_modules/boolean/LICENSE.txt b/node_modules/boolean/LICENSE.txt new file mode 100644 index 0000000..523047a --- /dev/null +++ b/node_modules/boolean/LICENSE.txt @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2014-2020 the native web. + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. diff --git a/node_modules/boolean/README.md b/node_modules/boolean/README.md new file mode 100644 index 0000000..17384dc --- /dev/null +++ b/node_modules/boolean/README.md @@ -0,0 +1,67 @@ +# boolean + +boolean converts lots of things to boolean. + +## Status + +| Category | Status | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Version | [](https://www.npmjs.com/package/boolean) | +| Dependencies |  | +| Dev dependencies |  | +| Build |  | +| License |  | + +## Installation + +```shell +$ npm install boolean +``` + +## Quick start + +First you need to add a reference to boolean in your application: + +```javascript +const { boolean } = require('boolean'); +``` + +If you use TypeScript, use the following code instead: + +```typescript +import { boolean } from 'boolean'; +``` + +To verify a value for its boolean value, call the `boolean` function and provide the value in question as parameter. + +```javascript +console.log(boolean('true')); // => true +``` + +The `boolean` function considers the following values to be equivalent to `true`: + +- `true` (boolean) +- `'true'` (string) +- `'TRUE'` (string) +- `'t'` (string) +- `'T'` (string) +- `'yes'` (string) +- `'YES'` (string) +- `'y'` (string) +- `'Y'` (string) +- `'on'` (string) +- `'ON'` (string) +- `'1'` (string) +- `1` (number) + +_Please note that if you provide a string, it will be trimmed._ + +All other values, including `undefined` and `null` are considered to be `false`. + +## Running quality assurance + +To run quality assurance for this module use [roboter](https://www.npmjs.com/package/roboter): + +```shell +$ npx roboter +``` diff --git a/node_modules/boolean/build/lib/boolean.d.ts b/node_modules/boolean/build/lib/boolean.d.ts new file mode 100644 index 0000000..379e720 --- /dev/null +++ b/node_modules/boolean/build/lib/boolean.d.ts @@ -0,0 +1,2 @@ +declare const boolean: (value: any) => boolean; +export { boolean }; diff --git a/node_modules/boolean/build/lib/boolean.js b/node_modules/boolean/build/lib/boolean.js new file mode 100644 index 0000000..0dae924 --- /dev/null +++ b/node_modules/boolean/build/lib/boolean.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.boolean = void 0; +const boolean = function (value) { + if (typeof value === 'string') { + return ['true', 't', 'yes', 'y', 'on', '1'].includes(value.trim().toLowerCase()); + } + if (typeof value === 'number') { + return value === 1; + } + if (typeof value === 'boolean') { + return value; + } + return false; +}; +exports.boolean = boolean; diff --git a/node_modules/boolean/lib/boolean.ts b/node_modules/boolean/lib/boolean.ts new file mode 100644 index 0000000..ea3d92f --- /dev/null +++ b/node_modules/boolean/lib/boolean.ts @@ -0,0 +1,17 @@ +const boolean = function (value: any): boolean { + if (typeof value === 'string') { + return [ 'true', 't', 'yes', 'y', 'on', '1' ].includes(value.trim().toLowerCase()); + } + + if (typeof value === 'number') { + return value === 1; + } + + if (typeof value === 'boolean') { + return value; + } + + return false; +}; + +export { boolean }; diff --git a/node_modules/boolean/package.json b/node_modules/boolean/package.json new file mode 100644 index 0000000..1c83d88 --- /dev/null +++ b/node_modules/boolean/package.json @@ -0,0 +1,70 @@ +{ + "_from": "boolean@^3.0.1", + "_id": "[email protected]", + "_inBundle": false, + "_integrity": "sha512-RwywHlpCRc3/Wh81MiCKun4ydaIFyW5Ea6JbL6sRCVx5q5irDw7pMXBUFYF/jArQ6YrG36q0kpovc9P/Kd3I4g==", + "_location": "/boolean", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "boolean@^3.0.1", + "name": "boolean", + "escapedName": "boolean", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "/global-agent", + "/roarr" + ], + "_resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.2.tgz", + "_shasum": "df1baa18b6a2b0e70840475e1d93ec8fe75b2570", + "_spec": "boolean@^3.0.1", + "_where": "/Users/lucifer/Documents/styx/node_modules/global-agent", + "bugs": { + "url": "https://github.com/thenativeweb/boolean/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Golo Roden", + "email": "[email protected]" + }, + { + "name": "Matthias Wagler", + "email": "[email protected]" + }, + { + "name": "Ryan Smith", + "email": "[email protected]" + }, + { + "name": "Thomas Schaaf", + "email": "[email protected]" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "boolean converts lots of things to boolean.", + "devDependencies": { + "assertthat": "5.2.1", + "roboter": "11.5.1", + "semantic-release-configuration": "1.0.23" + }, + "homepage": "https://github.com/thenativeweb/boolean#readme", + "keywords": [ + "boolean", + "parser" + ], + "license": "MIT", + "main": "build/lib/boolean.js", + "name": "boolean", + "repository": { + "type": "git", + "url": "git://github.com/thenativeweb/boolean.git" + }, + "types": "build/lib/boolean.d.ts", + "version": "3.0.2" +} diff --git a/node_modules/boolean/tsconfig.json b/node_modules/boolean/tsconfig.json new file mode 100644 index 0000000..bc040d4 --- /dev/null +++ b/node_modules/boolean/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "declaration": true, + "esModuleInterop": true, + "lib": [ "esnext" ], + "module": "commonjs", + "outDir": "build", + "resolveJsonModule": true, + "strict": true, + "target": "es2019" + }, + "include": [ + "./**/*.ts" + ] +} |
