@cdklabs/cdk-ssm-documents 0.0.70 → 0.0.71

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 (790) hide show
  1. package/.jsii +25 -25
  2. package/lib/construct/synth-utils.js +1 -1
  3. package/lib/document/automation-document.js +1 -1
  4. package/lib/document/command-document.js +1 -1
  5. package/lib/document/document-builder.js +2 -2
  6. package/lib/document/ssm-document.js +1 -1
  7. package/lib/domain/aws-service.js +1 -1
  8. package/lib/domain/choice.js +1 -1
  9. package/lib/domain/data-type.js +1 -1
  10. package/lib/domain/enum/install-action.js +2 -2
  11. package/lib/domain/enum/install-uninstall-repair.js +2 -2
  12. package/lib/domain/enum/installation-type.js +2 -2
  13. package/lib/domain/enum/package-name.js +2 -2
  14. package/lib/domain/input.js +1 -1
  15. package/lib/domain/operation.js +1 -1
  16. package/lib/domain/platform.js +1 -1
  17. package/lib/domain/precondition.js +1 -1
  18. package/lib/incident-response/incident-response.js +3 -3
  19. package/lib/interface/approve-hook.js +2 -2
  20. package/lib/interface/auth-method.js +3 -3
  21. package/lib/interface/aws-invoker.js +2 -2
  22. package/lib/interface/downloadable-content.js +8 -8
  23. package/lib/interface/environment.js +3 -3
  24. package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
  25. package/lib/interface/observer.js +1 -1
  26. package/lib/interface/on-failure.js +6 -6
  27. package/lib/interface/pause-hook.js +2 -2
  28. package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
  29. package/lib/interface/run-document-location.js +2 -2
  30. package/lib/interface/sleep-hook.js +2 -2
  31. package/lib/interface/step-ref.js +1 -1
  32. package/lib/interface/variables/boolean-variable.js +2 -2
  33. package/lib/interface/variables/map-list-variable.js +2 -2
  34. package/lib/interface/variables/number-variable.js +2 -2
  35. package/lib/interface/variables/secure-string-variable.js +4 -4
  36. package/lib/interface/variables/string-list-variable.js +2 -2
  37. package/lib/interface/variables/string-map-variable.js +2 -2
  38. package/lib/interface/variables/string-variable.js +4 -4
  39. package/lib/interface/variables/variable.js +2 -2
  40. package/lib/interface/webhook.js +1 -1
  41. package/lib/parent-steps/automation/approve-step.js +1 -1
  42. package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
  43. package/lib/parent-steps/automation/aws-api-step.js +1 -1
  44. package/lib/parent-steps/automation/branch-step.js +1 -1
  45. package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
  46. package/lib/parent-steps/automation/copy-image-step.js +1 -1
  47. package/lib/parent-steps/automation/create-image-step.js +1 -1
  48. package/lib/parent-steps/automation/create-stack-step.js +3 -3
  49. package/lib/parent-steps/automation/create-tags-step.js +3 -3
  50. package/lib/parent-steps/automation/delete-image-step.js +1 -1
  51. package/lib/parent-steps/automation/delete-stack-step.js +1 -1
  52. package/lib/parent-steps/automation/execute-automation-step.js +1 -1
  53. package/lib/parent-steps/automation/execute-script-step.js +5 -5
  54. package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
  55. package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
  56. package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
  57. package/lib/parent-steps/automation/pause-step.js +1 -1
  58. package/lib/parent-steps/automation/run-command-step.js +3 -3
  59. package/lib/parent-steps/automation/run-instance-step.js +1 -1
  60. package/lib/parent-steps/automation/sleep-step.js +1 -1
  61. package/lib/parent-steps/automation/update-variable.js +1 -1
  62. package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
  63. package/lib/parent-steps/automation-step.js +1 -1
  64. package/lib/parent-steps/command/applications-step.js +1 -1
  65. package/lib/parent-steps/command/configure-docker-step.js +1 -1
  66. package/lib/parent-steps/command/configure-package-step.js +1 -1
  67. package/lib/parent-steps/command/domain-join-step.js +1 -1
  68. package/lib/parent-steps/command/download-content-step.js +1 -1
  69. package/lib/parent-steps/command/ps-module-step.js +1 -1
  70. package/lib/parent-steps/command/run-docker-action-step.js +1 -1
  71. package/lib/parent-steps/command/run-document-step.js +1 -1
  72. package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
  73. package/lib/parent-steps/command/run-shell-script-step.js +1 -1
  74. package/lib/parent-steps/command/software-inventory-step.js +1 -1
  75. package/lib/parent-steps/command/update-agent-step.js +1 -1
  76. package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
  77. package/lib/parent-steps/command-step.js +1 -1
  78. package/lib/parent-steps/step.js +1 -1
  79. package/lib/patterns/automation/composite-step.js +2 -2
  80. package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
  81. package/lib/patterns/automation/string-step.js +1 -1
  82. package/lib/patterns/document/string-document.js +1 -1
  83. package/lib/patterns/document/timed-document.js +1 -1
  84. package/lib/samples/hello-world.js +1 -1
  85. package/lib/simulation/automation/approve-simulation.js +1 -1
  86. package/lib/simulation/automation/assert-aws-resource-simulation.js +4 -5
  87. package/lib/simulation/automation/automation-simulation-base.js +1 -1
  88. package/lib/simulation/automation/aws-api-simulation.js +1 -1
  89. package/lib/simulation/automation/branch-simulation.js +1 -1
  90. package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
  91. package/lib/simulation/automation/copy-image-simulation.js +1 -1
  92. package/lib/simulation/automation/create-image-simulation.js +1 -1
  93. package/lib/simulation/automation/create-stack-simulation.js +1 -1
  94. package/lib/simulation/automation/create-tags-simulation.js +1 -1
  95. package/lib/simulation/automation/delete-image-simulation.js +1 -1
  96. package/lib/simulation/automation/delete-stack-simulation.js +1 -1
  97. package/lib/simulation/automation/execute-script-simulation.js +1 -1
  98. package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
  99. package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
  100. package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
  101. package/lib/simulation/automation/pause-simulation.js +1 -1
  102. package/lib/simulation/automation/run-command-simulation.js +1 -1
  103. package/lib/simulation/automation/run-instance-simulation.js +1 -1
  104. package/lib/simulation/automation/sleep-simulation.js +1 -1
  105. package/lib/simulation/automation/update-variable-simulation.js +1 -1
  106. package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
  107. package/lib/simulation/automation-step-simulation.js +4 -5
  108. package/lib/simulation/command/command-simulation-base.js +1 -1
  109. package/lib/simulation/command/ps-module-simulation.js +1 -1
  110. package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
  111. package/lib/simulation/command/run-shell-script-simulation.js +1 -1
  112. package/lib/simulation/command-step-simulation.js +1 -1
  113. package/lib/simulation/document/automation-simulation.js +1 -1
  114. package/lib/simulation/document/command-simulation.js +1 -1
  115. package/lib/simulation/simulation.js +1 -1
  116. package/node_modules/@jsep-plugin/assignment/LICENSE +20 -0
  117. package/node_modules/@jsep-plugin/assignment/README.md +37 -0
  118. package/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.js +95 -0
  119. package/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.js.map +1 -0
  120. package/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.min.js +2 -0
  121. package/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.min.js.map +1 -0
  122. package/node_modules/@jsep-plugin/assignment/dist/cjs/package.json +3 -0
  123. package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.js +98 -0
  124. package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.js.map +1 -0
  125. package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.min.js +2 -0
  126. package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.min.js.map +1 -0
  127. package/node_modules/@jsep-plugin/assignment/dist/index.js +92 -0
  128. package/node_modules/@jsep-plugin/assignment/dist/index.min.js +2 -0
  129. package/node_modules/@jsep-plugin/assignment/dist/index.min.js.map +1 -0
  130. package/node_modules/@jsep-plugin/assignment/package.json +39 -0
  131. package/node_modules/@jsep-plugin/assignment/types/tsd.d.ts +39 -0
  132. package/node_modules/@jsep-plugin/regex/LICENSE +20 -0
  133. package/node_modules/@jsep-plugin/regex/README.md +36 -0
  134. package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.js +66 -0
  135. package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.js.map +1 -0
  136. package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.min.js +2 -0
  137. package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.min.js.map +1 -0
  138. package/node_modules/@jsep-plugin/regex/dist/cjs/package.json +3 -0
  139. package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.js +69 -0
  140. package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.js.map +1 -0
  141. package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.min.js +2 -0
  142. package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.min.js.map +1 -0
  143. package/node_modules/@jsep-plugin/regex/dist/index.js +63 -0
  144. package/node_modules/@jsep-plugin/regex/dist/index.min.js +2 -0
  145. package/node_modules/@jsep-plugin/regex/dist/index.min.js.map +1 -0
  146. package/node_modules/@jsep-plugin/regex/package.json +39 -0
  147. package/node_modules/@jsep-plugin/regex/types/tsd.d.ts +7 -0
  148. package/node_modules/jsep/LICENSE +20 -0
  149. package/node_modules/jsep/README.md +208 -0
  150. package/node_modules/jsep/dist/cjs/jsep.cjs.js +1129 -0
  151. package/node_modules/jsep/dist/cjs/jsep.cjs.js.map +1 -0
  152. package/node_modules/jsep/dist/cjs/jsep.cjs.min.js +2 -0
  153. package/node_modules/jsep/dist/cjs/jsep.cjs.min.js.map +1 -0
  154. package/node_modules/jsep/dist/cjs/package.json +3 -0
  155. package/node_modules/jsep/dist/iife/jsep.iife.js +1132 -0
  156. package/node_modules/jsep/dist/iife/jsep.iife.js.map +1 -0
  157. package/node_modules/jsep/dist/iife/jsep.iife.min.js +2 -0
  158. package/node_modules/jsep/dist/iife/jsep.iife.min.js.map +1 -0
  159. package/node_modules/jsep/dist/jsep.js +1126 -0
  160. package/node_modules/jsep/dist/jsep.min.js +2 -0
  161. package/node_modules/jsep/dist/jsep.min.js.map +1 -0
  162. package/node_modules/jsep/package.json +153 -0
  163. package/node_modules/jsep/typings/tsd.d.ts +180 -0
  164. package/node_modules/jsonpath-plus/.claude/settings.local.json +9 -0
  165. package/node_modules/jsonpath-plus/CHANGES.md +453 -0
  166. package/node_modules/jsonpath-plus/LICENSE +22 -0
  167. package/node_modules/jsonpath-plus/README.md +412 -0
  168. package/node_modules/jsonpath-plus/SECURITY.md +38 -0
  169. package/node_modules/jsonpath-plus/bin/jsonpath-cli.js +36 -0
  170. package/node_modules/jsonpath-plus/dist/index-browser-esm.js +2164 -0
  171. package/node_modules/jsonpath-plus/dist/index-browser-esm.min.js +2 -0
  172. package/node_modules/jsonpath-plus/dist/index-browser-esm.min.js.map +1 -0
  173. package/node_modules/jsonpath-plus/dist/index-browser-umd.cjs +2172 -0
  174. package/node_modules/jsonpath-plus/dist/index-browser-umd.min.cjs +2 -0
  175. package/node_modules/jsonpath-plus/dist/index-browser-umd.min.cjs.map +1 -0
  176. package/node_modules/jsonpath-plus/dist/index-node-cjs.cjs +2076 -0
  177. package/node_modules/jsonpath-plus/dist/index-node-esm.js +2074 -0
  178. package/node_modules/jsonpath-plus/package.json +141 -0
  179. package/node_modules/jsonpath-plus/pnpm-workspace.yaml +2 -0
  180. package/node_modules/jsonpath-plus/src/Safe-Script.js +208 -0
  181. package/node_modules/jsonpath-plus/src/jsonpath-browser.js +102 -0
  182. package/node_modules/jsonpath-plus/src/jsonpath-node.js +8 -0
  183. package/node_modules/jsonpath-plus/src/jsonpath.d.ts +226 -0
  184. package/node_modules/jsonpath-plus/src/jsonpath.js +784 -0
  185. package/package.json +3 -3
  186. package/node_modules/escodegen/LICENSE.BSD +0 -21
  187. package/node_modules/escodegen/README.md +0 -84
  188. package/node_modules/escodegen/bin/escodegen.js +0 -77
  189. package/node_modules/escodegen/bin/esgenerate.js +0 -64
  190. package/node_modules/escodegen/escodegen.js +0 -2667
  191. package/node_modules/escodegen/package.json +0 -63
  192. package/node_modules/esprima/LICENSE.BSD +0 -21
  193. package/node_modules/esprima/README.md +0 -46
  194. package/node_modules/esprima/bin/esparse.js +0 -139
  195. package/node_modules/esprima/bin/esvalidate.js +0 -236
  196. package/node_modules/esprima/dist/esprima.js +0 -6709
  197. package/node_modules/esprima/package.json +0 -112
  198. package/node_modules/estraverse/.jshintrc +0 -16
  199. package/node_modules/estraverse/LICENSE.BSD +0 -19
  200. package/node_modules/estraverse/README.md +0 -153
  201. package/node_modules/estraverse/estraverse.js +0 -805
  202. package/node_modules/estraverse/gulpfile.js +0 -70
  203. package/node_modules/estraverse/package.json +0 -40
  204. package/node_modules/esutils/LICENSE.BSD +0 -19
  205. package/node_modules/esutils/README.md +0 -174
  206. package/node_modules/esutils/lib/ast.js +0 -144
  207. package/node_modules/esutils/lib/code.js +0 -135
  208. package/node_modules/esutils/lib/keyword.js +0 -165
  209. package/node_modules/esutils/lib/utils.js +0 -33
  210. package/node_modules/esutils/package.json +0 -44
  211. package/node_modules/jsonpath/.jscsrc +0 -60
  212. package/node_modules/jsonpath/.jshintrc +0 -9
  213. package/node_modules/jsonpath/.travis.yml +0 -3
  214. package/node_modules/jsonpath/Dockerfile +0 -1
  215. package/node_modules/jsonpath/Gruntfile.js +0 -83
  216. package/node_modules/jsonpath/LICENSE +0 -7
  217. package/node_modules/jsonpath/README.md +0 -216
  218. package/node_modules/jsonpath/bin/generate_parser.js +0 -8
  219. package/node_modules/jsonpath/fig.yml +0 -5
  220. package/node_modules/jsonpath/generated/parser.js +0 -721
  221. package/node_modules/jsonpath/include/action.js +0 -4
  222. package/node_modules/jsonpath/include/module.js +0 -34
  223. package/node_modules/jsonpath/index.js +0 -1
  224. package/node_modules/jsonpath/jsonpath.js +0 -7093
  225. package/node_modules/jsonpath/jsonpath.min.js +0 -4
  226. package/node_modules/jsonpath/lib/aesprim.js +0 -18
  227. package/node_modules/jsonpath/lib/dict.js +0 -6
  228. package/node_modules/jsonpath/lib/grammar.js +0 -106
  229. package/node_modules/jsonpath/lib/handlers.js +0 -409
  230. package/node_modules/jsonpath/lib/index.js +0 -304
  231. package/node_modules/jsonpath/lib/parser.js +0 -21
  232. package/node_modules/jsonpath/lib/slice.js +0 -41
  233. package/node_modules/jsonpath/node_modules/esprima/LICENSE.BSD +0 -19
  234. package/node_modules/jsonpath/node_modules/esprima/README.md +0 -24
  235. package/node_modules/jsonpath/node_modules/esprima/bin/esparse.js +0 -127
  236. package/node_modules/jsonpath/node_modules/esprima/bin/esvalidate.js +0 -199
  237. package/node_modules/jsonpath/node_modules/esprima/esprima.js +0 -3772
  238. package/node_modules/jsonpath/node_modules/esprima/package.json +0 -83
  239. package/node_modules/jsonpath/node_modules/esprima/test/compat.js +0 -241
  240. package/node_modules/jsonpath/node_modules/esprima/test/reflect.js +0 -422
  241. package/node_modules/jsonpath/node_modules/esprima/test/run.js +0 -67
  242. package/node_modules/jsonpath/node_modules/esprima/test/runner.js +0 -495
  243. package/node_modules/jsonpath/node_modules/esprima/test/test.js +0 -25593
  244. package/node_modules/jsonpath/package.json +0 -45
  245. package/node_modules/jsonpath/test/data/store.json +0 -31
  246. package/node_modules/jsonpath/test/lessons.js +0 -38
  247. package/node_modules/jsonpath/test/parse.js +0 -164
  248. package/node_modules/jsonpath/test/query.js +0 -359
  249. package/node_modules/jsonpath/test/security.js +0 -238
  250. package/node_modules/jsonpath/test/slice.js +0 -57
  251. package/node_modules/jsonpath/test/stringify.js +0 -54
  252. package/node_modules/jsonpath/test/sugar.js +0 -72
  253. package/node_modules/source-map/LICENSE +0 -28
  254. package/node_modules/source-map/README.md +0 -742
  255. package/node_modules/source-map/dist/source-map.debug.js +0 -3234
  256. package/node_modules/source-map/dist/source-map.js +0 -3233
  257. package/node_modules/source-map/dist/source-map.min.js +0 -2
  258. package/node_modules/source-map/dist/source-map.min.js.map +0 -1
  259. package/node_modules/source-map/lib/array-set.js +0 -121
  260. package/node_modules/source-map/lib/base64-vlq.js +0 -140
  261. package/node_modules/source-map/lib/base64.js +0 -67
  262. package/node_modules/source-map/lib/binary-search.js +0 -111
  263. package/node_modules/source-map/lib/mapping-list.js +0 -79
  264. package/node_modules/source-map/lib/quick-sort.js +0 -114
  265. package/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  266. package/node_modules/source-map/lib/source-map-generator.js +0 -425
  267. package/node_modules/source-map/lib/source-node.js +0 -413
  268. package/node_modules/source-map/lib/util.js +0 -488
  269. package/node_modules/source-map/package.json +0 -73
  270. package/node_modules/source-map/source-map.d.ts +0 -98
  271. package/node_modules/source-map/source-map.js +0 -8
  272. package/node_modules/static-eval/.travis.yml +0 -18
  273. package/node_modules/static-eval/CHANGELOG.md +0 -21
  274. package/node_modules/static-eval/LICENSE +0 -20
  275. package/node_modules/static-eval/example/eval.js +0 -7
  276. package/node_modules/static-eval/example/vars.js +0 -11
  277. package/node_modules/static-eval/index.js +0 -209
  278. package/node_modules/static-eval/package.json +0 -54
  279. package/node_modules/static-eval/readme.markdown +0 -87
  280. package/node_modules/static-eval/security.md +0 -15
  281. package/node_modules/static-eval/test/eval.js +0 -177
  282. package/node_modules/static-eval/test/prop.js +0 -16
  283. package/node_modules/static-eval/test/template-strings.js +0 -33
  284. package/node_modules/underscore/LICENSE +0 -22
  285. package/node_modules/underscore/README.md +0 -34
  286. package/node_modules/underscore/amd/_baseCreate.js +0 -21
  287. package/node_modules/underscore/amd/_baseIteratee.js +0 -15
  288. package/node_modules/underscore/amd/_cb.js +0 -12
  289. package/node_modules/underscore/amd/_chainResult.js +0 -10
  290. package/node_modules/underscore/amd/_collectNonEnumProps.js +0 -42
  291. package/node_modules/underscore/amd/_createAssigner.js +0 -24
  292. package/node_modules/underscore/amd/_createEscaper.js +0 -21
  293. package/node_modules/underscore/amd/_createIndexFinder.js +0 -30
  294. package/node_modules/underscore/amd/_createPredicateIndexFinder.js +0 -18
  295. package/node_modules/underscore/amd/_createReduce.js +0 -30
  296. package/node_modules/underscore/amd/_createSizePropertyCheck.js +0 -13
  297. package/node_modules/underscore/amd/_deepGet.js +0 -15
  298. package/node_modules/underscore/amd/_escapeMap.js +0 -15
  299. package/node_modules/underscore/amd/_executeBound.js +0 -16
  300. package/node_modules/underscore/amd/_flatten.js +0 -32
  301. package/node_modules/underscore/amd/_getByteLength.js +0 -8
  302. package/node_modules/underscore/amd/_getLength.js +0 -8
  303. package/node_modules/underscore/amd/_group.js +0 -18
  304. package/node_modules/underscore/amd/_has.js +0 -10
  305. package/node_modules/underscore/amd/_hasObjectTag.js +0 -7
  306. package/node_modules/underscore/amd/_isArrayLike.js +0 -11
  307. package/node_modules/underscore/amd/_isBufferLike.js +0 -9
  308. package/node_modules/underscore/amd/_keyInObj.js +0 -11
  309. package/node_modules/underscore/amd/_methodFingerprint.js +0 -44
  310. package/node_modules/underscore/amd/_optimizeCb.js +0 -27
  311. package/node_modules/underscore/amd/_set.js +0 -21
  312. package/node_modules/underscore/amd/_setup.js +0 -70
  313. package/node_modules/underscore/amd/_shallowProperty.js +0 -12
  314. package/node_modules/underscore/amd/_stringTagBug.js +0 -16
  315. package/node_modules/underscore/amd/_tagTester.js +0 -13
  316. package/node_modules/underscore/amd/_toBufferView.js +0 -15
  317. package/node_modules/underscore/amd/_toPath.js +0 -11
  318. package/node_modules/underscore/amd/_unescapeMap.js +0 -8
  319. package/node_modules/underscore/amd/after.js +0 -14
  320. package/node_modules/underscore/amd/allKeys.js +0 -15
  321. package/node_modules/underscore/amd/before.js +0 -18
  322. package/node_modules/underscore/amd/bind.js +0 -15
  323. package/node_modules/underscore/amd/bindAll.js +0 -19
  324. package/node_modules/underscore/amd/chain.js +0 -12
  325. package/node_modules/underscore/amd/chunk.js +0 -17
  326. package/node_modules/underscore/amd/clone.js +0 -11
  327. package/node_modules/underscore/amd/compact.js +0 -10
  328. package/node_modules/underscore/amd/compose.js +0 -18
  329. package/node_modules/underscore/amd/constant.js +0 -12
  330. package/node_modules/underscore/amd/contains.js +0 -12
  331. package/node_modules/underscore/amd/countBy.js +0 -12
  332. package/node_modules/underscore/amd/create.js +0 -14
  333. package/node_modules/underscore/amd/debounce.js +0 -43
  334. package/node_modules/underscore/amd/defaults.js +0 -8
  335. package/node_modules/underscore/amd/defer.js +0 -9
  336. package/node_modules/underscore/amd/delay.js +0 -13
  337. package/node_modules/underscore/amd/difference.js +0 -14
  338. package/node_modules/underscore/amd/each.js +0 -25
  339. package/node_modules/underscore/amd/escape.js +0 -8
  340. package/node_modules/underscore/amd/every.js +0 -17
  341. package/node_modules/underscore/amd/extend.js +0 -8
  342. package/node_modules/underscore/amd/extendOwn.js +0 -10
  343. package/node_modules/underscore/amd/filter.js +0 -15
  344. package/node_modules/underscore/amd/find.js +0 -12
  345. package/node_modules/underscore/amd/findIndex.js +0 -8
  346. package/node_modules/underscore/amd/findKey.js +0 -15
  347. package/node_modules/underscore/amd/findLastIndex.js +0 -8
  348. package/node_modules/underscore/amd/findWhere.js +0 -11
  349. package/node_modules/underscore/amd/first.js +0 -13
  350. package/node_modules/underscore/amd/flatten.js +0 -11
  351. package/node_modules/underscore/amd/functions.js +0 -14
  352. package/node_modules/underscore/amd/get.js +0 -14
  353. package/node_modules/underscore/amd/groupBy.js +0 -11
  354. package/node_modules/underscore/amd/has.js +0 -19
  355. package/node_modules/underscore/amd/identity.js +0 -10
  356. package/node_modules/underscore/amd/index-default.js +0 -12
  357. package/node_modules/underscore/amd/index.js +0 -154
  358. package/node_modules/underscore/amd/indexBy.js +0 -11
  359. package/node_modules/underscore/amd/indexOf.js +0 -11
  360. package/node_modules/underscore/amd/initial.js +0 -12
  361. package/node_modules/underscore/amd/intersection.js +0 -22
  362. package/node_modules/underscore/amd/invert.js +0 -15
  363. package/node_modules/underscore/amd/invoke.js +0 -28
  364. package/node_modules/underscore/amd/isArguments.js +0 -19
  365. package/node_modules/underscore/amd/isArray.js +0 -9
  366. package/node_modules/underscore/amd/isArrayBuffer.js +0 -7
  367. package/node_modules/underscore/amd/isBoolean.js +0 -10
  368. package/node_modules/underscore/amd/isDataView.js +0 -15
  369. package/node_modules/underscore/amd/isDate.js +0 -7
  370. package/node_modules/underscore/amd/isElement.js +0 -10
  371. package/node_modules/underscore/amd/isEmpty.js +0 -18
  372. package/node_modules/underscore/amd/isEqual.js +0 -133
  373. package/node_modules/underscore/amd/isError.js +0 -7
  374. package/node_modules/underscore/amd/isFinite.js +0 -10
  375. package/node_modules/underscore/amd/isFunction.js +0 -18
  376. package/node_modules/underscore/amd/isMap.js +0 -7
  377. package/node_modules/underscore/amd/isMatch.js +0 -17
  378. package/node_modules/underscore/amd/isNaN.js +0 -10
  379. package/node_modules/underscore/amd/isNull.js +0 -10
  380. package/node_modules/underscore/amd/isNumber.js +0 -7
  381. package/node_modules/underscore/amd/isObject.js +0 -11
  382. package/node_modules/underscore/amd/isRegExp.js +0 -7
  383. package/node_modules/underscore/amd/isSet.js +0 -7
  384. package/node_modules/underscore/amd/isString.js +0 -7
  385. package/node_modules/underscore/amd/isSymbol.js +0 -7
  386. package/node_modules/underscore/amd/isTypedArray.js +0 -16
  387. package/node_modules/underscore/amd/isUndefined.js +0 -10
  388. package/node_modules/underscore/amd/isWeakMap.js +0 -7
  389. package/node_modules/underscore/amd/isWeakSet.js +0 -7
  390. package/node_modules/underscore/amd/iteratee.js +0 -13
  391. package/node_modules/underscore/amd/keys.js +0 -17
  392. package/node_modules/underscore/amd/last.js +0 -13
  393. package/node_modules/underscore/amd/lastIndexOf.js +0 -9
  394. package/node_modules/underscore/amd/map.js +0 -18
  395. package/node_modules/underscore/amd/mapObject.js +0 -19
  396. package/node_modules/underscore/amd/matcher.js +0 -14
  397. package/node_modules/underscore/amd/max.js +0 -30
  398. package/node_modules/underscore/amd/memoize.js +0 -17
  399. package/node_modules/underscore/amd/min.js +0 -30
  400. package/node_modules/underscore/amd/mixin.js +0 -18
  401. package/node_modules/underscore/amd/negate.js +0 -12
  402. package/node_modules/underscore/amd/noop.js +0 -8
  403. package/node_modules/underscore/amd/now.js +0 -10
  404. package/node_modules/underscore/amd/object.js +0 -20
  405. package/node_modules/underscore/amd/omit.js +0 -20
  406. package/node_modules/underscore/amd/once.js +0 -9
  407. package/node_modules/underscore/amd/pairs.js +0 -17
  408. package/node_modules/underscore/amd/partial.js +0 -25
  409. package/node_modules/underscore/amd/partition.js +0 -11
  410. package/node_modules/underscore/amd/pick.js +0 -25
  411. package/node_modules/underscore/amd/pluck.js +0 -10
  412. package/node_modules/underscore/amd/property.js +0 -14
  413. package/node_modules/underscore/amd/propertyOf.js +0 -13
  414. package/node_modules/underscore/amd/random.js +0 -14
  415. package/node_modules/underscore/amd/range.js +0 -27
  416. package/node_modules/underscore/amd/reduce.js +0 -9
  417. package/node_modules/underscore/amd/reduceRight.js +0 -8
  418. package/node_modules/underscore/amd/reject.js +0 -10
  419. package/node_modules/underscore/amd/rest.js +0 -12
  420. package/node_modules/underscore/amd/restArguments.js +0 -33
  421. package/node_modules/underscore/amd/result.js +0 -25
  422. package/node_modules/underscore/amd/sample.js +0 -27
  423. package/node_modules/underscore/amd/set.js +0 -15
  424. package/node_modules/underscore/amd/shuffle.js +0 -10
  425. package/node_modules/underscore/amd/size.js +0 -11
  426. package/node_modules/underscore/amd/some.js +0 -17
  427. package/node_modules/underscore/amd/sortBy.js +0 -26
  428. package/node_modules/underscore/amd/sortedIndex.js +0 -18
  429. package/node_modules/underscore/amd/tap.js +0 -13
  430. package/node_modules/underscore/amd/template.js +0 -103
  431. package/node_modules/underscore/amd/templateSettings.js +0 -13
  432. package/node_modules/underscore/amd/throttle.js +0 -51
  433. package/node_modules/underscore/amd/times.js +0 -13
  434. package/node_modules/underscore/amd/toArray.js +0 -18
  435. package/node_modules/underscore/amd/toPath.js +0 -12
  436. package/node_modules/underscore/amd/underscore-array-methods.js +0 -30
  437. package/node_modules/underscore/amd/underscore.js +0 -29
  438. package/node_modules/underscore/amd/unescape.js +0 -8
  439. package/node_modules/underscore/amd/union.js +0 -11
  440. package/node_modules/underscore/amd/uniq.js +0 -37
  441. package/node_modules/underscore/amd/uniqueId.js +0 -13
  442. package/node_modules/underscore/amd/unzip.js +0 -17
  443. package/node_modules/underscore/amd/values.js +0 -16
  444. package/node_modules/underscore/amd/where.js +0 -11
  445. package/node_modules/underscore/amd/without.js +0 -10
  446. package/node_modules/underscore/amd/wrap.js +0 -12
  447. package/node_modules/underscore/amd/zip.js +0 -9
  448. package/node_modules/underscore/cjs/_baseCreate.js +0 -20
  449. package/node_modules/underscore/cjs/_baseIteratee.js +0 -19
  450. package/node_modules/underscore/cjs/_cb.js +0 -12
  451. package/node_modules/underscore/cjs/_chainResult.js +0 -8
  452. package/node_modules/underscore/cjs/_collectNonEnumProps.js +0 -42
  453. package/node_modules/underscore/cjs/_createAssigner.js +0 -20
  454. package/node_modules/underscore/cjs/_createEscaper.js +0 -19
  455. package/node_modules/underscore/cjs/_createIndexFinder.js +0 -30
  456. package/node_modules/underscore/cjs/_createPredicateIndexFinder.js +0 -17
  457. package/node_modules/underscore/cjs/_createReduce.js +0 -30
  458. package/node_modules/underscore/cjs/_createSizePropertyCheck.js +0 -11
  459. package/node_modules/underscore/cjs/_deepGet.js +0 -11
  460. package/node_modules/underscore/cjs/_escapeMap.js +0 -11
  461. package/node_modules/underscore/cjs/_executeBound.js +0 -15
  462. package/node_modules/underscore/cjs/_flatten.js +0 -33
  463. package/node_modules/underscore/cjs/_getByteLength.js +0 -6
  464. package/node_modules/underscore/cjs/_getLength.js +0 -6
  465. package/node_modules/underscore/cjs/_group.js +0 -17
  466. package/node_modules/underscore/cjs/_has.js +0 -8
  467. package/node_modules/underscore/cjs/_hasObjectTag.js +0 -5
  468. package/node_modules/underscore/cjs/_isArrayLike.js +0 -10
  469. package/node_modules/underscore/cjs/_isBufferLike.js +0 -8
  470. package/node_modules/underscore/cjs/_keyInObj.js +0 -7
  471. package/node_modules/underscore/cjs/_methodFingerprint.js +0 -44
  472. package/node_modules/underscore/cjs/_optimizeCb.js +0 -23
  473. package/node_modules/underscore/cjs/_set.js +0 -21
  474. package/node_modules/underscore/cjs/_setup.js +0 -66
  475. package/node_modules/underscore/cjs/_shallowProperty.js +0 -8
  476. package/node_modules/underscore/cjs/_stringTagBug.js +0 -15
  477. package/node_modules/underscore/cjs/_tagTester.js +0 -11
  478. package/node_modules/underscore/cjs/_toBufferView.js +0 -13
  479. package/node_modules/underscore/cjs/_toPath.js +0 -10
  480. package/node_modules/underscore/cjs/_unescapeMap.js +0 -7
  481. package/node_modules/underscore/cjs/after.js +0 -10
  482. package/node_modules/underscore/cjs/allKeys.js +0 -15
  483. package/node_modules/underscore/cjs/before.js +0 -14
  484. package/node_modules/underscore/cjs/bind.js +0 -15
  485. package/node_modules/underscore/cjs/bindAll.js +0 -19
  486. package/node_modules/underscore/cjs/chain.js +0 -10
  487. package/node_modules/underscore/cjs/chunk.js +0 -15
  488. package/node_modules/underscore/cjs/clone.js +0 -11
  489. package/node_modules/underscore/cjs/compact.js +0 -8
  490. package/node_modules/underscore/cjs/compose.js +0 -14
  491. package/node_modules/underscore/cjs/constant.js +0 -8
  492. package/node_modules/underscore/cjs/contains.js +0 -12
  493. package/node_modules/underscore/cjs/countBy.js +0 -11
  494. package/node_modules/underscore/cjs/create.js +0 -13
  495. package/node_modules/underscore/cjs/debounce.js +0 -42
  496. package/node_modules/underscore/cjs/defaults.js +0 -7
  497. package/node_modules/underscore/cjs/defer.js +0 -9
  498. package/node_modules/underscore/cjs/delay.js +0 -11
  499. package/node_modules/underscore/cjs/difference.js +0 -15
  500. package/node_modules/underscore/cjs/each.js +0 -25
  501. package/node_modules/underscore/cjs/escape.js +0 -7
  502. package/node_modules/underscore/cjs/every.js +0 -17
  503. package/node_modules/underscore/cjs/extend.js +0 -7
  504. package/node_modules/underscore/cjs/extendOwn.js +0 -9
  505. package/node_modules/underscore/cjs/filter.js +0 -14
  506. package/node_modules/underscore/cjs/find.js +0 -12
  507. package/node_modules/underscore/cjs/findIndex.js +0 -6
  508. package/node_modules/underscore/cjs/findKey.js +0 -14
  509. package/node_modules/underscore/cjs/findLastIndex.js +0 -6
  510. package/node_modules/underscore/cjs/findWhere.js +0 -10
  511. package/node_modules/underscore/cjs/first.js +0 -11
  512. package/node_modules/underscore/cjs/flatten.js +0 -9
  513. package/node_modules/underscore/cjs/functions.js +0 -12
  514. package/node_modules/underscore/cjs/get.js +0 -14
  515. package/node_modules/underscore/cjs/groupBy.js +0 -10
  516. package/node_modules/underscore/cjs/has.js +0 -18
  517. package/node_modules/underscore/cjs/identity.js +0 -6
  518. package/node_modules/underscore/cjs/index-default.js +0 -11
  519. package/node_modules/underscore/cjs/index.js +0 -278
  520. package/node_modules/underscore/cjs/indexBy.js +0 -9
  521. package/node_modules/underscore/cjs/indexOf.js +0 -11
  522. package/node_modules/underscore/cjs/initial.js +0 -10
  523. package/node_modules/underscore/cjs/intersection.js +0 -21
  524. package/node_modules/underscore/cjs/invert.js +0 -13
  525. package/node_modules/underscore/cjs/invoke.js +0 -30
  526. package/node_modules/underscore/cjs/isArguments.js +0 -18
  527. package/node_modules/underscore/cjs/isArray.js +0 -8
  528. package/node_modules/underscore/cjs/isArrayBuffer.js +0 -5
  529. package/node_modules/underscore/cjs/isBoolean.js +0 -8
  530. package/node_modules/underscore/cjs/isDataView.js +0 -16
  531. package/node_modules/underscore/cjs/isDate.js +0 -5
  532. package/node_modules/underscore/cjs/isElement.js +0 -6
  533. package/node_modules/underscore/cjs/isEmpty.js +0 -20
  534. package/node_modules/underscore/cjs/isEqual.js +0 -140
  535. package/node_modules/underscore/cjs/isError.js +0 -5
  536. package/node_modules/underscore/cjs/isFinite.js +0 -9
  537. package/node_modules/underscore/cjs/isFunction.js +0 -17
  538. package/node_modules/underscore/cjs/isMap.js +0 -7
  539. package/node_modules/underscore/cjs/isMatch.js +0 -15
  540. package/node_modules/underscore/cjs/isNaN.js +0 -9
  541. package/node_modules/underscore/cjs/isNull.js +0 -6
  542. package/node_modules/underscore/cjs/isNumber.js +0 -5
  543. package/node_modules/underscore/cjs/isObject.js +0 -7
  544. package/node_modules/underscore/cjs/isRegExp.js +0 -5
  545. package/node_modules/underscore/cjs/isSet.js +0 -7
  546. package/node_modules/underscore/cjs/isString.js +0 -5
  547. package/node_modules/underscore/cjs/isSymbol.js +0 -5
  548. package/node_modules/underscore/cjs/isTypedArray.js +0 -17
  549. package/node_modules/underscore/cjs/isUndefined.js +0 -6
  550. package/node_modules/underscore/cjs/isWeakMap.js +0 -7
  551. package/node_modules/underscore/cjs/isWeakSet.js +0 -5
  552. package/node_modules/underscore/cjs/iteratee.js +0 -12
  553. package/node_modules/underscore/cjs/keys.js +0 -18
  554. package/node_modules/underscore/cjs/last.js +0 -11
  555. package/node_modules/underscore/cjs/lastIndexOf.js +0 -8
  556. package/node_modules/underscore/cjs/map.js +0 -18
  557. package/node_modules/underscore/cjs/mapObject.js +0 -18
  558. package/node_modules/underscore/cjs/matcher.js +0 -13
  559. package/node_modules/underscore/cjs/max.js +0 -31
  560. package/node_modules/underscore/cjs/memoize.js +0 -15
  561. package/node_modules/underscore/cjs/min.js +0 -31
  562. package/node_modules/underscore/cjs/mixin.js +0 -20
  563. package/node_modules/underscore/cjs/negate.js +0 -8
  564. package/node_modules/underscore/cjs/noop.js +0 -4
  565. package/node_modules/underscore/cjs/now.js +0 -6
  566. package/node_modules/underscore/cjs/object.js +0 -18
  567. package/node_modules/underscore/cjs/omit.js +0 -24
  568. package/node_modules/underscore/cjs/once.js +0 -8
  569. package/node_modules/underscore/cjs/pairs.js +0 -15
  570. package/node_modules/underscore/cjs/partial.js +0 -25
  571. package/node_modules/underscore/cjs/partition.js +0 -9
  572. package/node_modules/underscore/cjs/pick.js +0 -28
  573. package/node_modules/underscore/cjs/pluck.js +0 -9
  574. package/node_modules/underscore/cjs/property.js +0 -13
  575. package/node_modules/underscore/cjs/propertyOf.js +0 -12
  576. package/node_modules/underscore/cjs/random.js +0 -10
  577. package/node_modules/underscore/cjs/range.js +0 -23
  578. package/node_modules/underscore/cjs/reduce.js +0 -7
  579. package/node_modules/underscore/cjs/reduceRight.js +0 -6
  580. package/node_modules/underscore/cjs/reject.js +0 -10
  581. package/node_modules/underscore/cjs/rest.js +0 -10
  582. package/node_modules/underscore/cjs/restArguments.js +0 -29
  583. package/node_modules/underscore/cjs/result.js +0 -24
  584. package/node_modules/underscore/cjs/sample.js +0 -29
  585. package/node_modules/underscore/cjs/set.js +0 -15
  586. package/node_modules/underscore/cjs/shuffle.js +0 -8
  587. package/node_modules/underscore/cjs/size.js +0 -10
  588. package/node_modules/underscore/cjs/some.js +0 -17
  589. package/node_modules/underscore/cjs/sortBy.js +0 -26
  590. package/node_modules/underscore/cjs/sortedIndex.js +0 -17
  591. package/node_modules/underscore/cjs/tap.js +0 -9
  592. package/node_modules/underscore/cjs/template.js +0 -103
  593. package/node_modules/underscore/cjs/templateSettings.js +0 -11
  594. package/node_modules/underscore/cjs/throttle.js +0 -49
  595. package/node_modules/underscore/cjs/times.js +0 -11
  596. package/node_modules/underscore/cjs/toArray.js +0 -22
  597. package/node_modules/underscore/cjs/toPath.js +0 -11
  598. package/node_modules/underscore/cjs/underscore-array-methods.js +0 -31
  599. package/node_modules/underscore/cjs/underscore.js +0 -27
  600. package/node_modules/underscore/cjs/unescape.js +0 -7
  601. package/node_modules/underscore/cjs/union.js +0 -11
  602. package/node_modules/underscore/cjs/uniq.js +0 -38
  603. package/node_modules/underscore/cjs/uniqueId.js +0 -9
  604. package/node_modules/underscore/cjs/unzip.js +0 -17
  605. package/node_modules/underscore/cjs/values.js +0 -14
  606. package/node_modules/underscore/cjs/where.js +0 -10
  607. package/node_modules/underscore/cjs/without.js +0 -9
  608. package/node_modules/underscore/cjs/wrap.js +0 -10
  609. package/node_modules/underscore/cjs/zip.js +0 -8
  610. package/node_modules/underscore/modules/.eslintrc +0 -21
  611. package/node_modules/underscore/modules/_baseCreate.js +0 -18
  612. package/node_modules/underscore/modules/_baseIteratee.js +0 -17
  613. package/node_modules/underscore/modules/_cb.js +0 -10
  614. package/node_modules/underscore/modules/_chainResult.js +0 -6
  615. package/node_modules/underscore/modules/_collectNonEnumProps.js +0 -40
  616. package/node_modules/underscore/modules/_createAssigner.js +0 -18
  617. package/node_modules/underscore/modules/_createEscaper.js +0 -17
  618. package/node_modules/underscore/modules/_createIndexFinder.js +0 -28
  619. package/node_modules/underscore/modules/_createPredicateIndexFinder.js +0 -15
  620. package/node_modules/underscore/modules/_createReduce.js +0 -28
  621. package/node_modules/underscore/modules/_createSizePropertyCheck.js +0 -9
  622. package/node_modules/underscore/modules/_deepGet.js +0 -9
  623. package/node_modules/underscore/modules/_escapeMap.js +0 -9
  624. package/node_modules/underscore/modules/_executeBound.js +0 -13
  625. package/node_modules/underscore/modules/_flatten.js +0 -31
  626. package/node_modules/underscore/modules/_getByteLength.js +0 -4
  627. package/node_modules/underscore/modules/_getLength.js +0 -4
  628. package/node_modules/underscore/modules/_group.js +0 -15
  629. package/node_modules/underscore/modules/_has.js +0 -6
  630. package/node_modules/underscore/modules/_hasObjectTag.js +0 -3
  631. package/node_modules/underscore/modules/_isArrayLike.js +0 -8
  632. package/node_modules/underscore/modules/_isBufferLike.js +0 -6
  633. package/node_modules/underscore/modules/_keyInObj.js +0 -5
  634. package/node_modules/underscore/modules/_methodFingerprint.js +0 -37
  635. package/node_modules/underscore/modules/_optimizeCb.js +0 -21
  636. package/node_modules/underscore/modules/_setup.js +0 -43
  637. package/node_modules/underscore/modules/_shallowProperty.js +0 -6
  638. package/node_modules/underscore/modules/_stringTagBug.js +0 -10
  639. package/node_modules/underscore/modules/_tagTester.js +0 -9
  640. package/node_modules/underscore/modules/_toBufferView.js +0 -11
  641. package/node_modules/underscore/modules/_toPath.js +0 -8
  642. package/node_modules/underscore/modules/_unescapeMap.js +0 -5
  643. package/node_modules/underscore/modules/after.js +0 -8
  644. package/node_modules/underscore/modules/allKeys.js +0 -13
  645. package/node_modules/underscore/modules/before.js +0 -12
  646. package/node_modules/underscore/modules/bind.js +0 -13
  647. package/node_modules/underscore/modules/bindAll.js +0 -17
  648. package/node_modules/underscore/modules/chain.js +0 -8
  649. package/node_modules/underscore/modules/chunk.js +0 -13
  650. package/node_modules/underscore/modules/clone.js +0 -9
  651. package/node_modules/underscore/modules/compact.js +0 -6
  652. package/node_modules/underscore/modules/compose.js +0 -12
  653. package/node_modules/underscore/modules/constant.js +0 -6
  654. package/node_modules/underscore/modules/contains.js +0 -10
  655. package/node_modules/underscore/modules/countBy.js +0 -9
  656. package/node_modules/underscore/modules/create.js +0 -11
  657. package/node_modules/underscore/modules/debounce.js +0 -40
  658. package/node_modules/underscore/modules/defaults.js +0 -5
  659. package/node_modules/underscore/modules/defer.js +0 -7
  660. package/node_modules/underscore/modules/delay.js +0 -9
  661. package/node_modules/underscore/modules/difference.js +0 -13
  662. package/node_modules/underscore/modules/each.js +0 -23
  663. package/node_modules/underscore/modules/escape.js +0 -5
  664. package/node_modules/underscore/modules/every.js +0 -15
  665. package/node_modules/underscore/modules/extend.js +0 -5
  666. package/node_modules/underscore/modules/extendOwn.js +0 -7
  667. package/node_modules/underscore/modules/filter.js +0 -12
  668. package/node_modules/underscore/modules/find.js +0 -10
  669. package/node_modules/underscore/modules/findIndex.js +0 -4
  670. package/node_modules/underscore/modules/findKey.js +0 -12
  671. package/node_modules/underscore/modules/findLastIndex.js +0 -4
  672. package/node_modules/underscore/modules/findWhere.js +0 -8
  673. package/node_modules/underscore/modules/first.js +0 -9
  674. package/node_modules/underscore/modules/flatten.js +0 -7
  675. package/node_modules/underscore/modules/functions.js +0 -10
  676. package/node_modules/underscore/modules/get.js +0 -12
  677. package/node_modules/underscore/modules/groupBy.js +0 -8
  678. package/node_modules/underscore/modules/has.js +0 -16
  679. package/node_modules/underscore/modules/identity.js +0 -4
  680. package/node_modules/underscore/modules/index-all.js +0 -18
  681. package/node_modules/underscore/modules/index-default.js +0 -27
  682. package/node_modules/underscore/modules/index.js +0 -200
  683. package/node_modules/underscore/modules/indexBy.js +0 -7
  684. package/node_modules/underscore/modules/indexOf.js +0 -9
  685. package/node_modules/underscore/modules/initial.js +0 -8
  686. package/node_modules/underscore/modules/intersection.js +0 -19
  687. package/node_modules/underscore/modules/invert.js +0 -11
  688. package/node_modules/underscore/modules/invoke.js +0 -28
  689. package/node_modules/underscore/modules/isArguments.js +0 -16
  690. package/node_modules/underscore/modules/isArray.js +0 -6
  691. package/node_modules/underscore/modules/isArrayBuffer.js +0 -3
  692. package/node_modules/underscore/modules/isBoolean.js +0 -6
  693. package/node_modules/underscore/modules/isDataView.js +0 -14
  694. package/node_modules/underscore/modules/isDate.js +0 -3
  695. package/node_modules/underscore/modules/isElement.js +0 -4
  696. package/node_modules/underscore/modules/isEmpty.js +0 -18
  697. package/node_modules/underscore/modules/isEqual.js +0 -138
  698. package/node_modules/underscore/modules/isError.js +0 -3
  699. package/node_modules/underscore/modules/isFinite.js +0 -7
  700. package/node_modules/underscore/modules/isFunction.js +0 -15
  701. package/node_modules/underscore/modules/isMap.js +0 -5
  702. package/node_modules/underscore/modules/isMatch.js +0 -13
  703. package/node_modules/underscore/modules/isNaN.js +0 -7
  704. package/node_modules/underscore/modules/isNull.js +0 -4
  705. package/node_modules/underscore/modules/isNumber.js +0 -3
  706. package/node_modules/underscore/modules/isObject.js +0 -5
  707. package/node_modules/underscore/modules/isRegExp.js +0 -3
  708. package/node_modules/underscore/modules/isSet.js +0 -5
  709. package/node_modules/underscore/modules/isString.js +0 -3
  710. package/node_modules/underscore/modules/isSymbol.js +0 -3
  711. package/node_modules/underscore/modules/isTypedArray.js +0 -15
  712. package/node_modules/underscore/modules/isUndefined.js +0 -4
  713. package/node_modules/underscore/modules/isWeakMap.js +0 -5
  714. package/node_modules/underscore/modules/isWeakSet.js +0 -3
  715. package/node_modules/underscore/modules/iteratee.js +0 -10
  716. package/node_modules/underscore/modules/keys.js +0 -16
  717. package/node_modules/underscore/modules/last.js +0 -9
  718. package/node_modules/underscore/modules/lastIndexOf.js +0 -6
  719. package/node_modules/underscore/modules/map.js +0 -16
  720. package/node_modules/underscore/modules/mapObject.js +0 -16
  721. package/node_modules/underscore/modules/matcher.js +0 -11
  722. package/node_modules/underscore/modules/max.js +0 -29
  723. package/node_modules/underscore/modules/memoize.js +0 -13
  724. package/node_modules/underscore/modules/min.js +0 -29
  725. package/node_modules/underscore/modules/mixin.js +0 -18
  726. package/node_modules/underscore/modules/negate.js +0 -6
  727. package/node_modules/underscore/modules/noop.js +0 -2
  728. package/node_modules/underscore/modules/now.js +0 -4
  729. package/node_modules/underscore/modules/object.js +0 -16
  730. package/node_modules/underscore/modules/omit.js +0 -22
  731. package/node_modules/underscore/modules/once.js +0 -6
  732. package/node_modules/underscore/modules/package.json +0 -1
  733. package/node_modules/underscore/modules/pairs.js +0 -13
  734. package/node_modules/underscore/modules/partial.js +0 -24
  735. package/node_modules/underscore/modules/partition.js +0 -7
  736. package/node_modules/underscore/modules/pick.js +0 -26
  737. package/node_modules/underscore/modules/pluck.js +0 -7
  738. package/node_modules/underscore/modules/property.js +0 -11
  739. package/node_modules/underscore/modules/propertyOf.js +0 -10
  740. package/node_modules/underscore/modules/random.js +0 -8
  741. package/node_modules/underscore/modules/range.js +0 -21
  742. package/node_modules/underscore/modules/reduce.js +0 -5
  743. package/node_modules/underscore/modules/reduceRight.js +0 -4
  744. package/node_modules/underscore/modules/reject.js +0 -8
  745. package/node_modules/underscore/modules/rest.js +0 -8
  746. package/node_modules/underscore/modules/restArguments.js +0 -27
  747. package/node_modules/underscore/modules/result.js +0 -22
  748. package/node_modules/underscore/modules/sample.js +0 -27
  749. package/node_modules/underscore/modules/shuffle.js +0 -6
  750. package/node_modules/underscore/modules/size.js +0 -8
  751. package/node_modules/underscore/modules/some.js +0 -15
  752. package/node_modules/underscore/modules/sortBy.js +0 -24
  753. package/node_modules/underscore/modules/sortedIndex.js +0 -15
  754. package/node_modules/underscore/modules/tap.js +0 -7
  755. package/node_modules/underscore/modules/template.js +0 -101
  756. package/node_modules/underscore/modules/templateSettings.js +0 -9
  757. package/node_modules/underscore/modules/throttle.js +0 -47
  758. package/node_modules/underscore/modules/times.js +0 -9
  759. package/node_modules/underscore/modules/toArray.js +0 -20
  760. package/node_modules/underscore/modules/toPath.js +0 -9
  761. package/node_modules/underscore/modules/underscore-array-methods.js +0 -31
  762. package/node_modules/underscore/modules/underscore.js +0 -25
  763. package/node_modules/underscore/modules/unescape.js +0 -5
  764. package/node_modules/underscore/modules/union.js +0 -9
  765. package/node_modules/underscore/modules/uniq.js +0 -36
  766. package/node_modules/underscore/modules/uniqueId.js +0 -7
  767. package/node_modules/underscore/modules/unzip.js +0 -15
  768. package/node_modules/underscore/modules/values.js +0 -12
  769. package/node_modules/underscore/modules/where.js +0 -8
  770. package/node_modules/underscore/modules/without.js +0 -7
  771. package/node_modules/underscore/modules/wrap.js +0 -8
  772. package/node_modules/underscore/modules/zip.js +0 -6
  773. package/node_modules/underscore/package.json +0 -124
  774. package/node_modules/underscore/underscore-esm-min.js +0 -5
  775. package/node_modules/underscore/underscore-esm-min.js.map +0 -1
  776. package/node_modules/underscore/underscore-esm.js +0 -2034
  777. package/node_modules/underscore/underscore-esm.js.map +0 -1
  778. package/node_modules/underscore/underscore-min.js +0 -6
  779. package/node_modules/underscore/underscore-min.js.map +0 -1
  780. package/node_modules/underscore/underscore-node-f.cjs +0 -2158
  781. package/node_modules/underscore/underscore-node-f.cjs.map +0 -1
  782. package/node_modules/underscore/underscore-node.cjs +0 -11
  783. package/node_modules/underscore/underscore-node.cjs.map +0 -1
  784. package/node_modules/underscore/underscore-node.mjs +0 -7
  785. package/node_modules/underscore/underscore-node.mjs.map +0 -1
  786. package/node_modules/underscore/underscore-umd-min.js +0 -6
  787. package/node_modules/underscore/underscore-umd-min.js.map +0 -1
  788. package/node_modules/underscore/underscore-umd.js +0 -2042
  789. package/node_modules/underscore/underscore-umd.js.map +0 -1
  790. package/node_modules/underscore/underscore.js +0 -2042
