From e93da8b04da86773247aadb1cbb1912e4f4526b2 Mon Sep 17 00:00:00 2001 From: Priyansh Date: Tue, 22 Dec 2020 17:49:59 +0530 Subject: Rewriting Project --- node_modules/boolean/.eslintrc.json | 3 ++ node_modules/boolean/.releaserc.json | 3 ++ node_modules/boolean/CHANGELOG.md | 13 ++++++ node_modules/boolean/LICENSE.txt | 8 ++++ node_modules/boolean/README.md | 67 +++++++++++++++++++++++++++ node_modules/boolean/build/lib/boolean.d.ts | 2 + node_modules/boolean/build/lib/boolean.js | 16 +++++++ node_modules/boolean/lib/boolean.ts | 17 +++++++ node_modules/boolean/package.json | 70 +++++++++++++++++++++++++++++ node_modules/boolean/tsconfig.json | 16 +++++++ 10 files changed, 215 insertions(+) create mode 100644 node_modules/boolean/.eslintrc.json create mode 100644 node_modules/boolean/.releaserc.json create mode 100644 node_modules/boolean/CHANGELOG.md create mode 100644 node_modules/boolean/LICENSE.txt create mode 100644 node_modules/boolean/README.md create mode 100644 node_modules/boolean/build/lib/boolean.d.ts create mode 100644 node_modules/boolean/build/lib/boolean.js create mode 100644 node_modules/boolean/lib/boolean.ts create mode 100644 node_modules/boolean/package.json create mode 100644 node_modules/boolean/tsconfig.json (limited to 'node_modules/boolean') 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 | [![npm](https://img.shields.io/npm/v/boolean)](https://www.npmjs.com/package/boolean) | +| Dependencies | ![David](https://img.shields.io/david/thenativeweb/boolean) | +| Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/boolean) | +| Build | ![GitHub Actions](https://github.com/thenativeweb/boolean/workflows/Release/badge.svg?branch=master) | +| License | ![GitHub](https://img.shields.io/github/license/thenativeweb/boolean) | + +## 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": "boolean@3.0.2", + "_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": "golo.roden@thenativeweb.io" + }, + { + "name": "Matthias Wagler", + "email": "matthias.wagler@thenativeweb.io" + }, + { + "name": "Ryan Smith", + "email": "ryan.smith@ht2labs.com" + }, + { + "name": "Thomas Schaaf", + "email": "schaaf@komola.de" + } + ], + "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" + ] +} -- cgit v1.2.3