cdk-ecr-deployment 0.0.76 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/.jsii +28 -25
  2. package/lambda/Dockerfile +25 -0
  3. package/lambda/install.js +64 -0
  4. package/lib/index.js +40 -23
  5. package/node_modules/@sindresorhus/is/dist/index.d.ts +225 -0
  6. package/node_modules/@sindresorhus/is/dist/index.js +427 -0
  7. package/node_modules/@sindresorhus/is/dist/types.d.ts +24 -0
  8. package/node_modules/@sindresorhus/is/dist/types.js +3 -0
  9. package/node_modules/@sindresorhus/is/license +9 -0
  10. package/node_modules/@sindresorhus/is/package.json +96 -0
  11. package/node_modules/@sindresorhus/is/readme.md +628 -0
  12. package/node_modules/@szmarczak/http-timer/LICENSE +21 -0
  13. package/node_modules/@szmarczak/http-timer/README.md +93 -0
  14. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.js +126 -0
  16. package/node_modules/@szmarczak/http-timer/package.json +72 -0
  17. package/node_modules/@types/cacheable-request/LICENSE +21 -0
  18. package/node_modules/@types/cacheable-request/README.md +16 -0
  19. package/node_modules/@types/cacheable-request/index.d.ts +137 -0
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +21 -0
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +16 -0
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +8 -0
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +912 -0
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +497 -0
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2142 -0
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1365 -0
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +414 -0
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +412 -0
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +18 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3307 -0
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +545 -0
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +357 -0
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +643 -0
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +169 -0
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +623 -0
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1004 -0
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3748 -0
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +284 -0
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +1 -0
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1368 -0
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2100 -0
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +391 -0
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +131 -0
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2738 -0
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +114 -0
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +783 -0
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +455 -0
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +230 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +172 -0
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +555 -0
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1477 -0
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +117 -0
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +131 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +542 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +424 -0
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +42 -0
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +1249 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +67 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +68 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +94 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1019 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +161 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +204 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +798 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1563 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +378 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +507 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +158 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +649 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +517 -0
  74. package/node_modules/@types/cacheable-request/package.json +35 -0
  75. package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
  76. package/node_modules/@types/http-cache-semantics/README.md +16 -0
  77. package/node_modules/@types/http-cache-semantics/index.d.ts +170 -0
  78. package/node_modules/@types/http-cache-semantics/package.json +25 -0
  79. package/node_modules/@types/keyv/LICENSE +21 -0
  80. package/node_modules/@types/keyv/README.md +16 -0
  81. package/node_modules/@types/keyv/index.d.ts +77 -0
  82. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +21 -0
  83. package/node_modules/@types/keyv/node_modules/@types/node/README.md +16 -0
  84. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +8 -0
  85. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +912 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +497 -0
  87. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2142 -0
  88. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1365 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +414 -0
  90. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +412 -0
  91. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +18 -0
  92. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3307 -0
  93. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +545 -0
  94. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +357 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +643 -0
  97. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +169 -0
  98. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +623 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1004 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3748 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +284 -0
  102. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +1 -0
  103. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1368 -0
  104. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2100 -0
  105. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +391 -0
  106. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +131 -0
  107. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2738 -0
  108. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +114 -0
  109. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +783 -0
  110. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +455 -0
  111. package/node_modules/@types/keyv/node_modules/@types/node/package.json +230 -0
  112. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +172 -0
  113. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +555 -0
  114. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1477 -0
  115. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +117 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +131 -0
  117. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +542 -0
  118. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +424 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +42 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
  122. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +1249 -0
  123. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +67 -0
  124. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +68 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +94 -0
  126. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1019 -0
  127. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +161 -0
  128. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +204 -0
  129. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +798 -0
  130. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1563 -0
  131. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +378 -0
  132. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +507 -0
  133. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +158 -0
  134. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +649 -0
  135. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +517 -0
  136. package/node_modules/@types/keyv/package.json +32 -0
  137. package/node_modules/@types/responselike/LICENSE +21 -0
  138. package/node_modules/@types/responselike/README.md +16 -0
  139. package/node_modules/@types/responselike/index.d.ts +34 -0
  140. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +21 -0
  141. package/node_modules/@types/responselike/node_modules/@types/node/README.md +16 -0
  142. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +8 -0
  143. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +912 -0
  144. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +497 -0
  145. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2142 -0
  146. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1365 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +414 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +412 -0
  149. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +18 -0
  150. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3307 -0
  151. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +545 -0
  152. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +357 -0
  154. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +643 -0
  155. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +169 -0
  156. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +623 -0
  157. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1004 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3748 -0
  159. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +284 -0
  160. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +1 -0
  161. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1368 -0
  162. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2100 -0
  163. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +391 -0
  164. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +131 -0
  165. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2738 -0
  166. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +114 -0
  167. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +783 -0
  168. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +455 -0
  169. package/node_modules/@types/responselike/node_modules/@types/node/package.json +230 -0
  170. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +172 -0
  171. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +555 -0
  172. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1477 -0
  173. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +117 -0
  174. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +131 -0
  175. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +542 -0
  176. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +424 -0
  177. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
  178. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +42 -0
  179. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
  180. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +1249 -0
  181. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +67 -0
  182. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +68 -0
  183. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +94 -0
  184. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1019 -0
  185. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +161 -0
  186. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +204 -0
  187. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +798 -0
  188. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1563 -0
  189. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +378 -0
  190. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +507 -0
  191. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +158 -0
  192. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +649 -0
  193. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +517 -0
  194. package/node_modules/@types/responselike/package.json +25 -0
  195. package/node_modules/cacheable-lookup/LICENSE +21 -0
  196. package/node_modules/cacheable-lookup/README.md +240 -0
  197. package/node_modules/cacheable-lookup/index.d.ts +139 -0
  198. package/node_modules/cacheable-lookup/package.json +45 -0
  199. package/node_modules/cacheable-lookup/source/index.js +436 -0
  200. package/node_modules/cacheable-request/LICENSE +21 -0
  201. package/node_modules/cacheable-request/README.md +206 -0
  202. package/node_modules/cacheable-request/package.json +56 -0
  203. package/node_modules/cacheable-request/src/index.js +251 -0
  204. package/node_modules/clone-response/LICENSE +21 -0
  205. package/node_modules/clone-response/README.md +62 -0
  206. package/node_modules/clone-response/package.json +44 -0
  207. package/node_modules/clone-response/src/index.js +17 -0
  208. package/node_modules/decompress-response/index.d.ts +22 -0
  209. package/node_modules/decompress-response/index.js +58 -0
  210. package/node_modules/decompress-response/license +9 -0
  211. package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
  212. package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
  213. package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
  214. package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
  215. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
  216. package/node_modules/decompress-response/package.json +56 -0
  217. package/node_modules/decompress-response/readme.md +48 -0
  218. package/node_modules/defer-to-connect/LICENSE +21 -0
  219. package/node_modules/defer-to-connect/README.md +38 -0
  220. package/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
  221. package/node_modules/defer-to-connect/dist/source/index.js +47 -0
  222. package/node_modules/defer-to-connect/package.json +71 -0
  223. package/node_modules/end-of-stream/LICENSE +21 -0
  224. package/node_modules/end-of-stream/README.md +54 -0
  225. package/node_modules/end-of-stream/index.js +94 -0
  226. package/node_modules/end-of-stream/package.json +37 -0
  227. package/node_modules/get-stream/buffer-stream.js +52 -0
  228. package/node_modules/get-stream/index.d.ts +108 -0
  229. package/node_modules/get-stream/index.js +60 -0
  230. package/node_modules/get-stream/license +9 -0
  231. package/node_modules/get-stream/package.json +50 -0
  232. package/node_modules/get-stream/readme.md +124 -0
  233. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +2 -0
  234. package/node_modules/got/dist/source/as-promise/create-rejection.js +30 -0
  235. package/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
  236. package/node_modules/got/dist/source/as-promise/index.js +175 -0
  237. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +3 -0
  238. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +78 -0
  239. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +3 -0
  240. package/node_modules/got/dist/source/as-promise/parse-body.js +25 -0
  241. package/node_modules/got/dist/source/as-promise/types.d.ts +256 -0
  242. package/node_modules/got/dist/source/as-promise/types.js +40 -0
  243. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +5 -0
  244. package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
  245. package/node_modules/got/dist/source/core/index.d.ts +1124 -0
  246. package/node_modules/got/dist/source/core/index.js +1491 -0
  247. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
  248. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +17 -0
  249. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
  250. package/node_modules/got/dist/source/core/utils/get-body-size.js +32 -0
  251. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +4 -0
  252. package/node_modules/got/dist/source/core/utils/get-buffer.js +16 -0
  253. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
  254. package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
  255. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +2 -0
  256. package/node_modules/got/dist/source/core/utils/is-response-ok.js +8 -0
  257. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +14 -0
  258. package/node_modules/got/dist/source/core/utils/options-to-url.js +53 -0
  259. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
  260. package/node_modules/got/dist/source/core/utils/proxy-events.js +17 -0
  261. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +29 -0
  262. package/node_modules/got/dist/source/core/utils/timed-out.js +121 -0
  263. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
  264. package/node_modules/got/dist/source/core/utils/unhandle.js +22 -0
  265. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
  266. package/node_modules/got/dist/source/core/utils/url-to-options.js +24 -0
  267. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
  268. package/node_modules/got/dist/source/core/utils/weakable-map.js +29 -0
  269. package/node_modules/got/dist/source/create.d.ts +5 -0
  270. package/node_modules/got/dist/source/create.js +240 -0
  271. package/node_modules/got/dist/source/index.d.ts +4 -0
  272. package/node_modules/got/dist/source/index.js +132 -0
  273. package/node_modules/got/dist/source/types.d.ts +342 -0
  274. package/node_modules/got/dist/source/types.js +2 -0
  275. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +1 -0
  276. package/node_modules/got/dist/source/utils/deep-freeze.js +12 -0
  277. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +2 -0
  278. package/node_modules/got/dist/source/utils/deprecation-warning.js +13 -0
  279. package/node_modules/got/license +9 -0
  280. package/node_modules/got/package.json +130 -0
  281. package/node_modules/got/readme.md +2476 -0
  282. package/node_modules/http-cache-semantics/LICENSE +9 -0
  283. package/node_modules/http-cache-semantics/README.md +203 -0
  284. package/node_modules/http-cache-semantics/index.js +673 -0
  285. package/node_modules/http-cache-semantics/package.json +24 -0
  286. package/node_modules/http2-wrapper/LICENSE +21 -0
  287. package/node_modules/http2-wrapper/README.md +470 -0
  288. package/node_modules/http2-wrapper/package.json +54 -0
  289. package/node_modules/http2-wrapper/source/agent.js +670 -0
  290. package/node_modules/http2-wrapper/source/auto.js +149 -0
  291. package/node_modules/http2-wrapper/source/client-request.js +445 -0
  292. package/node_modules/http2-wrapper/source/incoming-message.js +58 -0
  293. package/node_modules/http2-wrapper/source/index.js +28 -0
  294. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +27 -0
  295. package/node_modules/http2-wrapper/source/utils/errors.js +45 -0
  296. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
  297. package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
  298. package/node_modules/http2-wrapper/source/utils/url-to-options.js +25 -0
  299. package/node_modules/json-buffer/.travis.yml +3 -0
  300. package/node_modules/json-buffer/LICENSE +22 -0
  301. package/node_modules/json-buffer/README.md +24 -0
  302. package/node_modules/json-buffer/index.js +58 -0
  303. package/node_modules/json-buffer/package.json +34 -0
  304. package/node_modules/json-buffer/test/index.js +63 -0
  305. package/node_modules/keyv/LICENSE +21 -0
  306. package/node_modules/keyv/README.md +288 -0
  307. package/node_modules/keyv/package.json +49 -0
  308. package/node_modules/keyv/src/index.js +111 -0
  309. package/node_modules/lowercase-keys/index.d.ts +16 -0
  310. package/node_modules/lowercase-keys/index.js +10 -0
  311. package/node_modules/lowercase-keys/license +9 -0
  312. package/node_modules/lowercase-keys/package.json +38 -0
  313. package/node_modules/lowercase-keys/readme.md +32 -0
  314. package/node_modules/mimic-response/index.js +32 -0
  315. package/node_modules/mimic-response/license +9 -0
  316. package/node_modules/mimic-response/package.json +37 -0
  317. package/node_modules/mimic-response/readme.md +54 -0
  318. package/node_modules/normalize-url/index.d.ts +267 -0
  319. package/node_modules/normalize-url/index.js +216 -0
  320. package/node_modules/normalize-url/license +9 -0
  321. package/node_modules/normalize-url/package.json +50 -0
  322. package/node_modules/normalize-url/readme.md +286 -0
  323. package/node_modules/once/LICENSE +15 -0
  324. package/node_modules/once/README.md +79 -0
  325. package/node_modules/once/once.js +42 -0
  326. package/node_modules/once/package.json +33 -0
  327. package/node_modules/p-cancelable/index.d.ts +176 -0
  328. package/node_modules/p-cancelable/index.js +111 -0
  329. package/node_modules/p-cancelable/license +9 -0
  330. package/node_modules/p-cancelable/package.json +49 -0
  331. package/node_modules/p-cancelable/readme.md +153 -0
  332. package/node_modules/pump/.travis.yml +5 -0
  333. package/node_modules/pump/LICENSE +21 -0
  334. package/node_modules/pump/README.md +65 -0
  335. package/node_modules/pump/index.js +82 -0
  336. package/node_modules/pump/package.json +24 -0
  337. package/node_modules/pump/test-browser.js +66 -0
  338. package/node_modules/pump/test-node.js +53 -0
  339. package/node_modules/quick-lru/index.d.ts +97 -0
  340. package/node_modules/quick-lru/index.js +123 -0
  341. package/node_modules/quick-lru/license +9 -0
  342. package/node_modules/quick-lru/package.json +43 -0
  343. package/node_modules/quick-lru/readme.md +111 -0
  344. package/node_modules/resolve-alpn/LICENSE +22 -0
  345. package/node_modules/resolve-alpn/README.md +60 -0
  346. package/node_modules/resolve-alpn/index.js +43 -0
  347. package/node_modules/resolve-alpn/package.json +34 -0
  348. package/node_modules/responselike/LICENSE +19 -0
  349. package/node_modules/responselike/README.md +77 -0
  350. package/node_modules/responselike/package.json +38 -0
  351. package/node_modules/responselike/src/index.js +34 -0
  352. package/node_modules/wrappy/LICENSE +15 -0
  353. package/node_modules/wrappy/README.md +36 -0
  354. package/node_modules/wrappy/package.json +29 -0
  355. package/node_modules/wrappy/wrappy.js +33 -0
  356. package/package.json +7 -4
