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 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # caniuse-lite
  2. A smaller version of caniuse-db, with only the essentials!
  3. ## Why?
  4. The full data behind [Can I use][1] is incredibly useful for any front end
  5. developer, and on the website all of the details from the database are displayed
  6. to the user. However in automated tools, [many of these fields go unused][2];
  7. it's not a problem for server side consumption but client side, the less
  8. JavaScript that we send to the end user the better.
  9. caniuse-lite then, is a smaller dataset that keeps essential parts of the data
  10. in a compact format. It does this in multiple ways, such as converting `null`
  11. array entries into empty strings, representing support data as an integer rather
  12. than a string, and using base62 references instead of longer human-readable
  13. keys.
  14. This packed data is then reassembled (via functions exposed by this module) into
  15. a larger format which is mostly compatible with caniuse-db, and so it can be
  16. used as an almost drop-in replacement for caniuse-db for contexts where size on
  17. disk is important; for example, usage in web browsers. The API differences are
  18. very small and are detailed in the section below.
  19. ## API
  20. ```js
  21. import * as lite from 'caniuse-lite';
  22. ```
  23. ### `lite.agents`
  24. caniuse-db provides a full `data.json` file which contains all of the features
  25. data. Instead of this large file, caniuse-lite provides this data subset
  26. instead, which has the `browser`, `prefix`, `prefix_exceptions`, `usage_global`
  27. and `versions` keys from the original.
  28. In addition, the subset contains the `release_date` key with release dates (as timestamps) for each version:
  29. ```json
  30. {
  31. "release_date": {
  32. "6": 998870400,
  33. "7": 1161129600,
  34. "8": 1237420800,
  35. "9": 1300060800,
  36. "10": 1346716800,
  37. "11": 1381968000,
  38. "5.5": 962323200
  39. }
  40. }
  41. ```
  42. ### `lite.feature(js)`
  43. The `feature` method takes a file from `data/features` and converts it into
  44. something that more closely represents the `caniuse-db` format. Note that only
  45. the `title`, `stats` and `status` keys are kept from the original data.
  46. ### `lite.features`
  47. The `features` index is provided as a way to query all of the features that
  48. are listed in the `caniuse-db` dataset. Note that you will need to use the
  49. `feature` method on values from this index to get a human-readable format.
  50. ### `lite.region(js)`
  51. The `region` method takes a file from `data/regions` and converts it into
  52. something that more closely represents the `caniuse-db` format. Note that *only*
  53. the usage data is exposed here (the `data` key in the original files).
  54. ## License
  55. The data in this repo is available for use under a CC BY 4.0 license
  56. (http://creativecommons.org/licenses/by/4.0/). For attribution just mention
  57. somewhere that the source is caniuse.com. If you have any questions about using
  58. the data for your project please contact me here: http://a.deveria.com/contact
  59. [1]: http://caniuse.com/
  60. [2]: https://github.com/Fyrd/caniuse/issues/1827
  61. ## Security contact information
  62. To report a security vulnerability, please use the
  63. [Tidelift security contact](https://tidelift.com/security).
  64. Tidelift will coordinate the fix and disclosure.