Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # boolean
  2. boolean converts lots of things to boolean.
  3. ## Status
  4. | Category | Status |
  5. | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
  6. | Version | [![npm](https://img.shields.io/npm/v/boolean)](https://www.npmjs.com/package/boolean) |
  7. | Dependencies | ![David](https://img.shields.io/david/thenativeweb/boolean) |
  8. | Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/boolean) |
  9. | Build | ![GitHub Actions](https://github.com/thenativeweb/boolean/workflows/Release/badge.svg?branch=main) |
  10. | License | ![GitHub](https://img.shields.io/github/license/thenativeweb/boolean) |
  11. ## Installation
  12. ```shell
  13. $ npm install boolean
  14. ```
  15. ## Quick start
  16. First you need to add a reference to boolean in your application:
  17. ```javascript
  18. const { boolean } = require('boolean');
  19. ```
  20. If you use TypeScript, use the following code instead:
  21. ```typescript
  22. import { boolean } from 'boolean';
  23. ```
  24. To verify a value for its boolean value, call the `boolean` function and provide the value in question as parameter.
  25. ```javascript
  26. console.log(boolean('true')); // => true
  27. ```
  28. The `boolean` function considers the following values to be equivalent to `true`:
  29. - `true` (boolean)
  30. - `'true'` (string)
  31. - `'TRUE'` (string)
  32. - `'t'` (string)
  33. - `'T'` (string)
  34. - `'yes'` (string)
  35. - `'YES'` (string)
  36. - `'y'` (string)
  37. - `'Y'` (string)
  38. - `'on'` (string)
  39. - `'ON'` (string)
  40. - `'1'` (string)
  41. - `1` (number)
  42. In addition to the primitive types mentioned above, boolean also supports their object wrappers `Boolean`, `String`, and `Number`.
  43. _Please note that if you provide a `string` or `String` object, it will be trimmed._
  44. All other values, including `undefined` and `null` are considered to be `false`.
  45. ## Running quality assurance
  46. To run quality assurance for this module use [roboter](https://www.npmjs.com/package/roboter):
  47. ```shell
  48. $ npx roboter
  49. ```