@@ -0,0 +1,628 @@
1
+ # is
2
+
3
+ > Type check values
4
+
5
+ For example, `is.string('🦄') //=> true`
6
+
7
+ <img src="header.gif" width="182" align="right">
8
+
9
+ ## Highlights
10
+
11
+ - Written in TypeScript
12
+ - [Extensive use of type guards](#type-guards)
13
+ - [Supports type assertions](#type-assertions)
14
+ - [Aware of generic type parameters](#generic-type-parameters) (use with caution)
15
+ - Actively maintained
16
+ - ![Millions of downloads per week](https://img.shields.io/npm/dw/@sindresorhus/is)
17
+
18
+ ## Install
19
+
20
+ ```
21
+ $ npm install @sindresorhus/is
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```js
27
+ const is = require('@sindresorhus/is');
28
+
29
+ is('🦄');
30
+ //=> 'string'
31
+
32
+ is(new Map());
33
+ //=> 'Map'
34
+
35
+ is.number(6);
36
+ //=> true
37
+ ```
38
+
39
+ [Assertions](#type-assertions) perform the same type checks, but throw an error if the type does not match.
40
+
41
+ ```js
42
+ const {assert} = require('@sindresorhus/is');
43
+
44
+ assert.string(2);
45
+ //=> Error: Expected value which is `string`, received value of type `number`.
46
+ ```
47
+
48
+ And with TypeScript:
49
+
50
+ ```ts
51
+ import {assert} from '@sindresorhus/is';
52
+
53
+ assert.string(foo);
54
+ // `foo` is now typed as a `string`.
55
+ ```
56
+
57
+ ## API
58
+
59
+ ### is(value)
60
+
61
+ Returns the type of `value`.
62
+
63
+ Primitives are lowercase and object types are camelcase.
64
+
65
+ Example:
66
+
67
+ - `'undefined'`
68
+ - `'null'`
69
+ - `'string'`
70
+ - `'symbol'`
71
+ - `'Array'`
72
+ - `'Function'`
73
+ - `'Object'`
74
+
75
+ Note: It will throw an error if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`.
76
+
77
+ ### is.{method}
78
+
79
+ All the below methods accept a value and returns a boolean for whether the value is of the desired type.
80
+
81
+ #### Primitives
82
+
83
+ ##### .undefined(value)
84
+ ##### .null(value)
85
+ ##### .string(value)
86
+ ##### .number(value)
87
+
88
+ Note: `is.number(NaN)` returns `false`. This intentionally deviates from `typeof` behavior to increase user-friendliness of `is` type checks.
89
+
90
+ ##### .boolean(value)
91
+ ##### .symbol(value)
92
+ ##### .bigint(value)
93
+
94
+ #### Built-in types
95
+
96
+ ##### .array(value, assertion?)
97
+
98
+ Returns true if `value` is an array and all of its items match the assertion (if provided).
99
+
100
+ ```js
101
+ is.array(value); // Validate `value` is an array.
102
+ is.array(value, is.number); // Validate `value` is an array and all of its items are numbers.
103
+ ```
104
+
105
+ ##### .function(value)
106
+ ##### .buffer(value)
107
+ ##### .object(value)
108
+
109
+ Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions).
110
+
111
+ ##### .numericString(value)
112
+
113
+ Returns `true` for a string that represents a number satisfying `is.number`, for example, `'42'` and `'-8.3'`.
114
+
115
+ Note: `'NaN'` returns `false`, but `'Infinity'` and `'-Infinity'` return `true`.
116
+
117
+ ##### .regExp(value)
118
+ ##### .date(value)
119
+ ##### .error(value)
120
+ ##### .nativePromise(value)
121
+ ##### .promise(value)
122
+
123
+ Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too.
124
+
125
+ ##### .generator(value)
126
+
127
+ Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`.
128
+
129
+ ##### .generatorFunction(value)
130
+
131
+ ##### .asyncFunction(value)
132
+
133
+ Returns `true` for any `async` function that can be called with the `await` operator.
134
+
135
+ ```js
136
+ is.asyncFunction(async () => {});
137
+ //=> true
138
+
139
+ is.asyncFunction(() => {});
140
+ //=> false
141
+ ```
142
+
143
+ ##### .asyncGenerator(value)
144
+
145
+ ```js
146
+ is.asyncGenerator(
147
+ (async function * () {
148
+ yield 4;
149
+ })()
150
+ );
151
+ //=> true
152
+
153
+ is.asyncGenerator(
154
+ (function * () {
155
+ yield 4;
156
+ })()
157
+ );
158
+ //=> false
159
+ ```
160
+
161
+ ##### .asyncGeneratorFunction(value)
162
+
163
+ ```js
164
+ is.asyncGeneratorFunction(async function * () {
165
+ yield 4;
166
+ });
167
+ //=> true
168
+
169
+ is.asyncGeneratorFunction(function * () {
170
+ yield 4;
171
+ });
172
+ //=> false
173
+ ```
174
+
175
+ ##### .boundFunction(value)
176
+
177
+ Returns `true` for any `bound` function.
178
+
179
+ ```js
180
+ is.boundFunction(() => {});
181
+ //=> true
182
+
183
+ is.boundFunction(function () {}.bind(null));
184
+ //=> true
185
+
186
+ is.boundFunction(function () {});
187
+ //=> false
188
+ ```
189
+
190
+ ##### .map(value)
191
+ ##### .set(value)
192
+ ##### .weakMap(value)
193
+ ##### .weakSet(value)
194
+
195
+ #### Typed arrays
196
+
197
+ ##### .int8Array(value)
198
+ ##### .uint8Array(value)
199
+ ##### .uint8ClampedArray(value)
200
+ ##### .int16Array(value)
201
+ ##### .uint16Array(value)
202
+ ##### .int32Array(value)
203
+ ##### .uint32Array(value)
204
+ ##### .float32Array(value)
205
+ ##### .float64Array(value)
206
+ ##### .bigInt64Array(value)
207
+ ##### .bigUint64Array(value)
208
+
209
+ #### Structured data
210
+
211
+ ##### .arrayBuffer(value)
212
+ ##### .sharedArrayBuffer(value)
213
+ ##### .dataView(value)
214
+
215
+ #### Emptiness
216
+
217
+ ##### .emptyString(value)
218
+
219
+ Returns `true` if the value is a `string` and the `.length` is 0.
220
+
221
+ ##### .nonEmptyString(value)
222
+
223
+ Returns `true` if the value is a `string` and the `.length` is more than 0.
224
+
225
+ ##### .emptyStringOrWhitespace(value)
226
+
227
+ Returns `true` if `is.emptyString(value)` or if it's a `string` that is all whitespace.
228
+
229
+ ##### .emptyArray(value)
230
+
231
+ Returns `true` if the value is an `Array` and the `.length` is 0.
232
+
233
+ ##### .nonEmptyArray(value)
234
+
235
+ Returns `true` if the value is an `Array` and the `.length` is more than 0.
236
+
237
+ ##### .emptyObject(value)
238
+
239
+ Returns `true` if the value is an `Object` and `Object.keys(value).length` is 0.
240
+
241
+ Please note that `Object.keys` returns only own enumerable properties. Hence something like this can happen:
242
+
243
+ ```js
244
+ const object1 = {};
245
+
246
+ Object.defineProperty(object1, 'property1', {
247
+ value: 42,
248
+ writable: true,
249
+ enumerable: false,
250
+ configurable: true
251
+ });
252
+
253
+ is.emptyObject(object1);
254
+ //=> true
255
+ ```
256
+
257
+ ##### .nonEmptyObject(value)
258
+
259
+ Returns `true` if the value is an `Object` and `Object.keys(value).length` is more than 0.
260
+
261
+ ##### .emptySet(value)
262
+
263
+ Returns `true` if the value is a `Set` and the `.size` is 0.
264
+
265
+ ##### .nonEmptySet(Value)
266
+
267
+ Returns `true` if the value is a `Set` and the `.size` is more than 0.
268
+
269
+ ##### .emptyMap(value)
270
+
271
+ Returns `true` if the value is a `Map` and the `.size` is 0.
272
+
273
+ ##### .nonEmptyMap(value)
274
+
275
+ Returns `true` if the value is a `Map` and the `.size` is more than 0.
276
+
277
+ #### Miscellaneous
278
+
279
+ ##### .directInstanceOf(value, class)
280
+
281
+ Returns `true` if `value` is a direct instance of `class`.
282
+
283
+ ```js
284
+ is.directInstanceOf(new Error(), Error);
285
+ //=> true
286
+
287
+ class UnicornError extends Error {}
288
+
289
+ is.directInstanceOf(new UnicornError(), Error);
290
+ //=> false
291
+ ```
292
+
293
+ ##### .urlInstance(value)
294
+
295
+ Returns `true` if `value` is an instance of the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL).
296
+
297
+ ```js
298
+ const url = new URL('https://example.com');
299
+
300
+ is.urlInstance(url);
301
+ //=> true
302
+ ```
303
+
304
+ ##### .urlString(value)
305
+
306
+ Returns `true` if `value` is a URL string.
307
+
308
+ Note: this only does basic checking using the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL) constructor.
309
+
310
+ ```js
311
+ const url = 'https://example.com';
312
+
313
+ is.urlString(url);
314
+ //=> true
315
+
316
+ is.urlString(new URL(url));
317
+ //=> false
318
+ ```
319
+
320
+ ##### .truthy(value)
321
+
322
+ Returns `true` for all values that evaluate to true in a boolean context:
323
+
324
+ ```js
325
+ is.truthy('🦄');
326
+ //=> true
327
+
328
+ is.truthy(undefined);
329
+ //=> false
330
+ ```
331
+
332
+ ##### .falsy(value)
333
+
334
+ Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`.
335
+
336
+ ##### .nan(value)
337
+ ##### .nullOrUndefined(value)
338
+ ##### .primitive(value)
339
+
340
+ JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`.
341
+
342
+ ##### .integer(value)
343
+
344
+ ##### .safeInteger(value)
345
+
346
+ Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
347
+
348
+ ##### .plainObject(value)
349
+
350
+ An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
351
+
352
+ ##### .iterable(value)
353
+ ##### .asyncIterable(value)
354
+ ##### .class(value)
355
+
356
+ Returns `true` for instances created by a class.
357
+
358
+ ##### .typedArray(value)
359
+
360
+ ##### .arrayLike(value)
361
+
362
+ A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0.
363
+
364
+ ```js
365
+ is.arrayLike(document.forms);
366
+ //=> true
367
+
368
+ function foo() {
369
+ is.arrayLike(arguments);
370
+ //=> true
371
+ }
372
+ foo();
373
+ ```
374
+
375
+ ##### .inRange(value, range)
376
+
377
+ Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order.
378
+
379
+ ```js
380
+ is.inRange(3, [0, 5]);
381
+ is.inRange(3, [5, 0]);
382
+ is.inRange(0, [-2, 2]);
383
+ ```
384
+
385
+ ##### .inRange(value, upperBound)
386
+
387
+ Check if `value` (number) is in the range of `0` to `upperBound`.
388
+
389
+ ```js
390
+ is.inRange(3, 10);
391
+ ```
392
+
393
+ ##### .domElement(value)
394
+
395
+ Returns `true` if `value` is a DOM Element.
396
+
397
+ ##### .nodeStream(value)
398
+
399
+ Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html).
400
+
401
+ ```js
402
+ const fs = require('fs');
403
+
404
+ is.nodeStream(fs.createReadStream('unicorn.png'));
405
+ //=> true
406
+ ```
407
+
408
+ ##### .observable(value)
409
+
410
+ Returns `true` if `value` is an `Observable`.
411
+
412
+ ```js
413
+ const {Observable} = require('rxjs');
414
+
415
+ is.observable(new Observable());
416
+ //=> true
417
+ ```
418
+
419
+ ##### .infinite(value)
420
+
421
+ Check if `value` is `Infinity` or `-Infinity`.
422
+
423
+ ##### .evenInteger(value)
424
+
425
+ Returns `true` if `value` is an even integer.
426
+
427
+ ##### .oddInteger(value)
428
+
429
+ Returns `true` if `value` is an odd integer.
430
+
431
+ ##### .propertyKey(value)
432
+
433
+ Returns `true` if `value` can be used as an object property key (either `string`, `number`, or `symbol`).
434
+
435
+ ##### .formData(value)
436
+
437
+ Returns `true` if `value` is an instance of the [`FormData` class](https://developer.mozilla.org/en-US/docs/Web/API/FormData).
438
+
439
+ ```js
440
+ const data = new FormData();
441
+
442
+ is.formData(data);
443
+ //=> true
444
+ ```
445
+
446
+ ##### .urlSearchParams(value)
447
+
448
+ Returns `true` if `value` is an instance of the [`URLSearchParams` class](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
449
+
450
+ ```js
451
+ const searchParams = new URLSearchParams();
452
+
453
+ is.urlSearchParams(searchParams);
454
+ //=> true
455
+ ```
456
+
457
+ ##### .any(predicate | predicate[], ...values)
458
+
459
+ Using a single `predicate` argument, returns `true` if **any** of the input `values` returns true in the `predicate`:
460
+
461
+ ```js
462
+ is.any(is.string, {}, true, '🦄');
463
+ //=> true
464
+
465
+ is.any(is.boolean, 'unicorns', [], new Map());
466
+ //=> false
467
+ ```
468
+
469
+ Using an array of `predicate[]`, returns `true` if **any** of the input `values` returns true for **any** of the `predicates` provided in an array:
470
+
471
+ ```js
472
+ is.any([is.string, is.number], {}, true, '🦄');
473
+ //=> true
474
+
475
+ is.any([is.boolean, is.number], 'unicorns', [], new Map());
476
+ //=> false
477
+ ```
478
+
479
+ ##### .all(predicate, ...values)
480
+
481
+ Returns `true` if **all** of the input `values` returns true in the `predicate`:
482
+
483
+ ```js
484
+ is.all(is.object, {}, new Map(), new Set());
485
+ //=> true
486
+
487
+ is.all(is.string, '🦄', [], 'unicorns');
488
+ //=> false
489
+ ```
490
+
491
+ ## Type guards
492
+
493
+ When using `is` together with TypeScript, [type guards](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types) are being used extensively to infer the correct type inside if-else statements.
494
+
495
+ ```ts
496
+ import is from '@sindresorhus/is';
497
+
498
+ const padLeft = (value: string, padding: string | number) => {
499
+ if (is.number(padding)) {
500
+ // `padding` is typed as `number`
501
+ return Array(padding + 1).join(' ') + value;
502
+ }
503
+
504
+ if (is.string(padding)) {
505
+ // `padding` is typed as `string`
506
+ return padding + value;
507
+ }
508
+
509
+ throw new TypeError(`Expected 'padding' to be of type 'string' or 'number', got '${is(padding)}'.`);
510
+ }
511
+
512
+ padLeft('🦄', 3);
513
+ //=> ' 🦄'
514
+
515
+ padLeft('🦄', '🌈');
516
+ //=> '🌈🦄'
517
+ ```
518
+
519
+ ## Type assertions
520
+
521
+ The type guards are also available as [type assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions), which throw an error for unexpected types. It is a convenient one-line version of the often repetitive "if-not-expected-type-throw" pattern.
522
+
523
+ ```ts
524
+ import {assert} from '@sindresorhus/is';
525
+
526
+ const handleMovieRatingApiResponse = (response: unknown) => {
527
+ assert.plainObject(response);
528
+ // `response` is now typed as a plain `object` with `unknown` properties.
529
+
530
+ assert.number(response.rating);
531
+ // `response.rating` is now typed as a `number`.
532
+
533
+ assert.string(response.title);
534
+ // `response.title` is now typed as a `string`.
535
+
536
+ return `${response.title} (${response.rating * 10})`;
537
+ };
538
+
539
+ handleMovieRatingApiResponse({rating: 0.87, title: 'The Matrix'});
540
+ //=> 'The Matrix (8.7)'
541
+
542
+ // This throws an error.
543
+ handleMovieRatingApiResponse({rating: '🦄'});
544
+ ```
545
+
546
+ ## Generic type parameters
547
+
548
+ The type guards and type assertions are aware of [generic type parameters](https://www.typescriptlang.org/docs/handbook/generics.html), such as `Promise<T>` and `Map<Key, Value>`. The default is `unknown` for most cases, since `is` cannot check them at runtime. If the generic type is known at compile-time, either implicitly (inferred) or explicitly (provided), `is` propagates the type so it can be used later.
549
+
550
+ Use generic type parameters with caution. They are only checked by the TypeScript compiler, and not checked by `is` at runtime. This can lead to unexpected behavior, where the generic type is _assumed_ at compile-time, but actually is something completely different at runtime. It is best to use `unknown` (default) and type-check the value of the generic type parameter at runtime with `is` or `assert`.
551
+
552
+ ```ts
553
+ import {assert} from '@sindresorhus/is';
554
+
555
+ async function badNumberAssumption(input: unknown) {
556
+ // Bad assumption about the generic type parameter fools the compile-time type system.
557
+ assert.promise<number>(input);
558
+ // `input` is a `Promise` but only assumed to be `Promise<number>`.
559
+
560
+ const resolved = await input;
561
+ // `resolved` is typed as `number` but was not actually checked at runtime.
562
+
563
+ // Multiplication will return NaN if the input promise did not actually contain a number.
564
+ return 2 * resolved;
565
+ }
566
+
567
+ async function goodNumberAssertion(input: unknown) {
568
+ assert.promise(input);
569
+ // `input` is typed as `Promise<unknown>`
570
+
571
+ const resolved = await input;
572
+ // `resolved` is typed as `unknown`
573
+
574
+ assert.number(resolved);
575
+ // `resolved` is typed as `number`
576
+
577
+ // Uses runtime checks so only numbers will reach the multiplication.
578
+ return 2 * resolved;
579
+ }
580
+
581
+ badNumberAssumption(Promise.resolve('An unexpected string'));
582
+ //=> NaN
583
+
584
+ // This correctly throws an error because of the unexpected string value.
585
+ goodNumberAssertion(Promise.resolve('An unexpected string'));
586
+ ```
587
+
588
+ ## FAQ
589
+
590
+ ### Why yet another type checking module?
591
+
592
+ There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs:
593
+
594
+ - Includes both type methods and ability to get the type
595
+ - Types of primitives returned as lowercase and object types as camelcase
596
+ - Covers all built-ins
597
+ - Unsurprising behavior
598
+ - Well-maintained
599
+ - Comprehensive test suite
600
+
601
+ For the ones I found, pick 3 of these.
602
+
603
+ The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive.
604
+
605
+ ## For enterprise
606
+
607
+ Available as part of the Tidelift Subscription.
608
+
609
+ The maintainers of @sindresorhus/is and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-sindresorhus-is?utm_source=npm-sindresorhus-is&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
610
+
611
+ ## Related
612
+
613
+ - [ow](https://github.com/sindresorhus/ow) - Function argument validation for humans
614
+ - [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream
615
+ - [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable
616
+ - [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array
617
+ - [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address
618
+ - [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted
619
+ - [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor
620
+ - [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty
621
+ - [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data
622
+ - [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji
623
+
624
+ ## Maintainers
625
+
626
+ - [Sindre Sorhus](https://github.com/sindresorhus)
627
+ - [Giora Guttsait](https://github.com/gioragutt)
628
+ - [Brandon Smith](https://github.com/brandon93s)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Szymon Marczak
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.