aurix-ai 0.1.0

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 (659) hide show
  1. package/README.md +329 -0
  2. package/bin/aurix +172 -0
  3. package/bin/aurix.cmd +23 -0
  4. package/dist/agent/AgentLoop.d.ts +52 -0
  5. package/dist/agent/AgentLoop.d.ts.map +1 -0
  6. package/dist/agent/AgentLoop.js +543 -0
  7. package/dist/agent/AgentLoop.js.map +1 -0
  8. package/dist/agent/AgentsMD.d.ts +8 -0
  9. package/dist/agent/AgentsMD.d.ts.map +1 -0
  10. package/dist/agent/AgentsMD.js +53 -0
  11. package/dist/agent/AgentsMD.js.map +1 -0
  12. package/dist/agent/CodeReview.d.ts +13 -0
  13. package/dist/agent/CodeReview.d.ts.map +1 -0
  14. package/dist/agent/CodeReview.js +134 -0
  15. package/dist/agent/CodeReview.js.map +1 -0
  16. package/dist/agent/Config.d.ts +63 -0
  17. package/dist/agent/Config.d.ts.map +1 -0
  18. package/dist/agent/Config.js +55 -0
  19. package/dist/agent/Config.js.map +1 -0
  20. package/dist/agent/Context.d.ts +4 -0
  21. package/dist/agent/Context.d.ts.map +1 -0
  22. package/dist/agent/Context.js +390 -0
  23. package/dist/agent/Context.js.map +1 -0
  24. package/dist/agent/ContextManager.d.ts +23 -0
  25. package/dist/agent/ContextManager.d.ts.map +1 -0
  26. package/dist/agent/ContextManager.js +163 -0
  27. package/dist/agent/ContextManager.js.map +1 -0
  28. package/dist/agent/MemoryEngine.d.ts +24 -0
  29. package/dist/agent/MemoryEngine.d.ts.map +1 -0
  30. package/dist/agent/MemoryEngine.js +347 -0
  31. package/dist/agent/MemoryEngine.js.map +1 -0
  32. package/dist/agent/MultiAgent.d.ts +22 -0
  33. package/dist/agent/MultiAgent.d.ts.map +1 -0
  34. package/dist/agent/MultiAgent.js +466 -0
  35. package/dist/agent/MultiAgent.js.map +1 -0
  36. package/dist/agent/ResearchPipeline.d.ts +22 -0
  37. package/dist/agent/ResearchPipeline.d.ts.map +1 -0
  38. package/dist/agent/ResearchPipeline.js +195 -0
  39. package/dist/agent/ResearchPipeline.js.map +1 -0
  40. package/dist/agent/Setup.d.ts +3 -0
  41. package/dist/agent/Setup.d.ts.map +1 -0
  42. package/dist/agent/Setup.js +503 -0
  43. package/dist/agent/Setup.js.map +1 -0
  44. package/dist/agent/TokenCounter.d.ts +6 -0
  45. package/dist/agent/TokenCounter.d.ts.map +1 -0
  46. package/dist/agent/TokenCounter.js +73 -0
  47. package/dist/agent/TokenCounter.js.map +1 -0
  48. package/dist/agent/research/CitationGuardian.d.ts +10 -0
  49. package/dist/agent/research/CitationGuardian.d.ts.map +1 -0
  50. package/dist/agent/research/CitationGuardian.js +43 -0
  51. package/dist/agent/research/CitationGuardian.js.map +1 -0
  52. package/dist/agent/research/ClaimExtractor.d.ts +7 -0
  53. package/dist/agent/research/ClaimExtractor.d.ts.map +1 -0
  54. package/dist/agent/research/ClaimExtractor.js +49 -0
  55. package/dist/agent/research/ClaimExtractor.js.map +1 -0
  56. package/dist/agent/research/DebateSystem.d.ts +6 -0
  57. package/dist/agent/research/DebateSystem.d.ts.map +1 -0
  58. package/dist/agent/research/DebateSystem.js +33 -0
  59. package/dist/agent/research/DebateSystem.js.map +1 -0
  60. package/dist/agent/research/FinalReviewer.d.ts +10 -0
  61. package/dist/agent/research/FinalReviewer.d.ts.map +1 -0
  62. package/dist/agent/research/FinalReviewer.js +35 -0
  63. package/dist/agent/research/FinalReviewer.js.map +1 -0
  64. package/dist/agent/research/JudgeAgent.d.ts +7 -0
  65. package/dist/agent/research/JudgeAgent.d.ts.map +1 -0
  66. package/dist/agent/research/JudgeAgent.js +40 -0
  67. package/dist/agent/research/JudgeAgent.js.map +1 -0
  68. package/dist/agent/research/LogicCritic.d.ts +10 -0
  69. package/dist/agent/research/LogicCritic.d.ts.map +1 -0
  70. package/dist/agent/research/LogicCritic.js +39 -0
  71. package/dist/agent/research/LogicCritic.js.map +1 -0
  72. package/dist/agent/research/PlanningAgent.d.ts +10 -0
  73. package/dist/agent/research/PlanningAgent.d.ts.map +1 -0
  74. package/dist/agent/research/PlanningAgent.js +39 -0
  75. package/dist/agent/research/PlanningAgent.js.map +1 -0
  76. package/dist/agent/research/RequestAnalyzer.d.ts +14 -0
  77. package/dist/agent/research/RequestAnalyzer.d.ts.map +1 -0
  78. package/dist/agent/research/RequestAnalyzer.js +38 -0
  79. package/dist/agent/research/RequestAnalyzer.js.map +1 -0
  80. package/dist/agent/research/ResearchAgent.d.ts +12 -0
  81. package/dist/agent/research/ResearchAgent.d.ts.map +1 -0
  82. package/dist/agent/research/ResearchAgent.js +64 -0
  83. package/dist/agent/research/ResearchAgent.js.map +1 -0
  84. package/dist/agent/research/SkepticAgent.d.ts +9 -0
  85. package/dist/agent/research/SkepticAgent.d.ts.map +1 -0
  86. package/dist/agent/research/SkepticAgent.js +38 -0
  87. package/dist/agent/research/SkepticAgent.js.map +1 -0
  88. package/dist/agent/research/SupporterAgent.d.ts +9 -0
  89. package/dist/agent/research/SupporterAgent.d.ts.map +1 -0
  90. package/dist/agent/research/SupporterAgent.js +31 -0
  91. package/dist/agent/research/SupporterAgent.js.map +1 -0
  92. package/dist/agent/research/VideoAgent.d.ts +10 -0
  93. package/dist/agent/research/VideoAgent.d.ts.map +1 -0
  94. package/dist/agent/research/VideoAgent.js +49 -0
  95. package/dist/agent/research/VideoAgent.js.map +1 -0
  96. package/dist/agent/research/WriterAgent.d.ts +6 -0
  97. package/dist/agent/research/WriterAgent.d.ts.map +1 -0
  98. package/dist/agent/research/WriterAgent.js +30 -0
  99. package/dist/agent/research/WriterAgent.js.map +1 -0
  100. package/dist/agent/research/index.d.ts +15 -0
  101. package/dist/agent/research/index.d.ts.map +1 -0
  102. package/dist/agent/research/index.js +14 -0
  103. package/dist/agent/research/index.js.map +1 -0
  104. package/dist/agent/research/types.d.ts +49 -0
  105. package/dist/agent/research/types.d.ts.map +1 -0
  106. package/dist/agent/research/types.js +17 -0
  107. package/dist/agent/research/types.js.map +1 -0
  108. package/dist/cli/AltScreen.d.ts +3 -0
  109. package/dist/cli/AltScreen.d.ts.map +1 -0
  110. package/dist/cli/AltScreen.js +72 -0
  111. package/dist/cli/AltScreen.js.map +1 -0
  112. package/dist/cli/App.d.ts +11 -0
  113. package/dist/cli/App.d.ts.map +1 -0
  114. package/dist/cli/App.js +1319 -0
  115. package/dist/cli/App.js.map +1 -0
  116. package/dist/cli/Banner.d.ts +13 -0
  117. package/dist/cli/Banner.d.ts.map +1 -0
  118. package/dist/cli/Banner.js +12 -0
  119. package/dist/cli/Banner.js.map +1 -0
  120. package/dist/cli/BlackFill.d.ts +3 -0
  121. package/dist/cli/BlackFill.d.ts.map +1 -0
  122. package/dist/cli/BlackFill.js +9 -0
  123. package/dist/cli/BlackFill.js.map +1 -0
  124. package/dist/cli/ChatArea.d.ts +20 -0
  125. package/dist/cli/ChatArea.d.ts.map +1 -0
  126. package/dist/cli/ChatArea.js +300 -0
  127. package/dist/cli/ChatArea.js.map +1 -0
  128. package/dist/cli/ConnectModal.d.ts +9 -0
  129. package/dist/cli/ConnectModal.d.ts.map +1 -0
  130. package/dist/cli/ConnectModal.js +101 -0
  131. package/dist/cli/ConnectModal.js.map +1 -0
  132. package/dist/cli/FileDiff.d.ts +16 -0
  133. package/dist/cli/FileDiff.d.ts.map +1 -0
  134. package/dist/cli/FileDiff.js +45 -0
  135. package/dist/cli/FileDiff.js.map +1 -0
  136. package/dist/cli/InputBox.d.ts +18 -0
  137. package/dist/cli/InputBox.d.ts.map +1 -0
  138. package/dist/cli/InputBox.js +573 -0
  139. package/dist/cli/InputBox.js.map +1 -0
  140. package/dist/cli/LoginModal.d.ts +10 -0
  141. package/dist/cli/LoginModal.d.ts.map +1 -0
  142. package/dist/cli/LoginModal.js +129 -0
  143. package/dist/cli/LoginModal.js.map +1 -0
  144. package/dist/cli/Menu.d.ts +26 -0
  145. package/dist/cli/Menu.d.ts.map +1 -0
  146. package/dist/cli/Menu.js +115 -0
  147. package/dist/cli/Menu.js.map +1 -0
  148. package/dist/cli/MouseFilter.d.ts +2 -0
  149. package/dist/cli/MouseFilter.d.ts.map +1 -0
  150. package/dist/cli/MouseFilter.js +47 -0
  151. package/dist/cli/MouseFilter.js.map +1 -0
  152. package/dist/cli/Panel.d.ts.map +1 -0
  153. package/dist/cli/Panel.js.map +1 -0
  154. package/dist/cli/PermissionPrompt.d.ts +9 -0
  155. package/dist/cli/PermissionPrompt.d.ts.map +1 -0
  156. package/dist/cli/PermissionPrompt.js +56 -0
  157. package/dist/cli/PermissionPrompt.js.map +1 -0
  158. package/dist/cli/SessionPanel.d.ts +15 -0
  159. package/dist/cli/SessionPanel.d.ts.map +1 -0
  160. package/dist/cli/SessionPanel.js +28 -0
  161. package/dist/cli/SessionPanel.js.map +1 -0
  162. package/dist/cli/SetupUI.d.ts +34 -0
  163. package/dist/cli/SetupUI.d.ts.map +1 -0
  164. package/dist/cli/SetupUI.js +311 -0
  165. package/dist/cli/SetupUI.js.map +1 -0
  166. package/dist/cli/StatusBar.d.ts +12 -0
  167. package/dist/cli/StatusBar.d.ts.map +1 -0
  168. package/dist/cli/StatusBar.js +7 -0
  169. package/dist/cli/StatusBar.js.map +1 -0
  170. package/dist/cli/WhatsAppModal.d.ts +10 -0
  171. package/dist/cli/WhatsAppModal.d.ts.map +1 -0
  172. package/dist/cli/WhatsAppModal.js +78 -0
  173. package/dist/cli/WhatsAppModal.js.map +1 -0
  174. package/dist/cli/animation/useThinking.d.ts +2 -0
  175. package/dist/cli/animation/useThinking.d.ts.map +1 -0
  176. package/dist/cli/animation/useThinking.js +50 -0
  177. package/dist/cli/animation/useThinking.js.map +1 -0
  178. package/dist/cli/commands.d.ts +26 -0
  179. package/dist/cli/commands.d.ts.map +1 -0
  180. package/dist/cli/commands.js +816 -0
  181. package/dist/cli/commands.js.map +1 -0
  182. package/dist/cli/theme.d.ts +101 -0
  183. package/dist/cli/theme.d.ts.map +1 -0
  184. package/dist/cli/theme.js +222 -0
  185. package/dist/cli/theme.js.map +1 -0
  186. package/dist/commands/SlashCommands.d.ts +15 -0
  187. package/dist/commands/SlashCommands.d.ts.map +1 -0
  188. package/dist/commands/SlashCommands.js +238 -0
  189. package/dist/commands/SlashCommands.js.map +1 -0
  190. package/dist/gateway/Discord.d.ts +13 -0
  191. package/dist/gateway/Discord.d.ts.map +1 -0
  192. package/dist/gateway/Discord.js +144 -0
  193. package/dist/gateway/Discord.js.map +1 -0
  194. package/dist/gateway/Gateway.d.ts +71 -0
  195. package/dist/gateway/Gateway.d.ts.map +1 -0
  196. package/dist/gateway/Gateway.js +665 -0
  197. package/dist/gateway/Gateway.js.map +1 -0
  198. package/dist/gateway/Telegram.d.ts +18 -0
  199. package/dist/gateway/Telegram.d.ts.map +1 -0
  200. package/dist/gateway/Telegram.js +224 -0
  201. package/dist/gateway/Telegram.js.map +1 -0
  202. package/dist/gateway/WASessionStore.d.ts +13 -0
  203. package/dist/gateway/WASessionStore.d.ts.map +1 -0
  204. package/dist/gateway/WASessionStore.js +94 -0
  205. package/dist/gateway/WASessionStore.js.map +1 -0
  206. package/dist/gateway/WhatsApp.d.ts +19 -0
  207. package/dist/gateway/WhatsApp.d.ts.map +1 -0
  208. package/dist/gateway/WhatsApp.js +159 -0
  209. package/dist/gateway/WhatsApp.js.map +1 -0
  210. package/dist/gateway-entry.d.ts +3 -0
  211. package/dist/gateway-entry.d.ts.map +1 -0
  212. package/dist/gateway-entry.js +50 -0
  213. package/dist/gateway-entry.js.map +1 -0
  214. package/dist/index.d.ts +5 -0
  215. package/dist/index.d.ts.map +1 -0
  216. package/dist/index.js +213 -0
  217. package/dist/index.js.map +1 -0
  218. package/dist/providers/index.d.ts +70 -0
  219. package/dist/providers/index.d.ts.map +1 -0
  220. package/dist/providers/index.js +390 -0
  221. package/dist/providers/index.js.map +1 -0
  222. package/dist/skills/SkillRegistry.d.ts +33 -0
  223. package/dist/skills/SkillRegistry.d.ts.map +1 -0
  224. package/dist/skills/SkillRegistry.js +102 -0
  225. package/dist/skills/SkillRegistry.js.map +1 -0
  226. package/dist/token-counter.linux-x64-gnu.node +0 -0
  227. package/dist/tools/Backend.d.ts +3 -0
  228. package/dist/tools/Backend.d.ts.map +1 -0
  229. package/dist/tools/Backend.js +154 -0
  230. package/dist/tools/Backend.js.map +1 -0
  231. package/dist/tools/Blockchain.d.ts +3 -0
  232. package/dist/tools/Blockchain.d.ts.map +1 -0
  233. package/dist/tools/Blockchain.js +82 -0
  234. package/dist/tools/Blockchain.js.map +1 -0
  235. package/dist/tools/Browser.d.ts +5 -0
  236. package/dist/tools/Browser.d.ts.map +1 -0
  237. package/dist/tools/Browser.js +2253 -0
  238. package/dist/tools/Browser.js.map +1 -0
  239. package/dist/tools/Cloud.d.ts +3 -0
  240. package/dist/tools/Cloud.d.ts.map +1 -0
  241. package/dist/tools/Cloud.js +115 -0
  242. package/dist/tools/Cloud.js.map +1 -0
  243. package/dist/tools/CodeExec.d.ts +3 -0
  244. package/dist/tools/CodeExec.d.ts.map +1 -0
  245. package/dist/tools/CodeExec.js +76 -0
  246. package/dist/tools/CodeExec.js.map +1 -0
  247. package/dist/tools/Cybersec.d.ts +3 -0
  248. package/dist/tools/Cybersec.d.ts.map +1 -0
  249. package/dist/tools/Cybersec.js +186 -0
  250. package/dist/tools/Cybersec.js.map +1 -0
  251. package/dist/tools/Deploy.d.ts +3 -0
  252. package/dist/tools/Deploy.d.ts.map +1 -0
  253. package/dist/tools/Deploy.js +87 -0
  254. package/dist/tools/Deploy.js.map +1 -0
  255. package/dist/tools/Diagram.d.ts +3 -0
  256. package/dist/tools/Diagram.d.ts.map +1 -0
  257. package/dist/tools/Diagram.js +38 -0
  258. package/dist/tools/Diagram.js.map +1 -0
  259. package/dist/tools/Docker.d.ts +3 -0
  260. package/dist/tools/Docker.d.ts.map +1 -0
  261. package/dist/tools/Docker.js +45 -0
  262. package/dist/tools/Docker.js.map +1 -0
  263. package/dist/tools/Email.d.ts +3 -0
  264. package/dist/tools/Email.d.ts.map +1 -0
  265. package/dist/tools/Email.js +172 -0
  266. package/dist/tools/Email.js.map +1 -0
  267. package/dist/tools/Excel.d.ts +3 -0
  268. package/dist/tools/Excel.d.ts.map +1 -0
  269. package/dist/tools/Excel.js +41 -0
  270. package/dist/tools/Excel.js.map +1 -0
  271. package/dist/tools/FileEdit.d.ts +3 -0
  272. package/dist/tools/FileEdit.d.ts.map +1 -0
  273. package/dist/tools/FileEdit.js +69 -0
  274. package/dist/tools/FileEdit.js.map +1 -0
  275. package/dist/tools/FileOps.d.ts +5 -0
  276. package/dist/tools/FileOps.d.ts.map +1 -0
  277. package/dist/tools/FileOps.js +76 -0
  278. package/dist/tools/FileOps.js.map +1 -0
  279. package/dist/tools/Frontend.d.ts +3 -0
  280. package/dist/tools/Frontend.d.ts.map +1 -0
  281. package/dist/tools/Frontend.js +124 -0
  282. package/dist/tools/Frontend.js.map +1 -0
  283. package/dist/tools/GifSearch.d.ts +3 -0
  284. package/dist/tools/GifSearch.d.ts.map +1 -0
  285. package/dist/tools/GifSearch.js +36 -0
  286. package/dist/tools/GifSearch.js.map +1 -0
  287. package/dist/tools/Github.d.ts +3 -0
  288. package/dist/tools/Github.d.ts.map +1 -0
  289. package/dist/tools/Github.js +95 -0
  290. package/dist/tools/Github.js.map +1 -0
  291. package/dist/tools/GithubConnect.d.ts +3 -0
  292. package/dist/tools/GithubConnect.d.ts.map +1 -0
  293. package/dist/tools/GithubConnect.js +282 -0
  294. package/dist/tools/GithubConnect.js.map +1 -0
  295. package/dist/tools/Humanizer.d.ts +3 -0
  296. package/dist/tools/Humanizer.d.ts.map +1 -0
  297. package/dist/tools/Humanizer.js +45 -0
  298. package/dist/tools/Humanizer.js.map +1 -0
  299. package/dist/tools/Maps.d.ts +3 -0
  300. package/dist/tools/Maps.d.ts.map +1 -0
  301. package/dist/tools/Maps.js +51 -0
  302. package/dist/tools/Maps.js.map +1 -0
  303. package/dist/tools/McpManage.d.ts +26 -0
  304. package/dist/tools/McpManage.d.ts.map +1 -0
  305. package/dist/tools/McpManage.js +229 -0
  306. package/dist/tools/McpManage.js.map +1 -0
  307. package/dist/tools/Memory.d.ts +3 -0
  308. package/dist/tools/Memory.d.ts.map +1 -0
  309. package/dist/tools/Memory.js +68 -0
  310. package/dist/tools/Memory.js.map +1 -0
  311. package/dist/tools/Music.d.ts +3 -0
  312. package/dist/tools/Music.d.ts.map +1 -0
  313. package/dist/tools/Music.js +274 -0
  314. package/dist/tools/Music.js.map +1 -0
  315. package/dist/tools/Notifier.d.ts +3 -0
  316. package/dist/tools/Notifier.d.ts.map +1 -0
  317. package/dist/tools/Notifier.js +31 -0
  318. package/dist/tools/Notifier.js.map +1 -0
  319. package/dist/tools/Osint.d.ts +3 -0
  320. package/dist/tools/Osint.d.ts.map +1 -0
  321. package/dist/tools/Osint.js +57 -0
  322. package/dist/tools/Osint.js.map +1 -0
  323. package/dist/tools/Pdf.d.ts +3 -0
  324. package/dist/tools/Pdf.d.ts.map +1 -0
  325. package/dist/tools/Pdf.js +152 -0
  326. package/dist/tools/Pdf.js.map +1 -0
  327. package/dist/tools/Planning.d.ts +3 -0
  328. package/dist/tools/Planning.d.ts.map +1 -0
  329. package/dist/tools/Planning.js +212 -0
  330. package/dist/tools/Planning.js.map +1 -0
  331. package/dist/tools/Pptx.d.ts +3 -0
  332. package/dist/tools/Pptx.d.ts.map +1 -0
  333. package/dist/tools/Pptx.js +47 -0
  334. package/dist/tools/Pptx.js.map +1 -0
  335. package/dist/tools/Registry.d.ts +39 -0
  336. package/dist/tools/Registry.d.ts.map +1 -0
  337. package/dist/tools/Registry.js +151 -0
  338. package/dist/tools/Registry.js.map +1 -0
  339. package/dist/tools/Research.d.ts +3 -0
  340. package/dist/tools/Research.d.ts.map +1 -0
  341. package/dist/tools/Research.js +126 -0
  342. package/dist/tools/Research.js.map +1 -0
  343. package/dist/tools/ResearchForums.d.ts +3 -0
  344. package/dist/tools/ResearchForums.d.ts.map +1 -0
  345. package/dist/tools/ResearchForums.js +84 -0
  346. package/dist/tools/ResearchForums.js.map +1 -0
  347. package/dist/tools/Scraper.d.ts +3 -0
  348. package/dist/tools/Scraper.d.ts.map +1 -0
  349. package/dist/tools/Scraper.js +54 -0
  350. package/dist/tools/Scraper.js.map +1 -0
  351. package/dist/tools/SendFile.d.ts +4 -0
  352. package/dist/tools/SendFile.d.ts.map +1 -0
  353. package/dist/tools/SendFile.js +71 -0
  354. package/dist/tools/SendFile.js.map +1 -0
  355. package/dist/tools/SkillLoader.d.ts +3 -0
  356. package/dist/tools/SkillLoader.d.ts.map +1 -0
  357. package/dist/tools/SkillLoader.js +132 -0
  358. package/dist/tools/SkillLoader.js.map +1 -0
  359. package/dist/tools/SystemMonitor.d.ts +3 -0
  360. package/dist/tools/SystemMonitor.d.ts.map +1 -0
  361. package/dist/tools/SystemMonitor.js +59 -0
  362. package/dist/tools/SystemMonitor.js.map +1 -0
  363. package/dist/tools/Terminal.d.ts +3 -0
  364. package/dist/tools/Terminal.d.ts.map +1 -0
  365. package/dist/tools/Terminal.js +32 -0
  366. package/dist/tools/Terminal.js.map +1 -0
  367. package/dist/tools/Todo.d.ts +3 -0
  368. package/dist/tools/Todo.d.ts.map +1 -0
  369. package/dist/tools/Todo.js +87 -0
  370. package/dist/tools/Todo.js.map +1 -0
  371. package/dist/tools/Trading.d.ts +3 -0
  372. package/dist/tools/Trading.d.ts.map +1 -0
  373. package/dist/tools/Trading.js +277 -0
  374. package/dist/tools/Trading.js.map +1 -0
  375. package/dist/tools/Vision.d.ts +3 -0
  376. package/dist/tools/Vision.d.ts.map +1 -0
  377. package/dist/tools/Vision.js +99 -0
  378. package/dist/tools/Vision.js.map +1 -0
  379. package/dist/tools/Vps.d.ts +3 -0
  380. package/dist/tools/Vps.d.ts.map +1 -0
  381. package/dist/tools/Vps.js +178 -0
  382. package/dist/tools/Vps.js.map +1 -0
  383. package/dist/tools/WebSearch.d.ts +3 -0
  384. package/dist/tools/WebSearch.d.ts.map +1 -0
  385. package/dist/tools/WebSearch.js +115 -0
  386. package/dist/tools/WebSearch.js.map +1 -0
  387. package/dist/tools/YouTube.d.ts +3 -0
  388. package/dist/tools/YouTube.d.ts.map +1 -0
  389. package/dist/tools/YouTube.js +30 -0
  390. package/dist/tools/YouTube.js.map +1 -0
  391. package/dist/utils/ascii-logo.d.ts +9 -0
  392. package/dist/utils/ascii-logo.d.ts.map +1 -0
  393. package/dist/utils/ascii-logo.js +34 -0
  394. package/dist/utils/ascii-logo.js.map +1 -0
  395. package/dist/utils/base-url.d.ts +9 -0
  396. package/dist/utils/base-url.d.ts.map +1 -0
  397. package/dist/utils/base-url.js +58 -0
  398. package/dist/utils/base-url.js.map +1 -0
  399. package/native/token-counter/index.d.ts +7 -0
  400. package/native/token-counter/index.js +316 -0
  401. package/native/token-counter/node_modules/.package-lock.json +568 -0
  402. package/native/token-counter/node_modules/2/array.js +25 -0
  403. package/native/token-counter/node_modules/2/index.js +12 -0
  404. package/native/token-counter/node_modules/2/iterator.js +13 -0
  405. package/native/token-counter/node_modules/2/license.txt +21 -0
  406. package/native/token-counter/node_modules/2/map.js +27 -0
  407. package/native/token-counter/node_modules/2/number.js +109 -0
  408. package/native/token-counter/node_modules/2/object.js +23 -0
  409. package/native/token-counter/node_modules/2/package.json +60 -0
  410. package/native/token-counter/node_modules/2/readme.md +246 -0
  411. package/native/token-counter/node_modules/2/string.js +11 -0
  412. package/native/token-counter/node_modules/2/test.js +520 -0
  413. package/native/token-counter/node_modules/@lamansky/every/index.js +16 -0
  414. package/native/token-counter/node_modules/@lamansky/every/license.txt +21 -0
  415. package/native/token-counter/node_modules/@lamansky/every/package.json +38 -0
  416. package/native/token-counter/node_modules/@lamansky/every/readme.md +46 -0
  417. package/native/token-counter/node_modules/@lamansky/flatten/index.js +5 -0
  418. package/native/token-counter/node_modules/@lamansky/flatten/license.txt +21 -0
  419. package/native/token-counter/node_modules/@lamansky/flatten/package.json +35 -0
  420. package/native/token-counter/node_modules/@lamansky/flatten/readme.md +41 -0
  421. package/native/token-counter/node_modules/@napi-rs/cli/LICENSE +21 -0
  422. package/native/token-counter/node_modules/@napi-rs/cli/README.md +96 -0
  423. package/native/token-counter/node_modules/@napi-rs/cli/package.json +65 -0
  424. package/native/token-counter/node_modules/@napi-rs/cli/scripts/index.js +51371 -0
  425. package/native/token-counter/node_modules/add-counter/index.js +3 -0
  426. package/native/token-counter/node_modules/add-counter/license.txt +21 -0
  427. package/native/token-counter/node_modules/add-counter/package.json +34 -0
  428. package/native/token-counter/node_modules/add-counter/readme.md +36 -0
  429. package/native/token-counter/node_modules/array-pad/LICENSE +22 -0
  430. package/native/token-counter/node_modules/array-pad/README.md +80 -0
  431. package/native/token-counter/node_modules/array-pad/index.js +30 -0
  432. package/native/token-counter/node_modules/array-pad/package.json +28 -0
  433. package/native/token-counter/node_modules/arrify/index.js +8 -0
  434. package/native/token-counter/node_modules/arrify/license +21 -0
  435. package/native/token-counter/node_modules/arrify/package.json +33 -0
  436. package/native/token-counter/node_modules/arrify/readme.md +36 -0
  437. package/native/token-counter/node_modules/case-insensitive/index.js +72 -0
  438. package/native/token-counter/node_modules/case-insensitive/license.txt +21 -0
  439. package/native/token-counter/node_modules/case-insensitive/package.json +39 -0
  440. package/native/token-counter/node_modules/case-insensitive/readme.md +39 -0
  441. package/native/token-counter/node_modules/case-insensitive/test.js +114 -0
  442. package/native/token-counter/node_modules/class-chain/index.js +32 -0
  443. package/native/token-counter/node_modules/class-chain/license.txt +21 -0
  444. package/native/token-counter/node_modules/class-chain/package.json +39 -0
  445. package/native/token-counter/node_modules/class-chain/readme.md +23 -0
  446. package/native/token-counter/node_modules/class-chain/test.js +77 -0
  447. package/native/token-counter/node_modules/copy-own/index.js +10 -0
  448. package/native/token-counter/node_modules/copy-own/license.txt +21 -0
  449. package/native/token-counter/node_modules/copy-own/package.json +37 -0
  450. package/native/token-counter/node_modules/copy-own/readme.md +67 -0
  451. package/native/token-counter/node_modules/def-props/index.js +43 -0
  452. package/native/token-counter/node_modules/def-props/license.txt +21 -0
  453. package/native/token-counter/node_modules/def-props/node_modules/is-obj/index.d.ts +22 -0
  454. package/native/token-counter/node_modules/def-props/node_modules/is-obj/index.js +6 -0
  455. package/native/token-counter/node_modules/def-props/node_modules/is-obj/license +9 -0
  456. package/native/token-counter/node_modules/def-props/node_modules/is-obj/package.json +34 -0
  457. package/native/token-counter/node_modules/def-props/node_modules/is-obj/readme.md +39 -0
  458. package/native/token-counter/node_modules/def-props/package.json +51 -0
  459. package/native/token-counter/node_modules/def-props/readme.md +117 -0
  460. package/native/token-counter/node_modules/empty-iterator/index.js +3 -0
  461. package/native/token-counter/node_modules/empty-iterator/license.txt +21 -0
  462. package/native/token-counter/node_modules/empty-iterator/package.json +33 -0
  463. package/native/token-counter/node_modules/empty-iterator/readme.md +23 -0
  464. package/native/token-counter/node_modules/enforce-range/index.js +15 -0
  465. package/native/token-counter/node_modules/enforce-range/license.txt +21 -0
  466. package/native/token-counter/node_modules/enforce-range/node_modules/2/array.js +43 -0
  467. package/native/token-counter/node_modules/enforce-range/node_modules/2/index.js +10 -0
  468. package/native/token-counter/node_modules/enforce-range/node_modules/2/iterator.js +26 -0
  469. package/native/token-counter/node_modules/enforce-range/node_modules/2/license.txt +21 -0
  470. package/native/token-counter/node_modules/enforce-range/node_modules/2/map.js +47 -0
  471. package/native/token-counter/node_modules/enforce-range/node_modules/2/number.js +33 -0
  472. package/native/token-counter/node_modules/enforce-range/node_modules/2/object.js +61 -0
  473. package/native/token-counter/node_modules/enforce-range/node_modules/2/package.json +41 -0
  474. package/native/token-counter/node_modules/enforce-range/node_modules/2/readme.md +210 -0
  475. package/native/token-counter/node_modules/enforce-range/node_modules/2/string.js +37 -0
  476. package/native/token-counter/node_modules/enforce-range/node_modules/2/test.js +413 -0
  477. package/native/token-counter/node_modules/enforce-range/package.json +36 -0
  478. package/native/token-counter/node_modules/enforce-range/readme.md +53 -0
  479. package/native/token-counter/node_modules/english-list/.travis.yml +6 -0
  480. package/native/token-counter/node_modules/english-list/LICENSE +22 -0
  481. package/native/token-counter/node_modules/english-list/README.md +44 -0
  482. package/native/token-counter/node_modules/english-list/index.js +34 -0
  483. package/native/token-counter/node_modules/english-list/package.json +31 -0
  484. package/native/token-counter/node_modules/english-list/test.log +6 -0
  485. package/native/token-counter/node_modules/errate/index.js +19 -0
  486. package/native/token-counter/node_modules/errate/license.txt +21 -0
  487. package/native/token-counter/node_modules/errate/package.json +39 -0
  488. package/native/token-counter/node_modules/errate/readme.md +79 -0
  489. package/native/token-counter/node_modules/ffn/index.js +9 -0
  490. package/native/token-counter/node_modules/ffn/license.txt +21 -0
  491. package/native/token-counter/node_modules/ffn/package.json +34 -0
  492. package/native/token-counter/node_modules/ffn/readme.md +51 -0
  493. package/native/token-counter/node_modules/get-own-property/index.js +5 -0
  494. package/native/token-counter/node_modules/get-own-property/license.txt +21 -0
  495. package/native/token-counter/node_modules/get-own-property/package.json +31 -0
  496. package/native/token-counter/node_modules/get-own-property/readme.md +22 -0
  497. package/native/token-counter/node_modules/has-duplicates/index.js +11 -0
  498. package/native/token-counter/node_modules/has-duplicates/license.txt +21 -0
  499. package/native/token-counter/node_modules/has-duplicates/package.json +32 -0
  500. package/native/token-counter/node_modules/has-duplicates/readme.md +23 -0
  501. package/native/token-counter/node_modules/has-duplicates/test.js +30 -0
  502. package/native/token-counter/node_modules/if-else-throw/index.js +8 -0
  503. package/native/token-counter/node_modules/if-else-throw/license.txt +21 -0
  504. package/native/token-counter/node_modules/if-else-throw/package.json +37 -0
  505. package/native/token-counter/node_modules/if-else-throw/readme.md +32 -0
  506. package/native/token-counter/node_modules/is-array-of-length/index.js +7 -0
  507. package/native/token-counter/node_modules/is-array-of-length/license.txt +21 -0
  508. package/native/token-counter/node_modules/is-array-of-length/package.json +42 -0
  509. package/native/token-counter/node_modules/is-array-of-length/readme.md +41 -0
  510. package/native/token-counter/node_modules/is-class-of/index.js +7 -0
  511. package/native/token-counter/node_modules/is-class-of/license.txt +21 -0
  512. package/native/token-counter/node_modules/is-class-of/package.json +35 -0
  513. package/native/token-counter/node_modules/is-class-of/readme.md +57 -0
  514. package/native/token-counter/node_modules/is-global-object/index.js +6 -0
  515. package/native/token-counter/node_modules/is-global-object/license.txt +21 -0
  516. package/native/token-counter/node_modules/is-global-object/package.json +34 -0
  517. package/native/token-counter/node_modules/is-global-object/readme.md +22 -0
  518. package/native/token-counter/node_modules/is-instance-of/index.js +28 -0
  519. package/native/token-counter/node_modules/is-instance-of/license.txt +21 -0
  520. package/native/token-counter/node_modules/is-instance-of/package.json +44 -0
  521. package/native/token-counter/node_modules/is-instance-of/readme.md +55 -0
  522. package/native/token-counter/node_modules/is-iterable/index.js +5 -0
  523. package/native/token-counter/node_modules/is-iterable/license +21 -0
  524. package/native/token-counter/node_modules/is-iterable/package.json +30 -0
  525. package/native/token-counter/node_modules/is-iterable/readme.md +23 -0
  526. package/native/token-counter/node_modules/is-nil/LICENSE +21 -0
  527. package/native/token-counter/node_modules/is-nil/README.md +47 -0
  528. package/native/token-counter/node_modules/is-nil/index.js +6 -0
  529. package/native/token-counter/node_modules/is-nil/package.json +46 -0
  530. package/native/token-counter/node_modules/is-obj/index.js +5 -0
  531. package/native/token-counter/node_modules/is-obj/license +21 -0
  532. package/native/token-counter/node_modules/is-obj/package.json +33 -0
  533. package/native/token-counter/node_modules/is-obj/readme.md +34 -0
  534. package/native/token-counter/node_modules/is-object/.eslintignore +1 -0
  535. package/native/token-counter/node_modules/is-object/.eslintrc +5 -0
  536. package/native/token-counter/node_modules/is-object/.nycrc +13 -0
  537. package/native/token-counter/node_modules/is-object/.testem.json +14 -0
  538. package/native/token-counter/node_modules/is-object/CHANGELOG.md +121 -0
  539. package/native/token-counter/node_modules/is-object/LICENSE +19 -0
  540. package/native/token-counter/node_modules/is-object/README.md +48 -0
  541. package/native/token-counter/node_modules/is-object/index.js +5 -0
  542. package/native/token-counter/node_modules/is-object/package.json +78 -0
  543. package/native/token-counter/node_modules/is-object/test/index.js +44 -0
  544. package/native/token-counter/node_modules/is-plain-object/LICENSE +21 -0
  545. package/native/token-counter/node_modules/is-plain-object/README.md +104 -0
  546. package/native/token-counter/node_modules/is-plain-object/index.d.ts +5 -0
  547. package/native/token-counter/node_modules/is-plain-object/index.js +37 -0
  548. package/native/token-counter/node_modules/is-plain-object/package.json +79 -0
  549. package/native/token-counter/node_modules/isobject/LICENSE +21 -0
  550. package/native/token-counter/node_modules/isobject/README.md +122 -0
  551. package/native/token-counter/node_modules/isobject/index.d.ts +5 -0
  552. package/native/token-counter/node_modules/isobject/index.js +12 -0
  553. package/native/token-counter/node_modules/isobject/package.json +74 -0
  554. package/native/token-counter/node_modules/lodash.set/LICENSE +47 -0
  555. package/native/token-counter/node_modules/lodash.set/README.md +18 -0
  556. package/native/token-counter/node_modules/lodash.set/index.js +990 -0
  557. package/native/token-counter/node_modules/lodash.set/package.json +17 -0
  558. package/native/token-counter/node_modules/longest-first/index.js +3 -0
  559. package/native/token-counter/node_modules/longest-first/license.txt +21 -0
  560. package/native/token-counter/node_modules/longest-first/package.json +36 -0
  561. package/native/token-counter/node_modules/longest-first/readme.md +29 -0
  562. package/native/token-counter/node_modules/m-o/index.js +27 -0
  563. package/native/token-counter/node_modules/m-o/license.txt +21 -0
  564. package/native/token-counter/node_modules/m-o/node_modules/new-object/index.js +23 -0
  565. package/native/token-counter/node_modules/m-o/node_modules/new-object/license.txt +21 -0
  566. package/native/token-counter/node_modules/m-o/node_modules/new-object/package.json +40 -0
  567. package/native/token-counter/node_modules/m-o/node_modules/new-object/readme.md +55 -0
  568. package/native/token-counter/node_modules/m-o/package.json +45 -0
  569. package/native/token-counter/node_modules/m-o/readme.md +87 -0
  570. package/native/token-counter/node_modules/map-iter/index.js +6 -0
  571. package/native/token-counter/node_modules/map-iter/license.txt +21 -0
  572. package/native/token-counter/node_modules/map-iter/package.json +40 -0
  573. package/native/token-counter/node_modules/map-iter/readme.md +46 -0
  574. package/native/token-counter/node_modules/new-object/index.js +5 -0
  575. package/native/token-counter/node_modules/new-object/license.txt +21 -0
  576. package/native/token-counter/node_modules/new-object/package.json +49 -0
  577. package/native/token-counter/node_modules/new-object/readme.md +145 -0
  578. package/native/token-counter/node_modules/ofn/index.js +22 -0
  579. package/native/token-counter/node_modules/ofn/license.txt +21 -0
  580. package/native/token-counter/node_modules/ofn/package.json +40 -0
  581. package/native/token-counter/node_modules/ofn/readme.md +63 -0
  582. package/native/token-counter/node_modules/otherwise/index.js +11 -0
  583. package/native/token-counter/node_modules/otherwise/license.txt +21 -0
  584. package/native/token-counter/node_modules/otherwise/package.json +38 -0
  585. package/native/token-counter/node_modules/otherwise/readme.md +29 -0
  586. package/native/token-counter/node_modules/parser-factory/index.js +138 -0
  587. package/native/token-counter/node_modules/parser-factory/license.txt +21 -0
  588. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/index.d.ts +38 -0
  589. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/index.js +23 -0
  590. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/license +9 -0
  591. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/package.json +35 -0
  592. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/readme.md +39 -0
  593. package/native/token-counter/node_modules/parser-factory/package.json +38 -0
  594. package/native/token-counter/node_modules/parser-factory/readme.md +15 -0
  595. package/native/token-counter/node_modules/pfn/index.js +5 -0
  596. package/native/token-counter/node_modules/pfn/license.txt +21 -0
  597. package/native/token-counter/node_modules/pfn/package.json +41 -0
  598. package/native/token-counter/node_modules/pfn/readme.md +111 -0
  599. package/native/token-counter/node_modules/pfn/strict.js +8 -0
  600. package/native/token-counter/node_modules/plainify/index.js +5 -0
  601. package/native/token-counter/node_modules/plainify/license.txt +21 -0
  602. package/native/token-counter/node_modules/plainify/package.json +36 -0
  603. package/native/token-counter/node_modules/plainify/readme.md +47 -0
  604. package/native/token-counter/node_modules/possible-function/changelog.md +7 -0
  605. package/native/token-counter/node_modules/possible-function/index.js +43 -0
  606. package/native/token-counter/node_modules/possible-function/license.txt +21 -0
  607. package/native/token-counter/node_modules/possible-function/package.json +34 -0
  608. package/native/token-counter/node_modules/possible-function/readme.md +77 -0
  609. package/native/token-counter/node_modules/possible-function/test.js +32 -0
  610. package/native/token-counter/node_modules/qfn/index.js +11 -0
  611. package/native/token-counter/node_modules/qfn/license.txt +21 -0
  612. package/native/token-counter/node_modules/qfn/package.json +40 -0
  613. package/native/token-counter/node_modules/qfn/readme.md +45 -0
  614. package/native/token-counter/node_modules/roadblock/index.js +3 -0
  615. package/native/token-counter/node_modules/roadblock/license.txt +21 -0
  616. package/native/token-counter/node_modules/roadblock/package.json +40 -0
  617. package/native/token-counter/node_modules/roadblock/readme.md +59 -0
  618. package/native/token-counter/node_modules/round-to/index.d.ts +56 -0
  619. package/native/token-counter/node_modules/round-to/index.js +37 -0
  620. package/native/token-counter/node_modules/round-to/license +9 -0
  621. package/native/token-counter/node_modules/round-to/package.json +38 -0
  622. package/native/token-counter/node_modules/round-to/readme.md +71 -0
  623. package/native/token-counter/node_modules/rtrim-array/index.js +10 -0
  624. package/native/token-counter/node_modules/rtrim-array/license.txt +21 -0
  625. package/native/token-counter/node_modules/rtrim-array/package.json +41 -0
  626. package/native/token-counter/node_modules/rtrim-array/readme.md +75 -0
  627. package/native/token-counter/node_modules/sbo/index.js +25 -0
  628. package/native/token-counter/node_modules/sbo/license.txt +21 -0
  629. package/native/token-counter/node_modules/sbo/package.json +50 -0
  630. package/native/token-counter/node_modules/sbo/readme.md +105 -0
  631. package/native/token-counter/node_modules/sorp/index.js +3 -0
  632. package/native/token-counter/node_modules/sorp/license.txt +21 -0
  633. package/native/token-counter/node_modules/sorp/package.json +34 -0
  634. package/native/token-counter/node_modules/sorp/readme.md +25 -0
  635. package/native/token-counter/node_modules/trim-call/index.js +6 -0
  636. package/native/token-counter/node_modules/trim-call/license.txt +21 -0
  637. package/native/token-counter/node_modules/trim-call/package.json +40 -0
  638. package/native/token-counter/node_modules/trim-call/readme.md +80 -0
  639. package/native/token-counter/node_modules/type-error/LICENSE +21 -0
  640. package/native/token-counter/node_modules/type-error/README.md +24 -0
  641. package/native/token-counter/node_modules/type-error/index.js +35 -0
  642. package/native/token-counter/node_modules/type-error/package.json +11 -0
  643. package/native/token-counter/node_modules/vfn/index.js +21 -0
  644. package/native/token-counter/node_modules/vfn/license.txt +21 -0
  645. package/native/token-counter/node_modules/vfn/package.json +40 -0
  646. package/native/token-counter/node_modules/vfn/readme.md +81 -0
  647. package/native/token-counter/node_modules/wfn/index.js +43 -0
  648. package/native/token-counter/node_modules/wfn/license.txt +21 -0
  649. package/native/token-counter/node_modules/wfn/package.json +38 -0
  650. package/native/token-counter/node_modules/wfn/readme.md +81 -0
  651. package/native/token-counter/package-lock.json +578 -0
  652. package/native/token-counter/package.json +21 -0
  653. package/native/token-counter/token-counter.linux-x64-gnu.node +0 -0
  654. package/package.json +98 -0
  655. package/scripts/build.cjs +27 -0
  656. package/scripts/deploy.sh +29 -0
  657. package/scripts/music.py +268 -0
  658. package/scripts/postinstall.mjs +81 -0
  659. package/scripts/push.sh +5 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright ©2018–2019 Fr. John Lamansky
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.
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "errate",
3
+ "version": "1.3.0",
4
+ "description": "Converts a value into an Error of the specified type.",
5
+ "keywords": [
6
+ "convert",
7
+ "error"
8
+ ],
9
+ "author": {
10
+ "name": "Fr. John Lamansky",
11
+ "url": "lamansky.com"
12
+ },
13
+ "license": "MIT",
14
+ "repository": "lamansky/errate",
15
+ "main": "index.js",
16
+ "files": [],
17
+ "engines": {
18
+ "node": ">=6.0.0"
19
+ },
20
+ "dependencies": {
21
+ "copy-own": "^1.2.0",
22
+ "is-class-of": "^1.0.1",
23
+ "is-instance-of": "^1.0.2",
24
+ "trim-call": "^1.1.0"
25
+ },
26
+ "devDependencies": {
27
+ "eslint-config-lamansky": "^2.0.0",
28
+ "mocha": "^6.2.1"
29
+ },
30
+ "scripts": {
31
+ "test": "mocha"
32
+ },
33
+ "eslintConfig": {
34
+ "extends": "lamansky",
35
+ "env": {
36
+ "mocha": true
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,79 @@
1
+ # errate
2
+
3
+ Converts a value into an Error of the specified type.
4
+
5
+ ## Installation
6
+
7
+ Requires [Node.js](https://nodejs.org/) 6.0.0 or above.
8
+
9
+ ```bash
10
+ npm i errate
11
+ ```
12
+
13
+ ## API
14
+
15
+ The module exports a single function.
16
+
17
+ ### Parameters
18
+
19
+ 1. Optional: `e` (string, Error object, boolean, or null): The error message, or an existing Error object. If `null` or a boolean, the returned Error will have no message.
20
+ 2. Optional: `Cls` (Error class): The desired class of the returned Error (such as `TypeError` or `RangeError`). Defaults to `Error`.
21
+ 3. Optional: Object argument:
22
+ * `defaultMessage` (string): The first argument that will be provided to the constructor if an Error object is being created (i.e. if `e` is `true` or “falsey”).
23
+ * `forceClass` (boolean): If set to `true`, instances of other `Error` classes will be converted to instances of `Cls`. If set to `false`, `Cls` will only be used to wrap string errors. Defaults to `true`.
24
+
25
+ ### Return Value
26
+
27
+ An Error of the specified class.
28
+
29
+ ## Examples
30
+
31
+ ### Default Class With Message
32
+
33
+ ```javascript
34
+ const errate = require('errate')
35
+
36
+ const err = errate('Message')
37
+ err instanceof Error // true
38
+ err.message // 'Message'
39
+ ```
40
+
41
+ ### Default Class Without Message
42
+
43
+ ```javascript
44
+ const errate = require('errate')
45
+
46
+ const err = errate()
47
+ err instanceof Error // true
48
+ err.message // ''
49
+ ```
50
+
51
+ ### Error Subclass With Message
52
+
53
+ ```javascript
54
+ const errate = require('errate')
55
+
56
+ const err = errate('Message', TypeError)
57
+ err instanceof TypeError // true
58
+ err.message // 'Message'
59
+ ```
60
+
61
+ ### Error Subclass Without Message
62
+
63
+ ```javascript
64
+ const errate = require('errate')
65
+
66
+ const err = errate(TypeError)
67
+ err instanceof TypeError // true
68
+ err.message // ''
69
+ ```
70
+
71
+ ### Error Class Conversion
72
+
73
+ ```javascript
74
+ const errate = require('errate')
75
+
76
+ const err = errate(new TypeError('Message'), RangeError)
77
+ err instanceof RangeError // true
78
+ err.message // 'Message'
79
+ ```
@@ -0,0 +1,9 @@
1
+ 'use strict'
2
+
3
+ module.exports = function ffn (f, {blacklist} = {}) {
4
+ const type = typeof f
5
+ if (type === 'function') return f
6
+ if (type === 'undefined') return blacklist ? x => !x : x => !!x
7
+ if (Array.isArray(f)) return x => f.includes(x)
8
+ return x => x === f
9
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright ©2018 John Lamansky
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.
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "ffn",
3
+ "version": "2.1.0",
4
+ "description": "Turns arrays and values into Filtering Functions.",
5
+ "keywords": [
6
+ "filter",
7
+ "comparison",
8
+ "test",
9
+ "function"
10
+ ],
11
+ "author": "John Lamansky",
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/lamansky/ffn",
14
+ "repository": "lamansky/ffn",
15
+ "main": "index.js",
16
+ "files": [],
17
+ "engines": {
18
+ "node": ">=6.0.0"
19
+ },
20
+ "dependencies": {},
21
+ "devDependencies": {
22
+ "eslint-config-lamansky": "^1.0.0",
23
+ "mocha": "^5.1.0"
24
+ },
25
+ "scripts": {
26
+ "test": "mocha"
27
+ },
28
+ "eslintConfig": {
29
+ "extends": "lamansky",
30
+ "env": {
31
+ "mocha": true
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,51 @@
1
+ # ffn
2
+
3
+ Turns arrays and values into Filtering Functions.
4
+
5
+ Many projects use callbacks to filter values. Sometimes this filtering involves complex conditions that need a function. Other times one just wants to test if the value equals another, or if the value appears in an array of acceptable values. Instead of making your project’s end-users write filters like `x => x === 'value'` or `x => ['ok', 'also ok'].includes(x)`, let them provide the value or the array directly, and `ffn` will turn it into a filtering function.
6
+
7
+ ## Installation
8
+
9
+ Requires [Node.js](https://nodejs.org/) 6.0.0 or above.
10
+
11
+ ```bash
12
+ npm i ffn
13
+ ```
14
+
15
+ ## API
16
+
17
+ The module exports a single function.
18
+
19
+ ### Parameters
20
+
21
+ 1. `f` (any): A Function, an Array, or some other value.
22
+ 2. Object argument:
23
+ * Optional: `blacklist` (bool): Set to `true` if `ffn` is being used to create a blacklist. This will make falsey values test true when `f` is undefined. Defaults to `false`.
24
+
25
+ ### Return Values
26
+
27
+ * If `f` is a Function: returns `f`
28
+ * If `f` is omitted or otherwise undefined: returns a function that tests whether its argument is truthy (unless `blacklist` is `true`)
29
+ * If `f` is an Array: returns a function that tests whether its argument is included in `f`
30
+ * Otherwise: returns a function that tests whether its argument is strictly equal to `f`
31
+
32
+ ## Example
33
+
34
+ ```javascript
35
+ const ffn = require('ffn')
36
+
37
+ const arr = [1, 2, 3, 4, 5]
38
+
39
+ // ffn returns functions as-is
40
+ arr.find(ffn(x => x % 2 === 0)) // 2
41
+
42
+ // ffn creates a function which checks for inclusion in the array
43
+ arr.find(ffn([4, 5])) // 4
44
+
45
+ // ffn creates a function which checks for equality with the value
46
+ arr.find(ffn(3)) // 3
47
+ ```
48
+
49
+ ## Related
50
+
51
+ For more projects like this, check out the [xfn](https://github.com/lamansky/xfn) family of modules.
@@ -0,0 +1,5 @@
1
+ 'use strict'
2
+
3
+ module.exports = function getOwnProperty (obj, key) {
4
+ if (Object.prototype.hasOwnProperty.call(obj, key)) return obj[key]
5
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright ©2017 John Lamansky
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.
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "get-own-property",
3
+ "version": "1.0.0",
4
+ "description": "Retrieves a property only if hasOwnProperty() is true.",
5
+ "keywords": [
6
+ "get",
7
+ "object",
8
+ "own",
9
+ "property",
10
+ "hasOwnProperty"
11
+ ],
12
+ "author": "John Lamansky",
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/lamansky/get-own-property",
15
+ "repository": "lamansky/get-own-property",
16
+ "main": "index.js",
17
+ "files": [],
18
+ "devDependencies": {
19
+ "eslint-config-lamansky": "^1.0.0",
20
+ "mocha": "^3.2.0"
21
+ },
22
+ "scripts": {
23
+ "test": "mocha"
24
+ },
25
+ "eslintConfig": {
26
+ "extends": "lamansky",
27
+ "env": {
28
+ "mocha": true
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,22 @@
1
+ # getOwnProperty
2
+
3
+ Retrieves a property only if [`hasOwnProperty()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty) is true.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install get-own-property --save
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ const getOwnProperty = require('get-own-property')
15
+
16
+ const obj = {hello: 'world'}
17
+
18
+ getOwnProperty(obj, 'hello') // 'world'
19
+
20
+ typeof obj.toString // 'function'
21
+ getOwnProperty(obj, 'toString') // undefined
22
+ ```
@@ -0,0 +1,11 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * Returns true if the array has duplicate elements or the string has
5
+ * duplicate characters.
6
+ * @param {array|string} thing
7
+ * @return {bool}
8
+ */
9
+ module.exports = function hasDuplicates (thing) {
10
+ return (new Set(thing)).size < thing.length
11
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright ©2017 John Lamansky
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.
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "has-duplicates",
3
+ "version": "1.0.0",
4
+ "description": "Returns true if an array has duplicate elements or a string has duplicate characters.",
5
+ "keywords": [
6
+ "array",
7
+ "duplicates",
8
+ "unique",
9
+ "check"
10
+ ],
11
+ "author": "John Lamansky",
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/lamansky/has-duplicates",
14
+ "repository": "lamansky/has-duplicates",
15
+ "main": "index.js",
16
+ "engines": {
17
+ "node": ">=0.12.0"
18
+ },
19
+ "devDependencies": {
20
+ "eslint-config-lamansky": "^1.0.0",
21
+ "mocha": "^3.2.0"
22
+ },
23
+ "scripts": {
24
+ "test": "mocha"
25
+ },
26
+ "eslintConfig": {
27
+ "extends": "lamansky",
28
+ "env": {
29
+ "mocha": true
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,23 @@
1
+ # has-duplicates
2
+
3
+ A [Node.js](https://nodejs.org/) module that checks an array for duplicate elements or a string for duplicate characters.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install has-duplicates --save
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ const hasDuplicates = require('has-duplicates')
15
+
16
+ // Arrays
17
+ hasDuplicates([1, 1]) // true
18
+ hasDuplicates([1, 2]) // false
19
+
20
+ // Strings
21
+ hasDuplicates('aa') // true
22
+ hasDuplicates('ab') // false
23
+ ```
@@ -0,0 +1,30 @@
1
+ 'use strict'
2
+
3
+ const assert = require('assert')
4
+ const hasDuplicates = require('.')
5
+
6
+ describe('hasDuplicates()', function () {
7
+ it('should return true if there are duplicates in an array', function () {
8
+ assert(hasDuplicates([1, 1]))
9
+ })
10
+
11
+ it('should return false if there are no duplicates in an array', function () {
12
+ assert(!hasDuplicates([1, 2]))
13
+ })
14
+
15
+ it('should return false if the array is empty', function () {
16
+ assert(!hasDuplicates([]))
17
+ })
18
+
19
+ it('should return true if there are duplicate characters in a string', function () {
20
+ assert(hasDuplicates('aa'))
21
+ })
22
+
23
+ it('should return false if there are no duplicate characters in a string', function () {
24
+ assert(!hasDuplicates('ab'))
25
+ })
26
+
27
+ it('should return false if the string is empty', function () {
28
+ assert(!hasDuplicates(''))
29
+ })
30
+ })
@@ -0,0 +1,8 @@
1
+ 'use strict'
2
+
3
+ const PossibleFunction = require('possible-function')
4
+
5
+ module.exports = function (test, val, err = new Error()) {
6
+ if (!(err instanceof Error)) err = new Error(err)
7
+ if (PossibleFunction(test, test)(val)) return val; else throw err
8
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright ©2017 John Lamansky
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.
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "if-else-throw",
3
+ "version": "1.0.0",
4
+ "description": "If X, return Y, else throw Z.",
5
+ "keywords": [
6
+ "error",
7
+ "throw",
8
+ "test",
9
+ "check",
10
+ "passthrough"
11
+ ],
12
+ "author": "John Lamansky",
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/lamansky/if-else-throw",
15
+ "repository": "lamansky/if-else-throw",
16
+ "main": "index.js",
17
+ "files": [],
18
+ "engines": {
19
+ "node": ">=5.0.0"
20
+ },
21
+ "dependencies": {
22
+ "possible-function": "^1.0.1"
23
+ },
24
+ "devDependencies": {
25
+ "eslint-config-lamansky": "^1.0.0",
26
+ "mocha": "^3.2.0"
27
+ },
28
+ "scripts": {
29
+ "test": "mocha"
30
+ },
31
+ "eslintConfig": {
32
+ "extends": "lamansky",
33
+ "env": {
34
+ "mocha": true
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,32 @@
1
+ # if-else-throw
2
+
3
+ If X, return Y, else throw Z.
4
+
5
+ X can be a boolean or a function.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install if-else-throw --save
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```javascript
16
+ const ifElseThrow = require('if-else-throw')
17
+ let value
18
+
19
+ value = []
20
+ value = ifElseThrow(
21
+ Array.isArray(value), // The boolean condition (in this case, true)
22
+ value, // The value returned if true
23
+ new TypeError('Not an array') // The error thrown if false
24
+ ) // []
25
+
26
+ let value = 'totally not an array'
27
+ value = ifElseThrow(
28
+ val => Array.isArray(val), // Instead of a boolean, can use a function
29
+ value,
30
+ new TypeError('Not an array')
31
+ ) // Uncaught TypeError
32
+ ```
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ const arrify = require('arrify')
4
+ const is = require('is-instance-of')
5
+
6
+ module.exports = require('sbo')((arr, lengths, {arrays} = {}) =>
7
+ is(arr, [Array, arrays]) && arrify(lengths).some(len => arr.length === len))
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright ©2018–2019 Fr. John Lamansky
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.
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "is-array-of-length",
3
+ "version": "1.1.0",
4
+ "description": "Returns true if a value is an array containing the specified number of elements.",
5
+ "keywords": [
6
+ "test",
7
+ "array",
8
+ "elements",
9
+ "length",
10
+ "bind operator"
11
+ ],
12
+ "author": {
13
+ "name": "Fr. John Lamansky",
14
+ "url": "lamansky.com"
15
+ },
16
+ "license": "MIT",
17
+ "homepage": "https://github.com/lamansky/is-array-of-length",
18
+ "repository": "lamansky/is-array-of-length",
19
+ "main": "index.js",
20
+ "files": [],
21
+ "engines": {
22
+ "node": ">=6"
23
+ },
24
+ "dependencies": {
25
+ "arrify": "^1.0.1",
26
+ "is-instance-of": "^1.0.2",
27
+ "sbo": "^1.1.0"
28
+ },
29
+ "devDependencies": {
30
+ "eslint-config-lamansky": "^2.0.0",
31
+ "mocha": "^6.2.0"
32
+ },
33
+ "scripts": {
34
+ "test": "mocha"
35
+ },
36
+ "eslintConfig": {
37
+ "extends": "lamansky",
38
+ "env": {
39
+ "mocha": true
40
+ }
41
+ }
42
+ }