locutus 2.0.12 → 2.0.16

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 (419) hide show
  1. package/_util/cli.js.map +1 -1
  2. package/_util/util.js +11 -16
  3. package/_util/util.js.map +1 -1
  4. package/c/index.js +2 -2
  5. package/c/index.js.map +1 -1
  6. package/c/math/index.js +2 -2
  7. package/c/math/index.js.map +1 -1
  8. package/c/stdio/index.js +1 -1
  9. package/c/stdio/index.js.map +1 -1
  10. package/c/stdio/sprintf.js +8 -1
  11. package/c/stdio/sprintf.js.map +1 -1
  12. package/golang/index.js +1 -1
  13. package/golang/index.js.map +1 -1
  14. package/golang/strings/Count.js +1 -1
  15. package/golang/strings/Count.js.map +1 -1
  16. package/golang/strings/index.js +4 -4
  17. package/golang/strings/index.js.map +1 -1
  18. package/index.js +5 -5
  19. package/index.js.map +1 -1
  20. package/package.json +39 -40
  21. package/php/_helpers/_bc.js +104 -48
  22. package/php/_helpers/_bc.js.map +1 -1
  23. package/php/_helpers/_phpCastString.js.map +1 -1
  24. package/php/_helpers/_php_cast_float.js.map +1 -1
  25. package/php/_helpers/_php_cast_int.js.map +1 -1
  26. package/php/_helpers/index.js +4 -4
  27. package/php/_helpers/index.js.map +1 -1
  28. package/php/array/array_change_key_case.js +2 -2
  29. package/php/array/array_change_key_case.js.map +1 -1
  30. package/php/array/array_chunk.js +1 -1
  31. package/php/array/array_chunk.js.map +1 -1
  32. package/php/array/array_column.js.map +1 -1
  33. package/php/array/array_combine.js.map +1 -1
  34. package/php/array/array_count_values.js.map +1 -1
  35. package/php/array/array_diff.js.map +1 -1
  36. package/php/array/array_diff_assoc.js.map +1 -1
  37. package/php/array/array_diff_key.js.map +1 -1
  38. package/php/array/array_diff_uassoc.js.map +1 -1
  39. package/php/array/array_diff_ukey.js.map +1 -1
  40. package/php/array/array_fill.js +1 -1
  41. package/php/array/array_fill.js.map +1 -1
  42. package/php/array/array_fill_keys.js.map +1 -1
  43. package/php/array/array_filter.js +1 -1
  44. package/php/array/array_filter.js.map +1 -1
  45. package/php/array/array_flip.js +1 -1
  46. package/php/array/array_flip.js.map +1 -1
  47. package/php/array/array_intersect.js.map +1 -1
  48. package/php/array/array_intersect_assoc.js.map +1 -1
  49. package/php/array/array_intersect_key.js.map +1 -1
  50. package/php/array/array_intersect_uassoc.js.map +1 -1
  51. package/php/array/array_intersect_ukey.js.map +1 -1
  52. package/php/array/array_keys.js.map +1 -1
  53. package/php/array/array_map.js.map +1 -1
  54. package/php/array/array_merge.js +1 -1
  55. package/php/array/array_merge.js.map +1 -1
  56. package/php/array/array_merge_recursive.js.map +1 -1
  57. package/php/array/array_multisort.js +16 -16
  58. package/php/array/array_multisort.js.map +1 -1
  59. package/php/array/array_pad.js +1 -1
  60. package/php/array/array_pad.js.map +1 -1
  61. package/php/array/array_pop.js.map +1 -1
  62. package/php/array/array_product.js.map +1 -1
  63. package/php/array/array_push.js.map +1 -1
  64. package/php/array/array_rand.js.map +1 -1
  65. package/php/array/array_reduce.js.map +1 -1
  66. package/php/array/array_replace.js.map +1 -1
  67. package/php/array/array_replace_recursive.js +1 -1
  68. package/php/array/array_replace_recursive.js.map +1 -1
  69. package/php/array/array_reverse.js +1 -1
  70. package/php/array/array_reverse.js.map +1 -1
  71. package/php/array/array_search.js.map +1 -1
  72. package/php/array/array_shift.js +0 -19
  73. package/php/array/array_shift.js.map +1 -1
  74. package/php/array/array_slice.js.map +1 -1
  75. package/php/array/array_splice.js.map +1 -1
  76. package/php/array/array_sum.js +1 -1
  77. package/php/array/array_sum.js.map +1 -1
  78. package/php/array/array_udiff.js.map +1 -1
  79. package/php/array/array_udiff_assoc.js.map +1 -1
  80. package/php/array/array_udiff_uassoc.js.map +1 -1
  81. package/php/array/array_uintersect.js.map +1 -1
  82. package/php/array/array_uintersect_uassoc.js.map +1 -1
  83. package/php/array/array_unique.js.map +1 -1
  84. package/php/array/array_unshift.js.map +1 -1
  85. package/php/array/array_values.js.map +1 -1
  86. package/php/array/array_walk.js.map +1 -1
  87. package/php/array/array_walk_recursive.js.map +1 -1
  88. package/php/array/arsort.js +3 -3
  89. package/php/array/arsort.js.map +1 -1
  90. package/php/array/asort.js +3 -3
  91. package/php/array/asort.js.map +1 -1
  92. package/php/array/count.js +1 -1
  93. package/php/array/count.js.map +1 -1
  94. package/php/array/current.js.map +1 -1
  95. package/php/array/each.js.map +1 -1
  96. package/php/array/end.js +1 -1
  97. package/php/array/end.js.map +1 -1
  98. package/php/array/in_array.js.map +1 -1
  99. package/php/array/index.js +73 -72
  100. package/php/array/index.js.map +1 -1
  101. package/php/array/key.js.map +1 -1
  102. package/php/array/krsort.js +3 -3
  103. package/php/array/krsort.js.map +1 -1
  104. package/php/array/ksort.js +3 -3
  105. package/php/array/ksort.js.map +1 -1
  106. package/php/array/natcasesort.js +2 -2
  107. package/php/array/natcasesort.js.map +1 -1
  108. package/php/array/natsort.js +2 -2
  109. package/php/array/natsort.js.map +1 -1
  110. package/php/array/next.js.map +1 -1
  111. package/php/array/pos.js.map +1 -1
  112. package/php/array/prev.js.map +1 -1
  113. package/php/array/range.js +3 -3
  114. package/php/array/range.js.map +1 -1
  115. package/php/array/reset.js.map +1 -1
  116. package/php/array/rsort.js +3 -3
  117. package/php/array/rsort.js.map +1 -1
  118. package/php/array/shuffle.js.map +1 -1
  119. package/php/array/sizeof.js.map +1 -1
  120. package/php/array/sort.js +3 -3
  121. package/php/array/sort.js.map +1 -1
  122. package/php/array/uasort.js.map +1 -1
  123. package/php/array/uksort.js.map +1 -1
  124. package/php/array/usort.js.map +1 -1
  125. package/php/bc/bcadd.js +3 -1
  126. package/php/bc/bcadd.js.map +1 -1
  127. package/php/bc/bccomp.js +2 -1
  128. package/php/bc/bccomp.js.map +1 -1
  129. package/php/bc/bcdiv.js +3 -1
  130. package/php/bc/bcdiv.js.map +1 -1
  131. package/php/bc/bcmul.js +3 -1
  132. package/php/bc/bcmul.js.map +1 -1
  133. package/php/bc/bcround.js +4 -2
  134. package/php/bc/bcround.js.map +1 -1
  135. package/php/bc/bcscale.js.map +1 -1
  136. package/php/bc/bcsub.js +3 -1
  137. package/php/bc/bcsub.js.map +1 -1
  138. package/php/bc/index.js +7 -7
  139. package/php/bc/index.js.map +1 -1
  140. package/php/ctype/ctype_alnum.js.map +1 -1
  141. package/php/ctype/ctype_alpha.js.map +1 -1
  142. package/php/ctype/ctype_cntrl.js.map +1 -1
  143. package/php/ctype/ctype_digit.js.map +1 -1
  144. package/php/ctype/ctype_graph.js.map +1 -1
  145. package/php/ctype/ctype_lower.js.map +1 -1
  146. package/php/ctype/ctype_print.js.map +1 -1
  147. package/php/ctype/ctype_punct.js.map +1 -1
  148. package/php/ctype/ctype_space.js.map +1 -1
  149. package/php/ctype/ctype_upper.js.map +1 -1
  150. package/php/ctype/ctype_xdigit.js.map +1 -1
  151. package/php/ctype/index.js +11 -11
  152. package/php/ctype/index.js.map +1 -1
  153. package/php/datetime/date.js +2 -1
  154. package/php/datetime/date.js.map +1 -1
  155. package/php/datetime/date_parse.js +1 -1
  156. package/php/datetime/date_parse.js.map +1 -1
  157. package/php/datetime/getdate.js.map +1 -1
  158. package/php/datetime/gettimeofday.js.map +1 -1
  159. package/php/datetime/gmdate.js.map +1 -1
  160. package/php/datetime/gmmktime.js.map +1 -1
  161. package/php/datetime/gmstrftime.js.map +1 -1
  162. package/php/datetime/idate.js +1 -1
  163. package/php/datetime/idate.js.map +1 -1
  164. package/php/datetime/index.js +15 -15
  165. package/php/datetime/index.js.map +1 -1
  166. package/php/datetime/microtime.js +3 -3
  167. package/php/datetime/microtime.js.map +1 -1
  168. package/php/datetime/mktime.js.map +1 -1
  169. package/php/datetime/strftime.js +2 -3
  170. package/php/datetime/strftime.js.map +1 -1
  171. package/php/datetime/strptime.js +20 -21
  172. package/php/datetime/strptime.js.map +1 -1
  173. package/php/datetime/strtotime.js +170 -4
  174. package/php/datetime/strtotime.js.map +1 -1
  175. package/php/exec/escapeshellarg.js +12 -4
  176. package/php/exec/escapeshellarg.js.map +1 -1
  177. package/php/exec/index.js +1 -1
  178. package/php/exec/index.js.map +1 -1
  179. package/php/filesystem/basename.js.map +1 -1
  180. package/php/filesystem/file_get_contents.js.map +1 -1
  181. package/php/filesystem/index.js +5 -5
  182. package/php/filesystem/index.js.map +1 -1
  183. package/php/filesystem/pathinfo.js +7 -8
  184. package/php/filesystem/pathinfo.js.map +1 -1
  185. package/php/filesystem/realpath.js.map +1 -1
  186. package/php/funchand/call_user_func.js.map +1 -1
  187. package/php/funchand/call_user_func_array.js +1 -1
  188. package/php/funchand/call_user_func_array.js.map +1 -1
  189. package/php/funchand/function_exists.js.map +1 -1
  190. package/php/funchand/get_defined_functions.js.map +1 -1
  191. package/php/funchand/index.js +5 -5
  192. package/php/funchand/index.js.map +1 -1
  193. package/php/i18n/i18n_loc_get_default.js.map +1 -1
  194. package/php/i18n/i18n_loc_set_default.js.map +1 -1
  195. package/php/i18n/index.js +2 -2
  196. package/php/i18n/index.js.map +1 -1
  197. package/php/index.js +19 -19
  198. package/php/index.js.map +1 -1
  199. package/php/info/assert_options.js +2 -1
  200. package/php/info/assert_options.js.map +1 -1
  201. package/php/info/index.js +6 -6
  202. package/php/info/index.js.map +1 -1
  203. package/php/info/ini_get.js.map +1 -1
  204. package/php/info/ini_set.js.map +1 -1
  205. package/php/info/set_time_limit.js.map +1 -1
  206. package/php/info/version_compare.js +21 -22
  207. package/php/info/version_compare.js.map +1 -1
  208. package/php/json/index.js +3 -3
  209. package/php/json/index.js.map +1 -1
  210. package/php/json/json_decode.js +1 -1
  211. package/php/json/json_decode.js.map +1 -1
  212. package/php/json/json_encode.js +1 -1
  213. package/php/json/json_encode.js.map +1 -1
  214. package/php/json/json_last_error.js.map +1 -1
  215. package/php/math/fmod.js +2 -2
  216. package/php/math/fmod.js.map +1 -1
  217. package/php/math/hypot.js.map +1 -1
  218. package/php/math/index.js +46 -46
  219. package/php/math/index.js.map +1 -1
  220. package/php/math/is_finite.js.map +1 -1
  221. package/php/math/is_infinite.js.map +1 -1
  222. package/php/math/is_nan.js.map +1 -1
  223. package/php/math/log1p.js.map +1 -1
  224. package/php/math/max.js +7 -7
  225. package/php/math/max.js.map +1 -1
  226. package/php/math/min.js +5 -5
  227. package/php/math/min.js.map +1 -1
  228. package/php/math/mt_rand.js.map +1 -1
  229. package/php/math/rand.js.map +1 -1
  230. package/php/math/round.js +1 -1
  231. package/php/math/round.js.map +1 -1
  232. package/php/misc/index.js +2 -2
  233. package/php/misc/index.js.map +1 -1
  234. package/php/misc/pack.js +23 -18
  235. package/php/misc/pack.js.map +1 -1
  236. package/php/misc/uniqid.js +1 -1
  237. package/php/misc/uniqid.js.map +1 -1
  238. package/php/net-gopher/gopher_parsedir.js +3 -4
  239. package/php/net-gopher/gopher_parsedir.js.map +1 -1
  240. package/php/net-gopher/index.js +1 -1
  241. package/php/net-gopher/index.js.map +1 -1
  242. package/php/network/index.js +6 -6
  243. package/php/network/index.js.map +1 -1
  244. package/php/network/inet_ntop.js.map +1 -1
  245. package/php/network/inet_pton.js +40 -32
  246. package/php/network/inet_pton.js.map +1 -1
  247. package/php/network/setcookie.js.map +1 -1
  248. package/php/network/setrawcookie.js.map +1 -1
  249. package/php/pcre/index.js +4 -3
  250. package/php/pcre/index.js.map +1 -1
  251. package/php/pcre/preg_replace.js +24 -0
  252. package/php/pcre/preg_replace.js.map +1 -0
  253. package/php/pcre/sql_regcase.js.map +1 -1
  254. package/php/strings/addcslashes.js.map +1 -1
  255. package/php/strings/bin2hex.js +3 -3
  256. package/php/strings/bin2hex.js.map +1 -1
  257. package/php/strings/chop.js.map +1 -1
  258. package/php/strings/convert_cyr_string.js +1 -1
  259. package/php/strings/convert_cyr_string.js.map +1 -1
  260. package/php/strings/convert_uuencode.js.map +1 -1
  261. package/php/strings/count_chars.js +1 -1
  262. package/php/strings/count_chars.js.map +1 -1
  263. package/php/strings/crc32.js.map +1 -1
  264. package/php/strings/echo.js.map +1 -1
  265. package/php/strings/explode.js.map +1 -1
  266. package/php/strings/get_html_translation_table.js +1 -1
  267. package/php/strings/get_html_translation_table.js.map +1 -1
  268. package/php/strings/hex2bin.js +1 -1
  269. package/php/strings/hex2bin.js.map +1 -1
  270. package/php/strings/html_entity_decode.js.map +1 -1
  271. package/php/strings/htmlentities.js.map +1 -1
  272. package/php/strings/htmlspecialchars.js +6 -6
  273. package/php/strings/htmlspecialchars.js.map +1 -1
  274. package/php/strings/htmlspecialchars_decode.js +6 -6
  275. package/php/strings/htmlspecialchars_decode.js.map +1 -1
  276. package/php/strings/implode.js.map +1 -1
  277. package/php/strings/index.js +91 -91
  278. package/php/strings/index.js.map +1 -1
  279. package/php/strings/join.js.map +1 -1
  280. package/php/strings/lcfirst.js.map +1 -1
  281. package/php/strings/levenshtein.js +6 -1
  282. package/php/strings/levenshtein.js.map +1 -1
  283. package/php/strings/localeconv.js.map +1 -1
  284. package/php/strings/ltrim.js.map +1 -1
  285. package/php/strings/md5.js +19 -15
  286. package/php/strings/md5.js.map +1 -1
  287. package/php/strings/md5_file.js.map +1 -1
  288. package/php/strings/metaphone.js +2 -2
  289. package/php/strings/metaphone.js.map +1 -1
  290. package/php/strings/money_format.js.map +1 -1
  291. package/php/strings/nl2br.js.map +1 -1
  292. package/php/strings/nl_langinfo.js.map +1 -1
  293. package/php/strings/number_format.js.map +1 -1
  294. package/php/strings/ord.js.map +1 -1
  295. package/php/strings/parse_str.js +13 -13
  296. package/php/strings/parse_str.js.map +1 -1
  297. package/php/strings/printf.js.map +1 -1
  298. package/php/strings/quoted_printable_decode.js.map +1 -1
  299. package/php/strings/quoted_printable_encode.js.map +1 -1
  300. package/php/strings/rtrim.js.map +1 -1
  301. package/php/strings/setlocale.js +18 -19
  302. package/php/strings/setlocale.js.map +1 -1
  303. package/php/strings/sha1.js +12 -7
  304. package/php/strings/sha1.js.map +1 -1
  305. package/php/strings/sha1_file.js.map +1 -1
  306. package/php/strings/similar_text.js +4 -4
  307. package/php/strings/similar_text.js.map +1 -1
  308. package/php/strings/soundex.js +3 -3
  309. package/php/strings/soundex.js.map +1 -1
  310. package/php/strings/split.js.map +1 -1
  311. package/php/strings/sprintf.js +7 -2
  312. package/php/strings/sprintf.js.map +1 -1
  313. package/php/strings/sscanf.js +2 -2
  314. package/php/strings/sscanf.js.map +1 -1
  315. package/php/strings/str_getcsv.js +2 -2
  316. package/php/strings/str_getcsv.js.map +1 -1
  317. package/php/strings/str_ireplace.js +6 -0
  318. package/php/strings/str_ireplace.js.map +1 -1
  319. package/php/strings/str_pad.js +1 -1
  320. package/php/strings/str_pad.js.map +1 -1
  321. package/php/strings/str_repeat.js.map +1 -1
  322. package/php/strings/str_replace.js +6 -0
  323. package/php/strings/str_replace.js.map +1 -1
  324. package/php/strings/str_shuffle.js +1 -1
  325. package/php/strings/str_shuffle.js.map +1 -1
  326. package/php/strings/str_split.js.map +1 -1
  327. package/php/strings/str_word_count.js.map +1 -1
  328. package/php/strings/strcasecmp.js.map +1 -1
  329. package/php/strings/strchr.js.map +1 -1
  330. package/php/strings/strcoll.js.map +1 -1
  331. package/php/strings/strip_tags.js.map +1 -1
  332. package/php/strings/stripos.js.map +1 -1
  333. package/php/strings/stristr.js.map +1 -1
  334. package/php/strings/strlen.js.map +1 -1
  335. package/php/strings/strnatcasecmp.js.map +1 -1
  336. package/php/strings/strnatcmp.js.map +1 -1
  337. package/php/strings/strncasecmp.js +1 -1
  338. package/php/strings/strncasecmp.js.map +1 -1
  339. package/php/strings/strncmp.js.map +1 -1
  340. package/php/strings/strpbrk.js.map +1 -1
  341. package/php/strings/strpos.js.map +1 -1
  342. package/php/strings/strrchr.js.map +1 -1
  343. package/php/strings/strrev.js.map +1 -1
  344. package/php/strings/strripos.js.map +1 -1
  345. package/php/strings/strrpos.js.map +1 -1
  346. package/php/strings/strspn.js +3 -3
  347. package/php/strings/strspn.js.map +1 -1
  348. package/php/strings/strstr.js.map +1 -1
  349. package/php/strings/strtok.js.map +1 -1
  350. package/php/strings/strtr.js.map +1 -1
  351. package/php/strings/substr.js.map +1 -1
  352. package/php/strings/substr_count.js.map +1 -1
  353. package/php/strings/trim.js.map +1 -1
  354. package/php/strings/ucfirst.js.map +1 -1
  355. package/php/strings/vprintf.js.map +1 -1
  356. package/php/strings/vsprintf.js.map +1 -1
  357. package/php/strings/wordwrap.js +4 -2
  358. package/php/strings/wordwrap.js.map +1 -1
  359. package/php/url/base64_decode.js +8 -8
  360. package/php/url/base64_decode.js.map +1 -1
  361. package/php/url/base64_encode.js +8 -8
  362. package/php/url/base64_encode.js.map +1 -1
  363. package/php/url/http_build_query.js +4 -4
  364. package/php/url/http_build_query.js.map +1 -1
  365. package/php/url/index.js +8 -8
  366. package/php/url/index.js.map +1 -1
  367. package/php/url/parse_url.js +1 -1
  368. package/php/url/parse_url.js.map +1 -1
  369. package/php/var/doubleval.js.map +1 -1
  370. package/php/var/empty.js +4 -4
  371. package/php/var/empty.js.map +1 -1
  372. package/php/var/gettype.js +1 -1
  373. package/php/var/gettype.js.map +1 -1
  374. package/php/var/index.js +30 -30
  375. package/php/var/index.js.map +1 -1
  376. package/php/var/intval.js +2 -1
  377. package/php/var/intval.js.map +1 -1
  378. package/php/var/is_array.js.map +1 -1
  379. package/php/var/is_callable.js.map +1 -1
  380. package/php/var/is_double.js.map +1 -1
  381. package/php/var/is_integer.js.map +1 -1
  382. package/php/var/is_long.js.map +1 -1
  383. package/php/var/is_numeric.js.map +1 -1
  384. package/php/var/is_real.js.map +1 -1
  385. package/php/var/is_unicode.js.map +1 -1
  386. package/php/var/isset.js +1 -1
  387. package/php/var/isset.js.map +1 -1
  388. package/php/var/print_r.js.map +1 -1
  389. package/php/var/serialize.js +7 -5
  390. package/php/var/serialize.js.map +1 -1
  391. package/php/var/strval.js.map +1 -1
  392. package/php/var/unserialize.js +422 -236
  393. package/php/var/unserialize.js.map +1 -1
  394. package/php/var/var_dump.js +3 -3
  395. package/php/var/var_dump.js.map +1 -1
  396. package/php/var/var_export.js +5 -5
  397. package/php/var/var_export.js.map +1 -1
  398. package/php/xdiff/index.js +2 -2
  399. package/php/xdiff/index.js.map +1 -1
  400. package/php/xdiff/xdiff_string_diff.js +30 -30
  401. package/php/xdiff/xdiff_string_diff.js.map +1 -1
  402. package/php/xdiff/xdiff_string_patch.js +7 -8
  403. package/php/xdiff/xdiff_string_patch.js.map +1 -1
  404. package/php/xml/index.js +2 -2
  405. package/php/xml/index.js.map +1 -1
  406. package/php/xml/utf8_decode.js.map +1 -1
  407. package/php/xml/utf8_encode.js +2 -2
  408. package/php/xml/utf8_encode.js.map +1 -1
  409. package/python/index.js +1 -1
  410. package/python/index.js.map +1 -1
  411. package/python/string/capwords.js.map +1 -1
  412. package/python/string/index.js +4 -4
  413. package/python/string/index.js.map +1 -1
  414. package/python/string/punctuation.js +10 -0
  415. package/python/string/punctuation.js.map +1 -0
  416. package/ruby/Math/index.js +1 -1
  417. package/ruby/Math/index.js.map +1 -1
  418. package/ruby/index.js +1 -1
  419. package/ruby/index.js.map +1 -1