@@ -0,0 +1,98 @@
1
+ var index = (function () {
2
+ 'use strict';
3
+
4
+ const PLUS_CODE = 43; // +
5
+ const MINUS_CODE = 45; // -
6
+
7
+ const plugin = {
8
+ name: 'assignment',
9
+
10
+ assignmentOperators: new Set([
11
+ '=',
12
+ '*=',
13
+ '**=',
14
+ '/=',
15
+ '%=',
16
+ '+=',
17
+ '-=',
18
+ '<<=',
19
+ '>>=',
20
+ '>>>=',
21
+ '&=',
22
+ '^=',
23
+ '|=',
24
+ '||=',
25
+ '&&=',
26
+ '??=',
27
+ ]),
28
+ updateOperators: [PLUS_CODE, MINUS_CODE],
29
+ assignmentPrecedence: 0.9,
30
+
31
+ init(jsep) {
32
+ const updateNodeTypes = [jsep.IDENTIFIER, jsep.MEMBER_EXP];
33
+ plugin.assignmentOperators.forEach(op => jsep.addBinaryOp(op, plugin.assignmentPrecedence, true));
34
+
35
+ jsep.hooks.add('gobble-token', function gobbleUpdatePrefix(env) {
36
+ const code = this.code;
37
+ if (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {
38
+ this.index += 2;
39
+ env.node = {
40
+ type: 'UpdateExpression',
41
+ operator: code === PLUS_CODE ? '++' : '--',
42
+ argument: this.gobbleTokenProperty(this.gobbleIdentifier()),
43
+ prefix: true,
44
+ };
45
+ if (!env.node.argument || !updateNodeTypes.includes(env.node.argument.type)) {
46
+ this.throwError(`Unexpected ${env.node.operator}`);
47
+ }
48
+ }
49
+ });
50
+
51
+ jsep.hooks.add('after-token', function gobbleUpdatePostfix(env) {
52
+ if (env.node) {
53
+ const code = this.code;
54
+ if (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {
55
+ if (!updateNodeTypes.includes(env.node.type)) {
56
+ this.throwError(`Unexpected ${env.node.operator}`);
57
+ }
58
+ this.index += 2;
59
+ env.node = {
60
+ type: 'UpdateExpression',
61
+ operator: code === PLUS_CODE ? '++' : '--',
62
+ argument: env.node,
63
+ prefix: false,
64
+ };
65
+ }
66
+ }
67
+ });
68
+
69
+ jsep.hooks.add('after-expression', function gobbleAssignment(env) {
70
+ if (env.node) {
71
+ // Note: Binaries can be chained in a single expression to respect
72
+ // operator precedence (i.e. a = b = 1 + 2 + 3)
73
+ // Update all binary assignment nodes in the tree
74
+ updateBinariesToAssignments(env.node);
75
+ }
76
+ });
77
+
78
+ function updateBinariesToAssignments(node) {
79
+ if (plugin.assignmentOperators.has(node.operator)) {
80
+ node.type = 'AssignmentExpression';
81
+ updateBinariesToAssignments(node.left);
82
+ updateBinariesToAssignments(node.right);
83
+ }
84
+ else if (!node.operator) {
85
+ Object.values(node).forEach((val) => {
86
+ if (val && typeof val === 'object') {
87
+ updateBinariesToAssignments(val);
88
+ }
89
+ });
90
+ }
91
+ }
92
+ },
93
+ };
94
+
95
+ return plugin;
96
+
97
+ }());
98
+ //# sourceMappingURL=index.iife.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.js","sources":["../../src/index.js"],"sourcesContent":["const PLUS_CODE = 43; // +\nconst MINUS_CODE = 45; // -\n\nconst plugin = {\n\tname: 'assignment',\n\n\tassignmentOperators: new Set([\n\t\t'=',\n\t\t'*=',\n\t\t'**=',\n\t\t'/=',\n\t\t'%=',\n\t\t'+=',\n\t\t'-=',\n\t\t'<<=',\n\t\t'>>=',\n\t\t'>>>=',\n\t\t'&=',\n\t\t'^=',\n\t\t'|=',\n\t\t'||=',\n\t\t'&&=',\n\t\t'??=',\n\t]),\n\tupdateOperators: [PLUS_CODE, MINUS_CODE],\n\tassignmentPrecedence: 0.9,\n\n\tinit(jsep) {\n\t\tconst updateNodeTypes = [jsep.IDENTIFIER, jsep.MEMBER_EXP];\n\t\tplugin.assignmentOperators.forEach(op => jsep.addBinaryOp(op, plugin.assignmentPrecedence, true));\n\n\t\tjsep.hooks.add('gobble-token', function gobbleUpdatePrefix(env) {\n\t\t\tconst code = this.code;\n\t\t\tif (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {\n\t\t\t\tthis.index += 2;\n\t\t\t\tenv.node = {\n\t\t\t\t\ttype: 'UpdateExpression',\n\t\t\t\t\toperator: code === PLUS_CODE ? '++' : '--',\n\t\t\t\t\targument: this.gobbleTokenProperty(this.gobbleIdentifier()),\n\t\t\t\t\tprefix: true,\n\t\t\t\t};\n\t\t\t\tif (!env.node.argument || !updateNodeTypes.includes(env.node.argument.type)) {\n\t\t\t\t\tthis.throwError(`Unexpected ${env.node.operator}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tjsep.hooks.add('after-token', function gobbleUpdatePostfix(env) {\n\t\t\tif (env.node) {\n\t\t\t\tconst code = this.code;\n\t\t\t\tif (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {\n\t\t\t\t\tif (!updateNodeTypes.includes(env.node.type)) {\n\t\t\t\t\t\tthis.throwError(`Unexpected ${env.node.operator}`);\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += 2;\n\t\t\t\t\tenv.node = {\n\t\t\t\t\t\ttype: 'UpdateExpression',\n\t\t\t\t\t\toperator: code === PLUS_CODE ? '++' : '--',\n\t\t\t\t\t\targument: env.node,\n\t\t\t\t\t\tprefix: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tjsep.hooks.add('after-expression', function gobbleAssignment(env) {\n\t\t\tif (env.node) {\n\t\t\t\t// Note: Binaries can be chained in a single expression to respect\n\t\t\t\t// operator precedence (i.e. a = b = 1 + 2 + 3)\n\t\t\t\t// Update all binary assignment nodes in the tree\n\t\t\t\tupdateBinariesToAssignments(env.node);\n\t\t\t}\n\t\t});\n\n\t\tfunction updateBinariesToAssignments(node) {\n\t\t\tif (plugin.assignmentOperators.has(node.operator)) {\n\t\t\t\tnode.type = 'AssignmentExpression';\n\t\t\t\tupdateBinariesToAssignments(node.left);\n\t\t\t\tupdateBinariesToAssignments(node.right);\n\t\t\t}\n\t\t\telse if (!node.operator) {\n\t\t\t\tObject.values(node).forEach((val) => {\n\t\t\t\t\tif (val && typeof val === 'object') {\n\t\t\t\t\t\tupdateBinariesToAssignments(val);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n};\nexport default plugin;\n"],"names":[],"mappings":";;;CAAA,MAAM,SAAS,GAAG,EAAE,CAAC;CACrB,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB;AACK,OAAC,MAAM,GAAG;CACf,CAAC,IAAI,EAAE,YAAY;AACnB;CACA,CAAC,mBAAmB,EAAE,IAAI,GAAG,CAAC;CAC9B,EAAE,GAAG;CACL,EAAE,IAAI;CACN,EAAE,KAAK;CACP,EAAE,IAAI;CACN,EAAE,IAAI;CACN,EAAE,IAAI;CACN,EAAE,IAAI;CACN,EAAE,KAAK;CACP,EAAE,KAAK;CACP,EAAE,MAAM;CACR,EAAE,IAAI;CACN,EAAE,IAAI;CACN,EAAE,IAAI;CACN,EAAE,KAAK;CACP,EAAE,KAAK;CACP,EAAE,KAAK;CACP,EAAE,CAAC;CACH,CAAC,eAAe,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;CACzC,CAAC,oBAAoB,EAAE,GAAG;AAC1B;CACA,CAAC,IAAI,CAAC,IAAI,EAAE;CACZ,EAAE,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;CAC7D,EAAE,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,CAAC;AACpG;CACA,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,SAAS,kBAAkB,CAAC,GAAG,EAAE;CAClE,GAAG,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;CAC1B,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;CACnG,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;CACpB,IAAI,GAAG,CAAC,IAAI,GAAG;CACf,KAAK,IAAI,EAAE,kBAAkB;CAC7B,KAAK,QAAQ,EAAE,IAAI,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI;CAC/C,KAAK,QAAQ,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;CAChE,KAAK,MAAM,EAAE,IAAI;CACjB,KAAK,CAAC;CACN,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;CACjF,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;CACxD,KAAK;CACL,IAAI;CACJ,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,SAAS,mBAAmB,CAAC,GAAG,EAAE;CAClE,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE;CACjB,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;CAC3B,IAAI,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;CACpG,KAAK,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;CACnD,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;CACzD,MAAM;CACN,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;CACrB,KAAK,GAAG,CAAC,IAAI,GAAG;CAChB,MAAM,IAAI,EAAE,kBAAkB;CAC9B,MAAM,QAAQ,EAAE,IAAI,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI;CAChD,MAAM,QAAQ,EAAE,GAAG,CAAC,IAAI;CACxB,MAAM,MAAM,EAAE,KAAK;CACnB,MAAM,CAAC;CACP,KAAK;CACL,IAAI;CACJ,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,gBAAgB,CAAC,GAAG,EAAE;CACpE,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE;CACjB;CACA;CACA;CACA,IAAI,2BAA2B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CAC1C,IAAI;CACJ,GAAG,CAAC,CAAC;AACL;CACA,EAAE,SAAS,2BAA2B,CAAC,IAAI,EAAE;CAC7C,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;CACtD,IAAI,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;CACvC,IAAI,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CAC3C,IAAI,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;CAC5C,IAAI;CACJ,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;CAC5B,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;CACzC,KAAK,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;CACzC,MAAM,2BAA2B,CAAC,GAAG,CAAC,CAAC;CACvC,MAAM;CACN,KAAK,CAAC,CAAC;CACP,IAAI;CACJ,GAAG;CACH,EAAE;CACF;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ var index=function(){"use strict";const e={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[43,45],assignmentPrecedence:.9,init(t){const o=[t.IDENTIFIER,t.MEMBER_EXP];function n(t){e.assignmentOperators.has(t.operator)?(t.type="AssignmentExpression",n(t.left),n(t.right)):t.operator||Object.values(t).forEach((e=>{e&&"object"==typeof e&&n(e)}))}e.assignmentOperators.forEach((o=>t.addBinaryOp(o,e.assignmentPrecedence,!0))),t.hooks.add("gobble-token",(function(t){const n=this.code;e.updateOperators.some((e=>e===n&&e===this.expr.charCodeAt(this.index+1)))&&(this.index+=2,t.node={type:"UpdateExpression",operator:43===n?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},t.node.argument&&o.includes(t.node.argument.type)||this.throwError(`Unexpected ${t.node.operator}`))})),t.hooks.add("after-token",(function(t){if(t.node){const n=this.code;e.updateOperators.some((e=>e===n&&e===this.expr.charCodeAt(this.index+1)))&&(o.includes(t.node.type)||this.throwError(`Unexpected ${t.node.operator}`),this.index+=2,t.node={type:"UpdateExpression",operator:43===n?"++":"--",argument:t.node,prefix:!1})}})),t.hooks.add("after-expression",(function(e){e.node&&n(e.node)}))}};return e}();
2
+ //# sourceMappingURL=index.iife.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.min.js","sources":["../../src/index.js"],"sourcesContent":["const PLUS_CODE = 43; // +\nconst MINUS_CODE = 45; // -\n\nconst plugin = {\n\tname: 'assignment',\n\n\tassignmentOperators: new Set([\n\t\t'=',\n\t\t'*=',\n\t\t'**=',\n\t\t'/=',\n\t\t'%=',\n\t\t'+=',\n\t\t'-=',\n\t\t'<<=',\n\t\t'>>=',\n\t\t'>>>=',\n\t\t'&=',\n\t\t'^=',\n\t\t'|=',\n\t\t'||=',\n\t\t'&&=',\n\t\t'??=',\n\t]),\n\tupdateOperators: [PLUS_CODE, MINUS_CODE],\n\tassignmentPrecedence: 0.9,\n\n\tinit(jsep) {\n\t\tconst updateNodeTypes = [jsep.IDENTIFIER, jsep.MEMBER_EXP];\n\t\tplugin.assignmentOperators.forEach(op => jsep.addBinaryOp(op, plugin.assignmentPrecedence, true));\n\n\t\tjsep.hooks.add('gobble-token', function gobbleUpdatePrefix(env) {\n\t\t\tconst code = this.code;\n\t\t\tif (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {\n\t\t\t\tthis.index += 2;\n\t\t\t\tenv.node = {\n\t\t\t\t\ttype: 'UpdateExpression',\n\t\t\t\t\toperator: code === PLUS_CODE ? '++' : '--',\n\t\t\t\t\targument: this.gobbleTokenProperty(this.gobbleIdentifier()),\n\t\t\t\t\tprefix: true,\n\t\t\t\t};\n\t\t\t\tif (!env.node.argument || !updateNodeTypes.includes(env.node.argument.type)) {\n\t\t\t\t\tthis.throwError(`Unexpected ${env.node.operator}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tjsep.hooks.add('after-token', function gobbleUpdatePostfix(env) {\n\t\t\tif (env.node) {\n\t\t\t\tconst code = this.code;\n\t\t\t\tif (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {\n\t\t\t\t\tif (!updateNodeTypes.includes(env.node.type)) {\n\t\t\t\t\t\tthis.throwError(`Unexpected ${env.node.operator}`);\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += 2;\n\t\t\t\t\tenv.node = {\n\t\t\t\t\t\ttype: 'UpdateExpression',\n\t\t\t\t\t\toperator: code === PLUS_CODE ? '++' : '--',\n\t\t\t\t\t\targument: env.node,\n\t\t\t\t\t\tprefix: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tjsep.hooks.add('after-expression', function gobbleAssignment(env) {\n\t\t\tif (env.node) {\n\t\t\t\t// Note: Binaries can be chained in a single expression to respect\n\t\t\t\t// operator precedence (i.e. a = b = 1 + 2 + 3)\n\t\t\t\t// Update all binary assignment nodes in the tree\n\t\t\t\tupdateBinariesToAssignments(env.node);\n\t\t\t}\n\t\t});\n\n\t\tfunction updateBinariesToAssignments(node) {\n\t\t\tif (plugin.assignmentOperators.has(node.operator)) {\n\t\t\t\tnode.type = 'AssignmentExpression';\n\t\t\t\tupdateBinariesToAssignments(node.left);\n\t\t\t\tupdateBinariesToAssignments(node.right);\n\t\t\t}\n\t\t\telse if (!node.operator) {\n\t\t\t\tObject.values(node).forEach((val) => {\n\t\t\t\t\tif (val && typeof val === 'object') {\n\t\t\t\t\t\tupdateBinariesToAssignments(val);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n};\nexport default plugin;\n"],"names":["plugin","name","assignmentOperators","Set","updateOperators","assignmentPrecedence","init","jsep","updateNodeTypes","IDENTIFIER","MEMBER_EXP","updateBinariesToAssignments","node","has","operator","type","left","right","Object","values","forEach","val","op","addBinaryOp","hooks","add","env","code","this","some","c","expr","charCodeAt","index","argument","gobbleTokenProperty","gobbleIdentifier","prefix","includes","throwError"],"mappings":"kCAAA,MAGMA,EAAS,CACdC,KAAM,aAENC,oBAAqB,IAAIC,IAAI,CAC5B,IACA,KACA,MACA,KACA,KACA,KACA,KACA,MACA,MACA,OACA,KACA,KACA,KACA,MACA,MACA,QAEDC,gBAAiB,CAxBA,GACC,IAwBlBC,qBAAsB,GAEtBC,KAAKC,GACJ,MAAMC,EAAkB,CAACD,EAAKE,WAAYF,EAAKG,YA8C/C,SAASC,EAA4BC,GAChCZ,EAAOE,oBAAoBW,IAAID,EAAKE,WACvCF,EAAKG,KAAO,uBACZJ,EAA4BC,EAAKI,MACjCL,EAA4BC,EAAKK,QAExBL,EAAKE,UACdI,OAAOC,OAAOP,GAAMQ,SAASC,IACxBA,GAAsB,iBAARA,GACjBV,EAA4BU,MAtDhCrB,EAAOE,oBAAoBkB,SAAQE,GAAMf,EAAKgB,YAAYD,EAAItB,EAAOK,sBAAsB,KAE3FE,EAAKiB,MAAMC,IAAI,gBAAgB,SAA4BC,GAC1D,MAAMC,EAAOC,KAAKD,KACd3B,EAAOI,gBAAgByB,MAAKC,GAAKA,IAAMH,GAAQG,IAAMF,KAAKG,KAAKC,WAAWJ,KAAKK,MAAQ,OAC1FL,KAAKK,OAAS,EACdP,EAAId,KAAO,CACVG,KAAM,mBACND,SArCa,KAqCHa,EAAqB,KAAO,KACtCO,SAAUN,KAAKO,oBAAoBP,KAAKQ,oBACxCC,QAAQ,GAEJX,EAAId,KAAKsB,UAAa1B,EAAgB8B,SAASZ,EAAId,KAAKsB,SAASnB,OACrEa,KAAKW,WAAW,cAAcb,EAAId,KAAKE,gBAK1CP,EAAKiB,MAAMC,IAAI,eAAe,SAA6BC,GAC1D,GAAIA,EAAId,KAAM,CACb,MAAMe,EAAOC,KAAKD,KACd3B,EAAOI,gBAAgByB,MAAKC,GAAKA,IAAMH,GAAQG,IAAMF,KAAKG,KAAKC,WAAWJ,KAAKK,MAAQ,OACrFzB,EAAgB8B,SAASZ,EAAId,KAAKG,OACtCa,KAAKW,WAAW,cAAcb,EAAId,KAAKE,YAExCc,KAAKK,OAAS,EACdP,EAAId,KAAO,CACVG,KAAM,mBACND,SAzDY,KAyDFa,EAAqB,KAAO,KACtCO,SAAUR,EAAId,KACdyB,QAAQ,QAMZ9B,EAAKiB,MAAMC,IAAI,oBAAoB,SAA0BC,GACxDA,EAAId,MAIPD,EAA4Be,EAAId"}
@@ -0,0 +1,92 @@
1
+ const PLUS_CODE = 43; // +
2
+ const MINUS_CODE = 45; // -
3
+
4
+ const plugin = {
5
+ name: 'assignment',
6
+
7
+ assignmentOperators: new Set([
8
+ '=',
9
+ '*=',
10
+ '**=',
11
+ '/=',
12
+ '%=',
13
+ '+=',
14
+ '-=',
15
+ '<<=',
16
+ '>>=',
17
+ '>>>=',
18
+ '&=',
19
+ '^=',
20
+ '|=',
21
+ '||=',
22
+ '&&=',
23
+ '??=',
24
+ ]),
25
+ updateOperators: [PLUS_CODE, MINUS_CODE],
26
+ assignmentPrecedence: 0.9,
27
+
28
+ init(jsep) {
29
+ const updateNodeTypes = [jsep.IDENTIFIER, jsep.MEMBER_EXP];
30
+ plugin.assignmentOperators.forEach(op => jsep.addBinaryOp(op, plugin.assignmentPrecedence, true));
31
+
32
+ jsep.hooks.add('gobble-token', function gobbleUpdatePrefix(env) {
33
+ const code = this.code;
34
+ if (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {
35
+ this.index += 2;
36
+ env.node = {
37
+ type: 'UpdateExpression',
38
+ operator: code === PLUS_CODE ? '++' : '--',
39
+ argument: this.gobbleTokenProperty(this.gobbleIdentifier()),
40
+ prefix: true,
41
+ };
42
+ if (!env.node.argument || !updateNodeTypes.includes(env.node.argument.type)) {
43
+ this.throwError(`Unexpected ${env.node.operator}`);
44
+ }
45
+ }
46
+ });
47
+
48
+ jsep.hooks.add('after-token', function gobbleUpdatePostfix(env) {
49
+ if (env.node) {
50
+ const code = this.code;
51
+ if (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {
52
+ if (!updateNodeTypes.includes(env.node.type)) {
53
+ this.throwError(`Unexpected ${env.node.operator}`);
54
+ }
55
+ this.index += 2;
56
+ env.node = {
57
+ type: 'UpdateExpression',
58
+ operator: code === PLUS_CODE ? '++' : '--',
59
+ argument: env.node,
60
+ prefix: false,
61
+ };
62
+ }
63
+ }
64
+ });
65
+
66
+ jsep.hooks.add('after-expression', function gobbleAssignment(env) {
67
+ if (env.node) {
68
+ // Note: Binaries can be chained in a single expression to respect
69
+ // operator precedence (i.e. a = b = 1 + 2 + 3)
70
+ // Update all binary assignment nodes in the tree
71
+ updateBinariesToAssignments(env.node);
72
+ }
73
+ });
74
+
75
+ function updateBinariesToAssignments(node) {
76
+ if (plugin.assignmentOperators.has(node.operator)) {
77
+ node.type = 'AssignmentExpression';
78
+ updateBinariesToAssignments(node.left);
79
+ updateBinariesToAssignments(node.right);
80
+ }
81
+ else if (!node.operator) {
82
+ Object.values(node).forEach((val) => {
83
+ if (val && typeof val === 'object') {
84
+ updateBinariesToAssignments(val);
85
+ }
86
+ });
87
+ }
88
+ }
89
+ },
90
+ };
91
+
92
+ export { plugin as default };
@@ -0,0 +1,2 @@
1
+ const e={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[43,45],assignmentPrecedence:.9,init(t){const o=[t.IDENTIFIER,t.MEMBER_EXP];function n(t){e.assignmentOperators.has(t.operator)?(t.type="AssignmentExpression",n(t.left),n(t.right)):t.operator||Object.values(t).forEach((e=>{e&&"object"==typeof e&&n(e)}))}e.assignmentOperators.forEach((o=>t.addBinaryOp(o,e.assignmentPrecedence,!0))),t.hooks.add("gobble-token",(function(t){const n=this.code;e.updateOperators.some((e=>e===n&&e===this.expr.charCodeAt(this.index+1)))&&(this.index+=2,t.node={type:"UpdateExpression",operator:43===n?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},t.node.argument&&o.includes(t.node.argument.type)||this.throwError(`Unexpected ${t.node.operator}`))})),t.hooks.add("after-token",(function(t){if(t.node){const n=this.code;e.updateOperators.some((e=>e===n&&e===this.expr.charCodeAt(this.index+1)))&&(o.includes(t.node.type)||this.throwError(`Unexpected ${t.node.operator}`),this.index+=2,t.node={type:"UpdateExpression",operator:43===n?"++":"--",argument:t.node,prefix:!1})}})),t.hooks.add("after-expression",(function(e){e.node&&n(e.node)}))}};export{e as default};
2
+ //# sourceMappingURL=index.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.min.js","sources":["../src/index.js"],"sourcesContent":["const PLUS_CODE = 43; // +\nconst MINUS_CODE = 45; // -\n\nconst plugin = {\n\tname: 'assignment',\n\n\tassignmentOperators: new Set([\n\t\t'=',\n\t\t'*=',\n\t\t'**=',\n\t\t'/=',\n\t\t'%=',\n\t\t'+=',\n\t\t'-=',\n\t\t'<<=',\n\t\t'>>=',\n\t\t'>>>=',\n\t\t'&=',\n\t\t'^=',\n\t\t'|=',\n\t\t'||=',\n\t\t'&&=',\n\t\t'??=',\n\t]),\n\tupdateOperators: [PLUS_CODE, MINUS_CODE],\n\tassignmentPrecedence: 0.9,\n\n\tinit(jsep) {\n\t\tconst updateNodeTypes = [jsep.IDENTIFIER, jsep.MEMBER_EXP];\n\t\tplugin.assignmentOperators.forEach(op => jsep.addBinaryOp(op, plugin.assignmentPrecedence, true));\n\n\t\tjsep.hooks.add('gobble-token', function gobbleUpdatePrefix(env) {\n\t\t\tconst code = this.code;\n\t\t\tif (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {\n\t\t\t\tthis.index += 2;\n\t\t\t\tenv.node = {\n\t\t\t\t\ttype: 'UpdateExpression',\n\t\t\t\t\toperator: code === PLUS_CODE ? '++' : '--',\n\t\t\t\t\targument: this.gobbleTokenProperty(this.gobbleIdentifier()),\n\t\t\t\t\tprefix: true,\n\t\t\t\t};\n\t\t\t\tif (!env.node.argument || !updateNodeTypes.includes(env.node.argument.type)) {\n\t\t\t\t\tthis.throwError(`Unexpected ${env.node.operator}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tjsep.hooks.add('after-token', function gobbleUpdatePostfix(env) {\n\t\t\tif (env.node) {\n\t\t\t\tconst code = this.code;\n\t\t\t\tif (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) {\n\t\t\t\t\tif (!updateNodeTypes.includes(env.node.type)) {\n\t\t\t\t\t\tthis.throwError(`Unexpected ${env.node.operator}`);\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += 2;\n\t\t\t\t\tenv.node = {\n\t\t\t\t\t\ttype: 'UpdateExpression',\n\t\t\t\t\t\toperator: code === PLUS_CODE ? '++' : '--',\n\t\t\t\t\t\targument: env.node,\n\t\t\t\t\t\tprefix: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tjsep.hooks.add('after-expression', function gobbleAssignment(env) {\n\t\t\tif (env.node) {\n\t\t\t\t// Note: Binaries can be chained in a single expression to respect\n\t\t\t\t// operator precedence (i.e. a = b = 1 + 2 + 3)\n\t\t\t\t// Update all binary assignment nodes in the tree\n\t\t\t\tupdateBinariesToAssignments(env.node);\n\t\t\t}\n\t\t});\n\n\t\tfunction updateBinariesToAssignments(node) {\n\t\t\tif (plugin.assignmentOperators.has(node.operator)) {\n\t\t\t\tnode.type = 'AssignmentExpression';\n\t\t\t\tupdateBinariesToAssignments(node.left);\n\t\t\t\tupdateBinariesToAssignments(node.right);\n\t\t\t}\n\t\t\telse if (!node.operator) {\n\t\t\t\tObject.values(node).forEach((val) => {\n\t\t\t\t\tif (val && typeof val === 'object') {\n\t\t\t\t\t\tupdateBinariesToAssignments(val);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n};\nexport default plugin;\n"],"names":["plugin","name","assignmentOperators","Set","updateOperators","assignmentPrecedence","init","jsep","updateNodeTypes","IDENTIFIER","MEMBER_EXP","updateBinariesToAssignments","node","has","operator","type","left","right","Object","values","forEach","val","op","addBinaryOp","hooks","add","env","code","this","some","c","expr","charCodeAt","index","argument","gobbleTokenProperty","gobbleIdentifier","prefix","includes","throwError"],"mappings":"AAAA,MAGMA,EAAS,CACdC,KAAM,aAENC,oBAAqB,IAAIC,IAAI,CAC5B,IACA,KACA,MACA,KACA,KACA,KACA,KACA,MACA,MACA,OACA,KACA,KACA,KACA,MACA,MACA,QAEDC,gBAAiB,CAxBA,GACC,IAwBlBC,qBAAsB,GAEtBC,KAAKC,GACJ,MAAMC,EAAkB,CAACD,EAAKE,WAAYF,EAAKG,YA8C/C,SAASC,EAA4BC,GAChCZ,EAAOE,oBAAoBW,IAAID,EAAKE,WACvCF,EAAKG,KAAO,uBACZJ,EAA4BC,EAAKI,MACjCL,EAA4BC,EAAKK,QAExBL,EAAKE,UACdI,OAAOC,OAAOP,GAAMQ,SAASC,IACxBA,GAAsB,iBAARA,GACjBV,EAA4BU,MAtDhCrB,EAAOE,oBAAoBkB,SAAQE,GAAMf,EAAKgB,YAAYD,EAAItB,EAAOK,sBAAsB,KAE3FE,EAAKiB,MAAMC,IAAI,gBAAgB,SAA4BC,GAC1D,MAAMC,EAAOC,KAAKD,KACd3B,EAAOI,gBAAgByB,MAAKC,GAAKA,IAAMH,GAAQG,IAAMF,KAAKG,KAAKC,WAAWJ,KAAKK,MAAQ,OAC1FL,KAAKK,OAAS,EACdP,EAAId,KAAO,CACVG,KAAM,mBACND,SArCa,KAqCHa,EAAqB,KAAO,KACtCO,SAAUN,KAAKO,oBAAoBP,KAAKQ,oBACxCC,QAAQ,GAEJX,EAAId,KAAKsB,UAAa1B,EAAgB8B,SAASZ,EAAId,KAAKsB,SAASnB,OACrEa,KAAKW,WAAW,cAAcb,EAAId,KAAKE,gBAK1CP,EAAKiB,MAAMC,IAAI,eAAe,SAA6BC,GAC1D,GAAIA,EAAId,KAAM,CACb,MAAMe,EAAOC,KAAKD,KACd3B,EAAOI,gBAAgByB,MAAKC,GAAKA,IAAMH,GAAQG,IAAMF,KAAKG,KAAKC,WAAWJ,KAAKK,MAAQ,OACrFzB,EAAgB8B,SAASZ,EAAId,KAAKG,OACtCa,KAAKW,WAAW,cAAcb,EAAId,KAAKE,YAExCc,KAAKK,OAAS,EACdP,EAAId,KAAO,CACVG,KAAM,mBACND,SAzDY,KAyDFa,EAAqB,KAAO,KACtCO,SAAUR,EAAId,KACdyB,QAAQ,QAMZ9B,EAAKiB,MAAMC,IAAI,oBAAoB,SAA0BC,GACxDA,EAAId,MAIPD,EAA4Be,EAAId"}
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@jsep-plugin/assignment",
3
+ "version": "1.3.0",
4
+ "description": "Adds assignment expression support",
5
+ "author": "Shelly (https://github.com/6utt3rfly)",
6
+ "maintainers": [
7
+ "Eric Smekens (https://github.com/EricSmekens)",
8
+ "Lea Verou (https://github.com/LeaVerou)",
9
+ "Shelly (https://github.com/6utt3rfly)"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "homepage": "https://ericsmekens.github.io/jsep/tree/master/packages/assignment#readme",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "url": "EricSmekens/jsep",
18
+ "directory": "packages/assignment"
19
+ },
20
+ "type": "module",
21
+ "main": "./dist/cjs/index.cjs.js",
22
+ "module": "./dist/index.js",
23
+ "types": "types/tsd.d.ts",
24
+ "peerDependencies": {
25
+ "jsep": "^0.4.0||^1.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "rollup": "^2.44.0",
29
+ "rollup-plugin-delete": "^2.0.0"
30
+ },
31
+ "engines": {
32
+ "node": ">= 10.16.0"
33
+ },
34
+ "scripts": {
35
+ "build": "rollup -c ../../plugin.rollup.config.js && cp ../../package-cjs.json dist/cjs/package.json && cp ../../LICENSE ./",
36
+ "test": "cd ../../ && http-server -p 49649 --silent & node-qunit-puppeteer http://localhost:49649/packages/assignment/test/unit_tests.html",
37
+ "lint": "eslint src/**/*.js test/**/*.js"
38
+ }
39
+ }
@@ -0,0 +1,39 @@
1
+ import * as jsep from 'jsep';
2
+ import { Expression, IPlugin } from 'jsep';
3
+ export const name: string;
4
+ export const assignmentOperators: Set<string>;
5
+ export const updateOperators: number[];
6
+ export const assignmentPrecedence: number;
7
+ export function init(this: typeof jsep): void;
8
+
9
+ export interface UpdateExpression extends Expression {
10
+ type: 'UpdateExpression';
11
+ operator: '++' | '--';
12
+ argument: Expression;
13
+ prefix: boolean;
14
+ }
15
+
16
+ export interface AssignmentExpression extends Expression {
17
+ type: 'AssignmentExpression';
18
+ operator: '='
19
+ | '*='
20
+ | '**='
21
+ | '/='
22
+ | '%='
23
+ | '+='
24
+ | '-='
25
+ | '<<='
26
+ | '>>='
27
+ | '>>>='
28
+ | '&='
29
+ | '^='
30
+ | '|='
31
+ | '||='
32
+ | '&&='
33
+ | '??=';
34
+ left: Expression;
35
+ right: Expression;
36
+ }
37
+
38
+ declare const _export: IPlugin;
39
+ export default _export;
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Stephen Oney, https://ericsmekens.github.io/jsep/
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,36 @@
1
+ [npm]: https://img.shields.io/npm/v/@jsep-plugin/regex
2
+ [npm-url]: https://www.npmjs.com/package/@jsep-plugin/regex
3
+ [size]: https://packagephobia.now.sh/badge?p=@jsep-plugin/regex
4
+ [size-url]: https://packagephobia.now.sh/result?p=@jsep-plugin/regex
5
+
6
+ [![npm][npm]][npm-url]
7
+ [![size][size]][size-url]
8
+
9
+ # @jsep-plugin/regex
10
+
11
+ A JSEP plugin for adding regex expression support. Allows expressions of the form:
12
+
13
+ ```javascript
14
+ jsep('/abc/');
15
+ jsep('/abc/ig');
16
+ jsep('/[a-z]{3}/ig.test(a)');
17
+ ```
18
+
19
+ ## Install
20
+
21
+ ```console
22
+ npm install @jsep-plugin/regex
23
+ # or
24
+ yarn add @jsep-plugin/regex
25
+ ```
26
+
27
+ ## Usage
28
+ ```javascript
29
+ import jsep from 'jsep';
30
+ import jsepRegex from '@jsep-plugin/regex';
31
+ jsep.plugins.register(jsepRegex);
32
+ ```
33
+
34
+ ## Meta
35
+
36
+ [LICENSE (MIT)](/LICENSE)
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ const FSLASH_CODE = 47; // '/'
4
+ const BSLASH_CODE = 92; // '\\'
5
+
6
+ var index = {
7
+ name: 'regex',
8
+
9
+ init(jsep) {
10
+ // Regex literal: /abc123/ig
11
+ jsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {
12
+ if (this.code === FSLASH_CODE) {
13
+ const patternIndex = ++this.index;
14
+
15
+ let inCharSet = false;
16
+ while (this.index < this.expr.length) {
17
+ if (this.code === FSLASH_CODE && !inCharSet) {
18
+ const pattern = this.expr.slice(patternIndex, this.index);
19
+
20
+ let flags = '';
21
+ while (++this.index < this.expr.length) {
22
+ const code = this.code;
23
+ if ((code >= 97 && code <= 122) // a...z
24
+ || (code >= 65 && code <= 90) // A...Z
25
+ || (code >= 48 && code <= 57)) { // 0-9
26
+ flags += this.char;
27
+ }
28
+ else {
29
+ break;
30
+ }
31
+ }
32
+
33
+ let value;
34
+ try {
35
+ value = new RegExp(pattern, flags);
36
+ }
37
+ catch (e) {
38
+ this.throwError(e.message);
39
+ }
40
+
41
+ env.node = {
42
+ type: jsep.LITERAL,
43
+ value,
44
+ raw: this.expr.slice(patternIndex - 1, this.index),
45
+ };
46
+
47
+ // allow . [] and () after regex: /regex/.test(a)
48
+ env.node = this.gobbleTokenProperty(env.node);
49
+ return env.node;
50
+ }
51
+ if (this.code === jsep.OBRACK_CODE) {
52
+ inCharSet = true;
53
+ }
54
+ else if (inCharSet && this.code === jsep.CBRACK_CODE) {
55
+ inCharSet = false;
56
+ }
57
+ this.index += this.code === BSLASH_CODE ? 2 : 1;
58
+ }
59
+ this.throwError('Unclosed Regex');
60
+ }
61
+ });
62
+ },
63
+ };
64
+
65
+ module.exports = index;
66
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../src/index.js"],"sourcesContent":["const FSLASH_CODE = 47; // '/'\nconst BSLASH_CODE = 92; // '\\\\'\n\nexport default {\n\tname: 'regex',\n\n\tinit(jsep) {\n\t\t// Regex literal: /abc123/ig\n\t\tjsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {\n\t\t\tif (this.code === FSLASH_CODE) {\n\t\t\t\tconst patternIndex = ++this.index;\n\n\t\t\t\tlet inCharSet = false;\n\t\t\t\twhile (this.index < this.expr.length) {\n\t\t\t\t\tif (this.code === FSLASH_CODE && !inCharSet) {\n\t\t\t\t\t\tconst pattern = this.expr.slice(patternIndex, this.index);\n\n\t\t\t\t\t\tlet flags = '';\n\t\t\t\t\t\twhile (++this.index < this.expr.length) {\n\t\t\t\t\t\t\tconst code = this.code;\n\t\t\t\t\t\t\tif ((code >= 97 && code <= 122) // a...z\n\t\t\t\t\t\t\t\t|| (code >= 65 && code <= 90) // A...Z\n\t\t\t\t\t\t\t\t|| (code >= 48 && code <= 57)) { // 0-9\n\t\t\t\t\t\t\t\tflags += this.char;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet value;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = new RegExp(pattern, flags);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\tthis.throwError(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tenv.node = {\n\t\t\t\t\t\t\ttype: jsep.LITERAL,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\traw: this.expr.slice(patternIndex - 1, this.index),\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// allow . [] and () after regex: /regex/.test(a)\n\t\t\t\t\t\tenv.node = this.gobbleTokenProperty(env.node);\n\t\t\t\t\t\treturn env.node;\n\t\t\t\t\t}\n\t\t\t\t\tif (this.code === jsep.OBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inCharSet && this.code === jsep.CBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = false;\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += this.code === BSLASH_CODE ? 2 : 1;\n\t\t\t\t}\n\t\t\t\tthis.throwError('Unclosed Regex');\n\t\t\t}\n\t\t});\n\t},\n};\n"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB;AACA,YAAe;AACf,CAAC,IAAI,EAAE,OAAO;AACd;AACA,CAAC,IAAI,CAAC,IAAI,EAAE;AACZ;AACA,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,SAAS,kBAAkB,CAAC,GAAG,EAAE;AAClE,GAAG,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE;AAClC,IAAI,MAAM,YAAY,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC;AACtC;AACA,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC;AAC1B,IAAI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAC1C,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,SAAS,EAAE;AAClD,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AAChE;AACA,MAAM,IAAI,KAAK,GAAG,EAAE,CAAC;AACrB,MAAM,OAAO,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAC9C,OAAO,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AAC9B,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,GAAG;AACrC,YAAY,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AACrC,YAAY,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE;AACvC,QAAQ,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;AAC3B,QAAQ;AACR,YAAY;AACZ,QAAQ,MAAM;AACd,QAAQ;AACR,OAAO;AACP;AACA,MAAM,IAAI,KAAK,CAAC;AAChB,MAAM,IAAI;AACV,OAAO,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC1C,OAAO;AACP,MAAM,OAAO,CAAC,EAAE;AAChB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAClC,OAAO;AACP;AACA,MAAM,GAAG,CAAC,IAAI,GAAG;AACjB,OAAO,IAAI,EAAE,IAAI,CAAC,OAAO;AACzB,OAAO,KAAK;AACZ,OAAO,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC;AACzD,OAAO,CAAC;AACR;AACA;AACA,MAAM,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACpD,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC;AACtB,MAAM;AACN,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE;AACzC,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,MAAM;AACN,UAAU,IAAI,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE;AAC3D,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM;AACN,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC;AACrD,KAAK;AACL,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AACtC,IAAI;AACJ,GAAG,CAAC,CAAC;AACL,EAAE;AACF,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e={name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const i=++this.index;let s=!1;for(;this.index<this.expr.length;){if(47===this.code&&!s){const s=this.expr.slice(i,this.index);let o,h="";for(;++this.index<this.expr.length;){const e=this.code;if(!(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;h+=this.char}try{o=new RegExp(s,h)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:o,raw:this.expr.slice(i-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?s=!0:s&&this.code===e.CBRACK_CODE&&(s=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}};module.exports=e;
2
+ //# sourceMappingURL=index.cjs.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.min.js","sources":["../../src/index.js"],"sourcesContent":["const FSLASH_CODE = 47; // '/'\nconst BSLASH_CODE = 92; // '\\\\'\n\nexport default {\n\tname: 'regex',\n\n\tinit(jsep) {\n\t\t// Regex literal: /abc123/ig\n\t\tjsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {\n\t\t\tif (this.code === FSLASH_CODE) {\n\t\t\t\tconst patternIndex = ++this.index;\n\n\t\t\t\tlet inCharSet = false;\n\t\t\t\twhile (this.index < this.expr.length) {\n\t\t\t\t\tif (this.code === FSLASH_CODE && !inCharSet) {\n\t\t\t\t\t\tconst pattern = this.expr.slice(patternIndex, this.index);\n\n\t\t\t\t\t\tlet flags = '';\n\t\t\t\t\t\twhile (++this.index < this.expr.length) {\n\t\t\t\t\t\t\tconst code = this.code;\n\t\t\t\t\t\t\tif ((code >= 97 && code <= 122) // a...z\n\t\t\t\t\t\t\t\t|| (code >= 65 && code <= 90) // A...Z\n\t\t\t\t\t\t\t\t|| (code >= 48 && code <= 57)) { // 0-9\n\t\t\t\t\t\t\t\tflags += this.char;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet value;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = new RegExp(pattern, flags);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\tthis.throwError(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tenv.node = {\n\t\t\t\t\t\t\ttype: jsep.LITERAL,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\traw: this.expr.slice(patternIndex - 1, this.index),\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// allow . [] and () after regex: /regex/.test(a)\n\t\t\t\t\t\tenv.node = this.gobbleTokenProperty(env.node);\n\t\t\t\t\t\treturn env.node;\n\t\t\t\t\t}\n\t\t\t\t\tif (this.code === jsep.OBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inCharSet && this.code === jsep.CBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = false;\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += this.code === BSLASH_CODE ? 2 : 1;\n\t\t\t\t}\n\t\t\t\tthis.throwError('Unclosed Regex');\n\t\t\t}\n\t\t});\n\t},\n};\n"],"names":["name","init","jsep","hooks","add","env","this","code","patternIndex","index","inCharSet","expr","length","pattern","slice","value","flags","char","RegExp","e","throwError","message","node","type","LITERAL","raw","gobbleTokenProperty","OBRACK_CODE","CBRACK_CODE"],"mappings":"aAGA,MAAe,CACdA,KAAM,QAENC,KAAKC,GAEJA,EAAKC,MAAMC,IAAI,gBAAgB,SAA4BC,GAC1D,GATiB,KASbC,KAAKC,KAAsB,CAC9B,MAAMC,IAAiBF,KAAKG,MAE5B,IAAIC,GAAY,EAChB,KAAOJ,KAAKG,MAAQH,KAAKK,KAAKC,QAAQ,CACrC,GAde,KAcXN,KAAKC,OAAyBG,EAAW,CAC5C,MAAMG,EAAUP,KAAKK,KAAKG,MAAMN,EAAcF,KAAKG,OAEnD,IAaIM,EAbAC,EAAQ,GACZ,OAASV,KAAKG,MAAQH,KAAKK,KAAKC,QAAQ,CACvC,MAAML,EAAOD,KAAKC,KAClB,KAAKA,GAAQ,IAAMA,GAAQ,KACtBA,GAAQ,IAAMA,GAAQ,IACtBA,GAAQ,IAAMA,GAAQ,IAI1B,MAHAS,GAASV,KAAKW,KAQhB,IACCF,EAAQ,IAAIG,OAAOL,EAASG,GAE7B,MAAOG,GACNb,KAAKc,WAAWD,EAAEE,SAWnB,OARAhB,EAAIiB,KAAO,CACVC,KAAMrB,EAAKsB,QACXT,MAAAA,EACAU,IAAKnB,KAAKK,KAAKG,MAAMN,EAAe,EAAGF,KAAKG,QAI7CJ,EAAIiB,KAAOhB,KAAKoB,oBAAoBrB,EAAIiB,MACjCjB,EAAIiB,KAERhB,KAAKC,OAASL,EAAKyB,YACtBjB,GAAY,EAEJA,GAAaJ,KAAKC,OAASL,EAAK0B,cACxClB,GAAY,GAEbJ,KAAKG,OArDU,KAqDDH,KAAKC,KAAuB,EAAI,EAE/CD,KAAKc,WAAW"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,69 @@
1
+ var index = (function () {
2
+ 'use strict';
3
+
4
+ const FSLASH_CODE = 47; // '/'
5
+ const BSLASH_CODE = 92; // '\\'
6
+
7
+ var index = {
8
+ name: 'regex',
9
+
10
+ init(jsep) {
11
+ // Regex literal: /abc123/ig
12
+ jsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {
13
+ if (this.code === FSLASH_CODE) {
14
+ const patternIndex = ++this.index;
15
+
16
+ let inCharSet = false;
17
+ while (this.index < this.expr.length) {
18
+ if (this.code === FSLASH_CODE && !inCharSet) {
19
+ const pattern = this.expr.slice(patternIndex, this.index);
20
+
21
+ let flags = '';
22
+ while (++this.index < this.expr.length) {
23
+ const code = this.code;
24
+ if ((code >= 97 && code <= 122) // a...z
25
+ || (code >= 65 && code <= 90) // A...Z
26
+ || (code >= 48 && code <= 57)) { // 0-9
27
+ flags += this.char;
28
+ }
29
+ else {
30
+ break;
31
+ }
32
+ }
33
+
34
+ let value;
35
+ try {
36
+ value = new RegExp(pattern, flags);
37
+ }
38
+ catch (e) {
39
+ this.throwError(e.message);
40
+ }
41
+
42
+ env.node = {
43
+ type: jsep.LITERAL,
44
+ value,
45
+ raw: this.expr.slice(patternIndex - 1, this.index),
46
+ };
47
+
48
+ // allow . [] and () after regex: /regex/.test(a)
49
+ env.node = this.gobbleTokenProperty(env.node);
50
+ return env.node;
51
+ }
52
+ if (this.code === jsep.OBRACK_CODE) {
53
+ inCharSet = true;
54
+ }
55
+ else if (inCharSet && this.code === jsep.CBRACK_CODE) {
56
+ inCharSet = false;
57
+ }
58
+ this.index += this.code === BSLASH_CODE ? 2 : 1;
59
+ }
60
+ this.throwError('Unclosed Regex');
61
+ }
62
+ });
63
+ },
64
+ };
65
+
66
+ return index;
67
+
68
+ }());
69
+ //# sourceMappingURL=index.iife.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.js","sources":["../../src/index.js"],"sourcesContent":["const FSLASH_CODE = 47; // '/'\nconst BSLASH_CODE = 92; // '\\\\'\n\nexport default {\n\tname: 'regex',\n\n\tinit(jsep) {\n\t\t// Regex literal: /abc123/ig\n\t\tjsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {\n\t\t\tif (this.code === FSLASH_CODE) {\n\t\t\t\tconst patternIndex = ++this.index;\n\n\t\t\t\tlet inCharSet = false;\n\t\t\t\twhile (this.index < this.expr.length) {\n\t\t\t\t\tif (this.code === FSLASH_CODE && !inCharSet) {\n\t\t\t\t\t\tconst pattern = this.expr.slice(patternIndex, this.index);\n\n\t\t\t\t\t\tlet flags = '';\n\t\t\t\t\t\twhile (++this.index < this.expr.length) {\n\t\t\t\t\t\t\tconst code = this.code;\n\t\t\t\t\t\t\tif ((code >= 97 && code <= 122) // a...z\n\t\t\t\t\t\t\t\t|| (code >= 65 && code <= 90) // A...Z\n\t\t\t\t\t\t\t\t|| (code >= 48 && code <= 57)) { // 0-9\n\t\t\t\t\t\t\t\tflags += this.char;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet value;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = new RegExp(pattern, flags);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\tthis.throwError(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tenv.node = {\n\t\t\t\t\t\t\ttype: jsep.LITERAL,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\traw: this.expr.slice(patternIndex - 1, this.index),\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// allow . [] and () after regex: /regex/.test(a)\n\t\t\t\t\t\tenv.node = this.gobbleTokenProperty(env.node);\n\t\t\t\t\t\treturn env.node;\n\t\t\t\t\t}\n\t\t\t\t\tif (this.code === jsep.OBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inCharSet && this.code === jsep.CBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = false;\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += this.code === BSLASH_CODE ? 2 : 1;\n\t\t\t\t}\n\t\t\t\tthis.throwError('Unclosed Regex');\n\t\t\t}\n\t\t});\n\t},\n};\n"],"names":[],"mappings":";;;CAAA,MAAM,WAAW,GAAG,EAAE,CAAC;CACvB,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB;AACA,aAAe;CACf,CAAC,IAAI,EAAE,OAAO;AACd;CACA,CAAC,IAAI,CAAC,IAAI,EAAE;CACZ;CACA,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,SAAS,kBAAkB,CAAC,GAAG,EAAE;CAClE,GAAG,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE;CAClC,IAAI,MAAM,YAAY,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC;AACtC;CACA,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC;CAC1B,IAAI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;CAC1C,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,SAAS,EAAE;CAClD,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AAChE;CACA,MAAM,IAAI,KAAK,GAAG,EAAE,CAAC;CACrB,MAAM,OAAO,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;CAC9C,OAAO,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;CAC9B,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,GAAG;CACrC,YAAY,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;CACrC,YAAY,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE;CACvC,QAAQ,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;CAC3B,QAAQ;CACR,YAAY;CACZ,QAAQ,MAAM;CACd,QAAQ;CACR,OAAO;AACP;CACA,MAAM,IAAI,KAAK,CAAC;CAChB,MAAM,IAAI;CACV,OAAO,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC1C,OAAO;CACP,MAAM,OAAO,CAAC,EAAE;CAChB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;CAClC,OAAO;AACP;CACA,MAAM,GAAG,CAAC,IAAI,GAAG;CACjB,OAAO,IAAI,EAAE,IAAI,CAAC,OAAO;CACzB,OAAO,KAAK;CACZ,OAAO,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC;CACzD,OAAO,CAAC;AACR;CACA;CACA,MAAM,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CACpD,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC;CACtB,MAAM;CACN,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE;CACzC,MAAM,SAAS,GAAG,IAAI,CAAC;CACvB,MAAM;CACN,UAAU,IAAI,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE;CAC3D,MAAM,SAAS,GAAG,KAAK,CAAC;CACxB,MAAM;CACN,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC;CACrD,KAAK;CACL,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;CACtC,IAAI;CACJ,GAAG,CAAC,CAAC;CACL,EAAE;CACF,CAAC;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ var index=function(){"use strict";return{name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const i=++this.index;let s=!1;for(;this.index<this.expr.length;){if(47===this.code&&!s){const s=this.expr.slice(i,this.index);let o,n="";for(;++this.index<this.expr.length;){const e=this.code;if(!(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;n+=this.char}try{o=new RegExp(s,n)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:o,raw:this.expr.slice(i-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?s=!0:s&&this.code===e.CBRACK_CODE&&(s=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}}}();
2
+ //# sourceMappingURL=index.iife.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.min.js","sources":["../../src/index.js"],"sourcesContent":["const FSLASH_CODE = 47; // '/'\nconst BSLASH_CODE = 92; // '\\\\'\n\nexport default {\n\tname: 'regex',\n\n\tinit(jsep) {\n\t\t// Regex literal: /abc123/ig\n\t\tjsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {\n\t\t\tif (this.code === FSLASH_CODE) {\n\t\t\t\tconst patternIndex = ++this.index;\n\n\t\t\t\tlet inCharSet = false;\n\t\t\t\twhile (this.index < this.expr.length) {\n\t\t\t\t\tif (this.code === FSLASH_CODE && !inCharSet) {\n\t\t\t\t\t\tconst pattern = this.expr.slice(patternIndex, this.index);\n\n\t\t\t\t\t\tlet flags = '';\n\t\t\t\t\t\twhile (++this.index < this.expr.length) {\n\t\t\t\t\t\t\tconst code = this.code;\n\t\t\t\t\t\t\tif ((code >= 97 && code <= 122) // a...z\n\t\t\t\t\t\t\t\t|| (code >= 65 && code <= 90) // A...Z\n\t\t\t\t\t\t\t\t|| (code >= 48 && code <= 57)) { // 0-9\n\t\t\t\t\t\t\t\tflags += this.char;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet value;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = new RegExp(pattern, flags);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\tthis.throwError(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tenv.node = {\n\t\t\t\t\t\t\ttype: jsep.LITERAL,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\traw: this.expr.slice(patternIndex - 1, this.index),\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// allow . [] and () after regex: /regex/.test(a)\n\t\t\t\t\t\tenv.node = this.gobbleTokenProperty(env.node);\n\t\t\t\t\t\treturn env.node;\n\t\t\t\t\t}\n\t\t\t\t\tif (this.code === jsep.OBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inCharSet && this.code === jsep.CBRACK_CODE) {\n\t\t\t\t\t\tinCharSet = false;\n\t\t\t\t\t}\n\t\t\t\t\tthis.index += this.code === BSLASH_CODE ? 2 : 1;\n\t\t\t\t}\n\t\t\t\tthis.throwError('Unclosed Regex');\n\t\t\t}\n\t\t});\n\t},\n};\n"],"names":["name","init","jsep","hooks","add","env","this","code","patternIndex","index","inCharSet","expr","length","pattern","slice","value","flags","char","RegExp","e","throwError","message","node","type","LITERAL","raw","gobbleTokenProperty","OBRACK_CODE","CBRACK_CODE"],"mappings":"wCAGe,CACdA,KAAM,QAENC,KAAKC,GAEJA,EAAKC,MAAMC,IAAI,gBAAgB,SAA4BC,GAC1D,GATiB,KASbC,KAAKC,KAAsB,CAC9B,MAAMC,IAAiBF,KAAKG,MAE5B,IAAIC,GAAY,EAChB,KAAOJ,KAAKG,MAAQH,KAAKK,KAAKC,QAAQ,CACrC,GAde,KAcXN,KAAKC,OAAyBG,EAAW,CAC5C,MAAMG,EAAUP,KAAKK,KAAKG,MAAMN,EAAcF,KAAKG,OAEnD,IAaIM,EAbAC,EAAQ,GACZ,OAASV,KAAKG,MAAQH,KAAKK,KAAKC,QAAQ,CACvC,MAAML,EAAOD,KAAKC,KAClB,KAAKA,GAAQ,IAAMA,GAAQ,KACtBA,GAAQ,IAAMA,GAAQ,IACtBA,GAAQ,IAAMA,GAAQ,IAI1B,MAHAS,GAASV,KAAKW,KAQhB,IACCF,EAAQ,IAAIG,OAAOL,EAASG,GAE7B,MAAOG,GACNb,KAAKc,WAAWD,EAAEE,SAWnB,OARAhB,EAAIiB,KAAO,CACVC,KAAMrB,EAAKsB,QACXT,MAAAA,EACAU,IAAKnB,KAAKK,KAAKG,MAAMN,EAAe,EAAGF,KAAKG,QAI7CJ,EAAIiB,KAAOhB,KAAKoB,oBAAoBrB,EAAIiB,MACjCjB,EAAIiB,KAERhB,KAAKC,OAASL,EAAKyB,YACtBjB,GAAY,EAEJA,GAAaJ,KAAKC,OAASL,EAAK0B,cACxClB,GAAY,GAEbJ,KAAKG,OArDU,KAqDDH,KAAKC,KAAuB,EAAI,EAE/CD,KAAKc,WAAW"}
@@ -0,0 +1,63 @@
1
+ const FSLASH_CODE = 47; // '/'
2
+ const BSLASH_CODE = 92; // '\\'
3
+
4
+ var index = {
5
+ name: 'regex',
6
+
7
+ init(jsep) {
8
+ // Regex literal: /abc123/ig
9
+ jsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) {
10
+ if (this.code === FSLASH_CODE) {
11
+ const patternIndex = ++this.index;
12
+
13
+ let inCharSet = false;
14
+ while (this.index < this.expr.length) {
15
+ if (this.code === FSLASH_CODE && !inCharSet) {
16
+ const pattern = this.expr.slice(patternIndex, this.index);
17
+
18
+ let flags = '';
19
+ while (++this.index < this.expr.length) {
20
+ const code = this.code;
21
+ if ((code >= 97 && code <= 122) // a...z
22
+ || (code >= 65 && code <= 90) // A...Z
23
+ || (code >= 48 && code <= 57)) { // 0-9
24
+ flags += this.char;
25
+ }
26
+ else {
27
+ break;
28
+ }
29
+ }
30
+
31
+ let value;
32
+ try {
33
+ value = new RegExp(pattern, flags);
34
+ }
35
+ catch (e) {
36
+ this.throwError(e.message);
37
+ }
38
+
39
+ env.node = {
40
+ type: jsep.LITERAL,
41
+ value,
42
+ raw: this.expr.slice(patternIndex - 1, this.index),
43
+ };
44
+
45
+ // allow . [] and () after regex: /regex/.test(a)
46
+ env.node = this.gobbleTokenProperty(env.node);
47
+ return env.node;
48
+ }
49
+ if (this.code === jsep.OBRACK_CODE) {
50
+ inCharSet = true;
51
+ }
52
+ else if (inCharSet && this.code === jsep.CBRACK_CODE) {
53
+ inCharSet = false;
54
+ }
55
+ this.index += this.code === BSLASH_CODE ? 2 : 1;
56
+ }
57
+ this.throwError('Unclosed Regex');
58
+ }
59
+ });
60
+ },
61
+ };
62
+
63
+ export { index as default };
@@ -0,0 +1,2 @@
1
+ var e={name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const i=++this.index;let s=!1;for(;this.index<this.expr.length;){if(47===this.code&&!s){const s=this.expr.slice(i,this.index);let o,h="";for(;++this.index<this.expr.length;){const e=this.code;if(!(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;h+=this.char}try{o=new RegExp(s,h)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:o,raw:this.expr.slice(i-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?s=!0:s&&this.code===e.CBRACK_CODE&&(s=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}};export{e as default};
2
+ //# sourceMappingURL=index.min.js.map