package/package.json CHANGED
@@ -1,46 +1,48 @@
1
1
  {
2
2
  "name": "locutus",
3
- "version": "2.0.12",
3
+ "version": "2.0.16",
4
4
  "license": "MIT",
5
5
  "description": "Locutus other languages' standard libraries to JavaScript for fun and educational purposes",
6
6
  "homepage": "https://locutus.io",
7
7
  "author": "Kevin van Zonneveld <kevin@vanzonneveld.net>",
8
8
  "engines": {
9
- "node": ">= 0.12.0"
9
+ "node": ">= 10"
10
10
  },
11
11
  "devDependencies": {
12
12
  "async": "2.0.0-rc.3",
13
- "babel-cli": "6.23.0",
14
- "babel-core": "6.23.1",
15
- "babel-eslint": "7.1.1",
16
- "babel-plugin-add-module-exports": "0.2.1",
13
+ "babel-cli": "6.26.0",
14
+ "babel-core": "6.26.3",
15
+ "babel-eslint": "10.1.0",
16
+ "babel-plugin-add-module-exports": "1.0.4",
17
17
  "babel-plugin-es6-promise": "1.1.1",
18
18
  "babel-plugin-syntax-async-functions": "6.13.0",
19
- "babel-plugin-transform-async-to-generator": "6.22.0",
19
+ "babel-plugin-transform-async-to-generator": "6.24.1",
20
20
  "babel-plugin-transform-object-assign": "6.22.0",
21
- "babel-preset-es2015": "6.22.0",
22
- "babel-register": "^6.26.0",
23
- "browserify": "13.0.0",
24
- "budo": "11.3.2",
21
+ "babel-preset-es2015": "6.24.1",
22
+ "babel-register": "6.26.0",
23
+ "browserify": "17.0.0",
24
+ "budo": "11.6.4",
25
25
  "chai": "3.5.0",
26
- "cross-env": "1.0.7",
26
+ "cross-env": "7.0.3",
27
27
  "depurar": "0.3.0",
28
- "eslint": "3.15.0",
29
- "eslint-config-standard": "6.2.1",
30
- "eslint-plugin-promise": "3.4.1",
31
- "eslint-plugin-standard": "2.0.1",
32
- "esprima": "^4.0.1",
33
- "fakefile": "0.0.8",
28
+ "es6-promise": "4.2.5",
29
+ "eslint": "7.27.0",
30
+ "eslint-config-standard": "16.0.2",
31
+ "eslint-plugin-import": "2.23.3",
32
+ "eslint-plugin-node": "11.1.0",
33
+ "eslint-plugin-promise": "5.1.0",
34
+ "eslint-plugin-standard": "5.0.0",
35
+ "esprima": "4.0.1",
36
+ "fakefile": "1.0.0",
34
37
  "globby": "4.0.0",
35
38
  "indent-string": "2.1.0",
36
39
  "invig": "0.0.22",
37
40
  "js-yaml": "3.6.0",
38
- "lodash": "4.17.10",
39
- "mkdirp": "0.5.1",
41
+ "lodash": "4.17.21",
42
+ "mkdirp": "1.0.4",
40
43
  "mocha": "5.2.0",
41
- "npm-run-all": "1.8.0",
42
- "rimraf": "2.5.2",
43
- "strip-indent": "2.0.0"
44
+ "npm-run-all": "4.1.5",
45
+ "rimraf": "3.0.2"
44
46
  },
45
47
  "keywords": [
46
48
  "php",
@@ -52,11 +54,11 @@
52
54
  "locutus"
53
55
  ],
54
56
  "bugs": {
55
- "url": "https://github.com/kvz/locutus/issues"
57
+ "url": "https://github.com/locutusjs/locutus/issues"
56
58
  },
57
59
  "repository": {
58
60
  "type": "git",
59
- "url": "https://github.com/kvz/locutus.git"
61
+ "url": "https://github.com/locutusjs/locutus.git"
60
62
  },
61
63
  "readmeFilename": "README.md",
62
64
  "scripts": {
@@ -68,29 +70,26 @@
68
70
  "build:tests:noskip": "rimraf test/languages && babel-node src/_util/cli.js writetests --noskip",
69
71
  "build:tests": "rimraf test/languages && babel-node src/_util/cli.js writetests",
70
72
  "build": "npm-run-all build:*",
71
- "deploy": "npm-run-all injectweb website:build website:deploy",
72
73
  "fix": "eslint src --fix",
73
74
  "injectweb": "rimraf website/source/{c,golang,php,python,ruby} && babel-node src/_util/cli.js injectweb",
74
75
  "lint": "eslint src",
75
76
  "playground:start": "cd test/browser && babel-node server.js",
76
- "release:major": "cross-env SEMANTIC=major npm run release",
77
- "release:minor": "cross-env SEMANTIC=minor npm run release",
78
- "release:patch": "cross-env SEMANTIC=patch npm run release",
79
- "release": "git commit CHANGELOG.md -m 'Update CHANGELOG.md' && npm version ${SEMANTIC:-patch} -m \"Release %s\" && git push --tags && git push && npm run build:dist && cd dist && npm publish",
80
- "test:languages:noskip": "npm run build:tests:noskip && cross-env DEBUG=locutus:* mocha --compilers js:babel-register --reporter spec --recursive test/languages --grep \"${TEST_GREP:-}\"",
81
- "test:languages": "npm run build:tests && cross-env DEBUG=locutus:* mocha --compilers js:babel-register --reporter spec --recursive test/languages --grep \"${TEST_GREP:-}\"",
77
+ "release:major": "cross-env SEMANTIC=major yarn release",
78
+ "release:minor": "cross-env SEMANTIC=minor yarn release",
79
+ "release:patch": "cross-env SEMANTIC=patch yarn release",
80
+ "release": "git commit CHANGELOG.md -m 'Update CHANGELOG.md' && npm version ${SEMANTIC:-patch} -m \"Release %s\" && git push --tags && git push && yarn build:dist && cd dist && npm publish",
81
+ "test:languages:noskip": "yarn build:tests:noskip && cross-env DEBUG=locutus:* mocha --compilers js:babel-register --reporter spec --recursive test/languages --grep \"${TEST_GREP:-}\"",
82
+ "test:languages": "yarn build:tests && cross-env DEBUG=locutus:* mocha --compilers js:babel-register --reporter spec --recursive test/languages --grep \"${TEST_GREP:-}\"",
82
83
  "test:module": "babel-node test/module/module.js",
83
84
  "test:util": "mocha --compilers js:babel-register --reporter spec test/util/",
84
85
  "test": "npm-run-all test:languages test:util test:module",
85
- "website:install": "cd website && npm install",
86
- "website:deploy": "cd website && hexo deploy",
87
- "website:start": "cd website && hexo server",
88
- "website:build": "cd website && hexo generate",
89
- "website:clean": "cd website && hexo clean"
90
- },
91
- "dependencies": {
92
- "es6-promise": "^4.2.5"
86
+ "website:install": "cd website && yarn",
87
+ "website:deploy": "cd website && yarn deploy",
88
+ "website:start": "cd website && yarn server",
89
+ "website:build": "cd website && yarn generate",
90
+ "website:clean": "cd website && yarn clean"
93
91
  },
92
+ "dependencies": {},
94
93
  "browser": {
95
94
  "fs": false,
96
95
  "child_process": false
@@ -73,7 +73,8 @@ module.exports = function _bc() {
73
73
  // this.n_text = null; // ?? Linked list for available list.
74
74
  this.n_value = null; // array as value, where 1.23 = [1,2,3]
75
75
  this.toString = function () {
76
- var r, tmp;
76
+ var r = void 0,
77
+ tmp = void 0;
77
78
  tmp = this.n_value.join('');
78
79
 
79
80
  // add minus sign (if applicable) then add the integer part
@@ -100,7 +101,9 @@ module.exports = function _bc() {
100
101
  * @return bc_num
101
102
  */
102
103
  bc_add: function bc_add(n1, n2, scaleMin) {
103
- var sum, cmpRes, resScale;
104
+ var sum = void 0,
105
+ cmpRes = void 0,
106
+ resScale = void 0;
104
107
 
105
108
  if (n1.n_sign === n2.n_sign) {
106
109
  sum = Libbcmath._bc_do_add(n1, n2, scaleMin);
@@ -142,8 +145,10 @@ module.exports = function _bc() {
142
145
  },
143
146
 
144
147
  _one_mult: function _one_mult(num, nPtr, size, digit, result, rPtr) {
145
- var carry, value; // int
146
- var nptr, rptr; // int pointers
148
+ var carry = void 0,
149
+ value = void 0; // int
150
+ var nptr = void 0,
151
+ rptr = void 0; // int pointers
147
152
  if (digit === 0) {
148
153
  Libbcmath.memset(result, 0, 0, size); // memset (result, 0, size);
149
154
  } else {
@@ -170,15 +175,28 @@ module.exports = function _bc() {
170
175
 
171
176
  bc_divide: function bc_divide(n1, n2, scale) {
172
177
  // var quot // bc_num return
173
- var qval; // bc_num
174
- var num1, num2; // string
175
- var ptr1, ptr2, n2ptr, qptr; // int pointers
176
- var scale1, val; // int
177
- var len1, len2, scale2, qdigits, extra, count; // int
178
- var qdig, qguess, borrow, carry; // int
179
- var mval; // string
180
- var zero; // char
181
- var norm; // int
178
+ var qval = void 0; // bc_num
179
+ var num1 = void 0,
180
+ num2 = void 0; // string
181
+ var ptr1 = void 0,
182
+ ptr2 = void 0,
183
+ n2ptr = void 0,
184
+ qptr = void 0; // int pointers
185
+ var scale1 = void 0,
186
+ val = void 0; // int
187
+ var len1 = void 0,
188
+ len2 = void 0,
189
+ scale2 = void 0,
190
+ qdigits = void 0,
191
+ extra = void 0,
192
+ count = void 0; // int
193
+ var qdig = void 0,
194
+ qguess = void 0,
195
+ borrow = void 0,
196
+ carry = void 0; // int
197
+ var mval = void 0; // string
198
+ var zero = void 0; // char
199
+ var norm = void 0; // int
182
200
  // var ptrs // return object from one_mul
183
201
  // Test for divide by zero. (return failure)
184
202
  if (Libbcmath.bc_is_zero(n2)) {
@@ -420,9 +438,11 @@ module.exports = function _bc() {
420
438
  * @param scale [int] optional
421
439
  */
422
440
  bc_multiply: function bc_multiply(n1, n2, scale) {
423
- var pval; // bc_num
424
- var len1, len2; // int
425
- var fullScale, prodScale; // int
441
+ var pval = void 0; // bc_num
442
+ var len1 = void 0,
443
+ len2 = void 0; // int
444
+ var fullScale = void 0,
445
+ prodScale = void 0; // int
426
446
  // Initialize things.
427
447
  len1 = n1.n_len + n1.n_scale;
428
448
  len2 = n2.n_len + n2.n_scale;
@@ -459,10 +479,15 @@ module.exports = function _bc() {
459
479
  },
460
480
 
461
481
  _bc_simp_mul: function _bc_simp_mul(n1, n1len, n2, n2len, fullScale) {
462
- var prod; // bc_num
463
- var n1ptr, n2ptr, pvptr; // char *n1ptr, *n2ptr, *pvptr;
464
- var n1end, n2end; // char *n1end, *n2end; // To the end of n1 and n2.
465
- var indx, sum, prodlen; // int indx, sum, prodlen;
482
+ var prod = void 0; // bc_num
483
+ var n1ptr = void 0,
484
+ n2ptr = void 0,
485
+ pvptr = void 0; // char *n1ptr, *n2ptr, *pvptr;
486
+ var n1end = void 0,
487
+ n2end = void 0; // char *n1end, *n2end; // To the end of n1 and n2.
488
+ var indx = void 0,
489
+ sum = void 0,
490
+ prodlen = void 0; // int indx, sum, prodlen;
466
491
  prodlen = n1len + n2len + 1;
467
492
 
468
493
  prod = Libbcmath.bc_new_num(prodlen, 0);
@@ -495,8 +520,10 @@ module.exports = function _bc() {
495
520
  be larger that what is being subtracted. Also, accum and val
496
521
  must have n_scale = 0. (e.g. they must look like integers. *) */
497
522
  _bc_shift_addsub: function _bc_shift_addsub(accum, val, shift, sub) {
498
- var accp, valp; // signed char *accp, *valp;
499
- var count, carry; // int count, carry;
523
+ var accp = void 0,
524
+ valp = void 0; // signed char *accp, *valp;
525
+ var count = void 0,
526
+ carry = void 0; // int count, carry;
500
527
  count = val.n_len;
501
528
  if (val.n_value[0] === 0) {
502
529
  count--;
@@ -568,13 +595,23 @@ module.exports = function _bc() {
568
595
  B is the base of storage, number of digits in u1,u0 close to equal.
569
596
  */
570
597
  _bc_rec_mul: function _bc_rec_mul(u, ulen, v, vlen, fullScale) {
571
- var prod; // @return
572
- var u0, u1, v0, v1; // bc_num
598
+ var prod = void 0; // @return
599
+ var u0 = void 0,
600
+ u1 = void 0,
601
+ v0 = void 0,
602
+ v1 = void 0; // bc_num
573
603
  // var u0len,
574
604
  // var v0len // int
575
- var m1, m2, m3, d1, d2; // bc_num
576
- var n, prodlen, m1zero; // int
577
- var d1len, d2len; // int
605
+ var m1 = void 0,
606
+ m2 = void 0,
607
+ m3 = void 0,
608
+ d1 = void 0,
609
+ d2 = void 0; // bc_num
610
+ var n = void 0,
611
+ prodlen = void 0,
612
+ m1zero = void 0; // int
613
+ var d1len = void 0,
614
+ d2len = void 0; // int
578
615
  // Base case?
579
616
  if (ulen + vlen < Libbcmath.MUL_BASE_DIGITS || ulen < Libbcmath.MUL_SMALL_DIGITS || vlen < Libbcmath.MUL_SMALL_DIGITS) {
580
617
  return Libbcmath._bc_simp_mul(u, ulen, v, vlen, fullScale);
@@ -671,8 +708,9 @@ module.exports = function _bc() {
671
708
  * @return -1, 0, 1 (see bc_compare)
672
709
  */
673
710
  _bc_do_compare: function _bc_do_compare(n1, n2, useSign, ignoreLast) {
674
- var n1ptr, n2ptr; // int
675
- var count; // int
711
+ var n1ptr = void 0,
712
+ n2ptr = void 0; // int
713
+ var count = void 0; // int
676
714
  // First, compare signs.
677
715
  if (useSign && n1.n_sign !== n2.n_sign) {
678
716
  if (n1.n_sign === Libbcmath.PLUS) {
@@ -770,8 +808,9 @@ module.exports = function _bc() {
770
808
  N2 is subtracted from N1 and the result placed in RESULT. SCALE_MIN
771
809
  is the minimum scale for the result. */
772
810
  bc_sub: function bc_sub(n1, n2, scaleMin) {
773
- var diff; // bc_num
774
- var cmpRes, resScale; // int
811
+ var diff = void 0; // bc_num
812
+ var cmpRes = void 0,
813
+ resScale = void 0; // int
775
814
  if (n1.n_sign !== n2.n_sign) {
776
815
  diff = Libbcmath._bc_do_add(n1, n2, scaleMin);
777
816
  diff.n_sign = n1.n_sign;
@@ -806,11 +845,16 @@ module.exports = function _bc() {
806
845
  },
807
846
 
808
847
  _bc_do_add: function _bc_do_add(n1, n2, scaleMin) {
809
- var sum; // bc_num
810
- var sumScale, sumDigits; // int
811
- var n1ptr, n2ptr, sumptr; // int
812
- var carry, n1bytes, n2bytes; // int
813
- var tmp; // int
848
+ var sum = void 0; // bc_num
849
+ var sumScale = void 0,
850
+ sumDigits = void 0; // int
851
+ var n1ptr = void 0,
852
+ n2ptr = void 0,
853
+ sumptr = void 0; // int
854
+ var carry = void 0,
855
+ n1bytes = void 0,
856
+ n2bytes = void 0; // int
857
+ var tmp = void 0; // int
814
858
 
815
859
  // Prepare sum.
816
860
  sumScale = Libbcmath.MAX(n1.n_scale, n2.n_scale);
@@ -925,11 +969,17 @@ module.exports = function _bc() {
925
969
  * @return bc_num
926
970
  */
927
971
  _bc_do_sub: function _bc_do_sub(n1, n2, scaleMin) {
928
- var diff; // bc_num
929
- var diffScale, diffLen; // int
930
- var minScale, minLen; // int
931
- var n1ptr, n2ptr, diffptr; // int
932
- var borrow, count, val; // int
972
+ var diff = void 0; // bc_num
973
+ var diffScale = void 0,
974
+ diffLen = void 0; // int
975
+ var minScale = void 0,
976
+ minLen = void 0; // int
977
+ var n1ptr = void 0,
978
+ n2ptr = void 0,
979
+ diffptr = void 0; // int
980
+ var borrow = void 0,
981
+ count = void 0,
982
+ val = void 0; // int
933
983
  // Allocate temporary storage.
934
984
  diffLen = Libbcmath.MAX(n1.n_len, n2.n_len);
935
985
  diffScale = Libbcmath.MAX(n1.n_scale, n2.n_scale);
@@ -1019,7 +1069,7 @@ module.exports = function _bc() {
1019
1069
  * @return bc_num
1020
1070
  */
1021
1071
  bc_new_num: function bc_new_num(length, scale) {
1022
- var temp; // bc_num
1072
+ var temp = void 0; // bc_num
1023
1073
  temp = new Libbcmath.bc_num(); // eslint-disable-line new-cap
1024
1074
  temp.n_sign = Libbcmath.PLUS;
1025
1075
  temp.n_len = length;
@@ -1052,7 +1102,7 @@ module.exports = function _bc() {
1052
1102
  * Convert to bc_num detecting scale
1053
1103
  */
1054
1104
  php_str2num: function php_str2num(str) {
1055
- var p;
1105
+ var p = void 0;
1056
1106
  p = str.indexOf('.');
1057
1107
  if (p === -1) {
1058
1108
  return Libbcmath.bc_str2num(str, 0);
@@ -1074,7 +1124,13 @@ module.exports = function _bc() {
1074
1124
  },
1075
1125
 
1076
1126
  bc_str2num: function bc_str2num(strIn, scale) {
1077
- var str, num, ptr, digits, strscale, zeroInt, nptr;
1127
+ var str = void 0,
1128
+ num = void 0,
1129
+ ptr = void 0,
1130
+ digits = void 0,
1131
+ strscale = void 0,
1132
+ zeroInt = void 0,
1133
+ nptr = void 0;
1078
1134
  // remove any non-expected characters
1079
1135
  // Check for valid number and count digits.
1080
1136
 
@@ -1204,7 +1260,7 @@ module.exports = function _bc() {
1204
1260
  * @param {int} len length to fill
1205
1261
  */
1206
1262
  memset: function memset(r, ptr, chr, len) {
1207
- var i;
1263
+ var i = void 0;
1208
1264
  for (i = 0; i < len; i++) {
1209
1265
  r[ptr + i] = chr;
1210
1266
  }
@@ -1217,7 +1273,7 @@ module.exports = function _bc() {
1217
1273
  * Also only works on arrays
1218
1274
  */
1219
1275
  memcpy: function memcpy(dest, ptr, src, srcptr, len) {
1220
- var i;
1276
+ var i = void 0;
1221
1277
  for (i = 0; i < len; i++) {
1222
1278
  dest[ptr + i] = src[srcptr + i];
1223
1279
  }
@@ -1230,8 +1286,8 @@ module.exports = function _bc() {
1230
1286
  * @return boolean true when zero, false when not zero.
1231
1287
  */
1232
1288
  bc_is_zero: function bc_is_zero(num) {
1233
- var count; // int
1234
- var nptr; // int
1289
+ var count = void 0; // int
1290
+ var nptr = void 0; // int
1235
1291
  // Quick check.
1236
1292
  // if (num === BCG(_zero_)) return TRUE;
1237
1293
  // Initialize