summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2018-11-07 22:10:16 +0100
committerMarvin Borner2018-11-07 22:10:17 +0100
commit954583f3d56fbfb60321725f13ad092e536e3737 (patch)
treea0505a763797582c61fd8c2f90b422456d8874c9
parent1c355e6e956a4e507ed5436d0c814ba9c3a1deb2 (diff)
Removed node_modules
l---------node_modules/.bin/twigjs1
-rw-r--r--node_modules/balanced-match/.npmignore5
-rw-r--r--node_modules/balanced-match/LICENSE.md21
-rw-r--r--node_modules/balanced-match/README.md91
-rw-r--r--node_modules/balanced-match/index.js59
-rw-r--r--node_modules/balanced-match/package.json77
-rw-r--r--node_modules/brace-expansion/LICENSE21
-rw-r--r--node_modules/brace-expansion/README.md129
-rw-r--r--node_modules/brace-expansion/index.js201
-rw-r--r--node_modules/brace-expansion/package.json75
-rw-r--r--node_modules/concat-map/.travis.yml4
-rw-r--r--node_modules/concat-map/LICENSE18
-rw-r--r--node_modules/concat-map/README.markdown62
-rw-r--r--node_modules/concat-map/example/map.js6
-rw-r--r--node_modules/concat-map/index.js13
-rw-r--r--node_modules/concat-map/package.json88
-rw-r--r--node_modules/concat-map/test/map.js39
-rw-r--r--node_modules/foreachasync/.npmignore1
-rw-r--r--node_modules/foreachasync/LICENSE191
-rw-r--r--node_modules/foreachasync/README.md134
-rw-r--r--node_modules/foreachasync/bower.json27
-rw-r--r--node_modules/foreachasync/forEachAsync.js35
-rw-r--r--node_modules/foreachasync/package.json60
-rw-r--r--node_modules/foreachasync/test.js29
-rwxr-xr-xnode_modules/locutus/_util/cli.js14
-rw-r--r--node_modules/locutus/_util/cli.js.map1
-rw-r--r--node_modules/locutus/_util/util.js622
-rw-r--r--node_modules/locutus/_util/util.js.map1
-rw-r--r--node_modules/locutus/c/index.js5
-rw-r--r--node_modules/locutus/c/index.js.map1
-rw-r--r--node_modules/locutus/c/math/abs.js20
-rw-r--r--node_modules/locutus/c/math/abs.js.map1
-rw-r--r--node_modules/locutus/c/math/frexp.js75
-rw-r--r--node_modules/locutus/c/math/frexp.js.map1
-rw-r--r--node_modules/locutus/c/math/index.js5
-rw-r--r--node_modules/locutus/c/math/index.js.map1
-rw-r--r--node_modules/locutus/c/stdio/index.js4
-rw-r--r--node_modules/locutus/c/stdio/index.js.map1
-rw-r--r--node_modules/locutus/c/stdio/sprintf.js135
-rw-r--r--node_modules/locutus/c/stdio/sprintf.js.map1
-rw-r--r--node_modules/locutus/golang/index.js4
-rw-r--r--node_modules/locutus/golang/index.js.map1
-rw-r--r--node_modules/locutus/golang/strings/Contains.js11
-rw-r--r--node_modules/locutus/golang/strings/Contains.js.map1
-rw-r--r--node_modules/locutus/golang/strings/Count.js35
-rw-r--r--node_modules/locutus/golang/strings/Count.js.map1
-rw-r--r--node_modules/locutus/golang/strings/Index2.js13
-rw-r--r--node_modules/locutus/golang/strings/Index2.js.map1
-rw-r--r--node_modules/locutus/golang/strings/LastIndex.js14
-rw-r--r--node_modules/locutus/golang/strings/LastIndex.js.map1
-rw-r--r--node_modules/locutus/golang/strings/index.js7
-rw-r--r--node_modules/locutus/golang/strings/index.js.map1
-rw-r--r--node_modules/locutus/index.js8
-rw-r--r--node_modules/locutus/index.js.map1
-rw-r--r--node_modules/locutus/package.json123
-rw-r--r--node_modules/locutus/php/_helpers/_bc.js1258
-rw-r--r--node_modules/locutus/php/_helpers/_bc.js.map1
-rw-r--r--node_modules/locutus/php/_helpers/_phpCastString.js69
-rw-r--r--node_modules/locutus/php/_helpers/_phpCastString.js.map1
-rw-r--r--node_modules/locutus/php/_helpers/_php_cast_int.js58
-rw-r--r--node_modules/locutus/php/_helpers/_php_cast_int.js.map1
-rw-r--r--node_modules/locutus/php/_helpers/index.js6
-rw-r--r--node_modules/locutus/php/_helpers/index.js.map1
-rw-r--r--node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js1255
-rw-r--r--node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js.map1
-rw-r--r--node_modules/locutus/php/_locutus_shared/index.js4
-rw-r--r--node_modules/locutus/php/_locutus_shared/index.js.map1
-rw-r--r--node_modules/locutus/php/array/array_change_key_case.js42
-rw-r--r--node_modules/locutus/php/array/array_change_key_case.js.map1
-rw-r--r--node_modules/locutus/php/array/array_chunk.js62
-rw-r--r--node_modules/locutus/php/array/array_chunk.js.map1
-rw-r--r--node_modules/locutus/php/array/array_combine.js46
-rw-r--r--node_modules/locutus/php/array/array_combine.js.map1
-rw-r--r--node_modules/locutus/php/array/array_count_values.js62
-rw-r--r--node_modules/locutus/php/array/array_count_values.js.map1
-rw-r--r--node_modules/locutus/php/array/array_diff.js35
-rw-r--r--node_modules/locutus/php/array/array_diff.js.map1
-rw-r--r--node_modules/locutus/php/array/array_diff_assoc.js35
-rw-r--r--node_modules/locutus/php/array/array_diff_assoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_diff_key.js37
-rw-r--r--node_modules/locutus/php/array/array_diff_key.js.map1
-rw-r--r--node_modules/locutus/php/array/array_diff_uassoc.js41
-rw-r--r--node_modules/locutus/php/array/array_diff_uassoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_diff_ukey.js41
-rw-r--r--node_modules/locutus/php/array/array_diff_ukey.js.map1
-rw-r--r--node_modules/locutus/php/array/array_fill.js22
-rw-r--r--node_modules/locutus/php/array/array_fill.js.map1
-rw-r--r--node_modules/locutus/php/array/array_fill_keys.js21
-rw-r--r--node_modules/locutus/php/array/array_fill_keys.js.map1
-rw-r--r--node_modules/locutus/php/array/array_filter.js39
-rw-r--r--node_modules/locutus/php/array/array_filter.js.map1
-rw-r--r--node_modules/locutus/php/array/array_flip.js24
-rw-r--r--node_modules/locutus/php/array/array_flip.js.map1
-rw-r--r--node_modules/locutus/php/array/array_intersect.js45
-rw-r--r--node_modules/locutus/php/array/array_intersect.js.map1
-rw-r--r--node_modules/locutus/php/array/array_intersect_assoc.js44
-rw-r--r--node_modules/locutus/php/array/array_intersect_assoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_intersect_key.js50
-rw-r--r--node_modules/locutus/php/array/array_intersect_key.js.map1
-rw-r--r--node_modules/locutus/php/array/array_intersect_uassoc.js54
-rw-r--r--node_modules/locutus/php/array/array_intersect_uassoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_intersect_ukey.js54
-rw-r--r--node_modules/locutus/php/array/array_intersect_ukey.js.map1
-rw-r--r--node_modules/locutus/php/array/array_key_exists.js17
-rw-r--r--node_modules/locutus/php/array/array_key_exists.js.map1
-rw-r--r--node_modules/locutus/php/array/array_keys.js41
-rw-r--r--node_modules/locutus/php/array/array_keys.js.map1
-rw-r--r--node_modules/locutus/php/array/array_map.js58
-rw-r--r--node_modules/locutus/php/array/array_map.js.map1
-rw-r--r--node_modules/locutus/php/array/array_merge.js67
-rw-r--r--node_modules/locutus/php/array/array_merge.js.map1
-rw-r--r--node_modules/locutus/php/array/array_merge_recursive.js40
-rw-r--r--node_modules/locutus/php/array/array_merge_recursive.js.map1
-rw-r--r--node_modules/locutus/php/array/array_multisort.js288
-rw-r--r--node_modules/locutus/php/array/array_multisort.js.map1
-rw-r--r--node_modules/locutus/php/array/array_pad.js38
-rw-r--r--node_modules/locutus/php/array/array_pad.js.map1
-rw-r--r--node_modules/locutus/php/array/array_pop.js51
-rw-r--r--node_modules/locutus/php/array/array_pop.js.map1
-rw-r--r--node_modules/locutus/php/array/array_product.js26
-rw-r--r--node_modules/locutus/php/array/array_product.js.map1
-rw-r--r--node_modules/locutus/php/array/array_push.js48
-rw-r--r--node_modules/locutus/php/array/array_push.js.map1
-rw-r--r--node_modules/locutus/php/array/array_rand.js36
-rw-r--r--node_modules/locutus/php/array/array_rand.js.map1
-rw-r--r--node_modules/locutus/php/array/array_reduce.js29
-rw-r--r--node_modules/locutus/php/array/array_reduce.js.map1
-rw-r--r--node_modules/locutus/php/array/array_replace.js34
-rw-r--r--node_modules/locutus/php/array/array_replace.js.map1
-rw-r--r--node_modules/locutus/php/array/array_replace_recursive.js48
-rw-r--r--node_modules/locutus/php/array/array_replace_recursive.js.map1
-rw-r--r--node_modules/locutus/php/array/array_reverse.js41
-rw-r--r--node_modules/locutus/php/array/array_reverse.js.map1
-rw-r--r--node_modules/locutus/php/array/array_search.js51
-rw-r--r--node_modules/locutus/php/array/array_search.js.map1
-rw-r--r--node_modules/locutus/php/array/array_shift.js38
-rw-r--r--node_modules/locutus/php/array/array_shift.js.map1
-rw-r--r--node_modules/locutus/php/array/array_slice.js74
-rw-r--r--node_modules/locutus/php/array/array_slice.js.map1
-rw-r--r--node_modules/locutus/php/array/array_splice.js123
-rw-r--r--node_modules/locutus/php/array/array_splice.js.map1
-rw-r--r--node_modules/locutus/php/array/array_sum.js37
-rw-r--r--node_modules/locutus/php/array/array_sum.js.map1
-rw-r--r--node_modules/locutus/php/array/array_udiff.js41
-rw-r--r--node_modules/locutus/php/array/array_udiff.js.map1
-rw-r--r--node_modules/locutus/php/array/array_udiff_assoc.js38
-rw-r--r--node_modules/locutus/php/array/array_udiff_assoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_udiff_uassoc.js44
-rw-r--r--node_modules/locutus/php/array/array_udiff_uassoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_uintersect.js48
-rw-r--r--node_modules/locutus/php/array/array_uintersect.js.map1
-rw-r--r--node_modules/locutus/php/array/array_uintersect_uassoc.js50
-rw-r--r--node_modules/locutus/php/array/array_uintersect_uassoc.js.map1
-rw-r--r--node_modules/locutus/php/array/array_unique.js48
-rw-r--r--node_modules/locutus/php/array/array_unique.js.map1
-rw-r--r--node_modules/locutus/php/array/array_unshift.js21
-rw-r--r--node_modules/locutus/php/array/array_unshift.js.map1
-rw-r--r--node_modules/locutus/php/array/array_values.js20
-rw-r--r--node_modules/locutus/php/array/array_values.js.map1
-rw-r--r--node_modules/locutus/php/array/array_walk.js41
-rw-r--r--node_modules/locutus/php/array/array_walk.js.map1
-rw-r--r--node_modules/locutus/php/array/array_walk_recursive.js49
-rw-r--r--node_modules/locutus/php/array/array_walk_recursive.js.map1
-rw-r--r--node_modules/locutus/php/array/arsort.js121
-rw-r--r--node_modules/locutus/php/array/arsort.js.map1
-rw-r--r--node_modules/locutus/php/array/asort.js121
-rw-r--r--node_modules/locutus/php/array/asort.js.map1
-rw-r--r--node_modules/locutus/php/array/count.js43
-rw-r--r--node_modules/locutus/php/array/count.js.map1
-rw-r--r--node_modules/locutus/php/array/current.js47
-rw-r--r--node_modules/locutus/php/array/current.js.map1
-rw-r--r--node_modules/locutus/php/array/each.js74
-rw-r--r--node_modules/locutus/php/array/each.js.map1
-rw-r--r--node_modules/locutus/php/array/end.js60
-rw-r--r--node_modules/locutus/php/array/end.js.map1
-rw-r--r--node_modules/locutus/php/array/in_array.js45
-rw-r--r--node_modules/locutus/php/array/in_array.js.map1
-rw-r--r--node_modules/locutus/php/array/index.js75
-rw-r--r--node_modules/locutus/php/array/index.js.map1
-rw-r--r--node_modules/locutus/php/array/key.js54
-rw-r--r--node_modules/locutus/php/array/key.js.map1
-rw-r--r--node_modules/locutus/php/array/krsort.js117
-rw-r--r--node_modules/locutus/php/array/krsort.js.map1
-rw-r--r--node_modules/locutus/php/array/ksort.js114
-rw-r--r--node_modules/locutus/php/array/ksort.js.map1
-rw-r--r--node_modules/locutus/php/array/natcasesort.js55
-rw-r--r--node_modules/locutus/php/array/natcasesort.js.map1
-rw-r--r--node_modules/locutus/php/array/natsort.js54
-rw-r--r--node_modules/locutus/php/array/natsort.js.map1
-rw-r--r--node_modules/locutus/php/array/next.js54
-rw-r--r--node_modules/locutus/php/array/next.js.map1
-rw-r--r--node_modules/locutus/php/array/pos.js14
-rw-r--r--node_modules/locutus/php/array/pos.js.map1
-rw-r--r--node_modules/locutus/php/array/prev.js52
-rw-r--r--node_modules/locutus/php/array/prev.js.map1
-rw-r--r--node_modules/locutus/php/array/range.js49
-rw-r--r--node_modules/locutus/php/array/range.js.map1
-rw-r--r--node_modules/locutus/php/array/reset.js53
-rw-r--r--node_modules/locutus/php/array/reset.js.map1
-rw-r--r--node_modules/locutus/php/array/rsort.js113
-rw-r--r--node_modules/locutus/php/array/rsort.js.map1
-rw-r--r--node_modules/locutus/php/array/shuffle.js45
-rw-r--r--node_modules/locutus/php/array/shuffle.js.map1
-rw-r--r--node_modules/locutus/php/array/sizeof.js15
-rw-r--r--node_modules/locutus/php/array/sizeof.js.map1
-rw-r--r--node_modules/locutus/php/array/sort.js116
-rw-r--r--node_modules/locutus/php/array/sort.js.map1
-rw-r--r--node_modules/locutus/php/array/uasort.js59
-rw-r--r--node_modules/locutus/php/array/uasort.js.map1
-rw-r--r--node_modules/locutus/php/array/uksort.js71
-rw-r--r--node_modules/locutus/php/array/uksort.js.map1
-rw-r--r--node_modules/locutus/php/array/usort.js58
-rw-r--r--node_modules/locutus/php/array/usort.js.map1
-rw-r--r--node_modules/locutus/php/bc/bcadd.js39
-rw-r--r--node_modules/locutus/php/bc/bcadd.js.map1
-rw-r--r--node_modules/locutus/php/bc/bccomp.js34
-rw-r--r--node_modules/locutus/php/bc/bccomp.js.map1
-rw-r--r--node_modules/locutus/php/bc/bcdiv.js44
-rw-r--r--node_modules/locutus/php/bc/bcdiv.js.map1
-rw-r--r--node_modules/locutus/php/bc/bcmul.js40
-rw-r--r--node_modules/locutus/php/bc/bcmul.js.map1
-rw-r--r--node_modules/locutus/php/bc/bcround.js56
-rw-r--r--node_modules/locutus/php/bc/bcround.js.map1
-rw-r--r--node_modules/locutus/php/bc/bcscale.js23
-rw-r--r--node_modules/locutus/php/bc/bcscale.js.map1
-rw-r--r--node_modules/locutus/php/bc/bcsub.js39
-rw-r--r--node_modules/locutus/php/bc/bcsub.js.map1
-rw-r--r--node_modules/locutus/php/bc/index.js10
-rw-r--r--node_modules/locutus/php/bc/index.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_alnum.js25
-rw-r--r--node_modules/locutus/php/ctype/ctype_alnum.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_alpha.js24
-rw-r--r--node_modules/locutus/php/ctype/ctype_alpha.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_cntrl.js26
-rw-r--r--node_modules/locutus/php/ctype/ctype_cntrl.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_digit.js24
-rw-r--r--node_modules/locutus/php/ctype/ctype_digit.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_graph.js26
-rw-r--r--node_modules/locutus/php/ctype/ctype_graph.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_lower.js25
-rw-r--r--node_modules/locutus/php/ctype/ctype_lower.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_print.js24
-rw-r--r--node_modules/locutus/php/ctype/ctype_print.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_punct.js24
-rw-r--r--node_modules/locutus/php/ctype/ctype_punct.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_space.js24
-rw-r--r--node_modules/locutus/php/ctype/ctype_space.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_upper.js25
-rw-r--r--node_modules/locutus/php/ctype/ctype_upper.js.map1
-rw-r--r--node_modules/locutus/php/ctype/ctype_xdigit.js25
-rw-r--r--node_modules/locutus/php/ctype/ctype_xdigit.js.map1
-rw-r--r--node_modules/locutus/php/ctype/index.js14
-rw-r--r--node_modules/locutus/php/ctype/index.js.map1
-rw-r--r--node_modules/locutus/php/datetime/checkdate.js19
-rw-r--r--node_modules/locutus/php/datetime/checkdate.js.map1
-rw-r--r--node_modules/locutus/php/datetime/date.js318
-rw-r--r--node_modules/locutus/php/datetime/date.js.map1
-rw-r--r--node_modules/locutus/php/datetime/date_parse.js38
-rw-r--r--node_modules/locutus/php/datetime/date_parse.js.map1
-rw-r--r--node_modules/locutus/php/datetime/getdate.js35
-rw-r--r--node_modules/locutus/php/datetime/getdate.js.map1
-rw-r--r--node_modules/locutus/php/datetime/gettimeofday.js33
-rw-r--r--node_modules/locutus/php/datetime/gettimeofday.js.map1
-rw-r--r--node_modules/locutus/php/datetime/gmdate.js21
-rw-r--r--node_modules/locutus/php/datetime/gmdate.js.map1
-rw-r--r--node_modules/locutus/php/datetime/gmmktime.js46
-rw-r--r--node_modules/locutus/php/datetime/gmmktime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/gmstrftime.js19
-rw-r--r--node_modules/locutus/php/datetime/gmstrftime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/idate.js71
-rw-r--r--node_modules/locutus/php/datetime/idate.js.map1
-rw-r--r--node_modules/locutus/php/datetime/index.js18
-rw-r--r--node_modules/locutus/php/datetime/index.js.map1
-rw-r--r--node_modules/locutus/php/datetime/microtime.js37
-rw-r--r--node_modules/locutus/php/datetime/microtime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/mktime.js77
-rw-r--r--node_modules/locutus/php/datetime/mktime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/strftime.js198
-rw-r--r--node_modules/locutus/php/datetime/strftime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/strptime.js361
-rw-r--r--node_modules/locutus/php/datetime/strptime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/strtotime.js273
-rw-r--r--node_modules/locutus/php/datetime/strtotime.js.map1
-rw-r--r--node_modules/locutus/php/datetime/time.js15
-rw-r--r--node_modules/locutus/php/datetime/time.js.map1
-rw-r--r--node_modules/locutus/php/exec/escapeshellarg.js18
-rw-r--r--node_modules/locutus/php/exec/escapeshellarg.js.map1
-rw-r--r--node_modules/locutus/php/exec/index.js4
-rw-r--r--node_modules/locutus/php/exec/index.js.map1
-rw-r--r--node_modules/locutus/php/filesystem/basename.js34
-rw-r--r--node_modules/locutus/php/filesystem/basename.js.map1
-rw-r--r--node_modules/locutus/php/filesystem/dirname.js16
-rw-r--r--node_modules/locutus/php/filesystem/dirname.js.map1
-rw-r--r--node_modules/locutus/php/filesystem/file_get_contents.js26
-rw-r--r--node_modules/locutus/php/filesystem/file_get_contents.js.map1
-rw-r--r--node_modules/locutus/php/filesystem/index.js8
-rw-r--r--node_modules/locutus/php/filesystem/index.js.map1
-rw-r--r--node_modules/locutus/php/filesystem/pathinfo.js146
-rw-r--r--node_modules/locutus/php/filesystem/pathinfo.js.map1
-rw-r--r--node_modules/locutus/php/filesystem/realpath.js60
-rw-r--r--node_modules/locutus/php/filesystem/realpath.js.map1
-rw-r--r--node_modules/locutus/php/funchand/call_user_func.js21
-rw-r--r--node_modules/locutus/php/funchand/call_user_func.js.map1
-rw-r--r--node_modules/locutus/php/funchand/call_user_func_array.js63
-rw-r--r--node_modules/locutus/php/funchand/call_user_func_array.js.map1
-rw-r--r--node_modules/locutus/php/funchand/create_function.js18
-rw-r--r--node_modules/locutus/php/funchand/create_function.js.map1
-rw-r--r--node_modules/locutus/php/funchand/function_exists.js22
-rw-r--r--node_modules/locutus/php/funchand/function_exists.js.map1
-rw-r--r--node_modules/locutus/php/funchand/get_defined_functions.js51
-rw-r--r--node_modules/locutus/php/funchand/get_defined_functions.js.map1
-rw-r--r--node_modules/locutus/php/funchand/index.js8
-rw-r--r--node_modules/locutus/php/funchand/index.js.map1
-rw-r--r--node_modules/locutus/php/i18n/i18n_loc_get_default.js25
-rw-r--r--node_modules/locutus/php/i18n/i18n_loc_get_default.js.map1
-rw-r--r--node_modules/locutus/php/i18n/i18n_loc_set_default.js30
-rw-r--r--node_modules/locutus/php/i18n/i18n_loc_set_default.js.map1
-rw-r--r--node_modules/locutus/php/i18n/index.js5
-rw-r--r--node_modules/locutus/php/i18n/index.js.map1
-rw-r--r--node_modules/locutus/php/index.js23
-rw-r--r--node_modules/locutus/php/index.js.map1
-rw-r--r--node_modules/locutus/php/info/assert_options.js43
-rw-r--r--node_modules/locutus/php/info/assert_options.js.map1
-rw-r--r--node_modules/locutus/php/info/getenv.js15
-rw-r--r--node_modules/locutus/php/info/getenv.js.map1
-rw-r--r--node_modules/locutus/php/info/index.js9
-rw-r--r--node_modules/locutus/php/info/index.js.map1
-rw-r--r--node_modules/locutus/php/info/ini_get.js27
-rw-r--r--node_modules/locutus/php/info/ini_get.js.map1
-rw-r--r--node_modules/locutus/php/info/ini_set.js50
-rw-r--r--node_modules/locutus/php/info/ini_set.js.map1
-rw-r--r--node_modules/locutus/php/info/set_time_limit.js23
-rw-r--r--node_modules/locutus/php/info/set_time_limit.js.map1
-rw-r--r--node_modules/locutus/php/info/version_compare.js118
-rw-r--r--node_modules/locutus/php/info/version_compare.js.map1
-rw-r--r--node_modules/locutus/php/json/index.js6
-rw-r--r--node_modules/locutus/php/json/index.js.map1
-rw-r--r--node_modules/locutus/php/json/json_decode.js88
-rw-r--r--node_modules/locutus/php/json/json_decode.js.map1
-rw-r--r--node_modules/locutus/php/json/json_encode.js166
-rw-r--r--node_modules/locutus/php/json/json_encode.js.map1
-rw-r--r--node_modules/locutus/php/json/json_last_error.js27
-rw-r--r--node_modules/locutus/php/json/json_last_error.js.map1
-rw-r--r--node_modules/locutus/php/math/abs.js20
-rw-r--r--node_modules/locutus/php/math/abs.js.map1
-rw-r--r--node_modules/locutus/php/math/acos.js12
-rw-r--r--node_modules/locutus/php/math/acos.js.map1
-rw-r--r--node_modules/locutus/php/math/acosh.js11
-rw-r--r--node_modules/locutus/php/math/acosh.js.map1
-rw-r--r--node_modules/locutus/php/math/asin.js12
-rw-r--r--node_modules/locutus/php/math/asin.js.map1
-rw-r--r--node_modules/locutus/php/math/asinh.js11
-rw-r--r--node_modules/locutus/php/math/asinh.js.map1
-rw-r--r--node_modules/locutus/php/math/atan.js11
-rw-r--r--node_modules/locutus/php/math/atan.js.map1
-rw-r--r--node_modules/locutus/php/math/atan2.js11
-rw-r--r--node_modules/locutus/php/math/atan2.js.map1
-rw-r--r--node_modules/locutus/php/math/atanh.js11
-rw-r--r--node_modules/locutus/php/math/atanh.js.map1
-rw-r--r--node_modules/locutus/php/math/base_convert.js13
-rw-r--r--node_modules/locutus/php/math/base_convert.js.map1
-rw-r--r--node_modules/locutus/php/math/bindec.js17
-rw-r--r--node_modules/locutus/php/math/bindec.js.map1
-rw-r--r--node_modules/locutus/php/math/ceil.js11
-rw-r--r--node_modules/locutus/php/math/ceil.js.map1
-rw-r--r--node_modules/locutus/php/math/cos.js11
-rw-r--r--node_modules/locutus/php/math/cos.js.map1
-rw-r--r--node_modules/locutus/php/math/cosh.js11
-rw-r--r--node_modules/locutus/php/math/cosh.js.map1
-rw-r--r--node_modules/locutus/php/math/decbin.js22
-rw-r--r--node_modules/locutus/php/math/decbin.js.map1
-rw-r--r--node_modules/locutus/php/math/dechex.js21
-rw-r--r--node_modules/locutus/php/math/dechex.js.map1
-rw-r--r--node_modules/locutus/php/math/decoct.js19
-rw-r--r--node_modules/locutus/php/math/decoct.js.map1
-rw-r--r--node_modules/locutus/php/math/deg2rad.js12
-rw-r--r--node_modules/locutus/php/math/deg2rad.js.map1
-rw-r--r--node_modules/locutus/php/math/exp.js11
-rw-r--r--node_modules/locutus/php/math/exp.js.map1
-rw-r--r--node_modules/locutus/php/math/expm1.js13
-rw-r--r--node_modules/locutus/php/math/expm1.js.map1
-rw-r--r--node_modules/locutus/php/math/floor.js11
-rw-r--r--node_modules/locutus/php/math/floor.js.map1
-rw-r--r--node_modules/locutus/php/math/fmod.js39
-rw-r--r--node_modules/locutus/php/math/fmod.js.map1
-rw-r--r--node_modules/locutus/php/math/getrandmax.js11
-rw-r--r--node_modules/locutus/php/math/getrandmax.js.map1
-rw-r--r--node_modules/locutus/php/math/hexdec.js14
-rw-r--r--node_modules/locutus/php/math/hexdec.js.map1
-rw-r--r--node_modules/locutus/php/math/hypot.js21
-rw-r--r--node_modules/locutus/php/math/hypot.js.map1
-rw-r--r--node_modules/locutus/php/math/index.js49
-rw-r--r--node_modules/locutus/php/math/index.js.map1
-rw-r--r--node_modules/locutus/php/math/is_finite.js36
-rw-r--r--node_modules/locutus/php/math/is_finite.js.map1
-rw-r--r--node_modules/locutus/php/math/is_infinite.js36
-rw-r--r--node_modules/locutus/php/math/is_infinite.js.map1
-rw-r--r--node_modules/locutus/php/math/is_nan.js34
-rw-r--r--node_modules/locutus/php/math/is_nan.js.map1
-rw-r--r--node_modules/locutus/php/math/lcg_value.js13
-rw-r--r--node_modules/locutus/php/math/lcg_value.js.map1
-rw-r--r--node_modules/locutus/php/math/log.js12
-rw-r--r--node_modules/locutus/php/math/log.js.map1
-rw-r--r--node_modules/locutus/php/math/log10.js16
-rw-r--r--node_modules/locutus/php/math/log10.js.map1
-rw-r--r--node_modules/locutus/php/math/log1p.js28
-rw-r--r--node_modules/locutus/php/math/log1p.js.map1
-rw-r--r--node_modules/locutus/php/math/max.js119
-rw-r--r--node_modules/locutus/php/math/max.js.map1
-rw-r--r--node_modules/locutus/php/math/min.js121
-rw-r--r--node_modules/locutus/php/math/min.js.map1
-rw-r--r--node_modules/locutus/php/math/mt_getrandmax.js12
-rw-r--r--node_modules/locutus/php/math/mt_getrandmax.js.map1
-rw-r--r--node_modules/locutus/php/math/mt_rand.js24
-rw-r--r--node_modules/locutus/php/math/mt_rand.js.map1
-rw-r--r--node_modules/locutus/php/math/octdec.js12
-rw-r--r--node_modules/locutus/php/math/octdec.js.map1
-rw-r--r--node_modules/locutus/php/math/pi.js12
-rw-r--r--node_modules/locutus/php/math/pi.js.map1
-rw-r--r--node_modules/locutus/php/math/pow.js11
-rw-r--r--node_modules/locutus/php/math/pow.js.map1
-rw-r--r--node_modules/locutus/php/math/rad2deg.js12
-rw-r--r--node_modules/locutus/php/math/rad2deg.js.map1
-rw-r--r--node_modules/locutus/php/math/rand.js22
-rw-r--r--node_modules/locutus/php/math/rand.js.map1
-rw-r--r--node_modules/locutus/php/math/round.js62
-rw-r--r--node_modules/locutus/php/math/round.js.map1
-rw-r--r--node_modules/locutus/php/math/sin.js11
-rw-r--r--node_modules/locutus/php/math/sin.js.map1
-rw-r--r--node_modules/locutus/php/math/sinh.js11
-rw-r--r--node_modules/locutus/php/math/sinh.js.map1
-rw-r--r--node_modules/locutus/php/math/sqrt.js11
-rw-r--r--node_modules/locutus/php/math/sqrt.js.map1
-rw-r--r--node_modules/locutus/php/math/tan.js11
-rw-r--r--node_modules/locutus/php/math/tan.js.map1
-rw-r--r--node_modules/locutus/php/math/tanh.js12
-rw-r--r--node_modules/locutus/php/math/tanh.js.map1
-rw-r--r--node_modules/locutus/php/misc/index.js5
-rw-r--r--node_modules/locutus/php/misc/index.js.map1
-rw-r--r--node_modules/locutus/php/misc/pack.js379
-rw-r--r--node_modules/locutus/php/misc/pack.js.map1
-rw-r--r--node_modules/locutus/php/misc/uniqid.js59
-rw-r--r--node_modules/locutus/php/misc/uniqid.js.map1
-rw-r--r--node_modules/locutus/php/net-gopher/gopher_parsedir.js84
-rw-r--r--node_modules/locutus/php/net-gopher/gopher_parsedir.js.map1
-rw-r--r--node_modules/locutus/php/net-gopher/index.js4
-rw-r--r--node_modules/locutus/php/net-gopher/index.js.map1
-rw-r--r--node_modules/locutus/php/network/index.js9
-rw-r--r--node_modules/locutus/php/network/index.js.map1
-rw-r--r--node_modules/locutus/php/network/inet_ntop.js34
-rw-r--r--node_modules/locutus/php/network/inet_ntop.js.map1
-rw-r--r--node_modules/locutus/php/network/inet_pton.js61
-rw-r--r--node_modules/locutus/php/network/inet_pton.js.map1
-rw-r--r--node_modules/locutus/php/network/ip2long.js45
-rw-r--r--node_modules/locutus/php/network/ip2long.js.map1
-rw-r--r--node_modules/locutus/php/network/long2ip.js15
-rw-r--r--node_modules/locutus/php/network/long2ip.js.map1
-rw-r--r--node_modules/locutus/php/network/setcookie.js15
-rw-r--r--node_modules/locutus/php/network/setcookie.js.map1
-rw-r--r--node_modules/locutus/php/network/setrawcookie.js50
-rw-r--r--node_modules/locutus/php/network/setrawcookie.js.map1
-rw-r--r--node_modules/locutus/php/pcre/index.js5
-rw-r--r--node_modules/locutus/php/pcre/index.js.map1
-rw-r--r--node_modules/locutus/php/pcre/preg_quote.js20
-rw-r--r--node_modules/locutus/php/pcre/preg_quote.js.map1
-rw-r--r--node_modules/locutus/php/pcre/sql_regcase.js38
-rw-r--r--node_modules/locutus/php/pcre/sql_regcase.js.map1
-rw-r--r--node_modules/locutus/php/strings/addcslashes.js176
-rw-r--r--node_modules/locutus/php/strings/addcslashes.js.map1
-rw-r--r--node_modules/locutus/php/strings/addslashes.js18
-rw-r--r--node_modules/locutus/php/strings/addslashes.js.map1
-rw-r--r--node_modules/locutus/php/strings/bin2hex.js28
-rw-r--r--node_modules/locutus/php/strings/bin2hex.js.map1
-rw-r--r--node_modules/locutus/php/strings/chop.js12
-rw-r--r--node_modules/locutus/php/strings/chop.js.map1
-rw-r--r--node_modules/locutus/php/strings/chr.js22
-rw-r--r--node_modules/locutus/php/strings/chr.js.map1
-rw-r--r--node_modules/locutus/php/strings/chunk_split.js24
-rw-r--r--node_modules/locutus/php/strings/chunk_split.js.map1
-rw-r--r--node_modules/locutus/php/strings/convert_cyr_string.js84
-rw-r--r--node_modules/locutus/php/strings/convert_cyr_string.js.map1
-rw-r--r--node_modules/locutus/php/strings/convert_uuencode.js81
-rw-r--r--node_modules/locutus/php/strings/convert_uuencode.js.map1
-rw-r--r--node_modules/locutus/php/strings/count_chars.js55
-rw-r--r--node_modules/locutus/php/strings/count_chars.js.map1
-rw-r--r--node_modules/locutus/php/strings/crc32.js29
-rw-r--r--node_modules/locutus/php/strings/crc32.js.map1
-rw-r--r--node_modules/locutus/php/strings/echo.js32
-rw-r--r--node_modules/locutus/php/strings/echo.js.map1
-rw-r--r--node_modules/locutus/php/strings/explode.js53
-rw-r--r--node_modules/locutus/php/strings/explode.js.map1
-rw-r--r--node_modules/locutus/php/strings/get_html_translation_table.js166
-rw-r--r--node_modules/locutus/php/strings/get_html_translation_table.js.map1
-rw-r--r--node_modules/locutus/php/strings/hex2bin.js28
-rw-r--r--node_modules/locutus/php/strings/hex2bin.js.map1
-rw-r--r--node_modules/locutus/php/strings/html_entity_decode.js46
-rw-r--r--node_modules/locutus/php/strings/html_entity_decode.js.map1
-rw-r--r--node_modules/locutus/php/strings/htmlentities.js48
-rw-r--r--node_modules/locutus/php/strings/htmlentities.js.map1
-rw-r--r--node_modules/locutus/php/strings/htmlspecialchars.js73
-rw-r--r--node_modules/locutus/php/strings/htmlspecialchars.js.map1
-rw-r--r--node_modules/locutus/php/strings/htmlspecialchars_decode.js71
-rw-r--r--node_modules/locutus/php/strings/htmlspecialchars_decode.js.map1
-rw-r--r--node_modules/locutus/php/strings/implode.js38
-rw-r--r--node_modules/locutus/php/strings/implode.js.map1
-rw-r--r--node_modules/locutus/php/strings/index.js94
-rw-r--r--node_modules/locutus/php/strings/index.js.map1
-rw-r--r--node_modules/locutus/php/strings/join.js12
-rw-r--r--node_modules/locutus/php/strings/join.js.map1
-rw-r--r--node_modules/locutus/php/strings/lcfirst.js13
-rw-r--r--node_modules/locutus/php/strings/lcfirst.js.map1
-rw-r--r--node_modules/locutus/php/strings/levenshtein.js94
-rw-r--r--node_modules/locutus/php/strings/levenshtein.js.map1
-rw-r--r--node_modules/locutus/php/strings/localeconv.js33
-rw-r--r--node_modules/locutus/php/strings/localeconv.js.map1
-rw-r--r--node_modules/locutus/php/strings/ltrim.js18
-rw-r--r--node_modules/locutus/php/strings/ltrim.js.map1
-rw-r--r--node_modules/locutus/php/strings/md5.js243
-rw-r--r--node_modules/locutus/php/strings/md5.js.map1
-rw-r--r--node_modules/locutus/php/strings/md5_file.js26
-rw-r--r--node_modules/locutus/php/strings/md5_file.js.map1
-rw-r--r--node_modules/locutus/php/strings/metaphone.js227
-rw-r--r--node_modules/locutus/php/strings/metaphone.js.map1
-rw-r--r--node_modules/locutus/php/strings/money_format.js252
-rw-r--r--node_modules/locutus/php/strings/money_format.js.map1
-rw-r--r--node_modules/locutus/php/strings/nl2br.js34
-rw-r--r--node_modules/locutus/php/strings/nl2br.js.map1
-rw-r--r--node_modules/locutus/php/strings/nl_langinfo.js108
-rw-r--r--node_modules/locutus/php/strings/nl_langinfo.js.map1
-rw-r--r--node_modules/locutus/php/strings/number_format.js79
-rw-r--r--node_modules/locutus/php/strings/number_format.js.map1
-rw-r--r--node_modules/locutus/php/strings/ord.js42
-rw-r--r--node_modules/locutus/php/strings/ord.js.map1
-rw-r--r--node_modules/locutus/php/strings/parse_str.js160
-rw-r--r--node_modules/locutus/php/strings/parse_str.js.map1
-rw-r--r--node_modules/locutus/php/strings/printf.js17
-rw-r--r--node_modules/locutus/php/strings/printf.js.map1
-rw-r--r--node_modules/locutus/php/strings/quoted_printable_decode.js33
-rw-r--r--node_modules/locutus/php/strings/quoted_printable_decode.js.map1
-rw-r--r--node_modules/locutus/php/strings/quoted_printable_encode.js48
-rw-r--r--node_modules/locutus/php/strings/quoted_printable_encode.js.map1
-rw-r--r--node_modules/locutus/php/strings/quotemeta.js11
-rw-r--r--node_modules/locutus/php/strings/quotemeta.js.map1
-rw-r--r--node_modules/locutus/php/strings/rtrim.js20
-rw-r--r--node_modules/locutus/php/strings/rtrim.js.map1
-rw-r--r--node_modules/locutus/php/strings/setlocale.js335
-rw-r--r--node_modules/locutus/php/strings/setlocale.js.map1
-rw-r--r--node_modules/locutus/php/strings/sha1.js151
-rw-r--r--node_modules/locutus/php/strings/sha1.js.map1
-rw-r--r--node_modules/locutus/php/strings/sha1_file.js24
-rw-r--r--node_modules/locutus/php/strings/sha1_file.js.map1
-rw-r--r--node_modules/locutus/php/strings/similar_text.js63
-rw-r--r--node_modules/locutus/php/strings/similar_text.js.map1
-rw-r--r--node_modules/locutus/php/strings/soundex.js67
-rw-r--r--node_modules/locutus/php/strings/soundex.js.map1
-rw-r--r--node_modules/locutus/php/strings/split.js12
-rw-r--r--node_modules/locutus/php/strings/split.js.map1
-rw-r--r--node_modules/locutus/php/strings/sprintf.js193
-rw-r--r--node_modules/locutus/php/strings/sprintf.js.map1
-rw-r--r--node_modules/locutus/php/strings/sscanf.js268
-rw-r--r--node_modules/locutus/php/strings/sscanf.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_getcsv.js55
-rw-r--r--node_modules/locutus/php/strings/str_getcsv.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_ireplace.js102
-rw-r--r--node_modules/locutus/php/strings/str_ireplace.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_pad.js49
-rw-r--r--node_modules/locutus/php/strings/str_pad.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_repeat.js26
-rw-r--r--node_modules/locutus/php/strings/str_repeat.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_replace.js85
-rw-r--r--node_modules/locutus/php/strings/str_replace.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_rot13.js21
-rw-r--r--node_modules/locutus/php/strings/str_rot13.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_shuffle.js34
-rw-r--r--node_modules/locutus/php/strings/str_shuffle.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_split.js33
-rw-r--r--node_modules/locutus/php/strings/str_split.js.map1
-rw-r--r--node_modules/locutus/php/strings/str_word_count.js117
-rw-r--r--node_modules/locutus/php/strings/str_word_count.js.map1
-rw-r--r--node_modules/locutus/php/strings/strcasecmp.js21
-rw-r--r--node_modules/locutus/php/strings/strcasecmp.js.map1
-rw-r--r--node_modules/locutus/php/strings/strchr.js14
-rw-r--r--node_modules/locutus/php/strings/strchr.js.map1
-rw-r--r--node_modules/locutus/php/strings/strcmp.js16
-rw-r--r--node_modules/locutus/php/strings/strcmp.js.map1
-rw-r--r--node_modules/locutus/php/strings/strcoll.js23
-rw-r--r--node_modules/locutus/php/strings/strcoll.js.map1
-rw-r--r--node_modules/locutus/php/strings/strcspn.js30
-rw-r--r--node_modules/locutus/php/strings/strcspn.js.map1
-rw-r--r--node_modules/locutus/php/strings/strip_tags.js66
-rw-r--r--node_modules/locutus/php/strings/strip_tags.js.map1
-rw-r--r--node_modules/locutus/php/strings/stripos.js20
-rw-r--r--node_modules/locutus/php/strings/stripos.js.map1
-rw-r--r--node_modules/locutus/php/strings/stripslashes.js33
-rw-r--r--node_modules/locutus/php/strings/stripslashes.js.map1
-rw-r--r--node_modules/locutus/php/strings/stristr.js26
-rw-r--r--node_modules/locutus/php/strings/stristr.js.map1
-rw-r--r--node_modules/locutus/php/strings/strlen.js76
-rw-r--r--node_modules/locutus/php/strings/strlen.js.map1
-rw-r--r--node_modules/locutus/php/strings/strnatcasecmp.js27
-rw-r--r--node_modules/locutus/php/strings/strnatcasecmp.js.map1
-rw-r--r--node_modules/locutus/php/strings/strnatcmp.js119
-rw-r--r--node_modules/locutus/php/strings/strnatcmp.js.map1
-rw-r--r--node_modules/locutus/php/strings/strncasecmp.js55
-rw-r--r--node_modules/locutus/php/strings/strncasecmp.js.map1
-rw-r--r--node_modules/locutus/php/strings/strncmp.js20
-rw-r--r--node_modules/locutus/php/strings/strncmp.js.map1
-rw-r--r--node_modules/locutus/php/strings/strpbrk.js19
-rw-r--r--node_modules/locutus/php/strings/strpbrk.js.map1
-rw-r--r--node_modules/locutus/php/strings/strpos.js15
-rw-r--r--node_modules/locutus/php/strings/strpos.js.map1
-rw-r--r--node_modules/locutus/php/strings/strrchr.js24
-rw-r--r--node_modules/locutus/php/strings/strrchr.js.map1
-rw-r--r--node_modules/locutus/php/strings/strrev.js34
-rw-r--r--node_modules/locutus/php/strings/strrev.js.map1
-rw-r--r--node_modules/locutus/php/strings/strripos.js27
-rw-r--r--node_modules/locutus/php/strings/strripos.js.map1
-rw-r--r--node_modules/locutus/php/strings/strrpos.js30
-rw-r--r--node_modules/locutus/php/strings/strrpos.js.map1
-rw-r--r--node_modules/locutus/php/strings/strspn.js39
-rw-r--r--node_modules/locutus/php/strings/strspn.js.map1
-rw-r--r--node_modules/locutus/php/strings/strstr.js31
-rw-r--r--node_modules/locutus/php/strings/strstr.js.map1
-rw-r--r--node_modules/locutus/php/strings/strtok.js38
-rw-r--r--node_modules/locutus/php/strings/strtok.js.map1
-rw-r--r--node_modules/locutus/php/strings/strtolower.js12
-rw-r--r--node_modules/locutus/php/strings/strtolower.js.map1
-rw-r--r--node_modules/locutus/php/strings/strtoupper.js12
-rw-r--r--node_modules/locutus/php/strings/strtoupper.js.map1
-rw-r--r--node_modules/locutus/php/strings/strtr.js102
-rw-r--r--node_modules/locutus/php/strings/strtr.js.map1
-rw-r--r--node_modules/locutus/php/strings/substr.js124
-rw-r--r--node_modules/locutus/php/strings/substr.js.map1
-rw-r--r--node_modules/locutus/php/strings/substr_compare.js39
-rw-r--r--node_modules/locutus/php/strings/substr_compare.js.map1
-rw-r--r--node_modules/locutus/php/strings/substr_count.js41
-rw-r--r--node_modules/locutus/php/strings/substr_count.js.map1
-rw-r--r--node_modules/locutus/php/strings/substr_replace.js32
-rw-r--r--node_modules/locutus/php/strings/substr_replace.js.map1
-rw-r--r--node_modules/locutus/php/strings/trim.js48
-rw-r--r--node_modules/locutus/php/strings/trim.js.map1
-rw-r--r--node_modules/locutus/php/strings/ucfirst.js15
-rw-r--r--node_modules/locutus/php/strings/ucfirst.js.map1
-rw-r--r--node_modules/locutus/php/strings/ucwords.js25
-rw-r--r--node_modules/locutus/php/strings/ucwords.js.map1
-rw-r--r--node_modules/locutus/php/strings/vprintf.js18
-rw-r--r--node_modules/locutus/php/strings/vprintf.js.map1
-rw-r--r--node_modules/locutus/php/strings/vsprintf.js13
-rw-r--r--node_modules/locutus/php/strings/vsprintf.js.map1
-rw-r--r--node_modules/locutus/php/strings/wordwrap.js93
-rw-r--r--node_modules/locutus/php/strings/wordwrap.js.map1
-rw-r--r--node_modules/locutus/php/url/base64_decode.js87
-rw-r--r--node_modules/locutus/php/url/base64_decode.js.map1
-rw-r--r--node_modules/locutus/php/url/base64_encode.js84
-rw-r--r--node_modules/locutus/php/url/base64_encode.js.map1
-rw-r--r--node_modules/locutus/php/url/http_build_query.js86
-rw-r--r--node_modules/locutus/php/url/http_build_query.js.map1
-rw-r--r--node_modules/locutus/php/url/index.js11
-rw-r--r--node_modules/locutus/php/url/index.js.map1
-rw-r--r--node_modules/locutus/php/url/parse_url.js71
-rw-r--r--node_modules/locutus/php/url/parse_url.js.map1
-rw-r--r--node_modules/locutus/php/url/rawurldecode.js28
-rw-r--r--node_modules/locutus/php/url/rawurldecode.js.map1
-rw-r--r--node_modules/locutus/php/url/rawurlencode.js33
-rw-r--r--node_modules/locutus/php/url/rawurlencode.js.map1
-rw-r--r--node_modules/locutus/php/url/urldecode.js41
-rw-r--r--node_modules/locutus/php/url/urldecode.js.map1
-rw-r--r--node_modules/locutus/php/url/urlencode.js37
-rw-r--r--node_modules/locutus/php/url/urlencode.js.map1
-rw-r--r--node_modules/locutus/php/var/boolval.js50
-rw-r--r--node_modules/locutus/php/var/boolval.js.map1
-rw-r--r--node_modules/locutus/php/var/doubleval.js15
-rw-r--r--node_modules/locutus/php/var/doubleval.js.map1
-rw-r--r--node_modules/locutus/php/var/empty.js50
-rw-r--r--node_modules/locutus/php/var/empty.js.map1
-rw-r--r--node_modules/locutus/php/var/floatval.js17
-rw-r--r--node_modules/locutus/php/var/floatval.js.map1
-rw-r--r--node_modules/locutus/php/var/gettype.js69
-rw-r--r--node_modules/locutus/php/var/gettype.js.map1
-rw-r--r--node_modules/locutus/php/var/index.js33
-rw-r--r--node_modules/locutus/php/var/index.js.map1
-rw-r--r--node_modules/locutus/php/var/intval.js49
-rw-r--r--node_modules/locutus/php/var/intval.js.map1
-rw-r--r--node_modules/locutus/php/var/is_array.js98
-rw-r--r--node_modules/locutus/php/var/is_array.js.map1
-rw-r--r--node_modules/locutus/php/var/is_binary.js12
-rw-r--r--node_modules/locutus/php/var/is_binary.js.map1
-rw-r--r--node_modules/locutus/php/var/is_bool.js15
-rw-r--r--node_modules/locutus/php/var/is_bool.js.map1
-rw-r--r--node_modules/locutus/php/var/is_buffer.js12
-rw-r--r--node_modules/locutus/php/var/is_buffer.js.map1
-rw-r--r--node_modules/locutus/php/var/is_callable.js84
-rw-r--r--node_modules/locutus/php/var/is_callable.js.map1
-rw-r--r--node_modules/locutus/php/var/is_double.js15
-rw-r--r--node_modules/locutus/php/var/is_double.js.map1
-rw-r--r--node_modules/locutus/php/var/is_float.js17
-rw-r--r--node_modules/locutus/php/var/is_float.js.map1
-rw-r--r--node_modules/locutus/php/var/is_int.js25
-rw-r--r--node_modules/locutus/php/var/is_int.js.map1
-rw-r--r--node_modules/locutus/php/var/is_integer.js17
-rw-r--r--node_modules/locutus/php/var/is_integer.js.map1
-rw-r--r--node_modules/locutus/php/var/is_long.js15
-rw-r--r--node_modules/locutus/php/var/is_long.js.map1
-rw-r--r--node_modules/locutus/php/var/is_null.js14
-rw-r--r--node_modules/locutus/php/var/is_null.js.map1
-rw-r--r--node_modules/locutus/php/var/is_numeric.js31
-rw-r--r--node_modules/locutus/php/var/is_numeric.js.map1
-rw-r--r--node_modules/locutus/php/var/is_object.js23
-rw-r--r--node_modules/locutus/php/var/is_object.js.map1
-rw-r--r--node_modules/locutus/php/var/is_real.js15
-rw-r--r--node_modules/locutus/php/var/is_real.js.map1
-rw-r--r--node_modules/locutus/php/var/is_scalar.js17
-rw-r--r--node_modules/locutus/php/var/is_scalar.js.map1
-rw-r--r--node_modules/locutus/php/var/is_string.js14
-rw-r--r--node_modules/locutus/php/var/is_string.js.map1
-rw-r--r--node_modules/locutus/php/var/is_unicode.js39
-rw-r--r--node_modules/locutus/php/var/is_unicode.js.map1
-rw-r--r--node_modules/locutus/php/var/isset.js32
-rw-r--r--node_modules/locutus/php/var/isset.js.map1
-rw-r--r--node_modules/locutus/php/var/print_r.js75
-rw-r--r--node_modules/locutus/php/var/print_r.js.map1
-rw-r--r--node_modules/locutus/php/var/serialize.js128
-rw-r--r--node_modules/locutus/php/var/serialize.js.map1
-rw-r--r--node_modules/locutus/php/var/strval.js36
-rw-r--r--node_modules/locutus/php/var/strval.js.map1
-rw-r--r--node_modules/locutus/php/var/unserialize.js204
-rw-r--r--node_modules/locutus/php/var/unserialize.js.map1
-rw-r--r--node_modules/locutus/php/var/var_dump.js173
-rw-r--r--node_modules/locutus/php/var/var_dump.js.map1
-rw-r--r--node_modules/locutus/php/var/var_export.js121
-rw-r--r--node_modules/locutus/php/var/var_export.js.map1
-rw-r--r--node_modules/locutus/php/xdiff/index.js5
-rw-r--r--node_modules/locutus/php/xdiff/index.js.map1
-rw-r--r--node_modules/locutus/php/xdiff/xdiff_string_diff.js438
-rw-r--r--node_modules/locutus/php/xdiff/xdiff_string_diff.js.map1
-rw-r--r--node_modules/locutus/php/xdiff/xdiff_string_patch.js203
-rw-r--r--node_modules/locutus/php/xdiff/xdiff_string_patch.js.map1
-rw-r--r--node_modules/locutus/php/xml/index.js5
-rw-r--r--node_modules/locutus/php/xml/index.js.map1
-rw-r--r--node_modules/locutus/php/xml/utf8_decode.js62
-rw-r--r--node_modules/locutus/php/xml/utf8_decode.js.map1
-rw-r--r--node_modules/locutus/php/xml/utf8_encode.js70
-rw-r--r--node_modules/locutus/php/xml/utf8_encode.js.map1
-rw-r--r--node_modules/locutus/python/index.js4
-rw-r--r--node_modules/locutus/python/index.js.map1
-rw-r--r--node_modules/locutus/python/string/capwords.js21
-rw-r--r--node_modules/locutus/python/string/capwords.js.map1
-rw-r--r--node_modules/locutus/python/string/index.js4
-rw-r--r--node_modules/locutus/python/string/index.js.map1
-rw-r--r--node_modules/locutus/ruby/Math/acos.js13
-rw-r--r--node_modules/locutus/ruby/Math/acos.js.map1
-rw-r--r--node_modules/locutus/ruby/Math/index.js4
-rw-r--r--node_modules/locutus/ruby/Math/index.js.map1
-rw-r--r--node_modules/locutus/ruby/index.js4
-rw-r--r--node_modules/locutus/ruby/index.js.map1
-rw-r--r--node_modules/minimatch/LICENSE15
-rw-r--r--node_modules/minimatch/README.md209
-rw-r--r--node_modules/minimatch/minimatch.js923
-rw-r--r--node_modules/minimatch/package.json63
-rw-r--r--node_modules/twig/.gitmodules3
-rw-r--r--node_modules/twig/.npmignore12
-rw-r--r--node_modules/twig/CHANGELOG.md155
-rw-r--r--node_modules/twig/LICENSE10
-rw-r--r--node_modules/twig/README.md136
-rwxr-xr-xnode_modules/twig/bin/twigjs67
-rw-r--r--node_modules/twig/docs/docco.css518
-rw-r--r--node_modules/twig/docs/licenses.md177
-rw-r--r--node_modules/twig/docs/public/fonts/aller-bold.eotbin29804 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/aller-bold.ttfbin66836 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/aller-bold.woffbin33244 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/aller-light.eotbin29509 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/aller-light.ttfbin68620 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/aller-light.woffbin33124 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/novecento-bold.eotbin18190 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/novecento-bold.ttfbin48136 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/fonts/novecento-bold.woffbin20576 -> 0 bytes
-rw-r--r--node_modules/twig/docs/public/stylesheets/normalize.css375
-rw-r--r--node_modules/twig/docs/release checklist.md20
-rw-r--r--node_modules/twig/docs/tests.md3567
-rw-r--r--node_modules/twig/docs/twig.html11250
-rw-r--r--node_modules/twig/lib/compile.js99
-rw-r--r--node_modules/twig/lib/paths.js86
-rw-r--r--node_modules/twig/package.json81
-rwxr-xr-xnode_modules/twig/test-ext/checkout.sh10
-rw-r--r--node_modules/twig/test-ext/test.original.js314
-rw-r--r--node_modules/twig/twig.js7223
-rw-r--r--node_modules/twig/twig.min.js10
-rw-r--r--node_modules/walk/LICENSE41
-rw-r--r--node_modules/walk/README.md306
-rw-r--r--node_modules/walk/lib/node-type-emitter.js92
-rw-r--r--node_modules/walk/lib/walk-async-only.js93
-rw-r--r--node_modules/walk/lib/walk.js302
-rw-r--r--node_modules/walk/package.json68
793 files changed, 0 insertions, 49392 deletions
diff --git a/node_modules/.bin/twigjs b/node_modules/.bin/twigjs
deleted file mode 120000
index 716ab8c..0000000
--- a/node_modules/.bin/twigjs
+++ /dev/null
@@ -1 +0,0 @@
-../twig/bin/twigjs \ No newline at end of file
diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore
deleted file mode 100644
index ae5d8c3..0000000
--- a/node_modules/balanced-match/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-test
-.gitignore
-.travis.yml
-Makefile
-example.js
diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md
deleted file mode 100644
index 2cdc8e4..0000000
--- a/node_modules/balanced-match/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md
deleted file mode 100644
index 08e918c..0000000
--- a/node_modules/balanced-match/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# balanced-match
-
-Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
-
-[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
-[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
-
-[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
-
-## Example
-
-Get the first matching pair of braces:
-
-```js
-var balanced = require('balanced-match');
-
-console.log(balanced('{', '}', 'pre{in{nested}}post'));
-console.log(balanced('{', '}', 'pre{first}between{second}post'));
-console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
-```
-
-The matches are:
-
-```bash
-$ node example.js
-{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
-{ start: 3,
- end: 9,
- pre: 'pre',
- body: 'first',
- post: 'between{second}post' }
-{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
-```
-
-## API
-
-### var m = balanced(a, b, str)
-
-For the first non-nested matching pair of `a` and `b` in `str`, return an
-object with those keys:
-
-* **start** the index of the first match of `a`
-* **end** the index of the matching `b`
-* **pre** the preamble, `a` and `b` not included
-* **body** the match, `a` and `b` not included
-* **post** the postscript, `a` and `b` not included
-
-If there's no match, `undefined` will be returned.
-
-If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
-
-### var r = balanced.range(a, b, str)
-
-For the first non-nested matching pair of `a` and `b` in `str`, return an
-array with indexes: `[ <a index>, <b index> ]`.
-
-If there's no match, `undefined` will be returned.
-
-If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
-
-## Installation
-
-With [npm](https://npmjs.org) do:
-
-```bash
-npm install balanced-match
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js
deleted file mode 100644
index 1685a76..0000000
--- a/node_modules/balanced-match/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-module.exports = balanced;
-function balanced(a, b, str) {
- if (a instanceof RegExp) a = maybeMatch(a, str);
- if (b instanceof RegExp) b = maybeMatch(b, str);
-
- var r = range(a, b, str);
-
- return r && {
- start: r[0],
- end: r[1],
- pre: str.slice(0, r[0]),
- body: str.slice(r[0] + a.length, r[1]),
- post: str.slice(r[1] + b.length)
- };
-}
-
-function maybeMatch(reg, str) {
- var m = str.match(reg);
- return m ? m[0] : null;
-}
-
-balanced.range = range;
-function range(a, b, str) {
- var begs, beg, left, right, result;
- var ai = str.indexOf(a);
- var bi = str.indexOf(b, ai + 1);
- var i = ai;
-
- if (ai >= 0 && bi > 0) {
- begs = [];
- left = str.length;
-
- while (i >= 0 && !result) {
- if (i == ai) {
- begs.push(i);
- ai = str.indexOf(a, i + 1);
- } else if (begs.length == 1) {
- result = [ begs.pop(), bi ];
- } else {
- beg = begs.pop();
- if (beg < left) {
- left = beg;
- right = bi;
- }
-
- bi = str.indexOf(b, i + 1);
- }
-
- i = ai < bi && ai >= 0 ? ai : bi;
- }
-
- if (begs.length) {
- result = [ left, right ];
- }
- }
-
- return result;
-}
diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json
deleted file mode 100644
index b430483..0000000
--- a/node_modules/balanced-match/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_from": "balanced-match@^1.0.0",
- "_id": "balanced-match@1.0.0",
- "_inBundle": false,
- "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
- "_location": "/balanced-match",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "balanced-match@^1.0.0",
- "name": "balanced-match",
- "escapedName": "balanced-match",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/brace-expansion"
- ],
- "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
- "_spec": "balanced-match@^1.0.0",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/brace-expansion",
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/balanced-match/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Match balanced character pairs, like \"{\" and \"}\"",
- "devDependencies": {
- "matcha": "^0.7.0",
- "tape": "^4.6.0"
- },
- "homepage": "https://github.com/juliangruber/balanced-match",
- "keywords": [
- "match",
- "regexp",
- "test",
- "balanced",
- "parse"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "balanced-match",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/balanced-match.git"
- },
- "scripts": {
- "bench": "make bench",
- "test": "make test"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- },
- "version": "1.0.0"
-}
diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE
deleted file mode 100644
index de32266..0000000
--- a/node_modules/brace-expansion/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md
deleted file mode 100644
index 6b4e0e1..0000000
--- a/node_modules/brace-expansion/README.md
+++ /dev/null
@@ -1,129 +0,0 @@
-# brace-expansion
-
-[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
-as known from sh/bash, in JavaScript.
-
-[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
-[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
-[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
-
-[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
-
-## Example
-
-```js
-var expand = require('brace-expansion');
-
-expand('file-{a,b,c}.jpg')
-// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
-
-expand('-v{,,}')
-// => ['-v', '-v', '-v']
-
-expand('file{0..2}.jpg')
-// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
-
-expand('file-{a..c}.jpg')
-// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
-
-expand('file{2..0}.jpg')
-// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
-
-expand('file{0..4..2}.jpg')
-// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
-
-expand('file-{a..e..2}.jpg')
-// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
-
-expand('file{00..10..5}.jpg')
-// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
-
-expand('{{A..C},{a..c}}')
-// => ['A', 'B', 'C', 'a', 'b', 'c']
-
-expand('ppp{,config,oe{,conf}}')
-// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
-```
-
-## API
-
-```js
-var expand = require('brace-expansion');
-```
-
-### var expanded = expand(str)
-
-Return an array of all possible and valid expansions of `str`. If none are
-found, `[str]` is returned.
-
-Valid expansions are:
-
-```js
-/^(.*,)+(.+)?$/
-// {a,b,...}
-```
-
-A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
-
-```js
-/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
-// {x..y[..incr]}
-```
-
-A numeric sequence from `x` to `y` inclusive, with optional increment.
-If `x` or `y` start with a leading `0`, all the numbers will be padded
-to have equal length. Negative numbers and backwards iteration work too.
-
-```js
-/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
-// {x..y[..incr]}
-```
-
-An alphabetic sequence from `x` to `y` inclusive, with optional increment.
-`x` and `y` must be exactly one character, and if given, `incr` must be a
-number.
-
-For compatibility reasons, the string `${` is not eligible for brace expansion.
-
-## Installation
-
-With [npm](https://npmjs.org) do:
-
-```bash
-npm install brace-expansion
-```
-
-## Contributors
-
-- [Julian Gruber](https://github.com/juliangruber)
-- [Isaac Z. Schlueter](https://github.com/isaacs)
-
-## Sponsors
-
-This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
-
-Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js
deleted file mode 100644
index 0478be8..0000000
--- a/node_modules/brace-expansion/index.js
+++ /dev/null
@@ -1,201 +0,0 @@
-var concatMap = require('concat-map');
-var balanced = require('balanced-match');
-
-module.exports = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balanced('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function identity(e) {
- return e;
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balanced('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
-
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = concatMap(n, function(el) { return expand(el, false) });
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
-
- return expansions;
-}
-
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
deleted file mode 100644
index 980a6ca..0000000
--- a/node_modules/brace-expansion/package.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "_from": "brace-expansion@^1.1.7",
- "_id": "brace-expansion@1.1.11",
- "_inBundle": false,
- "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "_location": "/brace-expansion",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "brace-expansion@^1.1.7",
- "name": "brace-expansion",
- "escapedName": "brace-expansion",
- "rawSpec": "^1.1.7",
- "saveSpec": null,
- "fetchSpec": "^1.1.7"
- },
- "_requiredBy": [
- "/minimatch"
- ],
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
- "_spec": "brace-expansion@^1.1.7",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/minimatch",
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/brace-expansion/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- },
- "deprecated": false,
- "description": "Brace expansion as known from sh/bash",
- "devDependencies": {
- "matcha": "^0.7.0",
- "tape": "^4.6.0"
- },
- "homepage": "https://github.com/juliangruber/brace-expansion",
- "keywords": [],
- "license": "MIT",
- "main": "index.js",
- "name": "brace-expansion",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/brace-expansion.git"
- },
- "scripts": {
- "bench": "matcha test/perf/bench.js",
- "gentest": "bash test/generate.sh",
- "test": "tape test/*.js"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- },
- "version": "1.1.11"
-}
diff --git a/node_modules/concat-map/.travis.yml b/node_modules/concat-map/.travis.yml
deleted file mode 100644
index f1d0f13..0000000
--- a/node_modules/concat-map/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.4
- - 0.6
diff --git a/node_modules/concat-map/LICENSE b/node_modules/concat-map/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/node_modules/concat-map/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/concat-map/README.markdown b/node_modules/concat-map/README.markdown
deleted file mode 100644
index 408f70a..0000000
--- a/node_modules/concat-map/README.markdown
+++ /dev/null
@@ -1,62 +0,0 @@
-concat-map
-==========
-
-Concatenative mapdashery.
-
-[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
-
-[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
-
-example
-=======
-
-``` js
-var concatMap = require('concat-map');
-var xs = [ 1, 2, 3, 4, 5, 6 ];
-var ys = concatMap(xs, function (x) {
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
-});
-console.dir(ys);
-```
-
-***
-
-```
-[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
-```
-
-methods
-=======
-
-``` js
-var concatMap = require('concat-map')
-```
-
-concatMap(xs, fn)
------------------
-
-Return an array of concatenated elements by calling `fn(x, i)` for each element
-`x` and each index `i` in the array `xs`.
-
-When `fn(x, i)` returns an array, its result will be concatenated with the
-result array. If `fn(x, i)` returns anything else, that value will be pushed
-onto the end of the result array.
-
-install
-=======
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install concat-map
-```
-
-license
-=======
-
-MIT
-
-notes
-=====
-
-This module was written while sitting high above the ground in a tree.
diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js
deleted file mode 100644
index 3365621..0000000
--- a/node_modules/concat-map/example/map.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var concatMap = require('../');
-var xs = [ 1, 2, 3, 4, 5, 6 ];
-var ys = concatMap(xs, function (x) {
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
-});
-console.dir(ys);
diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js
deleted file mode 100644
index b29a781..0000000
--- a/node_modules/concat-map/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = function (xs, fn) {
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- var x = fn(xs[i], i);
- if (isArray(x)) res.push.apply(res, x);
- else res.push(x);
- }
- return res;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json
deleted file mode 100644
index 4137c27..0000000
--- a/node_modules/concat-map/package.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "_from": "concat-map@0.0.1",
- "_id": "concat-map@0.0.1",
- "_inBundle": false,
- "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "_location": "/concat-map",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "concat-map@0.0.1",
- "name": "concat-map",
- "escapedName": "concat-map",
- "rawSpec": "0.0.1",
- "saveSpec": null,
- "fetchSpec": "0.0.1"
- },
- "_requiredBy": [
- "/brace-expansion"
- ],
- "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "_spec": "concat-map@0.0.1",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/brace-expansion",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/node-concat-map/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "concatenative mapdashery",
- "devDependencies": {
- "tape": "~2.4.0"
- },
- "directories": {
- "example": "example",
- "test": "test"
- },
- "homepage": "https://github.com/substack/node-concat-map#readme",
- "keywords": [
- "concat",
- "concatMap",
- "map",
- "functional",
- "higher-order"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "concat-map",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/node-concat-map.git"
- },
- "scripts": {
- "test": "tape test/*.js"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": {
- "ie": [
- 6,
- 7,
- 8,
- 9
- ],
- "ff": [
- 3.5,
- 10,
- 15
- ],
- "chrome": [
- 10,
- 22
- ],
- "safari": [
- 5.1
- ],
- "opera": [
- 12
- ]
- }
- },
- "version": "0.0.1"
-}
diff --git a/node_modules/concat-map/test/map.js b/node_modules/concat-map/test/map.js
deleted file mode 100644
index fdbd702..0000000
--- a/node_modules/concat-map/test/map.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var concatMap = require('../');
-var test = require('tape');
-
-test('empty or not', function (t) {
- var xs = [ 1, 2, 3, 4, 5, 6 ];
- var ixes = [];
- var ys = concatMap(xs, function (x, ix) {
- ixes.push(ix);
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
- });
- t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
- t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
- t.end();
-});
-
-test('always something', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function (x) {
- return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
- });
- t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
- t.end();
-});
-
-test('scalars', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function (x) {
- return x === 'b' ? [ 'B', 'B', 'B' ] : x;
- });
- t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
- t.end();
-});
-
-test('undefs', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function () {});
- t.same(ys, [ undefined, undefined, undefined, undefined ]);
- t.end();
-});
diff --git a/node_modules/foreachasync/.npmignore b/node_modules/foreachasync/.npmignore
deleted file mode 100644
index 8d4ae25..0000000
--- a/node_modules/foreachasync/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-bower_components
diff --git a/node_modules/foreachasync/LICENSE b/node_modules/foreachasync/LICENSE
deleted file mode 100644
index 37ec93a..0000000
--- a/node_modules/foreachasync/LICENSE
+++ /dev/null
@@ -1,191 +0,0 @@
-Apache License
-Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright
-owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities
-that control, are controlled by, or are under common control with that entity.
-For the purposes of this definition, "control" means (i) the power, direct or
-indirect, to cause the direction or management of such entity, whether by
-contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
-outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including
-but not limited to software source code, documentation source, and configuration
-files.
-
-"Object" form shall mean any form resulting from mechanical transformation or
-translation of a Source form, including but not limited to compiled object code,
-generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made
-available under the License, as indicated by a copyright notice that is included
-in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that
-is based on (or derived from) the Work and for which the editorial revisions,
-annotations, elaborations, or other modifications represent, as a whole, an
-original work of authorship. For the purposes of this License, Derivative Works
-shall not include works that remain separable from, or merely link (or bind by
-name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version
-of the Work and any modifications or additions to that Work or Derivative Works
-thereof, that is intentionally submitted to Licensor for inclusion in the Work
-by the copyright owner or by an individual or Legal Entity authorized to submit
-on behalf of the copyright owner. For the purposes of this definition,
-"submitted" means any form of electronic, verbal, or written communication sent
-to the Licensor or its representatives, including but not limited to
-communication on electronic mailing lists, source code control systems, and
-issue tracking systems that are managed by, or on behalf of, the Licensor for
-the purpose of discussing and improving the Work, but excluding communication
-that is conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
-of whom a Contribution has been received by Licensor and subsequently
-incorporated within the Work.
-
-2. Grant of Copyright License.
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable copyright license to reproduce, prepare Derivative Works of,
-publicly display, publicly perform, sublicense, and distribute the Work and such
-Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable (except as stated in this section) patent license to make, have
-made, use, offer to sell, sell, import, and otherwise transfer the Work, where
-such license applies only to those patent claims licensable by such Contributor
-that are necessarily infringed by their Contribution(s) alone or by combination
-of their Contribution(s) with the Work to which such Contribution(s) was
-submitted. If You institute patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Work or a
-Contribution incorporated within the Work constitutes direct or contributory
-patent infringement, then any patent licenses granted to You under this License
-for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution.
-
-You may reproduce and distribute copies of the Work or Derivative Works thereof
-in any medium, with or without modifications, and in Source or Object form,
-provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of
-this License; and
-You must cause any modified files to carry prominent notices stating that You
-changed the files; and
-You must retain, in the Source form of any Derivative Works that You distribute,
-all copyright, patent, trademark, and attribution notices from the Source form
-of the Work, excluding those notices that do not pertain to any part of the
-Derivative Works; and
-If the Work includes a "NOTICE" text file as part of its distribution, then any
-Derivative Works that You distribute must include a readable copy of the
-attribution notices contained within such NOTICE file, excluding those notices
-that do not pertain to any part of the Derivative Works, in at least one of the
-following places: within a NOTICE text file distributed as part of the
-Derivative Works; within the Source form or documentation, if provided along
-with the Derivative Works; or, within a display generated by the Derivative
-Works, if and wherever such third-party notices normally appear. The contents of
-the NOTICE file are for informational purposes only and do not modify the
-License. You may add Your own attribution notices within Derivative Works that
-You distribute, alongside or as an addendum to the NOTICE text from the Work,
-provided that such additional attribution notices cannot be construed as
-modifying the License.
-You may add Your own copyright statement to Your modifications and may provide
-additional or different license terms and conditions for use, reproduction, or
-distribution of Your modifications, or for any such Derivative Works as a whole,
-provided Your use, reproduction, and distribution of the Work otherwise complies
-with the conditions stated in this License.
-
-5. Submission of Contributions.
-
-Unless You explicitly state otherwise, any Contribution intentionally submitted
-for inclusion in the Work by You to the Licensor shall be under the terms and
-conditions of this License, without any additional terms or conditions.
-Notwithstanding the above, nothing herein shall supersede or modify the terms of
-any separate license agreement you may have executed with Licensor regarding
-such Contributions.
-
-6. Trademarks.
-
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-
-Unless required by applicable law or agreed to in writing, Licensor provides the
-Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
-including, without limitation, any warranties or conditions of TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
-solely responsible for determining the appropriateness of using or
-redistributing the Work and assume any risks associated with Your exercise of
-permissions under this License.
-
-8. Limitation of Liability.
-
-In no event and under no legal theory, whether in tort (including negligence),
-contract, or otherwise, unless required by applicable law (such as deliberate
-and grossly negligent acts) or agreed to in writing, shall any Contributor be
-liable to You for damages, including any direct, indirect, special, incidental,
-or consequential damages of any character arising as a result of this License or
-out of the use or inability to use the Work (including but not limited to
-damages for loss of goodwill, work stoppage, computer failure or malfunction, or
-any and all other commercial damages or losses), even if such Contributor has
-been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-
-While redistributing the Work or Derivative Works thereof, You may choose to
-offer, and charge a fee for, acceptance of support, warranty, indemnity, or
-other liability obligations and/or rights consistent with this License. However,
-in accepting such obligations, You may act only on Your own behalf and on Your
-sole responsibility, not on behalf of any other Contributor, and only if You
-agree to indemnify, defend, and hold each Contributor harmless for any liability
-incurred by, or claims asserted against, such Contributor by reason of your
-accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work
-
-To apply the Apache License to your work, attach the following boilerplate
-notice, with the fields enclosed by brackets "[]" replaced with your own
-identifying information. (Don't include the brackets!) The text should be
-enclosed in the appropriate comment syntax for the file format. We also
-recommend that a file or class name and description of purpose be included on
-the same "printed page" as the copyright notice for easier identification within
-third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/node_modules/foreachasync/README.md b/node_modules/foreachasync/README.md
deleted file mode 100644
index e5c8035..0000000
--- a/node_modules/foreachasync/README.md
+++ /dev/null
@@ -1,134 +0,0 @@
-forEachAsync
-===
-
-Analogous to `[].forEach`, but handles items asynchronously with a final callback passed to `then`.
-
-This is the most essential piece of the [`ArrayAsync`](https://github.com/FuturesJS/ArrayAsync) package.
-
-v3.x - Diet Cola Edition
----
-
-As I do every few years, I decided to rewrite FuturesJS.
-This year's remake is extremely lightweight.
-
-Usage
-===
-
-It's as simple as you could guess:
-
-```javascript
- // waits for one request to finish before beginning the next
- forEachAsync(['dogs', 'cats', 'octocats'], function (next, element, index, array) {
- getPics(element, next);
-
- // then after all of the elements have been handled
- // the final callback fires to let you know it's all done
- }).then(function () {
- console.log('All requests have finished');
- });
-
- // where `getPics` might be an asynchronous web request such as this
- function getPics(animal, cb) {
- var flickerAPI = "http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?";
- $.getJSON(
- flickerAPI
- , { tags: thing
- , tagmode: "any"
- , format: "json"
- , success: function (data) {
- console.log('teh animals:', data);
- }
- , complete: cb
- }
- );
- }
-```
-
-
-Browser Installation
-===
-
-You can install from bower:
-
-```bash
-bower install forEachAsync
-```
-
-Or download the raw file from <https://raw.github.com/FuturesJS/forEachAsync/master/forEachAsync.js>:
-
-```bash
-wget https://raw.github.com/FuturesJS/forEachAsync/master/forEachAsync.js
-```
-
-```javascript
-(function () {
- 'use strict';
-
- var forEachAsync = window.forEachAsync
- ;
-
- // do stuff ...
-}());
-```
-
-Or you can build it alongside other libraries:
-
-```bash
-npm install -g pakmanager
-npm install forEachAsync --save
-pakmanager -e browser build
-```
-
-```html
-<script src="pakmanaged.js"></script>
-```
-
-```javascript
-(function () {
- 'use strict';
-
- var forEachAsync = require('forEachAsync').forEachAsync
- ;
-
- // do stuff ...
-}());
-```
-
-
-Node Installation
-===
-
-```bash
-npm install --save forEachAsync@3.x
-```
-
-API
-===
-
-**`forEachAsync(array, callback[, thisArg])`**
-
-Parameters
-
- * `array` Array of elements to iterate over
- * `callback` Function to execute for each element, takes 4 arguments
- * `next` the function to call when the current element has been dealt with
- * `element` a single element of the aforementioned array
- * `index` the index of the current element
- * `array` the same array mentioned above
- * `thisArg` Object to use as `this` when executing `callback`
-
-**`forEachAsync#then(done)`**
-
-Parameters
-
- * `then` is in the return value of `forEachAsync` and accepts a final `done` callback.
- * `done` called after `forEachAsync` is complete, takes no arguments
-
-Internal API
-===
-
-`forEachAsync.__BREAK`
-
-This is used internally for the purposes of the `ArrayAsync` library.
-
-Please don't `break` stuff; use [`ArrayAsync`](https://github.com/FuturesJS/ArrayAsync)`.someAsync` or [`ArrayAsync`](https://github.com/FuturesJS/ArrayAsync)`.everyAsync` instead.
diff --git a/node_modules/foreachasync/bower.json b/node_modules/foreachasync/bower.json
deleted file mode 100644
index 085a7d9..0000000
--- a/node_modules/foreachasync/bower.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "forEachAsync",
- "main": "forEachAsync.js",
- "version": "3.0.0",
- "homepage": "https://github.com/FuturesJS/forEachAsync",
- "authors": [
- "AJ ONeal <coolaj86@gmail.com>"
- ],
- "description": "A node- and browser-ready async counterpart of Array.prototype.forEach",
- "keywords": [
- "futuresjs",
- "forEachAsync",
- "forEach",
- "for",
- "async",
- "each",
- "asynchronous"
- ],
- "license": "Apache-v2",
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "test",
- "tests"
- ]
-}
diff --git a/node_modules/foreachasync/forEachAsync.js b/node_modules/foreachasync/forEachAsync.js
deleted file mode 100644
index 8790d78..0000000
--- a/node_modules/foreachasync/forEachAsync.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*jshint -W054 */
-;(function (exports) {
- 'use strict';
-
- function forEachAsync(arr, fn, thisArg) {
- var dones = []
- , index = -1
- ;
-
- function next(BREAK, result) {
- index += 1;
-
- if (index === arr.length || BREAK === forEachAsync.__BREAK) {
- dones.forEach(function (done) {
- done.call(thisArg, result);
- });
- return;
- }
-
- fn.call(thisArg, next, arr[index], index, arr);
- }
-
- setTimeout(next, 4);
-
- return {
- then: function (_done) {
- dones.push(_done);
- return this;
- }
- };
- }
- forEachAsync.__BREAK = {};
-
- exports.forEachAsync = forEachAsync;
-}('undefined' !== typeof exports && exports || new Function('return this')()));
diff --git a/node_modules/foreachasync/package.json b/node_modules/foreachasync/package.json
deleted file mode 100644
index b594bdb..0000000
--- a/node_modules/foreachasync/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "_from": "foreachasync@^3.0.0",
- "_id": "foreachasync@3.0.0",
- "_inBundle": false,
- "_integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=",
- "_location": "/foreachasync",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "foreachasync@^3.0.0",
- "name": "foreachasync",
- "escapedName": "foreachasync",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/walk"
- ],
- "_resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
- "_shasum": "5502987dc8714be3392097f32e0071c9dee07cf6",
- "_spec": "foreachasync@^3.0.0",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/walk",
- "author": {
- "name": "AJ ONeal",
- "email": "coolaj86@gmail.com",
- "url": "http://coolaj86.com/"
- },
- "bugs": {
- "url": "https://github.com/FuturesJS/forEachAsync/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A node- and browser-ready async counterpart of Array.prototype.forEach",
- "directories": {
- "test": "test"
- },
- "homepage": "https://github.com/FuturesJS/forEachAsync",
- "keywords": [
- "futuresjs",
- "forEach",
- "for",
- "forEachAsync",
- "async",
- "futures",
- "each"
- ],
- "license": "Apache2",
- "main": "forEachAsync.js",
- "name": "foreachasync",
- "repository": {
- "type": "git",
- "url": "git://github.com/FuturesJS/forEachAsync.git"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "version": "3.0.0"
-}
diff --git a/node_modules/foreachasync/test.js b/node_modules/foreachasync/test.js
deleted file mode 100644
index 7c1cfe9..0000000
--- a/node_modules/foreachasync/test.js
+++ /dev/null
@@ -1,29 +0,0 @@
-(function () {
- "use strict";
-
- var forEachAsync = require('./forEachAsync').forEachAsync
- ;
-
- forEachAsync([0, 500, 70, 200, 400, 100], function (next, element, i, arr) {
- // test that array order is as expected
- console.log(element, 'is element', i, 'of', arr.length);
-
- // test that thisness is applied
- this[element] = i;
-
- if (i > 2) {
- // test that synchronous callbacks don't mess things up
- next();
- } else {
- // test asynchronous callbacks
- setTimeout(next, element);
- }
- }, {}).then(function () {
- // test that thisness carries
- console.log(this);
- }).then(function () {
- // test then chaining
- console.log("now wasn't that nice?");
- });
-
-}());
diff --git a/node_modules/locutus/_util/cli.js b/node_modules/locutus/_util/cli.js
deleted file mode 100755
index 77e4b14..0000000
--- a/node_modules/locutus/_util/cli.js
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-var Util = require('./util');
-
-var util = new Util(process.argv);
-
-util[process.argv[2]](function (err) {
- if (err) {
- throw new Error(err);
- }
- console.log('Done');
-});
-//# sourceMappingURL=cli.js.map \ No newline at end of file
diff --git a/node_modules/locutus/_util/cli.js.map b/node_modules/locutus/_util/cli.js.map
deleted file mode 100644
index 8875f62..0000000
--- a/node_modules/locutus/_util/cli.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/_util/cli.js"],"names":["Util","require","util","process","argv","err","Error","console","log"],"mappings":";;AAEA,IAAIA,OAAOC,QAAQ,QAAR,CAAX;;AAEA,IAAIC,OAAO,IAAIF,IAAJ,CAASG,QAAQC,IAAjB,CAAX;;AAEAF,KAAKC,QAAQC,IAAR,CAAa,CAAb,CAAL,EAAsB,UAAUC,GAAV,EAAe;AACnC,MAAIA,GAAJ,EAAS;AACP,UAAM,IAAIC,KAAJ,CAAUD,GAAV,CAAN;AACD;AACDE,UAAQC,GAAR,CAAY,MAAZ;AACD,CALD","file":"cli.js","sourcesContent":["\n\nvar Util = require('./util')\n\nvar util = new Util(process.argv)\n\nutil[process.argv[2]](function (err) {\n if (err) {\n throw new Error(err)\n }\n console.log('Done')\n})\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/_util/util.js b/node_modules/locutus/_util/util.js
deleted file mode 100644
index c5f3956..0000000
--- a/node_modules/locutus/_util/util.js
+++ /dev/null
@@ -1,622 +0,0 @@
-'use strict';
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var globby = require('globby');
-var path = require('path');
-var fs = require('fs');
-var async = require('async');
-var YAML = require('js-yaml');
-var mkdirp = require('mkdirp');
-var debug = require('depurar')('locutus');
-var indentString = require('indent-string');
-var _ = require('lodash');
-var esprima = require('esprima');
-
-var Util = function () {
- function Util(argv) {
- _classCallCheck(this, Util);
-
- if (!argv) {
- argv = [];
- }
- this.__src = path.dirname(__dirname);
- this.__root = path.dirname(path.dirname(__dirname));
- this.__test = path.dirname(path.dirname(__dirname)) + '/test';
-
- this.globals = {};
-
- this.pattern = [this.__src + '/**/**/*.js', '!**/index.js', '!**/_util/**'];
- this.concurrency = 8;
- this.authorKeys = ['original by', 'improved by', 'reimplemented by', 'parts by', 'bugfixed by', 'revised by', 'input by'];
-
- this.langDefaults = {
- c: {
- order: 1,
- function_title_template: '[language]\'s [category].[function] in JavaScript',
- human: 'C',
- packageType: 'header file',
- inspiration_urls: ['<a href="http://en.cppreference.com/w/c/numeric/math">the C math.h documentation</a>', '<a href="https://sourceware.org/git/?p=glibc.git;a=tree;f=math;hb=HEAD">the C math.h source</a>'],
- function_description_template: 'Here’s what our current JavaScript equivalent to <a href="http://en.cppreference.com/w/c/numeric/[category]/[function]">[language]\'s [function] found in the [category].h header file</a> looks like.'
- },
- golang: {
- order: 2,
- function_title_template: '[language]\'s [category].[function] in JavaScript',
- human: 'Go',
- packageType: 'package',
- inspiration_urls: ['<a href="https://golang.org/pkg/strings/">Go strings documentation</a>', '<a href="https://golang.org/src/strings/strings.go">Go strings source</a>', '<a href="https://golang.org/src/strings/example_test.go">Go strings examples source</a>', '<a href="http://gophersjs.com">GopherJS</a>'],
- function_description_template: 'Here’s what our current JavaScript equivalent to <a href="https://golang.org/pkg/[category]/#[function]">[language]\'s [category].[function]</a> looks like.'
- },
- python: {
- order: 3,
- function_title_template: '[language]\'s [category].[function] in JavaScript',
- human: 'Python',
- packageType: 'module',
- inspiration_urls: ['<a href="https://docs.python.org/3/library/string.html">the Python 3 standard library string page</a>'],
- function_description_template: 'Here’s what our current JavaScript equivalent to <a href="https://docs.python.org/3/library/[category].html#[category].[function]">[language]\'s [category].[function]</a> looks like.'
- },
- ruby: {
- order: 4,
- function_title_template: '[language]\'s [category].[function] in JavaScript',
- human: 'Ruby',
- packageType: 'module',
- inspiration_urls: ['<a href="http://ruby-doc.org/core-2.2.2/Math.html">the Ruby core documentation</a>'],
- function_description_template: 'Here’s what our current JavaScript equivalent to <a href="http://ruby-doc.org/core-2.2.2/[category].html#method-c-[function]">[language]\'s [category].[function]</a> looks like.'
- },
- php: {
- order: 5,
- function_title_template: '[language]\'s [function] in JavaScript',
- human: 'PHP',
- packageType: 'extension',
- inspiration_urls: ['<a href="http://php.net/manual/en/book.strings.php">the PHP string documentation</a>', '<a href="https://github.com/php/php-src/blob/master/ext/standard/string.c#L5338">the PHP string source</a>', '<a href="https://github.com/php/php-src/blob/master/ext/standard/tests/strings/str_pad_variation1.phpt">a PHP str_pad test</a>'],
- function_description_template: 'Here’s what our current JavaScript equivalent to <a href="http://php.net/manual/en/function.[functiondashed].php">[language]\'s [function]</a> looks like.',
- alias: ['/categories/', '/categories/array/', '/categories/bc/', '/categories/ctype/', '/categories/datetime/', '/categories/exec/', '/categories/filesystem/', '/categories/funchand/', '/categories/i18n/', '/categories/index/', '/categories/info/', '/categories/json/', '/categories/math/', '/categories/misc/', '/categories/net/', '/categories/network/', '/categories/pcre/', '/categories/strings/', '/categories/url/', '/categories/var/', '/categories/xdiff/', '/categories/xml/', '/functions/index/', '/functions/', '/packages/', '/packages/index/']
- }
- };
-
- this.allowSkip = argv.indexOf('--noskip') === -1;
-
- this._reindexBuffer = {};
- this._injectwebBuffer = {};
- }
-
- _createClass(Util, [{
- key: 'injectweb',
- value: function injectweb(cb) {
- var self = this;
- this._runFunctionOnAll(this._injectwebOne, function (err) {
- if (err) {
- return cb(err);
- }
- for (var indexHtml in self._injectwebBuffer) {
- debug('writing: ' + indexHtml);
- fs.writeFileSync(indexHtml, self._injectwebBuffer[indexHtml], 'utf-8');
- }
- });
- }
- }, {
- key: 'reindex',
- value: function reindex(cb) {
- var self = this;
- self._reindexBuffer = {};
- self._runFunctionOnAll(self._reindexOne, function (err) {
- if (err) {
- return cb(err);
- }
- for (var indexJs in self._reindexBuffer) {
- var requires = self._reindexBuffer[indexJs];
- requires.sort();
- debug('writing: ' + indexJs);
- fs.writeFileSync(indexJs, requires.join('\n') + '\n', 'utf-8');
- }
- });
- }
- }, {
- key: 'writetests',
- value: function writetests(cb) {
- this._runFunctionOnAll(this._writetestOne, cb);
- }
- }, {
- key: '_runFunctionOnAll',
- value: function _runFunctionOnAll(runFunc, cb) {
- var self = this;
-
- var q = async.queue(function (fullpath, callback) {
- self._load.bind(self, fullpath, {}, function (err, params) {
- if (err) {
- return callback(err);
- }
-
- runFunc.bind(self, params, callback)();
- })();
- }, self.concurrency);
-
- debug({
- pattern: self.pattern
- });
- var files = globby.sync(self.pattern);
-
- q.push(files);
-
- q.drain = cb;
- }
- }, {
- key: '_reindexOne',
- value: function _reindexOne(params, cb) {
- var fullpath = this.__src + '/' + params.filepath;
- var dir = path.dirname(fullpath);
- var basefile = path.basename(fullpath, '.js');
- var indexJs = dir + '/index.js';
-
- var module = basefile;
- if (basefile === 'Index2') {
- module = 'Index';
- }
-
- if (!this._reindexBuffer[indexJs]) {
- this._reindexBuffer[indexJs] = [];
- }
-
- var line = 'module.exports[\'' + module + '\'] = require(\'./' + basefile + '\')';
- this._reindexBuffer[indexJs].push(line);
- return cb(null);
- }
- }, {
- key: '_injectwebOne',
- value: function _injectwebOne(params, cb) {
- var authors = {};
- this.authorKeys.forEach(function (key) {
- if (params.headKeys[key]) {
- authors[key] = _.flattenDeep(params.headKeys[key]);
- }
- });
-
- var langPath = [this.__root, '/website/source/', params.language].join('');
-
- var langIndexPath = langPath + '/index.html';
- var catPath = langPath + '/' + params.category;
- var catIndexPath = catPath + '/' + 'index.html';
- var funcPath = catPath + '/' + params.func_name + '.html';
-
- if (!this._injectwebBuffer[langIndexPath]) {
- var langTitle = '';
- langTitle += this.langDefaults[params.language].human + ' ';
- langTitle += this.langDefaults[params.language].packageType + 's ';
- langTitle += ' in JavaScript';
-
- var langData = Object.assign({}, this.langDefaults[params.language], {
- warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand',
- type: 'language',
- layout: 'language',
- language: params.language,
- title: langTitle
- });
- this._injectwebBuffer[langIndexPath] = '---' + '\n' + YAML.safeDump(langData).trim() + '\n' + '---' + '\n';
- }
-
- if (!this._injectwebBuffer[catIndexPath]) {
- var catTitle = '';
- catTitle += this.langDefaults[params.language].human + '\'s ';
- catTitle += params.category + ' ';
- catTitle += this.langDefaults[params.language].packageType + ' ';
- catTitle += ' in JavaScript';
-
- var catData = {
- warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand',
- type: 'category',
- layout: 'category',
- language: params.language,
- category: params.category,
- title: catTitle
- };
- this._injectwebBuffer[catIndexPath] = '---' + '\n' + YAML.safeDump(catData).trim() + '\n' + '---' + '\n';
- }
-
- var functionTitle = this.langDefaults[params.language].function_title_template.replace(/\[language]/g, this.langDefaults[params.language].human).replace(/\[category]/g, params.category).replace(/\[function]/g, params.func_name).replace(/\[functiondashed]/g, params.func_name.replace(/_/g, '-'));
-
- var functionDescription = this.langDefaults[params.language].function_description_template.replace(/\[language]/g, this.langDefaults[params.language].human).replace(/\[category]/g, params.category).replace(/\[function]/g, params.func_name).replace(/\[functiondashed]/g, params.func_name.replace(/_/g, '-'));
-
- var funcData = {
- warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand',
- examples: (params.headKeys.example || []).map(function (lines, i) {
- return lines.join('\n');
- }),
- estarget: (params.headKeys.estarget || []).map(function (lines, i) {
- return lines.join('\n');
- }).join('\n').trim() || 'es5',
- returns: (params.headKeys.returns || []).map(function (lines, i) {
- return lines.join('\n');
- }),
- dependencies: [],
- authors: authors || {},
- notes: (params.headKeys.note || []).map(function (lines, i) {
- return lines.join('\n');
- }),
- type: 'function',
- layout: 'function',
- title: functionTitle,
- description: functionDescription,
- function: params.func_name,
- category: params.category,
- language: params.language,
- permalink: params.language + '/' + params.category + '/' + params.func_name + '/',
- alias: ['/functions/' + params.language + '/' + params.func_name + '/', '/functions/' + params.category + '/' + params.func_name + '/', '/' + params.language + '/' + params.func_name + '/']
- };
-
- if (params.language === 'php') {
- funcData.alias.push('/functions/' + params.func_name + '/');
- }
-
- var buf = '---' + '\n' + YAML.safeDump(funcData).trim() + '\n' + '---' + '\n';
-
- buf += '{% codeblock lang:javascript %}' + params.code + '{% endcodeblock %}';
-
- mkdirp(path.dirname(funcPath), function (err) {
- if (err) {
- throw new Error('Could not mkdir for ' + funcPath + '. ' + err);
- }
- fs.writeFile(funcPath, buf, 'utf-8', cb);
- });
- }
- }, {
- key: '_addRequire',
- value: function _addRequire(name, relativeSrcForTest) {
- return ['var ', name, ' = require(\'', relativeSrcForTest, '\') // eslint-disable-line no-unused-vars,camelcase'].join('');
- }
- }, {
- key: '_writetestOne',
- value: function _writetestOne(params, cb) {
- var self = this;
-
- if (!params.func_name) {
- throw new Error('No func_name in ' + JSON.stringify(params));
- }
- if (!params.headKeys) {
- throw new Error('No headKeys in ' + params.func_name);
- }
- if (!params.headKeys.example) {
- throw new Error('No example in ' + params.func_name);
- }
-
- var basename = path.basename(params.filepath);
- var subdir = path.dirname(params.filepath);
- var testpath = this.__test + '/languages/' + subdir + '/test-' + basename;
- var testdir = path.dirname(testpath);
- var relativeSrcForTestDir = path.relative(testdir, self.__src);
- var relativeTestFileForRoot = path.relative(self.__root, testpath);
-
- // console.log(relativeSrcForTestDir)
- // process.exit(1)
-
- var testProps = '';
- if (params.headKeys.test) {
- testProps = params.headKeys.test[0][0];
- }
-
- var describeSkip = '';
- if (self.allowSkip && testProps.indexOf('skip-all') !== -1) {
- describeSkip = '.skip';
- }
-
- var codez = [];
-
- codez.push('// warning: This file is auto generated by `npm run build:tests`');
- codez.push('// Do not edit by hand!');
-
- // Add globals
- for (var global in self.globals) {
- codez.push('var ' + global + ' = ' + self.globals[global]);
- }
-
- // Set timezone for testing dates
- // Not ideal: http://stackoverflow.com/questions/8083410/how-to-set-default-timezone-in-node-js
- codez.push('process.env.TZ = \'UTC\'');
-
- codez.push('var ' + 'expect' + ' = require(\'chai\').expect');
-
- // Add language-wide dependencies
- // @todo: It would be great if we could remove this
- if (params.language === 'php') {
- codez.push(self._addRequire('ini_set', relativeSrcForTestDir + '/' + 'php/info/ini_set'));
- codez.push(self._addRequire('ini_get', relativeSrcForTestDir + '/' + 'php/info/ini_get'));
- if (params.func_name === 'localeconv') {
- codez.push(self._addRequire('setlocale', relativeSrcForTestDir + '/' + 'php/strings/setlocale'));
- }
- if (params.func_name === 'i18n_loc_get_default') {
- codez.push(self._addRequire('i18n_loc_set_default', relativeSrcForTestDir + '/' + 'php/i18n/i18n_loc_set_default'));
- }
- }
-
- // Add the main function to test
- codez.push(self._addRequire(params.func_name, relativeSrcForTestDir + '/' + params.filepath));
-
- codez.push('');
-
- codez.push(['describe', describeSkip, '(\'src/', params.filepath, ' (tested in ', relativeTestFileForRoot, ')\', function () {'].join(''));
-
- // Run each example
- for (var i in params.headKeys.example) {
- if (!params.headKeys.returns[i] || !params.headKeys.returns[i].length) {
- throw new Error('There is no return for example ' + i, test, params);
- }
-
- var humanIndex = parseInt(i, 10) + 1;
- var itSkip = '';
- if (self.allowSkip && testProps.indexOf('skip-' + humanIndex) !== -1) {
- itSkip = '.skip';
- }
-
- codez.push([' it', itSkip, '(\'should pass example ', humanIndex, '\', function (done) {'].join(''));
-
- var body = [];
-
- var testExpected = params.headKeys.returns[i].join('\n');
-
- body.push('var expected = ' + testExpected);
-
- // Execute line by line (see date.js why)
- // We need result be the last result of the example code
- for (var j in params.headKeys.example[i]) {
- if (parseInt(j, 10) === params.headKeys.example[i].length - 1) {
- // last action gets saved
- body.push('var result = ' + params.headKeys.example[i][j].replace('var $result = ', ''));
- } else {
- body.push(params.headKeys.example[i][j]);
- }
- }
-
- body.push('expect(result).to.deep.equal(expected)');
- body.push('done()');
-
- codez.push(indentString(body.join('\n'), ' ', 4));
-
- codez.push(' })');
- }
-
- codez.push('})');
- codez.push('');
-
- var code = codez.join('\n');
-
- // Write to disk
- mkdirp(testdir, function (err) {
- if (err) {
- throw new Error(err);
- }
- debug('writing: ' + testpath);
- fs.writeFile(testpath, code, 'utf-8', cb);
- });
- }
-
- // Environment-specific file opener. function name needs to
- // be translated to code. The difficulty is in finding the
- // category.
-
- }, {
- key: '_opener',
- value: function _opener(fileOrName, requesterParams, cb) {
- var self = this;
- var pattern;
-
- var language = requesterParams.language || '*';
-
- if (path.basename(fileOrName, '.js').indexOf('.') !== -1) {
- // periods in the basename, like: unicode.utf8.RuneCountInString or strings.sprintf
- pattern = self.__src + '/' + language + '/' + fileOrName.replace(/\./g, '/') + '.js';
- } else if (fileOrName.indexOf('/') === -1) {
- // no slashes, like: sprintf
- pattern = self.__src + '/' + language + '/*/' + fileOrName + '.js';
- } else if (fileOrName.substr(0, 1) === '/') {
- // absolute path, like: /Users/john/code/locutus/php/strings/sprintf.js
- pattern = fileOrName;
- } else {
- // relative path, like: php/strings/sprintf.js
- pattern = self.__src + '/' + fileOrName;
- }
-
- pattern = pattern.replace('golang/strings/Index.js', 'golang/strings/Index2.js');
- debug('loading: ' + pattern);
- var files = globby.sync(pattern, {});
-
- if (files.length !== 1) {
- var msg = 'Found ' + files.length + ' occurances of ' + fileOrName + ' via pattern: ' + pattern;
- return cb(new Error(msg));
- }
-
- var filepath = files[0];
-
- if (path.basename(filepath) === 'index.js') {
- return cb(null);
- }
-
- if (!filepath) {
- return cb(new Error('Could not find ' + pattern));
- }
-
- fs.readFile(filepath, 'utf-8', function (err, code) {
- if (err) {
- return cb(new Error('Error while opening ' + filepath + '. ' + err));
- }
- return cb(null, filepath, code);
- });
- }
- }, {
- key: '_load',
- value: function _load(fileOrName, requesterParams, cb) {
- var self = this;
- self._opener(fileOrName, requesterParams, function (err, fullpath, code) {
- if (err) {
- return cb(err);
- }
-
- var filepath = path.relative(self.__src, fullpath);
- self._parse(filepath, code, cb);
- });
- }
- }, {
- key: '_findDependencies',
- value: function _findDependencies(fileOrName, requesterParams, dependencies, cb) {
- var self = this;
-
- if (!requesterParams.headKeys['depends on'] || !requesterParams.headKeys['depends on'].length) {
- if (cb) {
- cb(null, {});
- }
- return;
- }
-
- var i;
- var depCodePath;
- var loaded = 0;
- for (i in requesterParams.headKeys['depends on']) {
- depCodePath = requesterParams.headKeys['depends on'][i][0];
-
- self._load(depCodePath, requesterParams, function (err, params) {
- if (err) {
- return cb(err);
- }
-
- dependencies[depCodePath] = params;
- self._findDependencies(depCodePath, params, dependencies);
-
- if (cb && ++loaded === requesterParams.headKeys['depends on'].length) {
- cb(null, dependencies);
- }
- });
- }
- }
- }, {
- key: '_parse',
- value: function _parse(filepath, code, cb) {
- if (!code) {
- return cb(new Error('Unable to parse ' + filepath + '. Received no code'));
- }
-
- if (filepath.indexOf('/') === -1) {
- return cb(new Error('Parse only accepts relative filepaths. Received: \'' + filepath + '\''));
- }
-
- var parts = filepath.split('/');
- var language = parts.shift();
- var codepath = parts.join('.');
- var name = parts.pop();
- var category = parts.join('.');
-
- var ast = esprima.parseScript(code, { comment: true, loc: true, range: true });
-
- // find module.exports in the code
- var moduleExports = ast.body.filter(function (node) {
- try {
- var leftArg = node.expression.left;
- var rightArg = node.expression.right;
-
- return leftArg.object.name === 'module' && leftArg.property.name === 'exports' && rightArg.type === 'FunctionExpression' && rightArg.id.type === 'Identifier' && !!rightArg.id.name;
- } catch (err) {
- return false;
- }
- });
-
- // if file contains more than one export, fail
- if (moduleExports.length !== 1) {
- return cb(Error('File ' + filepath + ' is allowed to contain exactly one module.exports'));
- }
-
- // get the only export
- var exp = moduleExports[0];
-
- // look for function name and param list
- var funcName = exp.expression.right.id.name;
- var funcParams = exp.expression.right.params.map(function (p) {
- return p.name;
- });
-
- // remember the lines where the function is defined
- var funcLoc = exp.expression.right.loc;
-
- // since comments are not included in the AST
- // but are offered in ast.comments
- // remember the location of first function body statement/expression
- var firstFuncBodyElementLoc = exp.expression.right.body.body[0].loc;
-
- // get all line comments which are located between function signature definition
- // and first function body element
- var headComments = ast.comments.filter(function (c) {
- return c.type === 'Line' && c.loc.start.line >= funcLoc.start.line && c.loc.end.line <= firstFuncBodyElementLoc.start.line;
- }).map(function (c) {
- return c.value.trim();
- });
-
- if (headComments.length === 0) {
- var msg = 'Unable to parse ' + filepath + '. Did not find any comments in function definition';
- return cb(new Error(msg));
- }
-
- var headKeys = this._headKeys(headComments);
-
- var params = {
- headKeys: headKeys,
- name: name,
- filepath: filepath,
- codepath: codepath,
- // code: code,
- language: language,
- category: category,
- func_name: funcName,
- func_arguments: funcParams
- };
-
- this._findDependencies(filepath, params, {}, function (err, dependencies) {
- if (err) {
- return cb(err);
- }
-
- params.dependencies = dependencies;
- return cb(null, params);
- });
- }
- }, {
- key: '_headKeys',
- value: function _headKeys(headLines) {
- var i;
- var keys = {};
- var match = [];
- var dmatch = [];
- var key = '';
- var val = '';
- var num = 0;
-
- for (i in headLines) {
- if (!(match = headLines[i].match(/^\s*\W?\s*([a-z 0-9]+)\s*:\s*(.*)\s*$/))) {
- continue;
- }
- key = match[1];
- val = match[2];
-
- if (dmatch = key.match(/^(\w+)\s+(\d+)$/)) {
- // Things like examples and notes can be grouped
- key = dmatch[1];
- num = dmatch[2] - 1;
- } else {
- num = 0;
- }
-
- if (!keys[key]) {
- keys[key] = [];
- }
- if (!keys[key][num]) {
- keys[key][num] = [];
- }
- keys[key][num].push(val);
- }
-
- return keys;
- }
- }]);
-
- return Util;
-}();
-
-module.exports = Util;
-//# sourceMappingURL=util.js.map \ No newline at end of file
diff --git a/node_modules/locutus/_util/util.js.map b/node_modules/locutus/_util/util.js.map
deleted file mode 100644
index 9679611..0000000
--- a/node_modules/locutus/_util/util.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/_util/util.js"],"names":["globby","require","path","fs","async","YAML","mkdirp","debug","indentString","_","esprima","Util","argv","__src","dirname","__dirname","__root","__test","globals","pattern","concurrency","authorKeys","langDefaults","c","order","function_title_template","human","packageType","inspiration_urls","function_description_template","golang","python","ruby","php","alias","allowSkip","indexOf","_reindexBuffer","_injectwebBuffer","cb","self","_runFunctionOnAll","_injectwebOne","err","indexHtml","writeFileSync","_reindexOne","indexJs","requires","sort","join","_writetestOne","runFunc","q","queue","fullpath","callback","_load","bind","params","files","sync","push","drain","filepath","dir","basefile","basename","module","line","authors","forEach","key","headKeys","flattenDeep","langPath","language","langIndexPath","catPath","category","catIndexPath","funcPath","func_name","langTitle","langData","Object","assign","warning","type","layout","title","safeDump","trim","catTitle","catData","functionTitle","replace","functionDescription","funcData","examples","example","map","lines","i","estarget","returns","dependencies","notes","note","description","function","permalink","buf","code","Error","writeFile","name","relativeSrcForTest","JSON","stringify","subdir","testpath","testdir","relativeSrcForTestDir","relative","relativeTestFileForRoot","testProps","test","describeSkip","codez","global","_addRequire","length","humanIndex","parseInt","itSkip","body","testExpected","j","fileOrName","requesterParams","substr","msg","readFile","_opener","_parse","depCodePath","loaded","_findDependencies","parts","split","shift","codepath","pop","ast","parseScript","comment","loc","range","moduleExports","filter","leftArg","node","expression","left","rightArg","right","object","property","id","exp","funcName","funcParams","p","funcLoc","firstFuncBodyElementLoc","headComments","comments","start","end","value","_headKeys","func_arguments","headLines","keys","match","dmatch","val","num","exports"],"mappings":";;;;;;AAAA,IAAIA,SAASC,QAAQ,QAAR,CAAb;AACA,IAAIC,OAAOD,QAAQ,MAAR,CAAX;AACA,IAAIE,KAAKF,QAAQ,IAAR,CAAT;AACA,IAAIG,QAAQH,QAAQ,OAAR,CAAZ;AACA,IAAII,OAAOJ,QAAQ,SAAR,CAAX;AACA,IAAIK,SAASL,QAAQ,QAAR,CAAb;AACA,IAAIM,QAAQN,QAAQ,SAAR,EAAmB,SAAnB,CAAZ;AACA,IAAIO,eAAeP,QAAQ,eAAR,CAAnB;AACA,IAAIQ,IAAIR,QAAQ,QAAR,CAAR;AACA,IAAMS,UAAUT,QAAQ,SAAR,CAAhB;;IAEMU,I;AACJ,gBAAaC,IAAb,EAAmB;AAAA;;AACjB,QAAI,CAACA,IAAL,EAAW;AACT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S,EAAb;AACA,UAAIlH,MAAM,EAAV;AACA,UAAImH,MAAM,EAAV;AACA,UAAIC,MAAM,CAAV;;AAEA,WAAKrF,CAAL,IAAUgF,SAAV,EAAqB;AACnB,YAAI,EAAEE,QAAQF,UAAUhF,CAAV,EAAakF,KAAb,CAAmB,uCAAnB,CAAV,CAAJ,EAA4E;AAC1E;AACD;AACDjH,cAAMiH,MAAM,CAAN,CAAN;AACAE,cAAMF,MAAM,CAAN,CAAN;;AAEA,YAAKC,SAASlH,IAAIiH,KAAJ,CAAU,iBAAV,CAAd,EAA6C;AAC3C;AACAjH,gBAAMkH,OAAO,CAAP,CAAN;AACAE,gBAAMF,OAAO,CAAP,IAAY,CAAlB;AACD,SAJD,MAIO;AACLE,gBAAM,CAAN;AACD;;AAED,YAAI,CAACJ,KAAKhH,GAAL,CAAL,EAAgB;AACdgH,eAAKhH,GAAL,IAAY,EAAZ;AACD;AACD,YAAI,CAACgH,KAAKhH,GAAL,EAAUoH,GAAV,CAAL,EAAqB;AACnBJ,eAAKhH,GAAL,EAAUoH,GAAV,IAAiB,EAAjB;AACD;AACDJ,aAAKhH,GAAL,EAAUoH,GAAV,EAAe9H,IAAf,CAAoB6H,GAApB;AACD;;AAED,aAAOH,IAAP;AACD;;;;;;AAGHpH,OAAOyH,OAAP,GAAiBlL,IAAjB","file":"util.js","sourcesContent":["var globby = require('globby')\nvar path = require('path')\nvar fs = require('fs')\nvar async = require('async')\nvar YAML = require('js-yaml')\nvar mkdirp = require('mkdirp')\nvar debug = require('depurar')('locutus')\nvar indentString = require('indent-string')\nvar _ = require('lodash')\nconst esprima = require('esprima')\n\nclass Util {\n constructor (argv) {\n if (!argv) {\n argv = []\n }\n this.__src = path.dirname(__dirname)\n this.__root = path.dirname(path.dirname(__dirname))\n this.__test = path.dirname(path.dirname(__dirname)) + '/test'\n\n this.globals = {}\n\n this.pattern = [this.__src + '/**/**/*.js', '!**/index.js', '!**/_util/**']\n this.concurrency = 8\n this.authorKeys = [\n 'original by',\n 'improved by',\n 'reimplemented by',\n 'parts by',\n 'bugfixed by',\n 'revised by',\n 'input by'\n ]\n\n this.langDefaults = {\n c: {\n order: 1,\n function_title_template: '[language]\\'s [category].[function] in JavaScript',\n human: 'C',\n packageType: 'header file',\n inspiration_urls: [\n '<a href=\"http://en.cppreference.com/w/c/numeric/math\">the C math.h documentation</a>',\n '<a href=\"https://sourceware.org/git/?p=glibc.git;a=tree;f=math;hb=HEAD\">the C math.h source</a>'\n ],\n function_description_template: 'Here’s what our current JavaScript equivalent to <a href=\"http://en.cppreference.com/w/c/numeric/[category]/[function]\">[language]\\'s [function] found in the [category].h header file</a> looks like.'\n },\n golang: {\n order: 2,\n function_title_template: '[language]\\'s [category].[function] in JavaScript',\n human: 'Go',\n packageType: 'package',\n inspiration_urls: [\n '<a href=\"https://golang.org/pkg/strings/\">Go strings documentation</a>',\n '<a href=\"https://golang.org/src/strings/strings.go\">Go strings source</a>',\n '<a href=\"https://golang.org/src/strings/example_test.go\">Go strings examples source</a>',\n '<a href=\"http://gophersjs.com\">GopherJS</a>'\n ],\n function_description_template: 'Here’s what our current JavaScript equivalent to <a href=\"https://golang.org/pkg/[category]/#[function]\">[language]\\'s [category].[function]</a> looks like.'\n },\n python: {\n order: 3,\n function_title_template: '[language]\\'s [category].[function] in JavaScript',\n human: 'Python',\n packageType: 'module',\n inspiration_urls: [\n '<a href=\"https://docs.python.org/3/library/string.html\">the Python 3 standard library string page</a>'\n ],\n function_description_template: 'Here’s what our current JavaScript equivalent to <a href=\"https://docs.python.org/3/library/[category].html#[category].[function]\">[language]\\'s [category].[function]</a> looks like.'\n },\n ruby: {\n order: 4,\n function_title_template: '[language]\\'s [category].[function] in JavaScript',\n human: 'Ruby',\n packageType: 'module',\n inspiration_urls: [\n '<a href=\"http://ruby-doc.org/core-2.2.2/Math.html\">the Ruby core documentation</a>'\n ],\n function_description_template: 'Here’s what our current JavaScript equivalent to <a href=\"http://ruby-doc.org/core-2.2.2/[category].html#method-c-[function]\">[language]\\'s [category].[function]</a> looks like.'\n },\n php: {\n order: 5,\n function_title_template: '[language]\\'s [function] in JavaScript',\n human: 'PHP',\n packageType: 'extension',\n inspiration_urls: [\n '<a href=\"http://php.net/manual/en/book.strings.php\">the PHP string documentation</a>',\n '<a href=\"https://github.com/php/php-src/blob/master/ext/standard/string.c#L5338\">the PHP string source</a>',\n '<a href=\"https://github.com/php/php-src/blob/master/ext/standard/tests/strings/str_pad_variation1.phpt\">a PHP str_pad test</a>'\n ],\n function_description_template: 'Here’s what our current JavaScript equivalent to <a href=\"http://php.net/manual/en/function.[functiondashed].php\">[language]\\'s [function]</a> looks like.',\n alias: [\n '/categories/',\n '/categories/array/',\n '/categories/bc/',\n '/categories/ctype/',\n '/categories/datetime/',\n '/categories/exec/',\n '/categories/filesystem/',\n '/categories/funchand/',\n '/categories/i18n/',\n '/categories/index/',\n '/categories/info/',\n '/categories/json/',\n '/categories/math/',\n '/categories/misc/',\n '/categories/net/',\n '/categories/network/',\n '/categories/pcre/',\n '/categories/strings/',\n '/categories/url/',\n '/categories/var/',\n '/categories/xdiff/',\n '/categories/xml/',\n '/functions/index/',\n '/functions/',\n '/packages/',\n '/packages/index/'\n ]\n }\n }\n\n this.allowSkip = (argv.indexOf('--noskip') === -1)\n\n this._reindexBuffer = {}\n this._injectwebBuffer = {}\n }\n\n injectweb (cb) {\n var self = this\n this._runFunctionOnAll(this._injectwebOne, function (err) {\n if (err) {\n return cb(err)\n }\n for (var indexHtml in self._injectwebBuffer) {\n debug('writing: ' + indexHtml)\n fs.writeFileSync(indexHtml, self._injectwebBuffer[indexHtml], 'utf-8')\n }\n })\n }\n\n reindex (cb) {\n var self = this\n self._reindexBuffer = {}\n self._runFunctionOnAll(self._reindexOne, function (err) {\n if (err) {\n return cb(err)\n }\n for (var indexJs in self._reindexBuffer) {\n var requires = self._reindexBuffer[indexJs]\n requires.sort()\n debug('writing: ' + indexJs)\n fs.writeFileSync(indexJs, requires.join('\\n') + '\\n', 'utf-8')\n }\n })\n }\n\n writetests (cb) {\n this._runFunctionOnAll(this._writetestOne, cb)\n }\n\n _runFunctionOnAll (runFunc, cb) {\n var self = this\n\n var q = async.queue(function (fullpath, callback) {\n self._load.bind(self, fullpath, {}, function (err, params) {\n if (err) {\n return callback(err)\n }\n\n runFunc.bind(self, params, callback)()\n })()\n }, self.concurrency)\n\n debug({\n pattern: self.pattern\n })\n var files = globby.sync(self.pattern)\n\n q.push(files)\n\n q.drain = cb\n }\n\n _reindexOne (params, cb) {\n var fullpath = this.__src + '/' + params.filepath\n var dir = path.dirname(fullpath)\n var basefile = path.basename(fullpath, '.js')\n var indexJs = dir + '/index.js'\n\n var module = basefile\n if (basefile === 'Index2') {\n module = 'Index'\n }\n\n if (!this._reindexBuffer[indexJs]) {\n this._reindexBuffer[indexJs] = []\n }\n\n var line = 'module.exports[\\'' + module + '\\'] = require(\\'./' + basefile + '\\')'\n this._reindexBuffer[indexJs].push(line)\n return cb(null)\n }\n\n _injectwebOne (params, cb) {\n var authors = {}\n this.authorKeys.forEach(function (key) {\n if (params.headKeys[key]) {\n authors[key] = _.flattenDeep(params.headKeys[key])\n }\n })\n\n var langPath = [\n this.__root,\n '/website/source/',\n params.language\n ].join('')\n\n var langIndexPath = langPath + '/index.html'\n var catPath = langPath + '/' + params.category\n var catIndexPath = catPath + '/' + 'index.html'\n var funcPath = catPath + '/' + params.func_name + '.html'\n\n if (!this._injectwebBuffer[langIndexPath]) {\n var langTitle = ''\n langTitle += this.langDefaults[params.language].human + ' '\n langTitle += this.langDefaults[params.language].packageType + 's '\n langTitle += ' in JavaScript'\n\n var langData = Object.assign({}, this.langDefaults[params.language], {\n warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand',\n type: 'language',\n layout: 'language',\n language: params.language,\n title: langTitle\n })\n this._injectwebBuffer[langIndexPath] = '---' + '\\n' + YAML.safeDump(langData).trim() + '\\n' + '---' + '\\n'\n }\n\n if (!this._injectwebBuffer[catIndexPath]) {\n var catTitle = ''\n catTitle += this.langDefaults[params.language].human + '\\'s '\n catTitle += params.category + ' '\n catTitle += this.langDefaults[params.language].packageType + ' '\n catTitle += ' in JavaScript'\n\n var catData = {\n warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand',\n type: 'category',\n layout: 'category',\n language: params.language,\n category: params.category,\n title: catTitle\n }\n this._injectwebBuffer[catIndexPath] = '---' + '\\n' + YAML.safeDump(catData).trim() + '\\n' + '---' + '\\n'\n }\n\n var functionTitle = this.langDefaults[params.language].function_title_template\n .replace(/\\[language]/g, this.langDefaults[params.language].human)\n .replace(/\\[category]/g, params.category)\n .replace(/\\[function]/g, params.func_name)\n .replace(/\\[functiondashed]/g, params.func_name.replace(/_/g, '-'))\n\n var functionDescription = this.langDefaults[params.language].function_description_template\n .replace(/\\[language]/g, this.langDefaults[params.language].human)\n .replace(/\\[category]/g, params.category)\n .replace(/\\[function]/g, params.func_name)\n .replace(/\\[functiondashed]/g, params.func_name.replace(/_/g, '-'))\n\n var funcData = {\n warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand',\n examples: (params.headKeys.example || []).map(function (lines, i) {\n return lines.join('\\n')\n }),\n estarget: (params.headKeys.estarget || []).map(function (lines, i) {\n return lines.join('\\n')\n }).join('\\n').trim() || 'es5',\n returns: (params.headKeys.returns || []).map(function (lines, i) {\n return lines.join('\\n')\n }),\n dependencies: [],\n authors: authors || {},\n notes: (params.headKeys.note || []).map(function (lines, i) {\n return lines.join('\\n')\n }),\n type: 'function',\n layout: 'function',\n title: functionTitle,\n description: functionDescription,\n function: params.func_name,\n category: params.category,\n language: params.language,\n permalink: params.language + '/' + params.category + '/' + params.func_name + '/',\n alias: [\n '/functions/' + params.language + '/' + params.func_name + '/',\n '/functions/' + params.category + '/' + params.func_name + '/',\n '/' + params.language + '/' + params.func_name + '/'\n ]\n }\n\n if (params.language === 'php') {\n funcData.alias.push('/functions/' + params.func_name + '/')\n }\n\n var buf = '---' + '\\n' + YAML.safeDump(funcData).trim() + '\\n' + '---' + '\\n'\n\n buf += `{% codeblock lang:javascript %}${params.code}{% endcodeblock %}`\n\n mkdirp(path.dirname(funcPath), function (err) {\n if (err) {\n throw new Error('Could not mkdir for ' + funcPath + '. ' + err)\n }\n fs.writeFile(funcPath, buf, 'utf-8', cb)\n })\n }\n\n _addRequire (name, relativeSrcForTest) {\n return [\n 'var ',\n name,\n ' = require(\\'',\n relativeSrcForTest,\n '\\') // eslint-disable-line no-unused-vars,camelcase'\n ].join('')\n }\n\n _writetestOne (params, cb) {\n var self = this\n\n if (!params.func_name) {\n throw new Error('No func_name in ' + JSON.stringify(params))\n }\n if (!params.headKeys) {\n throw new Error('No headKeys in ' + params.func_name)\n }\n if (!params.headKeys.example) {\n throw new Error('No example in ' + params.func_name)\n }\n\n var basename = path.basename(params.filepath)\n var subdir = path.dirname(params.filepath)\n var testpath = this.__test + '/languages/' + subdir + '/test-' + basename\n var testdir = path.dirname(testpath)\n var relativeSrcForTestDir = path.relative(testdir, self.__src)\n var relativeTestFileForRoot = path.relative(self.__root, testpath)\n\n // console.log(relativeSrcForTestDir)\n // process.exit(1)\n\n var testProps = ''\n if (params.headKeys.test) {\n testProps = params.headKeys.test[0][0]\n }\n\n var describeSkip = ''\n if (self.allowSkip && testProps.indexOf('skip-all') !== -1) {\n describeSkip = '.skip'\n }\n\n var codez = []\n\n codez.push('// warning: This file is auto generated by `npm run build:tests`')\n codez.push('// Do not edit by hand!')\n\n // Add globals\n for (var global in self.globals) {\n codez.push('var ' + global + ' = ' + self.globals[global])\n }\n\n // Set timezone for testing dates\n // Not ideal: http://stackoverflow.com/questions/8083410/how-to-set-default-timezone-in-node-js\n codez.push('process.env.TZ = \\'UTC\\'')\n\n codez.push('var ' + 'expect' + ' = require(\\'chai\\').expect')\n\n // Add language-wide dependencies\n // @todo: It would be great if we could remove this\n if (params.language === 'php') {\n codez.push(self._addRequire('ini_set', relativeSrcForTestDir + '/' + 'php/info/ini_set'))\n codez.push(self._addRequire('ini_get', relativeSrcForTestDir + '/' + 'php/info/ini_get'))\n if (params.func_name === 'localeconv') {\n codez.push(self._addRequire(\n 'setlocale',\n relativeSrcForTestDir + '/' + 'php/strings/setlocale'\n ))\n }\n if (params.func_name === 'i18n_loc_get_default') {\n codez.push(self._addRequire(\n 'i18n_loc_set_default',\n relativeSrcForTestDir + '/' + 'php/i18n/i18n_loc_set_default'\n ))\n }\n }\n\n // Add the main function to test\n codez.push(self._addRequire(\n params.func_name,\n relativeSrcForTestDir + '/' + params.filepath\n ))\n\n codez.push('')\n\n codez.push([\n 'describe',\n describeSkip,\n '(\\'src/',\n params.filepath,\n ' (tested in ',\n relativeTestFileForRoot,\n ')\\', function () {'\n ].join(''))\n\n // Run each example\n for (var i in params.headKeys.example) {\n if (!params.headKeys.returns[i] || !params.headKeys.returns[i].length) {\n throw new Error('There is no return for example ' + i, test, params)\n }\n\n var humanIndex = parseInt(i, 10) + 1\n var itSkip = ''\n if (self.allowSkip && testProps.indexOf('skip-' + humanIndex) !== -1) {\n itSkip = '.skip'\n }\n\n codez.push([\n ' it',\n itSkip,\n '(\\'should pass example ',\n (humanIndex),\n '\\', function (done) {'\n ].join(''))\n\n var body = []\n\n var testExpected = params.headKeys.returns[i].join('\\n')\n\n body.push('var expected = ' + testExpected)\n\n // Execute line by line (see date.js why)\n // We need result be the last result of the example code\n for (var j in params.headKeys.example[i]) {\n if (parseInt(j, 10) === params.headKeys.example[i].length - 1) {\n // last action gets saved\n body.push('var result = ' + params.headKeys.example[i][j].replace('var $result = ', ''))\n } else {\n body.push(params.headKeys.example[i][j])\n }\n }\n\n body.push('expect(result).to.deep.equal(expected)')\n body.push('done()')\n\n codez.push(indentString(body.join('\\n'), ' ', 4))\n\n codez.push(' })')\n }\n\n codez.push('})')\n codez.push('')\n\n var code = codez.join('\\n')\n\n // Write to disk\n mkdirp(testdir, function (err) {\n if (err) {\n throw new Error(err)\n }\n debug('writing: ' + testpath)\n fs.writeFile(testpath, code, 'utf-8', cb)\n })\n }\n\n // Environment-specific file opener. function name needs to\n // be translated to code. The difficulty is in finding the\n // category.\n _opener (fileOrName, requesterParams, cb) {\n var self = this\n var pattern\n\n var language = requesterParams.language || '*'\n\n if (path.basename(fileOrName, '.js').indexOf('.') !== -1) {\n // periods in the basename, like: unicode.utf8.RuneCountInString or strings.sprintf\n pattern = self.__src + '/' + language + '/' + fileOrName.replace(/\\./g, '/') + '.js'\n } else if (fileOrName.indexOf('/') === -1) {\n // no slashes, like: sprintf\n pattern = self.__src + '/' + language + '/*/' + fileOrName + '.js'\n } else if (fileOrName.substr(0, 1) === '/') {\n // absolute path, like: /Users/john/code/locutus/php/strings/sprintf.js\n pattern = fileOrName\n } else {\n // relative path, like: php/strings/sprintf.js\n pattern = self.__src + '/' + fileOrName\n }\n\n pattern = pattern.replace('golang/strings/Index.js', 'golang/strings/Index2.js')\n debug('loading: ' + pattern)\n var files = globby.sync(pattern, {})\n\n if (files.length !== 1) {\n var msg = `Found ${files.length} occurances of ${fileOrName} via pattern: ${pattern}`\n return cb(new Error(msg))\n }\n\n var filepath = files[0]\n\n if (path.basename(filepath) === 'index.js') {\n return cb(null)\n }\n\n if (!filepath) {\n return cb(new Error('Could not find ' + pattern))\n }\n\n fs.readFile(filepath, 'utf-8', function (err, code) {\n if (err) {\n return cb(new Error('Error while opening ' + filepath + '. ' + err))\n }\n return cb(null, filepath, code)\n })\n }\n\n _load (fileOrName, requesterParams, cb) {\n var self = this\n self._opener(fileOrName, requesterParams, function (err, fullpath, code) {\n if (err) {\n return cb(err)\n }\n\n var filepath = path.relative(self.__src, fullpath)\n self._parse(filepath, code, cb)\n })\n }\n\n _findDependencies (fileOrName, requesterParams, dependencies, cb) {\n var self = this\n\n if (!requesterParams.headKeys['depends on'] || !requesterParams.headKeys['depends on'].length) {\n if (cb) {\n cb(null, {})\n }\n return\n }\n\n var i\n var depCodePath\n var loaded = 0\n for (i in requesterParams.headKeys['depends on']) {\n depCodePath = requesterParams.headKeys['depends on'][i][0]\n\n self._load(depCodePath, requesterParams, function (err, params) {\n if (err) {\n return cb(err)\n }\n\n dependencies[depCodePath] = params\n self._findDependencies(depCodePath, params, dependencies)\n\n if (cb && ++loaded === requesterParams.headKeys['depends on'].length) {\n cb(null, dependencies)\n }\n })\n }\n }\n\n _parse (filepath, code, cb) {\n if (!code) {\n return cb(new Error('Unable to parse ' + filepath + '. Received no code'))\n }\n\n if (filepath.indexOf('/') === -1) {\n return cb(new Error('Parse only accepts relative filepaths. Received: \\'' + filepath + '\\''))\n }\n\n var parts = filepath.split('/')\n var language = parts.shift()\n var codepath = parts.join('.')\n var name = parts.pop()\n var category = parts.join('.')\n\n var ast = esprima.parseScript(code, { comment: true, loc: true, range: true })\n\n // find module.exports in the code\n var moduleExports = ast.body.filter(node => {\n try {\n var leftArg = node.expression.left\n var rightArg = node.expression.right\n\n return leftArg.object.name === 'module' &&\n leftArg.property.name === 'exports' &&\n rightArg.type === 'FunctionExpression' &&\n rightArg.id.type === 'Identifier' &&\n !!rightArg.id.name\n } catch (err) {\n return false\n }\n })\n\n // if file contains more than one export, fail\n if (moduleExports.length !== 1) {\n return cb(Error(`File ${filepath} is allowed to contain exactly one module.exports`))\n }\n\n // get the only export\n var exp = moduleExports[0]\n\n // look for function name and param list\n var funcName = exp.expression.right.id.name\n var funcParams = exp.expression.right.params.map(p => p.name)\n\n // remember the lines where the function is defined\n var funcLoc = exp.expression.right.loc\n\n // since comments are not included in the AST\n // but are offered in ast.comments\n // remember the location of first function body statement/expression\n var firstFuncBodyElementLoc = exp.expression.right.body.body[0].loc\n\n // get all line comments which are located between function signature definition\n // and first function body element\n var headComments = ast.comments.filter(c =>\n c.type === 'Line' &&\n c.loc.start.line >= funcLoc.start.line &&\n c.loc.end.line <= firstFuncBodyElementLoc.start.line).map(c => c.value.trim())\n\n if (headComments.length === 0) {\n var msg = `Unable to parse ${filepath}. Did not find any comments in function definition`\n return cb(new Error(msg))\n }\n\n var headKeys = this._headKeys(headComments)\n\n var params = {\n headKeys: headKeys,\n name: name,\n filepath: filepath,\n codepath: codepath,\n // code: code,\n language: language,\n category: category,\n func_name: funcName,\n func_arguments: funcParams\n }\n\n this._findDependencies(filepath, params, {}, function (err, dependencies) {\n if (err) {\n return cb(err)\n }\n\n params.dependencies = dependencies\n return cb(null, params)\n })\n }\n\n _headKeys (headLines) {\n var i\n var keys = {}\n var match = []\n var dmatch = []\n var key = ''\n var val = ''\n var num = 0\n\n for (i in headLines) {\n if (!(match = headLines[i].match(/^\\s*\\W?\\s*([a-z 0-9]+)\\s*:\\s*(.*)\\s*$/))) {\n continue\n }\n key = match[1]\n val = match[2]\n\n if ((dmatch = key.match(/^(\\w+)\\s+(\\d+)$/))) {\n // Things like examples and notes can be grouped\n key = dmatch[1]\n num = dmatch[2] - 1\n } else {\n num = 0\n }\n\n if (!keys[key]) {\n keys[key] = []\n }\n if (!keys[key][num]) {\n keys[key][num] = []\n }\n keys[key][num].push(val)\n }\n\n return keys\n }\n}\n\nmodule.exports = Util\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/c/index.js b/node_modules/locutus/c/index.js
deleted file mode 100644
index 784393d..0000000
--- a/node_modules/locutus/c/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['math'] = require('./math');
-module.exports['stdio'] = require('./stdio');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/c/index.js.map b/node_modules/locutus/c/index.js.map
deleted file mode 100644
index 59ce353..0000000
--- a/node_modules/locutus/c/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/c/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B","file":"index.js","sourcesContent":["module.exports['math'] = require('./math')\nmodule.exports['stdio'] = require('./stdio')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/c/math/abs.js b/node_modules/locutus/c/math/abs.js
deleted file mode 100644
index c329bf3..0000000
--- a/node_modules/locutus/c/math/abs.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-module.exports = function abs(mixedNumber) {
- // discuss at: http://locutus.io/c/abs/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // improved by: Karol Kowalski
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // example 1: abs(4.2)
- // returns 1: 4.2
- // example 2: abs(-4.2)
- // returns 2: 4.2
- // example 3: abs(-5)
- // returns 3: 5
- // example 4: abs('_argos')
- // returns 4: 0
-
- return Math.abs(mixedNumber) || 0;
-};
-//# sourceMappingURL=abs.js.map \ No newline at end of file
diff --git a/node_modules/locutus/c/math/abs.js.map b/node_modules/locutus/c/math/abs.js.map
deleted file mode 100644
index 27a0950..0000000
--- a/node_modules/locutus/c/math/abs.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/c/math/abs.js"],"names":["module","exports","abs","mixedNumber","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,WAAd,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,GAAL,CAASC,WAAT,KAAyB,CAAhC;AACD,CAhBD","file":"abs.js","sourcesContent":["module.exports = function abs (mixedNumber) {\n // discuss at: http://locutus.io/c/abs/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // improved by: Karol Kowalski\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // example 1: abs(4.2)\n // returns 1: 4.2\n // example 2: abs(-4.2)\n // returns 2: 4.2\n // example 3: abs(-5)\n // returns 3: 5\n // example 4: abs('_argos')\n // returns 4: 0\n\n return Math.abs(mixedNumber) || 0\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/c/math/frexp.js b/node_modules/locutus/c/math/frexp.js
deleted file mode 100644
index 876e2f5..0000000
--- a/node_modules/locutus/c/math/frexp.js
+++ /dev/null
@@ -1,75 +0,0 @@
-"use strict";
-
-module.exports = function frexp(arg) {
- // discuss at: http://locutus.io/c/frexp/
- // original by: Oskar Larsson Högfeldt (http://oskar-lh.name/)
- // note 1: Instead of
- // note 1: double frexp( double arg, int* exp );
- // note 1: this is built as
- // note 1: [double, int] frexp( double arg );
- // note 1: due to the lack of pointers in JavaScript.
- // note 1: See code comments for further information.
- // example 1: frexp(1)
- // returns 1: [0.5, 1]
- // example 2: frexp(1.5)
- // returns 2: [0.75, 1]
- // example 3: frexp(3 * Math.pow(2, 500))
- // returns 3: [0.75, 502]
- // example 4: frexp(-4)
- // returns 4: [-0.5, 3]
- // example 5: frexp(Number.MAX_VALUE)
- // returns 5: [0.9999999999999999, 1024]
- // example 6: frexp(Number.MIN_VALUE)
- // returns 6: [0.5, -1073]
- // example 7: frexp(-Infinity)
- // returns 7: [-Infinity, 0]
- // example 8: frexp(-0)
- // returns 8: [-0, 0]
- // example 9: frexp(NaN)
- // returns 9: [NaN, 0]
-
- // Potential issue with this implementation:
- // the precisions of Math.pow and the ** operator are undefined in the ECMAScript standard,
- // however, sane implementations should give the same results for Math.pow(2, <integer>) operations
-
- // Like frexp of C and std::frexp of C++,
- // but returns an array instead of using a pointer argument for passing the exponent result.
- // Object.is(n, frexp(n)[0] * 2 ** frexp(n)[1]) for all number values of n except when Math.isFinite(n) && Math.abs(n) > 2**1023
- // Object.is(n, (2 * frexp(n)[0]) * 2 ** (frexp(n)[1] - 1)) for all number values of n
- // Object.is(n, frexp(n)[0]) for these values of n: 0, -0, NaN, Infinity, -Infinity
- // Math.abs(frexp(n)[0]) is >= 0.5 and < 1.0 for any other number-type value of n
- // See http://en.cppreference.com/w/c/numeric/math/frexp for a more detailed description
-
- arg = Number(arg);
-
- var result = [arg, 0];
-
- if (arg !== 0 && Number.isFinite(arg)) {
- var absArg = Math.abs(arg);
- // Math.log2 was introduced in ES2015, use it when available
- var log2 = Math.log2 || function log2(n) {
- return Math.log(n) * Math.LOG2E;
- };
- var exp = Math.max(-1023, Math.floor(log2(absArg)) + 1);
- var x = absArg * Math.pow(2, -exp);
-
- // These while loops compensate for rounding errors that sometimes occur because of ECMAScript's Math.log2's undefined precision
- // and also works around the issue of Math.pow(2, -exp) === Infinity when exp <= -1024
- while (x < 0.5) {
- x *= 2;
- exp--;
- }
- while (x >= 1) {
- x *= 0.5;
- exp++;
- }
-
- if (arg < 0) {
- x = -x;
- }
- result[0] = x;
- result[1] = exp;
- }
- return result;
-};
-//# sourceMappingURL=frexp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/c/math/frexp.js.map b/node_modules/locutus/c/math/frexp.js.map
deleted file mode 100644
index 461d0ff..0000000
--- a/node_modules/locutus/c/math/frexp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/c/math/frexp.js"],"names":["module","exports","frexp","arg","Number","result","isFinite","absArg","Math","abs","log2","n","log","LOG2E","exp","max","floor","x","pow"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,QAAMC,OAAOD,GAAP,CAAN;;AAEA,MAAME,SAAS,CAACF,GAAD,EAAM,CAAN,CAAf;;AAEA,MAAIA,QAAQ,CAAR,IAAaC,OAAOE,QAAP,CAAgBH,GAAhB,CAAjB,EAAuC;AACrC,QAAMI,SAASC,KAAKC,GAAL,CAASN,GAAT,CAAf;AACA;AACA,QAAMO,OAAOF,KAAKE,IAAL,IAAa,SAASA,IAAT,CAAeC,CAAf,EAAkB;AAAE,aAAOH,KAAKI,GAAL,CAASD,CAAT,IAAcH,KAAKK,KAA1B;AAAiC,KAA/E;AACA,QAAIC,MAAMN,KAAKO,GAAL,CAAS,CAAC,IAAV,EAAgBP,KAAKQ,KAAL,CAAWN,KAAKH,MAAL,CAAX,IAA2B,CAA3C,CAAV;AACA,QAAIU,IAAIV,SAASC,KAAKU,GAAL,CAAS,CAAT,EAAY,CAACJ,GAAb,CAAjB;;AAEA;AACA;AACA,WAAOG,IAAI,GAAX,EAAgB;AACdA,WAAK,CAAL;AACAH;AACD;AACD,WAAOG,KAAK,CAAZ,EAAe;AACbA,WAAK,GAAL;AACAH;AACD;;AAED,QAAIX,MAAM,CAAV,EAAa;AACXc,UAAI,CAACA,CAAL;AACD;AACDZ,WAAO,CAAP,IAAYY,CAAZ;AACAZ,WAAO,CAAP,IAAYS,GAAZ;AACD;AACD,SAAOT,MAAP;AACD,CArED","file":"frexp.js","sourcesContent":["module.exports = function frexp (arg) {\n // discuss at: http://locutus.io/c/frexp/\n // original by: Oskar Larsson Högfeldt (http://oskar-lh.name/)\n // note 1: Instead of\n // note 1: double frexp( double arg, int* exp );\n // note 1: this is built as\n // note 1: [double, int] frexp( double arg );\n // note 1: due to the lack of pointers in JavaScript.\n // note 1: See code comments for further information.\n // example 1: frexp(1)\n // returns 1: [0.5, 1]\n // example 2: frexp(1.5)\n // returns 2: [0.75, 1]\n // example 3: frexp(3 * Math.pow(2, 500))\n // returns 3: [0.75, 502]\n // example 4: frexp(-4)\n // returns 4: [-0.5, 3]\n // example 5: frexp(Number.MAX_VALUE)\n // returns 5: [0.9999999999999999, 1024]\n // example 6: frexp(Number.MIN_VALUE)\n // returns 6: [0.5, -1073]\n // example 7: frexp(-Infinity)\n // returns 7: [-Infinity, 0]\n // example 8: frexp(-0)\n // returns 8: [-0, 0]\n // example 9: frexp(NaN)\n // returns 9: [NaN, 0]\n\n // Potential issue with this implementation:\n // the precisions of Math.pow and the ** operator are undefined in the ECMAScript standard,\n // however, sane implementations should give the same results for Math.pow(2, <integer>) operations\n\n // Like frexp of C and std::frexp of C++,\n // but returns an array instead of using a pointer argument for passing the exponent result.\n // Object.is(n, frexp(n)[0] * 2 ** frexp(n)[1]) for all number values of n except when Math.isFinite(n) && Math.abs(n) > 2**1023\n // Object.is(n, (2 * frexp(n)[0]) * 2 ** (frexp(n)[1] - 1)) for all number values of n\n // Object.is(n, frexp(n)[0]) for these values of n: 0, -0, NaN, Infinity, -Infinity\n // Math.abs(frexp(n)[0]) is >= 0.5 and < 1.0 for any other number-type value of n\n // See http://en.cppreference.com/w/c/numeric/math/frexp for a more detailed description\n\n arg = Number(arg)\n\n const result = [arg, 0]\n\n if (arg !== 0 && Number.isFinite(arg)) {\n const absArg = Math.abs(arg)\n // Math.log2 was introduced in ES2015, use it when available\n const log2 = Math.log2 || function log2 (n) { return Math.log(n) * Math.LOG2E }\n let exp = Math.max(-1023, Math.floor(log2(absArg)) + 1)\n let x = absArg * Math.pow(2, -exp)\n\n // These while loops compensate for rounding errors that sometimes occur because of ECMAScript's Math.log2's undefined precision\n // and also works around the issue of Math.pow(2, -exp) === Infinity when exp <= -1024\n while (x < 0.5) {\n x *= 2\n exp--\n }\n while (x >= 1) {\n x *= 0.5\n exp++\n }\n\n if (arg < 0) {\n x = -x\n }\n result[0] = x\n result[1] = exp\n }\n return result\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/c/math/index.js b/node_modules/locutus/c/math/index.js
deleted file mode 100644
index 8c55887..0000000
--- a/node_modules/locutus/c/math/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['abs'] = require('./abs');
-module.exports['frexp'] = require('./frexp');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/c/math/index.js.map b/node_modules/locutus/c/math/index.js.map
deleted file mode 100644
index fe8b3a1..0000000
--- a/node_modules/locutus/c/math/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/c/math/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B","file":"index.js","sourcesContent":["module.exports['abs'] = require('./abs')\nmodule.exports['frexp'] = require('./frexp')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/c/stdio/index.js b/node_modules/locutus/c/stdio/index.js
deleted file mode 100644
index 758c66d..0000000
--- a/node_modules/locutus/c/stdio/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['sprintf'] = require('./sprintf');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/c/stdio/index.js.map b/node_modules/locutus/c/stdio/index.js.map
deleted file mode 100644
index 5542070..0000000
--- a/node_modules/locutus/c/stdio/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/c/stdio/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B","file":"index.js","sourcesContent":["module.exports['sprintf'] = require('./sprintf')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/c/stdio/sprintf.js b/node_modules/locutus/c/stdio/sprintf.js
deleted file mode 100644
index c7d0cad..0000000
--- a/node_modules/locutus/c/stdio/sprintf.js
+++ /dev/null
@@ -1,135 +0,0 @@
-'use strict';
-
-function pad(str, minLength, padChar, leftJustify) {
- var diff = minLength - str.length;
- var padStr = padChar.repeat(Math.max(0, diff));
-
- return leftJustify ? str + padStr : padStr + str;
-}
-
-module.exports = function sprintf(format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- // original by: Rafał Kukawski
- // example 1: sprintf('%+10.*d', 5, 1)
- // returns 1: ' +00001'
- var placeholderRegex = /%(?:(\d+)\$)?([-+#0 ]*)(\*|\d+)?(?:\.(\*|\d*))?([\s\S])/g;
-
- var index = 0;
-
- return format.replace(placeholderRegex, function (match, param, flags, width, prec, modifier) {
- var leftJustify = flags.includes('-');
-
- // flag '0' is ignored when flag '-' is present
- var padChar = leftJustify ? ' ' : flags.split('').reduce(function (pc, c) {
- return [' ', '0'].includes(c) ? c : pc;
- }, ' ');
-
- var positiveSign = flags.includes('+') ? '+' : flags.includes(' ') ? ' ' : '';
-
- var minWidth = width === '*' ? args[index++] : +width || 0;
- var precision = prec === '*' ? args[index++] : +prec;
-
- if (param && !+param) {
- throw Error('Param index must be greater than 0');
- }
-
- if (param && +param > args.length) {
- throw Error('Too few arguments');
- }
-
- // compiling with default clang params, mixed positional and non-positional params
- // give only a warning
- var arg = param ? args[param - 1] : args[index++];
-
- if (precision === undefined || isNaN(precision)) {
- precision = 'eEfFgG'.includes(modifier) ? 6 : modifier === 's' ? String(arg).length : undefined;
- }
-
- switch (modifier) {
- case '%':
- return '%';
- case 'd':
- case 'i':
- {
- var number = Math.trunc(+arg || 0);
- var abs = Math.abs(number);
- var prefix = number < 0 ? '-' : positiveSign;
-
- var str = pad(abs.toString(), precision || 0, '0', false);
-
- if (padChar === '0') {
- return prefix + pad(str, minWidth - prefix.length, padChar, leftJustify);
- }
-
- return pad(prefix + str, minWidth, padChar, leftJustify);
- }
- case 'e':
- case 'E':
- case 'f':
- case 'F':
- case 'g':
- case 'G':
- {
- var _number = +arg;
- var _abs = Math.abs(_number);
- var _prefix = _number < 0 ? '-' : positiveSign;
-
- var op = [Number.prototype.toExponential, Number.prototype.toFixed, Number.prototype.toPrecision]['efg'.indexOf(modifier.toLowerCase())];
-
- var tr = [String.prototype.toLowerCase, String.prototype.toUpperCase]['eEfFgG'.indexOf(modifier) % 2];
-
- var isSpecial = isNaN(_abs) || !isFinite(_abs);
-
- var _str = isSpecial ? _abs.toString().substr(0, 3) : op.call(_abs, precision);
-
- if (padChar === '0' && !isSpecial) {
- return _prefix + pad(tr.call(_str), minWidth - _prefix.length, padChar, leftJustify);
- }
-
- return pad(tr.call(_prefix + _str), minWidth, isSpecial ? ' ' : padChar, leftJustify);
- }
- case 'b':
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- {
- var _number2 = +arg || 0;
- var intVal = Math.trunc(_number2) + (_number2 < 0 ? 0xFFFFFFFF + 1 : 0);
- var base = [2, 8, 10, 16, 16]['bouxX'.indexOf(modifier)];
- var _prefix2 = intVal && flags.includes('#') ? ['', '0', '', '0x', '0X']['bouxXX'.indexOf(modifier)] : '';
-
- if (padChar === '0' && _prefix2) {
- return _prefix2 + pad(pad(intVal.toString(base), precision, '0', false), minWidth - _prefix2.length, padChar, leftJustify);
- }
-
- return pad(_prefix2 + pad(intVal.toString(base), precision, '0', false), minWidth, padChar, leftJustify);
- }
- case 'p':
- case 'n':
- {
- throw Error('\'' + modifier + '\' modifier not supported');
- }
- case 's':
- {
- return pad(String(arg).substr(0, precision), minWidth, padChar, leftJustify);
- }
- case 'c':
- {
- // extension, if arg is string, take first char
- var chr = typeof arg === 'string' ? arg.charAt(0) : String.fromCharCode(+arg);
- return pad(chr, minWidth, padChar, leftJustify);
- }
- case 'a':
- case 'A':
- throw Error('\'' + modifier + '\' modifier not yet implemented');
- default:
- // for unknown modifiers, return the modifier char
- return modifier;
- }
- });
-};
-//# sourceMappingURL=sprintf.js.map \ No newline at end of file
diff --git a/node_modules/locutus/c/stdio/sprintf.js.map b/node_modules/locutus/c/stdio/sprintf.js.map
deleted file mode 100644
index 6a2ddbb..0000000
--- a/node_modules/locutus/c/stdio/sprintf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/c/stdio/sprintf.js"],"names":["pad","str","minLength","padChar","leftJustify","diff","length","padStr","repeat","Math","max","module","exports","sprintf","format","args","placeholderRegex","index","replace","match","param","flags","width","prec","modifier","includes","split","reduce","pc","c","positiveSign","minWidth","precision","Error","arg","undefined","isNaN","String","number","trunc","abs","prefix","toString","op","Number","prototype","toExponential","toFixed","toPr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AC3B,GAArB,CAAtD;AACA,iBAAOlC,IAAI2D,GAAJ,EAAS5B,QAAT,EAAmB5B,OAAnB,EAA4BC,WAA5B,CAAP;AACD;AACD,WAAK,GAAL;AACA,WAAK,GAAL;AACE,cAAM6B,aAAUT,QAAV,qCAAN;AACF;AACE;AACA,eAAOA,QAAP;AAjFJ;AAmFD,GA/GM,CAAP;AAgHD,CAxHD","file":"sprintf.js","sourcesContent":["function pad (str, minLength, padChar, leftJustify) {\n const diff = minLength - str.length\n const padStr = padChar.repeat(Math.max(0, diff))\n\n return leftJustify ? str + padStr : padStr + str\n}\n\nmodule.exports = function sprintf (format, ...args) {\n // original by: Rafał Kukawski\n // example 1: sprintf('%+10.*d', 5, 1)\n // returns 1: ' +00001'\n const placeholderRegex = /%(?:(\\d+)\\$)?([-+#0 ]*)(\\*|\\d+)?(?:\\.(\\*|\\d*))?([\\s\\S])/g\n\n let index = 0\n\n return format.replace(placeholderRegex, function (match, param, flags, width, prec, modifier) {\n const leftJustify = flags.includes('-')\n\n // flag '0' is ignored when flag '-' is present\n const padChar = leftJustify ? ' '\n : flags.split('').reduce((pc, c) => [' ', '0'].includes(c) ? c : pc, ' ')\n\n const positiveSign = flags.includes('+') ? '+' : flags.includes(' ') ? ' ' : ''\n\n const minWidth = width === '*' ? args[index++] : +width || 0\n let precision = prec === '*' ? args[index++] : +prec\n\n if (param && !+param) {\n throw Error(`Param index must be greater than 0`)\n }\n\n if (param && +param > args.length) {\n throw Error(`Too few arguments`)\n }\n\n // compiling with default clang params, mixed positional and non-positional params\n // give only a warning\n const arg = param ? args[param - 1] : args[index++]\n\n if (precision === undefined || isNaN(precision)) {\n precision = 'eEfFgG'.includes(modifier) ? 6 : (modifier === 's' ? String(arg).length : undefined)\n }\n\n switch (modifier) {\n case '%':\n return '%'\n case 'd':\n case 'i': {\n const number = Math.trunc(+arg || 0)\n const abs = Math.abs(number)\n const prefix = number < 0 ? '-' : positiveSign\n\n const str = pad(abs.toString(), precision || 0, '0', false)\n\n if (padChar === '0') {\n return prefix + pad(str, minWidth - prefix.length, padChar, leftJustify)\n }\n\n return pad(prefix + str, minWidth, padChar, leftJustify)\n }\n case 'e':\n case 'E':\n case 'f':\n case 'F':\n case 'g':\n case 'G': {\n const number = +arg\n const abs = Math.abs(number)\n const prefix = number < 0 ? '-' : positiveSign\n\n const op = [\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision\n ]['efg'.indexOf(modifier.toLowerCase())]\n\n const tr = [\n String.prototype.toLowerCase,\n String.prototype.toUpperCase\n ]['eEfFgG'.indexOf(modifier) % 2]\n\n const isSpecial = isNaN(abs) || !isFinite(abs)\n\n let str = isSpecial ? abs.toString().substr(0, 3) : op.call(abs, precision)\n\n if (padChar === '0' && !isSpecial) {\n return prefix + pad(tr.call(str), minWidth - prefix.length, padChar, leftJustify)\n }\n\n return pad(tr.call(prefix + str), minWidth, isSpecial ? ' ' : padChar, leftJustify)\n }\n case 'b':\n case 'o':\n case 'u':\n case 'x':\n case 'X': {\n const number = +arg || 0\n const intVal = Math.trunc(number) + (number < 0 ? 0xFFFFFFFF + 1 : 0)\n const base = [2, 8, 10, 16, 16]['bouxX'.indexOf(modifier)]\n const prefix = intVal && flags.includes('#') ? ['', '0', '', '0x', '0X']['bouxXX'.indexOf(modifier)] : ''\n\n if (padChar === '0' && prefix) {\n return prefix + pad(pad(intVal.toString(base), precision, '0', false), minWidth - prefix.length, padChar, leftJustify)\n }\n\n return pad(prefix + pad(intVal.toString(base), precision, '0', false), minWidth, padChar, leftJustify)\n }\n case 'p':\n case 'n': {\n throw Error(`'${modifier}' modifier not supported`)\n }\n case 's': {\n return pad(String(arg).substr(0, precision), minWidth, padChar, leftJustify)\n }\n case 'c': {\n // extension, if arg is string, take first char\n const chr = typeof arg === 'string' ? arg.charAt(0) : String.fromCharCode(+arg)\n return pad(chr, minWidth, padChar, leftJustify)\n }\n case 'a':\n case 'A':\n throw Error(`'${modifier}' modifier not yet implemented`)\n default:\n // for unknown modifiers, return the modifier char\n return modifier\n }\n })\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/golang/index.js b/node_modules/locutus/golang/index.js
deleted file mode 100644
index d9ef169..0000000
--- a/node_modules/locutus/golang/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['strings'] = require('./strings');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/golang/index.js.map b/node_modules/locutus/golang/index.js.map
deleted file mode 100644
index 3bbd683..0000000
--- a/node_modules/locutus/golang/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/golang/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B","file":"index.js","sourcesContent":["module.exports['strings'] = require('./strings')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/Contains.js b/node_modules/locutus/golang/strings/Contains.js
deleted file mode 100644
index 32659c9..0000000
--- a/node_modules/locutus/golang/strings/Contains.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function Contains(s, substr) {
- // discuss at: http://locutus.io/golang/strings/Contains
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: Contains('Kevin', 'K')
- // returns 1: true
-
- return (s + '').indexOf(substr) !== -1;
-};
-//# sourceMappingURL=Contains.js.map \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/Contains.js.map b/node_modules/locutus/golang/strings/Contains.js.map
deleted file mode 100644
index 4807eda..0000000
--- a/node_modules/locutus/golang/strings/Contains.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/golang/strings/Contains.js"],"names":["module","exports","Contains","s","substr","indexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,CAAnB,EAAsBC,MAAtB,EAA8B;AAC7C;AACA;AACA;AACA;;AAEA,SAAO,CAACD,IAAI,EAAL,EAASE,OAAT,CAAiBD,MAAjB,MAA6B,CAAC,CAArC;AACD,CAPD","file":"Contains.js","sourcesContent":["module.exports = function Contains (s, substr) {\n // discuss at: http://locutus.io/golang/strings/Contains\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: Contains('Kevin', 'K')\n // returns 1: true\n\n return (s + '').indexOf(substr) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/Count.js b/node_modules/locutus/golang/strings/Count.js
deleted file mode 100644
index aaee645..0000000
--- a/node_modules/locutus/golang/strings/Count.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-module.exports = function Count(s, sep) {
- // discuss at: http://locutus.io/php/printf/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: GopherJS (http://www.gopherjs.org/)
- // example 1: Count("cheese", "e")
- // returns 1: 3
- // example 2: Count("five", "") // before & after each rune
- // returns 2: 5
-
- var pos;
- var n = 0;
-
- if (sep.length === 0) {
- return s.split(sep).length + 1;
- } else if (sep.length > s.length) {
- return 0;
- } else if (sep.length === s.length) {
- if (sep === s) {
- return 1;
- }
- return 0;
- }
- while (true) {
- pos = (s + '').indexOf(sep);
- if (pos === -1) {
- break;
- }
- n = n + 1 >> 0;
- s = s.substring(pos + sep.length >> 0);
- }
- return n;
-};
-//# sourceMappingURL=Count.js.map \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/Count.js.map b/node_modules/locutus/golang/strings/Count.js.map
deleted file mode 100644
index 1e774ac..0000000
--- a/node_modules/locutus/golang/strings/Count.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/golang/strings/Count.js"],"names":["module","exports","Count","s","sep","pos","n","length","split","indexOf","substring"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmBC,GAAnB,EAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,IAAI,CAAR;;AAEA,MAAKF,IAAIG,MAAJ,KAAe,CAApB,EAAwB;AACtB,WAAOJ,EAAEK,KAAF,CAAQJ,GAAR,EAAaG,MAAb,GAAsB,CAA7B;AACD,GAFD,MAEO,IAAIH,IAAIG,MAAJ,GAAaJ,EAAEI,MAAnB,EAA2B;AAChC,WAAO,CAAP;AACD,GAFM,MAEA,IAAKH,IAAIG,MAAJ,KAAeJ,EAAEI,MAAtB,EAA+B;AACpC,QAAIH,QAAQD,CAAZ,EAAe;AACb,aAAO,CAAP;AACD;AACD,WAAO,CAAP;AACD;AACD,SAAO,IAAP,EAAa;AACXE,UAAM,CAACF,IAAI,EAAL,EAASM,OAAT,CAAiBL,GAAjB,CAAN;AACA,QAAIC,QAAQ,CAAC,CAAb,EAAgB;AACd;AACD;AACDC,QAAIA,IAAK,CAAL,IAAW,CAAf;AACAH,QAAIA,EAAEO,SAAF,CAAaL,MAAMD,IAAIG,MAAV,IAAoB,CAAjC,CAAJ;AACD;AACD,SAAOD,CAAP;AACD,CA/BD","file":"Count.js","sourcesContent":["module.exports = function Count (s, sep) {\n // discuss at: http://locutus.io/php/printf/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: GopherJS (http://www.gopherjs.org/)\n // example 1: Count(\"cheese\", \"e\")\n // returns 1: 3\n // example 2: Count(\"five\", \"\") // before & after each rune\n // returns 2: 5\n\n var pos\n var n = 0\n\n if ((sep.length === 0)) {\n return s.split(sep).length + 1\n } else if (sep.length > s.length) {\n return 0\n } else if ((sep.length === s.length)) {\n if (sep === s) {\n return 1\n }\n return 0\n }\n while (true) {\n pos = (s + '').indexOf(sep)\n if (pos === -1) {\n break\n }\n n = n + (1) >> 0\n s = s.substring((pos + sep.length >> 0))\n }\n return n\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/Index2.js b/node_modules/locutus/golang/strings/Index2.js
deleted file mode 100644
index ba24cf4..0000000
--- a/node_modules/locutus/golang/strings/Index2.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function Index(s, sep) {
- // discuss at: http://locutus.io/golang/strings/Index
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: Index('Kevin', 'K')
- // returns 1: 0
- // example 2: Index('Kevin', 'Z')
- // returns 2: -1
-
- return (s + '').indexOf(sep);
-};
-//# sourceMappingURL=Index2.js.map \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/Index2.js.map b/node_modules/locutus/golang/strings/Index2.js.map
deleted file mode 100644
index b00e5a3..0000000
--- a/node_modules/locutus/golang/strings/Index2.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/golang/strings/Index2.js"],"names":["module","exports","Index","s","sep","indexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmBC,GAAnB,EAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACD,IAAI,EAAL,EAASE,OAAT,CAAiBD,GAAjB,CAAP;AACD,CATD","file":"Index2.js","sourcesContent":["module.exports = function Index (s, sep) {\n // discuss at: http://locutus.io/golang/strings/Index\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: Index('Kevin', 'K')\n // returns 1: 0\n // example 2: Index('Kevin', 'Z')\n // returns 2: -1\n\n return (s + '').indexOf(sep)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/LastIndex.js b/node_modules/locutus/golang/strings/LastIndex.js
deleted file mode 100644
index 2d793a6..0000000
--- a/node_modules/locutus/golang/strings/LastIndex.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-
-module.exports = function LastIndex(s, sep) {
- // discuss at: http://locutus.io/golang/strings/LastIndex
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: GopherJS (http://www.gopherjs.org/)
- // example 1: LastIndex('go gopher', 'go')
- // returns 1: 3
- // example 2: LastIndex('go gopher', 'rodent')
- // returns 2: -1
-
- return parseInt(s.lastIndexOf(sep), 10) >> 0;
-};
-//# sourceMappingURL=LastIndex.js.map \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/LastIndex.js.map b/node_modules/locutus/golang/strings/LastIndex.js.map
deleted file mode 100644
index 8be0a84..0000000
--- a/node_modules/locutus/golang/strings/LastIndex.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/golang/strings/LastIndex.js"],"names":["module","exports","LastIndex","s","sep","parseInt","lastIndexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,CAApB,EAAuBC,GAAvB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,SAASF,EAAEG,WAAF,CAAcF,GAAd,CAAT,EAA6B,EAA7B,KAAoC,CAA3C;AACD,CAVD","file":"LastIndex.js","sourcesContent":["module.exports = function LastIndex (s, sep) {\n // discuss at: http://locutus.io/golang/strings/LastIndex\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: GopherJS (http://www.gopherjs.org/)\n // example 1: LastIndex('go gopher', 'go')\n // returns 1: 3\n // example 2: LastIndex('go gopher', 'rodent')\n // returns 2: -1\n\n return parseInt(s.lastIndexOf(sep), 10) >> 0\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/index.js b/node_modules/locutus/golang/strings/index.js
deleted file mode 100644
index f6afbd7..0000000
--- a/node_modules/locutus/golang/strings/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports['Contains'] = require('./Contains');
-module.exports['Count'] = require('./Count');
-module.exports['Index'] = require('./Index2');
-module.exports['LastIndex'] = require('./LastIndex');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/golang/strings/index.js.map b/node_modules/locutus/golang/strings/index.js.map
deleted file mode 100644
index b8579ee..0000000
--- a/node_modules/locutus/golang/strings/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/golang/strings/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,UAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B","file":"index.js","sourcesContent":["module.exports['Contains'] = require('./Contains')\nmodule.exports['Count'] = require('./Count')\nmodule.exports['Index'] = require('./Index2')\nmodule.exports['LastIndex'] = require('./LastIndex')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/index.js b/node_modules/locutus/index.js
deleted file mode 100644
index e1e8b41..0000000
--- a/node_modules/locutus/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports['c'] = require('./c');
-module.exports['golang'] = require('./golang');
-module.exports['php'] = require('./php');
-module.exports['python'] = require('./python');
-module.exports['ruby'] = require('./ruby');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/index.js.map b/node_modules/locutus/index.js.map
deleted file mode 100644
index b27a813..0000000
--- a/node_modules/locutus/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../src/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,GAAf,IAAsBC,QAAQ,KAAR,CAAtB;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB","file":"index.js","sourcesContent":["module.exports['c'] = require('./c')\nmodule.exports['golang'] = require('./golang')\nmodule.exports['php'] = require('./php')\nmodule.exports['python'] = require('./python')\nmodule.exports['ruby'] = require('./ruby')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/package.json b/node_modules/locutus/package.json
deleted file mode 100644
index cafb771..0000000
--- a/node_modules/locutus/package.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "_from": "locutus@^2.0.5",
- "_id": "locutus@2.0.10",
- "_inBundle": false,
- "_integrity": "sha512-AZg2kCqrquMJ5FehDsBidV0qHl98NrsYtseUClzjAQ3HFnsDBJTCwGVplSQ82t9/QfgahqvTjaKcZqZkHmS0wQ==",
- "_location": "/locutus",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "locutus@^2.0.5",
- "name": "locutus",
- "escapedName": "locutus",
- "rawSpec": "^2.0.5",
- "saveSpec": null,
- "fetchSpec": "^2.0.5"
- },
- "_requiredBy": [
- "/twig"
- ],
- "_resolved": "https://registry.npmjs.org/locutus/-/locutus-2.0.10.tgz",
- "_shasum": "f903619466a98a4ab76e8b87a5854b55a743b917",
- "_spec": "locutus@^2.0.5",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/twig",
- "author": {
- "name": "Kevin van Zonneveld",
- "email": "kevin@vanzonneveld.net"
- },
- "browser": {
- "fs": false,
- "child_process": false
- },
- "bugs": {
- "url": "https://github.com/kvz/locutus/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Locutus other languages' stadard libraries to JavaScript for fun and educational purposes",
- "devDependencies": {
- "async": "2.0.0-rc.3",
- "babel-cli": "6.23.0",
- "babel-core": "6.23.1",
- "babel-eslint": "7.1.1",
- "babel-plugin-add-module-exports": "0.2.1",
- "babel-plugin-es6-promise": "1.1.1",
- "babel-plugin-syntax-async-functions": "6.13.0",
- "babel-plugin-transform-async-to-generator": "6.22.0",
- "babel-plugin-transform-object-assign": "6.22.0",
- "babel-preset-es2015": "6.22.0",
- "babel-register": "6.7.2",
- "browserify": "13.0.0",
- "budo": "11.3.2",
- "chai": "3.5.0",
- "cross-env": "1.0.7",
- "depurar": "0.3.0",
- "eslint": "3.15.0",
- "eslint-config-standard": "6.2.1",
- "eslint-plugin-promise": "3.4.1",
- "eslint-plugin-standard": "2.0.1",
- "esprima": "^4.0.1",
- "fakefile": "0.0.8",
- "globby": "4.0.0",
- "indent-string": "2.1.0",
- "invig": "0.0.22",
- "js-yaml": "3.6.0",
- "lodash": "4.17.10",
- "mkdirp": "0.5.1",
- "mocha": "5.2.0",
- "npm-run-all": "1.8.0",
- "rimraf": "2.5.2",
- "strip-indent": "2.0.0"
- },
- "engines": {
- "node": ">= 0.12.0"
- },
- "homepage": "http://locutus.io",
- "keywords": [
- "php",
- "golang",
- "c",
- "ruby",
- "python",
- "js",
- "locutus"
- ],
- "license": "MIT",
- "name": "locutus",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/kvz/locutus.git"
- },
- "scripts": {
- "beautify": "env INVIG_PRETTIER=1 invig --src src",
- "browser:bundle": "browserify test/browser/app.js --outfile test/browser/bundle.js",
- "browser:watch": "budo test/browser/app.js --live --serve test/browser/bundle.js",
- "build": "npm-run-all build:*",
- "build:dist": "babel src --out-dir dist --source-maps && cp package.json dist/",
- "build:indices": "babel-node src/_util/cli.js reindex",
- "build:tests": "rimraf test/languages && babel-node src/_util/cli.js writetests",
- "build:tests:noskip": "rimraf test/languages && babel-node src/_util/cli.js writetests --noskip",
- "deploy": "npm-run-all injectweb website:build website:deploy",
- "fix": "eslint src --fix",
- "injectweb": "rimraf website/source/{c,golang,php,python,ruby} && babel-node src/_util/cli.js injectweb",
- "lint": "eslint src",
- "playground:start": "cd test/browser && babel-node server.js",
- "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",
- "release:major": "cross-env SEMANTIC=major npm run release",
- "release:minor": "cross-env SEMANTIC=minor npm run release",
- "release:patch": "cross-env SEMANTIC=patch npm run release",
- "test": "npm-run-all test:languages test:util test:module",
- "test:languages": "npm run build:tests && cross-env DEBUG=locutus:* mocha --compilers js:babel-register --reporter spec --recursive test/languages --grep \"${TEST_GREP:-}\"",
- "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:-}\"",
- "test:module": "babel-node test/module/module.js",
- "test:util": "mocha --compilers js:babel-register --reporter spec test/util/",
- "website:build": "cd website && hexo generate",
- "website:clean": "cd website && hexo clean",
- "website:deploy": "cd website && hexo deploy --silent",
- "website:install": "cd website && npm install",
- "website:start": "cd website && hexo server"
- },
- "version": "2.0.10"
-}
diff --git a/node_modules/locutus/php/_helpers/_bc.js b/node_modules/locutus/php/_helpers/_bc.js
deleted file mode 100644
index ac27204..0000000
--- a/node_modules/locutus/php/_helpers/_bc.js
+++ /dev/null
@@ -1,1258 +0,0 @@
-'use strict';
-
-module.exports = function _bc() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/_helpers/_bc
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $bc = _bc()
- // example 1: var $result = $bc.PLUS
- // returns 1: '+'
-
- /**
- * BC Math Library for Javascript
- * Ported from the PHP5 bcmath extension source code,
- * which uses the Libbcmath package...
- * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
- * Copyright (C) 2000 Philip A. Nelson
- * The Free Software Foundation, Inc.
- * 59 Temple Place, Suite 330
- * Boston, MA 02111-1307 USA.
- * e-mail: philnelson@acm.org
- * us-mail: Philip A. Nelson
- * Computer Science Department, 9062
- * Western Washington University
- * Bellingham, WA 98226-9062
- *
- * bcmath-js homepage:
- *
- * This code is covered under the LGPL licence, and can be used however you want :)
- * Be kind and share any decent code changes.
- */
-
- /**
- * Binary Calculator (BC) Arbitrary Precision Mathematics Lib v0.10 (LGPL)
- * Copy of Libbcmath included in PHP5 src
- *
- * Note: this is just the shared library file and does not include the php-style functions.
- * use bcmath{-min}.js for functions like bcadd, bcsub etc.
- *
- * Feel free to use how-ever you want, just email any bug-fixes/improvements
- * to the sourceforge project:
- *
- *
- * Ported from the PHP5 bcmath extension source code,
- * which uses the Libbcmath package...
- * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
- * Copyright (C) 2000 Philip A. Nelson
- * The Free Software Foundation, Inc.
- * 59 Temple Place, Suite 330
- * Boston, MA 02111-1307 USA.
- * e-mail: philnelson@acm.org
- * us-mail: Philip A. Nelson
- * Computer Science Department, 9062
- * Western Washington University
- * Bellingham, WA 98226-9062
- */
-
- var Libbcmath = {
- PLUS: '+',
- MINUS: '-',
- BASE: 10,
- // must be 10 (for now)
- scale: 0,
- // default scale
- /**
- * Basic number structure
- */
- bc_num: function bc_num() {
- this.n_sign = null; // sign
- this.n_len = null; // (int) The number of digits before the decimal point.
- this.n_scale = null; // (int) The number of digits after the decimal point.
- // this.n_refs = null; // (int) The number of pointers to this number.
- // this.n_text = null; // ?? Linked list for available list.
- this.n_value = null; // array as value, where 1.23 = [1,2,3]
- this.toString = function () {
- var r, tmp;
- tmp = this.n_value.join('');
-
- // add minus sign (if applicable) then add the integer part
- r = (this.n_sign === Libbcmath.PLUS ? '' : this.n_sign) + tmp.substr(0, this.n_len);
-
- // if decimal places, add a . and the decimal part
- if (this.n_scale > 0) {
- r += '.' + tmp.substr(this.n_len, this.n_scale);
- }
- return r;
- };
- },
-
- /**
- * Base add function
- *
- // Here is the full add routine that takes care of negative numbers.
- // N1 is added to N2 and the result placed into RESULT. SCALE_MIN
- // is the minimum scale for the result.
- *
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @param {int} scaleMin
- * @return bc_num
- */
- bc_add: function bc_add(n1, n2, scaleMin) {
- var sum, cmpRes, resScale;
-
- if (n1.n_sign === n2.n_sign) {
- sum = Libbcmath._bc_do_add(n1, n2, scaleMin);
- sum.n_sign = n1.n_sign;
- } else {
- // subtraction must be done.
- cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false); // Compare magnitudes.
- switch (cmpRes) {
- case -1:
- // n1 is less than n2, subtract n1 from n2.
- sum = Libbcmath._bc_do_sub(n2, n1, scaleMin);
- sum.n_sign = n2.n_sign;
- break;
-
- case 0:
- // They are equal! return zero with the correct scale!
- resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale));
- sum = Libbcmath.bc_new_num(1, resScale);
- Libbcmath.memset(sum.n_value, 0, 0, resScale + 1);
- break;
-
- case 1:
- // n2 is less than n1, subtract n2 from n1.
- sum = Libbcmath._bc_do_sub(n1, n2, scaleMin);
- sum.n_sign = n1.n_sign;
- }
- }
- return sum;
- },
-
- /**
- * This is the "user callable" routine to compare numbers N1 and N2.
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @return int -1, 0, 1 (n1 < n2, ===, n1 > n2)
- */
- bc_compare: function bc_compare(n1, n2) {
- return Libbcmath._bc_do_compare(n1, n2, true, false);
- },
-
- _one_mult: function _one_mult(num, nPtr, size, digit, result, rPtr) {
- var carry, value; // int
- var nptr, rptr; // int pointers
- if (digit === 0) {
- Libbcmath.memset(result, 0, 0, size); // memset (result, 0, size);
- } else {
- if (digit === 1) {
- Libbcmath.memcpy(result, rPtr, num, nPtr, size); // memcpy (result, num, size);
- } else {
- // Initialize
- nptr = nPtr + size - 1; // nptr = (unsigned char *) (num+size-1);
- rptr = rPtr + size - 1; // rptr = (unsigned char *) (result+size-1);
- carry = 0;
-
- while (size-- > 0) {
- value = num[nptr--] * digit + carry; // value = *nptr-- * digit + carry;
- result[rptr--] = value % Libbcmath.BASE; // @CHECK cint //*rptr-- = value % BASE;
- carry = Math.floor(value / Libbcmath.BASE); // @CHECK cint //carry = value / BASE;
- }
-
- if (carry !== 0) {
- result[rptr] = carry;
- }
- }
- }
- },
-
- bc_divide: function bc_divide(n1, n2, scale) {
- // var quot // bc_num return
- var qval; // bc_num
- var num1, num2; // string
- var ptr1, ptr2, n2ptr, qptr; // int pointers
- var scale1, val; // int
- var len1, len2, scale2, qdigits, extra, count; // int
- var qdig, qguess, borrow, carry; // int
- var mval; // string
- var zero; // char
- var norm; // int
- // var ptrs // return object from one_mul
- // Test for divide by zero. (return failure)
- if (Libbcmath.bc_is_zero(n2)) {
- return -1;
- }
-
- // Test for zero divide by anything (return zero)
- if (Libbcmath.bc_is_zero(n1)) {
- return Libbcmath.bc_new_num(1, scale);
- }
-
- /* Test for n1 equals n2 (return 1 as n1 nor n2 are zero)
- if (Libbcmath.bc_compare(n1, n2, Libbcmath.MAX(n1.n_scale, n2.n_scale)) === 0) {
- quot=Libbcmath.bc_new_num(1, scale);
- quot.n_value[0] = 1;
- return quot;
- }
- */
-
- // Test for divide by 1. If it is we must truncate.
- // @todo: check where scale > 0 too.. can't see why not
- // (ie bc_is_zero - add bc_is_one function)
- if (n2.n_scale === 0) {
- if (n2.n_len === 1 && n2.n_value[0] === 1) {
- qval = Libbcmath.bc_new_num(n1.n_len, scale); // qval = bc_new_num (n1->n_len, scale);
- qval.n_sign = n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS;
- // memset (&qval->n_value[n1->n_len],0,scale):
- Libbcmath.memset(qval.n_value, n1.n_len, 0, scale);
- // memcpy (qval->n_value, n1->n_value, n1->n_len + MIN(n1->n_scale,scale)):
- Libbcmath.memcpy(qval.n_value, 0, n1.n_value, 0, n1.n_len + Libbcmath.MIN(n1.n_scale, scale));
- // can we return here? not in c src, but can't see why-not.
- // return qval;
- }
- }
-
- /* Set up the divide. Move the decimal point on n1 by n2's scale.
- Remember, zeros on the end of num2 are wasted effort for dividing. */
- scale2 = n2.n_scale; // scale2 = n2->n_scale;
- n2ptr = n2.n_len + scale2 - 1; // n2ptr = (unsigned char *) n2.n_value+n2.n_len+scale2-1;
- while (scale2 > 0 && n2.n_value[n2ptr--] === 0) {
- scale2--;
- }
-
- len1 = n1.n_len + scale2;
- scale1 = n1.n_scale - scale2;
- if (scale1 < scale) {
- extra = scale - scale1;
- } else {
- extra = 0;
- }
-
- // num1 = (unsigned char *) safe_emalloc (1, n1.n_len+n1.n_scale, extra+2):
- num1 = Libbcmath.safe_emalloc(1, n1.n_len + n1.n_scale, extra + 2);
- if (num1 === null) {
- Libbcmath.bc_out_of_memory();
- }
- // memset (num1, 0, n1->n_len+n1->n_scale+extra+2):
- Libbcmath.memset(num1, 0, 0, n1.n_len + n1.n_scale + extra + 2);
- // memcpy (num1+1, n1.n_value, n1.n_len+n1.n_scale):
- Libbcmath.memcpy(num1, 1, n1.n_value, 0, n1.n_len + n1.n_scale);
- // len2 = n2->n_len + scale2:
- len2 = n2.n_len + scale2;
- // num2 = (unsigned char *) safe_emalloc (1, len2, 1):
- num2 = Libbcmath.safe_emalloc(1, len2, 1);
- if (num2 === null) {
- Libbcmath.bc_out_of_memory();
- }
- // memcpy (num2, n2.n_value, len2):
- Libbcmath.memcpy(num2, 0, n2.n_value, 0, len2);
- // *(num2+len2) = 0:
- num2[len2] = 0;
- // n2ptr = num2:
- n2ptr = 0;
- // while (*n2ptr === 0):
- while (num2[n2ptr] === 0) {
- n2ptr++;
- len2--;
- }
-
- // Calculate the number of quotient digits.
- if (len2 > len1 + scale) {
- qdigits = scale + 1;
- zero = true;
- } else {
- zero = false;
- if (len2 > len1) {
- qdigits = scale + 1; // One for the zero integer part.
- } else {
- qdigits = len1 - len2 + scale + 1;
- }
- }
-
- // Allocate and zero the storage for the quotient.
- // qval = bc_new_num (qdigits-scale,scale);
- qval = Libbcmath.bc_new_num(qdigits - scale, scale);
- // memset (qval->n_value, 0, qdigits);
- Libbcmath.memset(qval.n_value, 0, 0, qdigits);
- // Allocate storage for the temporary storage mval.
- // mval = (unsigned char *) safe_emalloc (1, len2, 1);
- mval = Libbcmath.safe_emalloc(1, len2, 1);
- if (mval === null) {
- Libbcmath.bc_out_of_memory();
- }
-
- // Now for the full divide algorithm.
- if (!zero) {
- // Normalize
- // norm = Libbcmath.cint(10 / (Libbcmath.cint(n2.n_value[n2ptr]) + 1));
- // norm = 10 / ((int)*n2ptr + 1)
- norm = Math.floor(10 / (n2.n_value[n2ptr] + 1)); // norm = 10 / ((int)*n2ptr + 1);
- if (norm !== 1) {
- // Libbcmath._one_mult(num1, len1+scale1+extra+1, norm, num1);
- Libbcmath._one_mult(num1, 0, len1 + scale1 + extra + 1, norm, num1, 0);
- // Libbcmath._one_mult(n2ptr, len2, norm, n2ptr);
- Libbcmath._one_mult(n2.n_value, n2ptr, len2, norm, n2.n_value, n2ptr);
- // @todo: Check: Is the pointer affected by the call? if so,
- // maybe need to adjust points on return?
- }
-
- // Initialize divide loop.
- qdig = 0;
- if (len2 > len1) {
- qptr = len2 - len1; // qptr = (unsigned char *) qval.n_value+len2-len1;
- } else {
- qptr = 0; // qptr = (unsigned char *) qval.n_value;
- }
-
- // Loop
- while (qdig <= len1 + scale - len2) {
- // Calculate the quotient digit guess.
- if (n2.n_value[n2ptr] === num1[qdig]) {
- qguess = 9;
- } else {
- qguess = Math.floor((num1[qdig] * 10 + num1[qdig + 1]) / n2.n_value[n2ptr]);
- }
- // Test qguess.
-
- if (n2.n_value[n2ptr + 1] * qguess > (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) * 10 + num1[qdig + 2]) {
- qguess--;
- // And again.
- if (n2.n_value[n2ptr + 1] * qguess > (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) * 10 + num1[qdig + 2]) {
- qguess--;
- }
- }
-
- // Multiply and subtract.
- borrow = 0;
- if (qguess !== 0) {
- mval[0] = 0; //* mval = 0; // @CHECK is this to fix ptr2 < 0?
- // _one_mult (n2ptr, len2, qguess, mval+1); // @CHECK
- Libbcmath._one_mult(n2.n_value, n2ptr, len2, qguess, mval, 1);
- ptr1 = qdig + len2; // (unsigned char *) num1+qdig+len2;
- ptr2 = len2; // (unsigned char *) mval+len2;
- // @todo: CHECK: Does a negative pointer return null?
- // ptr2 can be < 0 here as ptr1 = len2, thus count < len2+1 will always fail ?
- for (count = 0; count < len2 + 1; count++) {
- if (ptr2 < 0) {
- // val = Libbcmath.cint(num1[ptr1]) - 0 - borrow;
- // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- val = num1[ptr1] - 0 - borrow; // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- } else {
- // val = Libbcmath.cint(num1[ptr1]) - Libbcmath.cint(mval[ptr2--]) - borrow;
- // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- val = num1[ptr1] - mval[ptr2--] - borrow;
- }
- if (val < 0) {
- val += 10;
- borrow = 1;
- } else {
- borrow = 0;
- }
- num1[ptr1--] = val;
- }
- }
-
- // Test for negative result.
- if (borrow === 1) {
- qguess--;
- ptr1 = qdig + len2; // (unsigned char *) num1+qdig+len2;
- ptr2 = len2 - 1; // (unsigned char *) n2ptr+len2-1;
- carry = 0;
- for (count = 0; count < len2; count++) {
- if (ptr2 < 0) {
- // val = Libbcmath.cint(num1[ptr1]) + 0 + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- val = num1[ptr1] + 0 + carry;
- } else {
- // val = Libbcmath.cint(num1[ptr1]) + Libbcmath.cint(n2.n_value[ptr2--]) + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- val = num1[ptr1] + n2.n_value[ptr2--] + carry;
- }
- if (val > 9) {
- val -= 10;
- carry = 1;
- } else {
- carry = 0;
- }
- num1[ptr1--] = val; //* ptr1-- = val;
- }
- if (carry === 1) {
- // num1[ptr1] = Libbcmath.cint((num1[ptr1] + 1) % 10);
- // *ptr1 = (*ptr1 + 1) % 10; // @CHECK
- // *ptr1 = (*ptr1 + 1) % 10; // @CHECK
- num1[ptr1] = (num1[ptr1] + 1) % 10;
- }
- }
-
- // We now know the quotient digit.
- qval.n_value[qptr++] = qguess; //* qptr++ = qguess;
- qdig++;
- }
- }
-
- // Clean up and return the number.
- qval.n_sign = n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS;
- if (Libbcmath.bc_is_zero(qval)) {
- qval.n_sign = Libbcmath.PLUS;
- }
- Libbcmath._bc_rm_leading_zeros(qval);
-
- return qval;
-
- // return 0; // Everything is OK.
- },
-
- MUL_BASE_DIGITS: 80,
- MUL_SMALL_DIGITS: 80 / 4,
- // #define MUL_SMALL_DIGITS mul_base_digits/4
-
- /* The multiply routine. N2 times N1 is put int PROD with the scale of
- the result being MIN(N2 scale+N1 scale, MAX (SCALE, N2 scale, N1 scale)).
- */
- /**
- * @param n1 bc_num
- * @param n2 bc_num
- * @param scale [int] optional
- */
- bc_multiply: function bc_multiply(n1, n2, scale) {
- var pval; // bc_num
- var len1, len2; // int
- var fullScale, prodScale; // int
- // Initialize things.
- len1 = n1.n_len + n1.n_scale;
- len2 = n2.n_len + n2.n_scale;
- fullScale = n1.n_scale + n2.n_scale;
- prodScale = Libbcmath.MIN(fullScale, Libbcmath.MAX(scale, Libbcmath.MAX(n1.n_scale, n2.n_scale)));
-
- // pval = Libbcmath.bc_init_num(); // allow pass by ref
- // Do the multiply
- pval = Libbcmath._bc_rec_mul(n1, len1, n2, len2, fullScale);
-
- // Assign to prod and clean up the number.
- pval.n_sign = n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS;
- // pval.n_value = pval.nPtr;
- pval.n_len = len2 + len1 + 1 - fullScale;
- pval.n_scale = prodScale;
- Libbcmath._bc_rm_leading_zeros(pval);
- if (Libbcmath.bc_is_zero(pval)) {
- pval.n_sign = Libbcmath.PLUS;
- }
- // bc_free_num (prod);
- return pval;
- },
-
- new_sub_num: function new_sub_num(length, scale, value) {
- var ptr = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
-
- var temp = new Libbcmath.bc_num(); // eslint-disable-line new-cap
- temp.n_sign = Libbcmath.PLUS;
- temp.n_len = length;
- temp.n_scale = scale;
- temp.n_value = Libbcmath.safe_emalloc(1, length + scale, 0);
- Libbcmath.memcpy(temp.n_value, 0, value, ptr, length + scale);
- return temp;
- },
-
- _bc_simp_mul: function _bc_simp_mul(n1, n1len, n2, n2len, fullScale) {
- var prod; // bc_num
- var n1ptr, n2ptr, pvptr; // char *n1ptr, *n2ptr, *pvptr;
- var n1end, n2end; // char *n1end, *n2end; // To the end of n1 and n2.
- var indx, sum, prodlen; // int indx, sum, prodlen;
- prodlen = n1len + n2len + 1;
-
- prod = Libbcmath.bc_new_num(prodlen, 0);
-
- n1end = n1len - 1; // (char *) (n1->n_value + n1len - 1);
- n2end = n2len - 1; // (char *) (n2->n_value + n2len - 1);
- pvptr = prodlen - 1; // (char *) ((*prod)->n_value + prodlen - 1);
- sum = 0;
-
- // Here is the loop...
- for (indx = 0; indx < prodlen - 1; indx++) {
- // (char *) (n1end - MAX(0, indx-n2len+1));
- n1ptr = n1end - Libbcmath.MAX(0, indx - n2len + 1);
- // (char *) (n2end - MIN(indx, n2len-1));
- n2ptr = n2end - Libbcmath.MIN(indx, n2len - 1);
- while (n1ptr >= 0 && n2ptr <= n2end) {
- // sum += *n1ptr-- * *n2ptr++;
- sum += n1.n_value[n1ptr--] * n2.n_value[n2ptr++];
- }
- //* pvptr-- = sum % BASE;
- prod.n_value[pvptr--] = Math.floor(sum % Libbcmath.BASE);
- sum = Math.floor(sum / Libbcmath.BASE); // sum = sum / BASE;
- }
- prod.n_value[pvptr] = sum; //* pvptr = sum;
- return prod;
- },
-
- /* A special adder/subtractor for the recursive divide and conquer
- multiply algorithm. Note: if sub is called, accum must
- be larger that what is being subtracted. Also, accum and val
- must have n_scale = 0. (e.g. they must look like integers. *) */
- _bc_shift_addsub: function _bc_shift_addsub(accum, val, shift, sub) {
- var accp, valp; // signed char *accp, *valp;
- var count, carry; // int count, carry;
- count = val.n_len;
- if (val.n_value[0] === 0) {
- count--;
- }
-
- // assert (accum->n_len+accum->n_scale >= shift+count);
- if (accum.n_len + accum.n_scale < shift + count) {
- throw new Error('len + scale < shift + count'); // ?? I think that's what assert does :)
- }
-
- // Set up pointers and others
- // (signed char *)(accum->n_value + accum->n_len + accum->n_scale - shift - 1);
- accp = accum.n_len + accum.n_scale - shift - 1;
- valp = val.n_len - 1; // (signed char *)(val->n_value + val->n_len - 1);
- carry = 0;
- if (sub) {
- // Subtraction, carry is really borrow.
- while (count--) {
- accum.n_value[accp] -= val.n_value[valp--] + carry; //* accp -= *valp-- + carry;
- if (accum.n_value[accp] < 0) {
- // if (*accp < 0)
- carry = 1;
- accum.n_value[accp--] += Libbcmath.BASE; //* accp-- += BASE;
- } else {
- carry = 0;
- accp--;
- }
- }
- while (carry) {
- accum.n_value[accp] -= carry; //* accp -= carry;
- if (accum.n_value[accp] < 0) {
- // if (*accp < 0)
- accum.n_value[accp--] += Libbcmath.BASE; // *accp-- += BASE;
- } else {
- carry = 0;
- }
- }
- } else {
- // Addition
- while (count--) {
- accum.n_value[accp] += val.n_value[valp--] + carry; //* accp += *valp-- + carry;
- if (accum.n_value[accp] > Libbcmath.BASE - 1) {
- // if (*accp > (BASE-1))
- carry = 1;
- accum.n_value[accp--] -= Libbcmath.BASE; //* accp-- -= BASE;
- } else {
- carry = 0;
- accp--;
- }
- }
- while (carry) {
- accum.n_value[accp] += carry; //* accp += carry;
- if (accum.n_value[accp] > Libbcmath.BASE - 1) {
- // if (*accp > (BASE-1))
- accum.n_value[accp--] -= Libbcmath.BASE; //* accp-- -= BASE;
- } else {
- carry = 0;
- }
- }
- }
- return true; // accum is the pass-by-reference return
- },
-
- /* Recursive divide and conquer multiply algorithm.
- based on
- Let u = u0 + u1*(b^n)
- Let v = v0 + v1*(b^n)
- Then uv = (B^2n+B^n)*u1*v1 + B^n*(u1-u0)*(v0-v1) + (B^n+1)*u0*v0
- B is the base of storage, number of digits in u1,u0 close to equal.
- */
- _bc_rec_mul: function _bc_rec_mul(u, ulen, v, vlen, fullScale) {
- var prod; // @return
- var u0, u1, v0, v1; // bc_num
- // var u0len,
- // var v0len // int
- var m1, m2, m3, d1, d2; // bc_num
- var n, prodlen, m1zero; // int
- var d1len, d2len; // int
- // Base case?
- if (ulen + vlen < Libbcmath.MUL_BASE_DIGITS || ulen < Libbcmath.MUL_SMALL_DIGITS || vlen < Libbcmath.MUL_SMALL_DIGITS) {
- return Libbcmath._bc_simp_mul(u, ulen, v, vlen, fullScale);
- }
-
- // Calculate n -- the u and v split point in digits.
- n = Math.floor((Libbcmath.MAX(ulen, vlen) + 1) / 2);
-
- // Split u and v.
- if (ulen < n) {
- u1 = Libbcmath.bc_init_num(); // u1 = bc_copy_num (BCG(_zero_));
- u0 = Libbcmath.new_sub_num(ulen, 0, u.n_value);
- } else {
- u1 = Libbcmath.new_sub_num(ulen - n, 0, u.n_value);
- u0 = Libbcmath.new_sub_num(n, 0, u.n_value, ulen - n);
- }
- if (vlen < n) {
- v1 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- v0 = Libbcmath.new_sub_num(vlen, 0, v.n_value);
- } else {
- v1 = Libbcmath.new_sub_num(vlen - n, 0, v.n_value);
- v0 = Libbcmath.new_sub_num(n, 0, v.n_value, vlen - n);
- }
- Libbcmath._bc_rm_leading_zeros(u1);
- Libbcmath._bc_rm_leading_zeros(u0);
- // var u0len = u0.n_len
- Libbcmath._bc_rm_leading_zeros(v1);
- Libbcmath._bc_rm_leading_zeros(v0);
- // var v0len = v0.n_len
-
- m1zero = Libbcmath.bc_is_zero(u1) || Libbcmath.bc_is_zero(v1);
-
- // Calculate sub results ...
- d1 = Libbcmath.bc_init_num(); // needed?
- d2 = Libbcmath.bc_init_num(); // needed?
- d1 = Libbcmath.bc_sub(u1, u0, 0);
- d1len = d1.n_len;
-
- d2 = Libbcmath.bc_sub(v0, v1, 0);
- d2len = d2.n_len;
-
- // Do recursive multiplies and shifted adds.
- if (m1zero) {
- m1 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- } else {
- // m1 = Libbcmath.bc_init_num(); //allow pass-by-ref
- m1 = Libbcmath._bc_rec_mul(u1, u1.n_len, v1, v1.n_len, 0);
- }
- if (Libbcmath.bc_is_zero(d1) || Libbcmath.bc_is_zero(d2)) {
- m2 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- } else {
- // m2 = Libbcmath.bc_init_num(); //allow pass-by-ref
- m2 = Libbcmath._bc_rec_mul(d1, d1len, d2, d2len, 0);
- }
-
- if (Libbcmath.bc_is_zero(u0) || Libbcmath.bc_is_zero(v0)) {
- m3 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- } else {
- // m3 = Libbcmath.bc_init_num(); //allow pass-by-ref
- m3 = Libbcmath._bc_rec_mul(u0, u0.n_len, v0, v0.n_len, 0);
- }
-
- // Initialize product
- prodlen = ulen + vlen + 1;
- prod = Libbcmath.bc_new_num(prodlen, 0);
-
- if (!m1zero) {
- Libbcmath._bc_shift_addsub(prod, m1, 2 * n, 0);
- Libbcmath._bc_shift_addsub(prod, m1, n, 0);
- }
- Libbcmath._bc_shift_addsub(prod, m3, n, 0);
- Libbcmath._bc_shift_addsub(prod, m3, 0, 0);
- Libbcmath._bc_shift_addsub(prod, m2, n, d1.n_sign !== d2.n_sign);
-
- return prod;
- // Now clean up!
- // bc_free_num (&u1);
- // bc_free_num (&u0);
- // bc_free_num (&v1);
- // bc_free_num (&m1);
- // bc_free_num (&v0);
- // bc_free_num (&m2);
- // bc_free_num (&m3);
- // bc_free_num (&d1);
- // bc_free_num (&d2);
- },
-
- /**
- *
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @param {boolean} useSign
- * @param {boolean} ignoreLast
- * @return -1, 0, 1 (see bc_compare)
- */
- _bc_do_compare: function _bc_do_compare(n1, n2, useSign, ignoreLast) {
- var n1ptr, n2ptr; // int
- var count; // int
- // First, compare signs.
- if (useSign && n1.n_sign !== n2.n_sign) {
- if (n1.n_sign === Libbcmath.PLUS) {
- return 1; // Positive N1 > Negative N2
- } else {
- return -1; // Negative N1 < Positive N1
- }
- }
-
- // Now compare the magnitude.
- if (n1.n_len !== n2.n_len) {
- if (n1.n_len > n2.n_len) {
- // Magnitude of n1 > n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return 1;
- } else {
- return -1;
- }
- } else {
- // Magnitude of n1 < n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return -1;
- } else {
- return 1;
- }
- }
- }
-
- /* If we get here, they have the same number of integer digits.
- check the integer part and the equal length part of the fraction. */
- count = n1.n_len + Math.min(n1.n_scale, n2.n_scale);
- n1ptr = 0;
- n2ptr = 0;
-
- while (count > 0 && n1.n_value[n1ptr] === n2.n_value[n2ptr]) {
- n1ptr++;
- n2ptr++;
- count--;
- }
-
- if (ignoreLast && count === 1 && n1.n_scale === n2.n_scale) {
- return 0;
- }
-
- if (count !== 0) {
- if (n1.n_value[n1ptr] > n2.n_value[n2ptr]) {
- // Magnitude of n1 > n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return 1;
- } else {
- return -1;
- }
- } else {
- // Magnitude of n1 < n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return -1;
- } else {
- return 1;
- }
- }
- }
-
- // They are equal up to the last part of the equal part of the fraction.
- if (n1.n_scale !== n2.n_scale) {
- if (n1.n_scale > n2.n_scale) {
- for (count = n1.n_scale - n2.n_scale; count > 0; count--) {
- if (n1.n_value[n1ptr++] !== 0) {
- // Magnitude of n1 > n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return 1;
- } else {
- return -1;
- }
- }
- }
- } else {
- for (count = n2.n_scale - n1.n_scale; count > 0; count--) {
- if (n2.n_value[n2ptr++] !== 0) {
- // Magnitude of n1 < n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return -1;
- } else {
- return 1;
- }
- }
- }
- }
- }
-
- // They must be equal!
- return 0;
- },
-
- /* Here is the full subtract routine that takes care of negative numbers.
- N2 is subtracted from N1 and the result placed in RESULT. SCALE_MIN
- is the minimum scale for the result. */
- bc_sub: function bc_sub(n1, n2, scaleMin) {
- var diff; // bc_num
- var cmpRes, resScale; // int
- if (n1.n_sign !== n2.n_sign) {
- diff = Libbcmath._bc_do_add(n1, n2, scaleMin);
- diff.n_sign = n1.n_sign;
- } else {
- // subtraction must be done.
- // Compare magnitudes.
- cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false);
- switch (cmpRes) {
- case -1:
- // n1 is less than n2, subtract n1 from n2.
- diff = Libbcmath._bc_do_sub(n2, n1, scaleMin);
- diff.n_sign = n2.n_sign === Libbcmath.PLUS ? Libbcmath.MINUS : Libbcmath.PLUS;
- break;
- case 0:
- // They are equal! return zero!
- resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale));
- diff = Libbcmath.bc_new_num(1, resScale);
- Libbcmath.memset(diff.n_value, 0, 0, resScale + 1);
- break;
- case 1:
- // n2 is less than n1, subtract n2 from n1.
- diff = Libbcmath._bc_do_sub(n1, n2, scaleMin);
- diff.n_sign = n1.n_sign;
- break;
- }
- }
-
- // Clean up and return.
- // bc_free_num (result);
- //* result = diff;
- return diff;
- },
-
- _bc_do_add: function _bc_do_add(n1, n2, scaleMin) {
- var sum; // bc_num
- var sumScale, sumDigits; // int
- var n1ptr, n2ptr, sumptr; // int
- var carry, n1bytes, n2bytes; // int
- var tmp; // int
-
- // Prepare sum.
- sumScale = Libbcmath.MAX(n1.n_scale, n2.n_scale);
- sumDigits = Libbcmath.MAX(n1.n_len, n2.n_len) + 1;
- sum = Libbcmath.bc_new_num(sumDigits, Libbcmath.MAX(sumScale, scaleMin));
-
- // Start with the fraction part. Initialize the pointers.
- n1bytes = n1.n_scale;
- n2bytes = n2.n_scale;
- n1ptr = n1.n_len + n1bytes - 1;
- n2ptr = n2.n_len + n2bytes - 1;
- sumptr = sumScale + sumDigits - 1;
-
- // Add the fraction part. First copy the longer fraction
- // (ie when adding 1.2345 to 1 we know .2345 is correct already) .
- if (n1bytes !== n2bytes) {
- if (n1bytes > n2bytes) {
- // n1 has more dp then n2
- while (n1bytes > n2bytes) {
- sum.n_value[sumptr--] = n1.n_value[n1ptr--];
- // *sumptr-- = *n1ptr--;
- n1bytes--;
- }
- } else {
- // n2 has more dp then n1
- while (n2bytes > n1bytes) {
- sum.n_value[sumptr--] = n2.n_value[n2ptr--];
- // *sumptr-- = *n2ptr--;
- n2bytes--;
- }
- }
- }
-
- // Now add the remaining fraction part and equal size integer parts.
- n1bytes += n1.n_len;
- n2bytes += n2.n_len;
- carry = 0;
- while (n1bytes > 0 && n2bytes > 0) {
- // add the two numbers together
- tmp = n1.n_value[n1ptr--] + n2.n_value[n2ptr--] + carry;
- // *sumptr = *n1ptr-- + *n2ptr-- + carry;
- // check if they are >= 10 (impossible to be more then 18)
- if (tmp >= Libbcmath.BASE) {
- carry = 1;
- tmp -= Libbcmath.BASE; // yep, subtract 10, add a carry
- } else {
- carry = 0;
- }
- sum.n_value[sumptr] = tmp;
- sumptr--;
- n1bytes--;
- n2bytes--;
- }
-
- // Now add carry the [rest of the] longer integer part.
- if (n1bytes === 0) {
- // n2 is a bigger number then n1
- while (n2bytes-- > 0) {
- tmp = n2.n_value[n2ptr--] + carry;
- // *sumptr = *n2ptr-- + carry;
- if (tmp >= Libbcmath.BASE) {
- carry = 1;
- tmp -= Libbcmath.BASE;
- } else {
- carry = 0;
- }
- sum.n_value[sumptr--] = tmp;
- }
- } else {
- // n1 is bigger then n2..
- while (n1bytes-- > 0) {
- tmp = n1.n_value[n1ptr--] + carry;
- // *sumptr = *n1ptr-- + carry;
- if (tmp >= Libbcmath.BASE) {
- carry = 1;
- tmp -= Libbcmath.BASE;
- } else {
- carry = 0;
- }
- sum.n_value[sumptr--] = tmp;
- }
- }
-
- // Set final carry.
- if (carry === 1) {
- sum.n_value[sumptr] += 1;
- // *sumptr += 1;
- }
-
- // Adjust sum and return.
- Libbcmath._bc_rm_leading_zeros(sum);
- return sum;
- },
-
- /**
- * Perform a subtraction
- *
- * Perform subtraction: N2 is subtracted from N1 and the value is
- * returned. The signs of N1 and N2 are ignored. Also, N1 is
- * assumed to be larger than N2. SCALE_MIN is the minimum scale
- * of the result.
- *
- * Basic school maths says to subtract 2 numbers..
- * 1. make them the same length, the decimal places, and the integer part
- * 2. start from the right and subtract the two numbers from each other
- * 3. if the sum of the 2 numbers < 0, carry -1 to the next set and add 10
- * (ie 18 > carry 1 becomes 8). thus 0.9 + 0.9 = 1.8
- *
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @param {int} scaleMin
- * @return bc_num
- */
- _bc_do_sub: function _bc_do_sub(n1, n2, scaleMin) {
- var diff; // bc_num
- var diffScale, diffLen; // int
- var minScale, minLen; // int
- var n1ptr, n2ptr, diffptr; // int
- var borrow, count, val; // int
- // Allocate temporary storage.
- diffLen = Libbcmath.MAX(n1.n_len, n2.n_len);
- diffScale = Libbcmath.MAX(n1.n_scale, n2.n_scale);
- minLen = Libbcmath.MIN(n1.n_len, n2.n_len);
- minScale = Libbcmath.MIN(n1.n_scale, n2.n_scale);
- diff = Libbcmath.bc_new_num(diffLen, Libbcmath.MAX(diffScale, scaleMin));
-
- /* Not needed?
- // Zero extra digits made by scaleMin.
- if (scaleMin > diffScale) {
- diffptr = (char *) (diff->n_value + diffLen + diffScale);
- for (count = scaleMin - diffScale; count > 0; count--) {
- *diffptr++ = 0;
- }
- }
- */
-
- // Initialize the subtract.
- n1ptr = n1.n_len + n1.n_scale - 1;
- n2ptr = n2.n_len + n2.n_scale - 1;
- diffptr = diffLen + diffScale - 1;
-
- // Subtract the numbers.
- borrow = 0;
-
- // Take care of the longer scaled number.
- if (n1.n_scale !== minScale) {
- // n1 has the longer scale
- for (count = n1.n_scale - minScale; count > 0; count--) {
- diff.n_value[diffptr--] = n1.n_value[n1ptr--];
- // *diffptr-- = *n1ptr--;
- }
- } else {
- // n2 has the longer scale
- for (count = n2.n_scale - minScale; count > 0; count--) {
- val = 0 - n2.n_value[n2ptr--] - borrow;
- // val = - *n2ptr-- - borrow;
- if (val < 0) {
- val += Libbcmath.BASE;
- borrow = 1;
- } else {
- borrow = 0;
- }
- diff.n_value[diffptr--] = val;
- //* diffptr-- = val;
- }
- }
-
- // Now do the equal length scale and integer parts.
- for (count = 0; count < minLen + minScale; count++) {
- val = n1.n_value[n1ptr--] - n2.n_value[n2ptr--] - borrow;
- // val = *n1ptr-- - *n2ptr-- - borrow;
- if (val < 0) {
- val += Libbcmath.BASE;
- borrow = 1;
- } else {
- borrow = 0;
- }
- diff.n_value[diffptr--] = val;
- //* diffptr-- = val;
- }
-
- // If n1 has more digits then n2, we now do that subtract.
- if (diffLen !== minLen) {
- for (count = diffLen - minLen; count > 0; count--) {
- val = n1.n_value[n1ptr--] - borrow;
- // val = *n1ptr-- - borrow;
- if (val < 0) {
- val += Libbcmath.BASE;
- borrow = 1;
- } else {
- borrow = 0;
- }
- diff.n_value[diffptr--] = val;
- }
- }
-
- // Clean up and return.
- Libbcmath._bc_rm_leading_zeros(diff);
- return diff;
- },
-
- /**
- *
- * @param {int} length
- * @param {int} scale
- * @return bc_num
- */
- bc_new_num: function bc_new_num(length, scale) {
- var temp; // bc_num
- temp = new Libbcmath.bc_num(); // eslint-disable-line new-cap
- temp.n_sign = Libbcmath.PLUS;
- temp.n_len = length;
- temp.n_scale = scale;
- temp.n_value = Libbcmath.safe_emalloc(1, length + scale, 0);
- Libbcmath.memset(temp.n_value, 0, 0, length + scale);
- return temp;
- },
-
- safe_emalloc: function safe_emalloc(size, len, extra) {
- return Array(size * len + extra);
- },
-
- /**
- * Create a new number
- */
- bc_init_num: function bc_init_num() {
- return new Libbcmath.bc_new_num(1, 0); // eslint-disable-line new-cap
- },
-
- _bc_rm_leading_zeros: function _bc_rm_leading_zeros(num) {
- // We can move n_value to point to the first non zero digit!
- while (num.n_value[0] === 0 && num.n_len > 1) {
- num.n_value.shift();
- num.n_len--;
- }
- },
-
- /**
- * Convert to bc_num detecting scale
- */
- php_str2num: function php_str2num(str) {
- var p;
- p = str.indexOf('.');
- if (p === -1) {
- return Libbcmath.bc_str2num(str, 0);
- } else {
- return Libbcmath.bc_str2num(str, str.length - p);
- }
- },
-
- CH_VAL: function CH_VAL(c) {
- return c - '0'; // ??
- },
-
- BCD_CHAR: function BCD_CHAR(d) {
- return d + '0'; // ??
- },
-
- isdigit: function isdigit(c) {
- return isNaN(parseInt(c, 10));
- },
-
- bc_str2num: function bc_str2num(strIn, scale) {
- var str, num, ptr, digits, strscale, zeroInt, nptr;
- // remove any non-expected characters
- // Check for valid number and count digits.
-
- str = strIn.split(''); // convert to array
- ptr = 0; // str
- digits = 0;
- strscale = 0;
- zeroInt = false;
- if (str[ptr] === '+' || str[ptr] === '-') {
- ptr++; // Sign
- }
- while (str[ptr] === '0') {
- ptr++; // Skip leading zeros.
- }
- // while (Libbcmath.isdigit(str[ptr])) {
- while (str[ptr] % 1 === 0) {
- // Libbcmath.isdigit(str[ptr])) {
- ptr++;
- digits++; // digits
- }
-
- if (str[ptr] === '.') {
- ptr++; // decimal point
- }
- // while (Libbcmath.isdigit(str[ptr])) {
- while (str[ptr] % 1 === 0) {
- // Libbcmath.isdigit(str[ptr])) {
- ptr++;
- strscale++; // digits
- }
-
- if (str[ptr] || digits + strscale === 0) {
- // invalid number, return 0
- return Libbcmath.bc_init_num();
- //* num = bc_copy_num (BCG(_zero_));
- }
-
- // Adjust numbers and allocate storage and initialize fields.
- strscale = Libbcmath.MIN(strscale, scale);
- if (digits === 0) {
- zeroInt = true;
- digits = 1;
- }
-
- num = Libbcmath.bc_new_num(digits, strscale);
-
- // Build the whole number.
- ptr = 0; // str
- if (str[ptr] === '-') {
- num.n_sign = Libbcmath.MINUS;
- // (*num)->n_sign = MINUS;
- ptr++;
- } else {
- num.n_sign = Libbcmath.PLUS;
- // (*num)->n_sign = PLUS;
- if (str[ptr] === '+') {
- ptr++;
- }
- }
- while (str[ptr] === '0') {
- ptr++; // Skip leading zeros.
- }
-
- nptr = 0; // (*num)->n_value;
- if (zeroInt) {
- num.n_value[nptr++] = 0;
- digits = 0;
- }
- for (; digits > 0; digits--) {
- num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++]);
- //* nptr++ = CH_VAL(*ptr++);
- }
-
- // Build the fractional part.
- if (strscale > 0) {
- ptr++; // skip the decimal point!
- for (; strscale > 0; strscale--) {
- num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++]);
- }
- }
-
- return num;
- },
-
- cint: function cint(v) {
- if (typeof v === 'undefined') {
- v = 0;
- }
- var x = parseInt(v, 10);
- if (isNaN(x)) {
- x = 0;
- }
- return x;
- },
-
- /**
- * Basic min function
- * @param {int} a
- * @param {int} b
- */
- MIN: function MIN(a, b) {
- return a > b ? b : a;
- },
-
- /**
- * Basic max function
- * @param {int} a
- * @param {int} b
- */
- MAX: function MAX(a, b) {
- return a > b ? a : b;
- },
-
- /**
- * Basic odd function
- * @param {int} a
- */
- ODD: function ODD(a) {
- return a & 1;
- },
-
- /**
- * replicate c function
- * @param {array} r return (by reference)
- * @param {int} ptr
- * @param {string} chr char to fill
- * @param {int} len length to fill
- */
- memset: function memset(r, ptr, chr, len) {
- var i;
- for (i = 0; i < len; i++) {
- r[ptr + i] = chr;
- }
- },
-
- /**
- * Replacement c function
- * Obviously can't work like c does, so we've added an "offset"
- * param so you could do memcpy(dest+1, src, len) as memcpy(dest, 1, src, len)
- * Also only works on arrays
- */
- memcpy: function memcpy(dest, ptr, src, srcptr, len) {
- var i;
- for (i = 0; i < len; i++) {
- dest[ptr + i] = src[srcptr + i];
- }
- return true;
- },
-
- /**
- * Determine if the number specified is zero or not
- * @param {bc_num} num number to check
- * @return boolean true when zero, false when not zero.
- */
- bc_is_zero: function bc_is_zero(num) {
- var count; // int
- var nptr; // int
- // Quick check.
- // if (num === BCG(_zero_)) return TRUE;
- // Initialize
- count = num.n_len + num.n_scale;
- nptr = 0; // num->n_value;
- // The check
- while (count > 0 && num.n_value[nptr++] === 0) {
- count--;
- }
-
- if (count !== 0) {
- return false;
- } else {
- return true;
- }
- },
-
- bc_out_of_memory: function bc_out_of_memory() {
- throw new Error('(BC) Out of memory');
- }
- };
- return Libbcmath;
-};
-//# sourceMappingURL=_bc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/_bc.js.map b/node_modules/locutus/php/_helpers/_bc.js.map
deleted file mode 100644
index f60e863..0000000
--- a/node_modules/locutus/php/_helpers/_bc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/_helpers/_bc.js"],"names":["module","exports","_bc","Libbcmath","PLUS","MINUS","BASE","scale","bc_num","n_sign","n_len","n_scale","n_value","toString","r","tmp","join","substr","bc_add","n1","n2","scaleMin","sum","cmpRes","resScale","_bc_do_add","_bc_do_compare","_bc_do_sub","MAX","bc_new_num","memset","bc_compare","_one_mult","num","nPtr","size","digit","result","rPtr","carry","value","nptr","rptr","memcpy","Math","floor","bc_divide","qval","num1","num2","ptr1","ptr2","n2ptr","qptr","scale1","val","len1","len2","scale2","qdigits","extra","count","qdig","qguess","borrow","mval","zero","norm","bc_is_zero","MIN","safe_emalloc","bc_out_of_memory","_bc_rm_leading_zeros","MUL_BASE_DIGITS","MUL_SMALL_DIGITS","bc_multiply","pval","fullScale","prodScale","_bc_rec_mul","new_sub_num","length","ptr","temp","_bc_simp_mul","n1len","n2len","prod","n1ptr","pvptr","n1end","n2end","indx","prodlen","_bc_shift_addsub","accum","shift","sub","accp","valp","Error","u","ulen","v","vlen","u0","u1","v0","v1","m1","m2","m3","d1","d2","n","m1zero","d1len","d2len","bc_init_num","bc_sub","useSign","ignoreLast","min","diff","sumScale","sumDigits","sumptr","n1bytes","n2bytes","diffScale","diffLen","minScale","minLen","diffptr","len","Array","php_str2num","str","p","indexOf","bc_str2num","CH_VAL","c","BCD_CHAR","d","isdigit","isNaN","parseInt","strIn","digits","strscale","zeroInt","split","cint","x","a","b","ODD","chr","i","dest","src","srcptr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,GAAgB;AAAE;AACjC;AACA;AACA;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B,CAAV,EAAaoE,GAAb,EAAkB4E,GAAlB,EAAuBxB,GAAvB,EAA4B;AAClC,UAAIyB,CAAJ;AACA,WAAKA,IAAI,CAAT,EAAYA,IAAIzB,GAAhB,EAAqByB,GAArB,EAA0B;AACxBjJ,UAAEoE,MAAM6E,CAAR,IAAaD,GAAb;AACD;AACF,KAznCa;;AA2nCd;;;;;;AAMAnH,YAAQ,gBAAUqH,IAAV,EAAgB9E,GAAhB,EAAqB+E,GAArB,EAA0BC,MAA1B,EAAkC5B,GAAlC,EAAuC;AAC7C,UAAIyB,CAAJ;AACA,WAAKA,IAAI,CAAT,EAAYA,IAAIzB,GAAhB,EAAqByB,GAArB,EAA0B;AACxBC,aAAK9E,MAAM6E,CAAX,IAAgBE,IAAIC,SAASH,CAAb,CAAhB;AACD;AACD,aAAO,IAAP;AACD,KAvoCa;;AAyoCd;;;;;AAKA3F,gBAAY,oBAAUnC,GAAV,EAAe;AACzB,UAAI4B,KAAJ,CADyB,CACf;AACV,UAAIpB,IAAJ,CAFyB,CAEhB;AACT;AACA;AACA;AACAoB,cAAQ5B,IAAIvB,KAAJ,GAAYuB,IAAItB,OAAxB;AACA8B,aAAO,CAAP,CAPyB,CAOhB;AACT;AACA,aAAQoB,QAAQ,CAAT,IAAgB5B,IAAIrB,OAAJ,CAAY6B,MAAZ,MAAwB,CAA/C,EAAmD;AACjDoB;AACD;;AAED,UAAIA,UAAU,CAAd,EAAiB;AACf,eAAO,KAAP;AACD,OAFD,MAEO;AACL,eAAO,IAAP;AACD;AACF,KAhqCa;;AAkqCdU,sBAAkB,4BAAY;AAC5B,YAAM,IAAI6B,KAAJ,CAAU,oBAAV,CAAN;AACD;AApqCa,GAAhB;AAsqCA,SAAOjG,SAAP;AACD,CA7tCD","file":"_bc.js","sourcesContent":["module.exports = function _bc () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/_helpers/_bc\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $bc = _bc()\n // example 1: var $result = $bc.PLUS\n // returns 1: '+'\n\n /**\n * BC Math Library for Javascript\n * Ported from the PHP5 bcmath extension source code,\n * which uses the Libbcmath package...\n * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.\n * Copyright (C) 2000 Philip A. Nelson\n * The Free Software Foundation, Inc.\n * 59 Temple Place, Suite 330\n * Boston, MA 02111-1307 USA.\n * e-mail: philnelson@acm.org\n * us-mail: Philip A. Nelson\n * Computer Science Department, 9062\n * Western Washington University\n * Bellingham, WA 98226-9062\n *\n * bcmath-js homepage:\n *\n * This code is covered under the LGPL licence, and can be used however you want :)\n * Be kind and share any decent code changes.\n */\n\n /**\n * Binary Calculator (BC) Arbitrary Precision Mathematics Lib v0.10 (LGPL)\n * Copy of Libbcmath included in PHP5 src\n *\n * Note: this is just the shared library file and does not include the php-style functions.\n * use bcmath{-min}.js for functions like bcadd, bcsub etc.\n *\n * Feel free to use how-ever you want, just email any bug-fixes/improvements\n * to the sourceforge project:\n *\n *\n * Ported from the PHP5 bcmath extension source code,\n * which uses the Libbcmath package...\n * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.\n * Copyright (C) 2000 Philip A. Nelson\n * The Free Software Foundation, Inc.\n * 59 Temple Place, Suite 330\n * Boston, MA 02111-1307 USA.\n * e-mail: philnelson@acm.org\n * us-mail: Philip A. Nelson\n * Computer Science Department, 9062\n * Western Washington University\n * Bellingham, WA 98226-9062\n */\n\n var Libbcmath = {\n PLUS: '+',\n MINUS: '-',\n BASE: 10,\n // must be 10 (for now)\n scale: 0,\n // default scale\n /**\n * Basic number structure\n */\n bc_num: function () {\n this.n_sign = null // sign\n this.n_len = null // (int) The number of digits before the decimal point.\n this.n_scale = null // (int) The number of digits after the decimal point.\n // this.n_refs = null; // (int) The number of pointers to this number.\n // this.n_text = null; // ?? Linked list for available list.\n this.n_value = null // array as value, where 1.23 = [1,2,3]\n this.toString = function () {\n var r, tmp\n tmp = this.n_value.join('')\n\n // add minus sign (if applicable) then add the integer part\n r = ((this.n_sign === Libbcmath.PLUS) ? '' : this.n_sign) + tmp.substr(0, this.n_len)\n\n // if decimal places, add a . and the decimal part\n if (this.n_scale > 0) {\n r += '.' + tmp.substr(this.n_len, this.n_scale)\n }\n return r\n }\n },\n\n /**\n * Base add function\n *\n // Here is the full add routine that takes care of negative numbers.\n // N1 is added to N2 and the result placed into RESULT. SCALE_MIN\n // is the minimum scale for the result.\n *\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @param {int} scaleMin\n * @return bc_num\n */\n bc_add: function (n1, n2, scaleMin) {\n var sum, cmpRes, resScale\n\n if (n1.n_sign === n2.n_sign) {\n sum = Libbcmath._bc_do_add(n1, n2, scaleMin)\n sum.n_sign = n1.n_sign\n } else { // subtraction must be done.\n cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false) // Compare magnitudes.\n switch (cmpRes) {\n case -1:\n // n1 is less than n2, subtract n1 from n2.\n sum = Libbcmath._bc_do_sub(n2, n1, scaleMin)\n sum.n_sign = n2.n_sign\n break\n\n case 0:\n // They are equal! return zero with the correct scale!\n resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale))\n sum = Libbcmath.bc_new_num(1, resScale)\n Libbcmath.memset(sum.n_value, 0, 0, resScale + 1)\n break\n\n case 1:\n // n2 is less than n1, subtract n2 from n1.\n sum = Libbcmath._bc_do_sub(n1, n2, scaleMin)\n sum.n_sign = n1.n_sign\n }\n }\n return sum\n },\n\n /**\n * This is the \"user callable\" routine to compare numbers N1 and N2.\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @return int -1, 0, 1 (n1 < n2, ===, n1 > n2)\n */\n bc_compare: function (n1, n2) {\n return Libbcmath._bc_do_compare(n1, n2, true, false)\n },\n\n _one_mult: function (num, nPtr, size, digit, result, rPtr) {\n var carry, value // int\n var nptr, rptr // int pointers\n if (digit === 0) {\n Libbcmath.memset(result, 0, 0, size) // memset (result, 0, size);\n } else {\n if (digit === 1) {\n Libbcmath.memcpy(result, rPtr, num, nPtr, size) // memcpy (result, num, size);\n } else { // Initialize\n nptr = nPtr + size - 1 // nptr = (unsigned char *) (num+size-1);\n rptr = rPtr + size - 1 // rptr = (unsigned char *) (result+size-1);\n carry = 0\n\n while (size-- > 0) {\n value = num[nptr--] * digit + carry // value = *nptr-- * digit + carry;\n result[rptr--] = value % Libbcmath.BASE // @CHECK cint //*rptr-- = value % BASE;\n carry = Math.floor(value / Libbcmath.BASE) // @CHECK cint //carry = value / BASE;\n }\n\n if (carry !== 0) {\n result[rptr] = carry\n }\n }\n }\n },\n\n bc_divide: function (n1, n2, scale) {\n // var quot // bc_num return\n var qval // bc_num\n var num1, num2 // string\n var ptr1, ptr2, n2ptr, qptr // int pointers\n var scale1, val // int\n var len1, len2, scale2, qdigits, extra, count // int\n var qdig, qguess, borrow, carry // int\n var mval // string\n var zero // char\n var norm // int\n // var ptrs // return object from one_mul\n // Test for divide by zero. (return failure)\n if (Libbcmath.bc_is_zero(n2)) {\n return -1\n }\n\n // Test for zero divide by anything (return zero)\n if (Libbcmath.bc_is_zero(n1)) {\n return Libbcmath.bc_new_num(1, scale)\n }\n\n /* Test for n1 equals n2 (return 1 as n1 nor n2 are zero)\n if (Libbcmath.bc_compare(n1, n2, Libbcmath.MAX(n1.n_scale, n2.n_scale)) === 0) {\n quot=Libbcmath.bc_new_num(1, scale);\n quot.n_value[0] = 1;\n return quot;\n }\n */\n\n // Test for divide by 1. If it is we must truncate.\n // @todo: check where scale > 0 too.. can't see why not\n // (ie bc_is_zero - add bc_is_one function)\n if (n2.n_scale === 0) {\n if (n2.n_len === 1 && n2.n_value[0] === 1) {\n qval = Libbcmath.bc_new_num(n1.n_len, scale) // qval = bc_new_num (n1->n_len, scale);\n qval.n_sign = (n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS)\n // memset (&qval->n_value[n1->n_len],0,scale):\n Libbcmath.memset(qval.n_value, n1.n_len, 0, scale)\n // memcpy (qval->n_value, n1->n_value, n1->n_len + MIN(n1->n_scale,scale)):\n Libbcmath.memcpy(\n qval.n_value, 0, n1.n_value, 0, n1.n_len + Libbcmath.MIN(n1.n_scale, scale)\n )\n // can we return here? not in c src, but can't see why-not.\n // return qval;\n }\n }\n\n /* Set up the divide. Move the decimal point on n1 by n2's scale.\n Remember, zeros on the end of num2 are wasted effort for dividing. */\n scale2 = n2.n_scale // scale2 = n2->n_scale;\n n2ptr = n2.n_len + scale2 - 1 // n2ptr = (unsigned char *) n2.n_value+n2.n_len+scale2-1;\n while ((scale2 > 0) && (n2.n_value[n2ptr--] === 0)) {\n scale2--\n }\n\n len1 = n1.n_len + scale2\n scale1 = n1.n_scale - scale2\n if (scale1 < scale) {\n extra = scale - scale1\n } else {\n extra = 0\n }\n\n // num1 = (unsigned char *) safe_emalloc (1, n1.n_len+n1.n_scale, extra+2):\n num1 = Libbcmath.safe_emalloc(1, n1.n_len + n1.n_scale, extra + 2)\n if (num1 === null) {\n Libbcmath.bc_out_of_memory()\n }\n // memset (num1, 0, n1->n_len+n1->n_scale+extra+2):\n Libbcmath.memset(num1, 0, 0, n1.n_len + n1.n_scale + extra + 2)\n // memcpy (num1+1, n1.n_value, n1.n_len+n1.n_scale):\n Libbcmath.memcpy(num1, 1, n1.n_value, 0, n1.n_len + n1.n_scale)\n // len2 = n2->n_len + scale2:\n len2 = n2.n_len + scale2\n // num2 = (unsigned char *) safe_emalloc (1, len2, 1):\n num2 = Libbcmath.safe_emalloc(1, len2, 1)\n if (num2 === null) {\n Libbcmath.bc_out_of_memory()\n }\n // memcpy (num2, n2.n_value, len2):\n Libbcmath.memcpy(num2, 0, n2.n_value, 0, len2)\n // *(num2+len2) = 0:\n num2[len2] = 0\n // n2ptr = num2:\n n2ptr = 0\n // while (*n2ptr === 0):\n while (num2[n2ptr] === 0) {\n n2ptr++\n len2--\n }\n\n // Calculate the number of quotient digits.\n if (len2 > len1 + scale) {\n qdigits = scale + 1\n zero = true\n } else {\n zero = false\n if (len2 > len1) {\n qdigits = scale + 1 // One for the zero integer part.\n } else {\n qdigits = len1 - len2 + scale + 1\n }\n }\n\n // Allocate and zero the storage for the quotient.\n // qval = bc_new_num (qdigits-scale,scale);\n qval = Libbcmath.bc_new_num(qdigits - scale, scale)\n // memset (qval->n_value, 0, qdigits);\n Libbcmath.memset(qval.n_value, 0, 0, qdigits)\n // Allocate storage for the temporary storage mval.\n // mval = (unsigned char *) safe_emalloc (1, len2, 1);\n mval = Libbcmath.safe_emalloc(1, len2, 1)\n if (mval === null) {\n Libbcmath.bc_out_of_memory()\n }\n\n // Now for the full divide algorithm.\n if (!zero) { // Normalize\n // norm = Libbcmath.cint(10 / (Libbcmath.cint(n2.n_value[n2ptr]) + 1));\n // norm = 10 / ((int)*n2ptr + 1)\n norm = Math.floor(10 / (n2.n_value[n2ptr] + 1)) // norm = 10 / ((int)*n2ptr + 1);\n if (norm !== 1) {\n // Libbcmath._one_mult(num1, len1+scale1+extra+1, norm, num1);\n Libbcmath._one_mult(num1, 0, len1 + scale1 + extra + 1, norm, num1, 0)\n // Libbcmath._one_mult(n2ptr, len2, norm, n2ptr);\n Libbcmath._one_mult(n2.n_value, n2ptr, len2, norm, n2.n_value, n2ptr)\n // @todo: Check: Is the pointer affected by the call? if so,\n // maybe need to adjust points on return?\n }\n\n // Initialize divide loop.\n qdig = 0\n if (len2 > len1) {\n qptr = len2 - len1 // qptr = (unsigned char *) qval.n_value+len2-len1;\n } else {\n qptr = 0 // qptr = (unsigned char *) qval.n_value;\n }\n\n // Loop\n while (qdig <= len1 + scale - len2) { // Calculate the quotient digit guess.\n if (n2.n_value[n2ptr] === num1[qdig]) {\n qguess = 9\n } else {\n qguess = Math.floor((num1[qdig] * 10 + num1[qdig + 1]) / n2.n_value[n2ptr])\n }\n // Test qguess.\n\n if (n2.n_value[n2ptr + 1] * qguess >\n (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) *\n 10 + num1[qdig + 2]) {\n qguess--\n // And again.\n if (n2.n_value[n2ptr + 1] * qguess >\n (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) *\n 10 + num1[qdig + 2]) {\n qguess--\n }\n }\n\n // Multiply and subtract.\n borrow = 0\n if (qguess !== 0) {\n mval[0] = 0 //* mval = 0; // @CHECK is this to fix ptr2 < 0?\n // _one_mult (n2ptr, len2, qguess, mval+1); // @CHECK\n Libbcmath._one_mult(n2.n_value, n2ptr, len2, qguess, mval, 1)\n ptr1 = qdig + len2 // (unsigned char *) num1+qdig+len2;\n ptr2 = len2 // (unsigned char *) mval+len2;\n // @todo: CHECK: Does a negative pointer return null?\n // ptr2 can be < 0 here as ptr1 = len2, thus count < len2+1 will always fail ?\n for (count = 0; count < len2 + 1; count++) {\n if (ptr2 < 0) {\n // val = Libbcmath.cint(num1[ptr1]) - 0 - borrow;\n // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n val = num1[ptr1] - 0 - borrow // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n } else {\n // val = Libbcmath.cint(num1[ptr1]) - Libbcmath.cint(mval[ptr2--]) - borrow;\n // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n val = num1[ptr1] - mval[ptr2--] - borrow\n }\n if (val < 0) {\n val += 10\n borrow = 1\n } else {\n borrow = 0\n }\n num1[ptr1--] = val\n }\n }\n\n // Test for negative result.\n if (borrow === 1) {\n qguess--\n ptr1 = qdig + len2 // (unsigned char *) num1+qdig+len2;\n ptr2 = len2 - 1 // (unsigned char *) n2ptr+len2-1;\n carry = 0\n for (count = 0; count < len2; count++) {\n if (ptr2 < 0) {\n // val = Libbcmath.cint(num1[ptr1]) + 0 + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n val = num1[ptr1] + 0 + carry\n } else {\n // val = Libbcmath.cint(num1[ptr1]) + Libbcmath.cint(n2.n_value[ptr2--]) + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n val = num1[ptr1] + n2.n_value[ptr2--] + carry\n }\n if (val > 9) {\n val -= 10\n carry = 1\n } else {\n carry = 0\n }\n num1[ptr1--] = val //* ptr1-- = val;\n }\n if (carry === 1) {\n // num1[ptr1] = Libbcmath.cint((num1[ptr1] + 1) % 10);\n // *ptr1 = (*ptr1 + 1) % 10; // @CHECK\n // *ptr1 = (*ptr1 + 1) % 10; // @CHECK\n num1[ptr1] = (num1[ptr1] + 1) % 10\n }\n }\n\n // We now know the quotient digit.\n qval.n_value[qptr++] = qguess //* qptr++ = qguess;\n qdig++\n }\n }\n\n // Clean up and return the number.\n qval.n_sign = (n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS)\n if (Libbcmath.bc_is_zero(qval)) {\n qval.n_sign = Libbcmath.PLUS\n }\n Libbcmath._bc_rm_leading_zeros(qval)\n\n return qval\n\n // return 0; // Everything is OK.\n },\n\n MUL_BASE_DIGITS: 80,\n MUL_SMALL_DIGITS: (80 / 4),\n // #define MUL_SMALL_DIGITS mul_base_digits/4\n\n /* The multiply routine. N2 times N1 is put int PROD with the scale of\n the result being MIN(N2 scale+N1 scale, MAX (SCALE, N2 scale, N1 scale)).\n */\n /**\n * @param n1 bc_num\n * @param n2 bc_num\n * @param scale [int] optional\n */\n bc_multiply: function (n1, n2, scale) {\n var pval // bc_num\n var len1, len2 // int\n var fullScale, prodScale // int\n // Initialize things.\n len1 = n1.n_len + n1.n_scale\n len2 = n2.n_len + n2.n_scale\n fullScale = n1.n_scale + n2.n_scale\n prodScale = Libbcmath.MIN(\n fullScale, Libbcmath.MAX(scale, Libbcmath.MAX(n1.n_scale, n2.n_scale))\n )\n\n // pval = Libbcmath.bc_init_num(); // allow pass by ref\n // Do the multiply\n pval = Libbcmath._bc_rec_mul(n1, len1, n2, len2, fullScale)\n\n // Assign to prod and clean up the number.\n pval.n_sign = (n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS)\n // pval.n_value = pval.nPtr;\n pval.n_len = len2 + len1 + 1 - fullScale\n pval.n_scale = prodScale\n Libbcmath._bc_rm_leading_zeros(pval)\n if (Libbcmath.bc_is_zero(pval)) {\n pval.n_sign = Libbcmath.PLUS\n }\n // bc_free_num (prod);\n return pval\n },\n\n new_sub_num: function (length, scale, value, ptr = 0) {\n var temp = new Libbcmath.bc_num() // eslint-disable-line new-cap\n temp.n_sign = Libbcmath.PLUS\n temp.n_len = length\n temp.n_scale = scale\n temp.n_value = Libbcmath.safe_emalloc(1, length + scale, 0)\n Libbcmath.memcpy(temp.n_value, 0, value, ptr, length + scale)\n return temp\n },\n\n _bc_simp_mul: function (n1, n1len, n2, n2len, fullScale) {\n var prod // bc_num\n var n1ptr, n2ptr, pvptr // char *n1ptr, *n2ptr, *pvptr;\n var n1end, n2end // char *n1end, *n2end; // To the end of n1 and n2.\n var indx, sum, prodlen // int indx, sum, prodlen;\n prodlen = n1len + n2len + 1\n\n prod = Libbcmath.bc_new_num(prodlen, 0)\n\n n1end = n1len - 1 // (char *) (n1->n_value + n1len - 1);\n n2end = n2len - 1 // (char *) (n2->n_value + n2len - 1);\n pvptr = prodlen - 1 // (char *) ((*prod)->n_value + prodlen - 1);\n sum = 0\n\n // Here is the loop...\n for (indx = 0; indx < prodlen - 1; indx++) {\n // (char *) (n1end - MAX(0, indx-n2len+1));\n n1ptr = n1end - Libbcmath.MAX(0, indx - n2len + 1)\n // (char *) (n2end - MIN(indx, n2len-1));\n n2ptr = n2end - Libbcmath.MIN(indx, n2len - 1)\n while ((n1ptr >= 0) && (n2ptr <= n2end)) {\n // sum += *n1ptr-- * *n2ptr++;\n sum += n1.n_value[n1ptr--] * n2.n_value[n2ptr++]\n }\n //* pvptr-- = sum % BASE;\n prod.n_value[pvptr--] = Math.floor(sum % Libbcmath.BASE)\n sum = Math.floor(sum / Libbcmath.BASE) // sum = sum / BASE;\n }\n prod.n_value[pvptr] = sum //* pvptr = sum;\n return prod\n },\n\n /* A special adder/subtractor for the recursive divide and conquer\n multiply algorithm. Note: if sub is called, accum must\n be larger that what is being subtracted. Also, accum and val\n must have n_scale = 0. (e.g. they must look like integers. *) */\n _bc_shift_addsub: function (accum, val, shift, sub) {\n var accp, valp // signed char *accp, *valp;\n var count, carry // int count, carry;\n count = val.n_len\n if (val.n_value[0] === 0) {\n count--\n }\n\n // assert (accum->n_len+accum->n_scale >= shift+count);\n if (accum.n_len + accum.n_scale < shift + count) {\n throw new Error('len + scale < shift + count') // ?? I think that's what assert does :)\n }\n\n // Set up pointers and others\n // (signed char *)(accum->n_value + accum->n_len + accum->n_scale - shift - 1);\n accp = accum.n_len + accum.n_scale - shift - 1\n valp = val.n_len - 1 // (signed char *)(val->n_value + val->n_len - 1);\n carry = 0\n if (sub) {\n // Subtraction, carry is really borrow.\n while (count--) {\n accum.n_value[accp] -= val.n_value[valp--] + carry //* accp -= *valp-- + carry;\n if (accum.n_value[accp] < 0) { // if (*accp < 0)\n carry = 1\n accum.n_value[accp--] += Libbcmath.BASE //* accp-- += BASE;\n } else {\n carry = 0\n accp--\n }\n }\n while (carry) {\n accum.n_value[accp] -= carry //* accp -= carry;\n if (accum.n_value[accp] < 0) { // if (*accp < 0)\n accum.n_value[accp--] += Libbcmath.BASE // *accp-- += BASE;\n } else {\n carry = 0\n }\n }\n } else {\n // Addition\n while (count--) {\n accum.n_value[accp] += val.n_value[valp--] + carry //* accp += *valp-- + carry;\n if (accum.n_value[accp] > (Libbcmath.BASE - 1)) { // if (*accp > (BASE-1))\n carry = 1\n accum.n_value[accp--] -= Libbcmath.BASE //* accp-- -= BASE;\n } else {\n carry = 0\n accp--\n }\n }\n while (carry) {\n accum.n_value[accp] += carry //* accp += carry;\n if (accum.n_value[accp] > (Libbcmath.BASE - 1)) { // if (*accp > (BASE-1))\n accum.n_value[accp--] -= Libbcmath.BASE //* accp-- -= BASE;\n } else {\n carry = 0\n }\n }\n }\n return true // accum is the pass-by-reference return\n },\n\n /* Recursive divide and conquer multiply algorithm.\n based on\n Let u = u0 + u1*(b^n)\n Let v = v0 + v1*(b^n)\n Then uv = (B^2n+B^n)*u1*v1 + B^n*(u1-u0)*(v0-v1) + (B^n+1)*u0*v0\n\n B is the base of storage, number of digits in u1,u0 close to equal.\n */\n _bc_rec_mul: function (u, ulen, v, vlen, fullScale) {\n var prod // @return\n var u0, u1, v0, v1 // bc_num\n // var u0len,\n // var v0len // int\n var m1, m2, m3, d1, d2 // bc_num\n var n, prodlen, m1zero // int\n var d1len, d2len // int\n // Base case?\n if ((ulen + vlen) < Libbcmath.MUL_BASE_DIGITS ||\n ulen < Libbcmath.MUL_SMALL_DIGITS ||\n vlen < Libbcmath.MUL_SMALL_DIGITS) {\n return Libbcmath._bc_simp_mul(u, ulen, v, vlen, fullScale)\n }\n\n // Calculate n -- the u and v split point in digits.\n n = Math.floor((Libbcmath.MAX(ulen, vlen) + 1) / 2)\n\n // Split u and v.\n if (ulen < n) {\n u1 = Libbcmath.bc_init_num() // u1 = bc_copy_num (BCG(_zero_));\n u0 = Libbcmath.new_sub_num(ulen, 0, u.n_value)\n } else {\n u1 = Libbcmath.new_sub_num(ulen - n, 0, u.n_value)\n u0 = Libbcmath.new_sub_num(n, 0, u.n_value, ulen - n)\n }\n if (vlen < n) {\n v1 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n v0 = Libbcmath.new_sub_num(vlen, 0, v.n_value)\n } else {\n v1 = Libbcmath.new_sub_num(vlen - n, 0, v.n_value)\n v0 = Libbcmath.new_sub_num(n, 0, v.n_value, vlen - n)\n }\n Libbcmath._bc_rm_leading_zeros(u1)\n Libbcmath._bc_rm_leading_zeros(u0)\n // var u0len = u0.n_len\n Libbcmath._bc_rm_leading_zeros(v1)\n Libbcmath._bc_rm_leading_zeros(v0)\n // var v0len = v0.n_len\n\n m1zero = Libbcmath.bc_is_zero(u1) || Libbcmath.bc_is_zero(v1)\n\n // Calculate sub results ...\n d1 = Libbcmath.bc_init_num() // needed?\n d2 = Libbcmath.bc_init_num() // needed?\n d1 = Libbcmath.bc_sub(u1, u0, 0)\n d1len = d1.n_len\n\n d2 = Libbcmath.bc_sub(v0, v1, 0)\n d2len = d2.n_len\n\n // Do recursive multiplies and shifted adds.\n if (m1zero) {\n m1 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n } else {\n // m1 = Libbcmath.bc_init_num(); //allow pass-by-ref\n m1 = Libbcmath._bc_rec_mul(u1, u1.n_len, v1, v1.n_len, 0)\n }\n if (Libbcmath.bc_is_zero(d1) || Libbcmath.bc_is_zero(d2)) {\n m2 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n } else {\n // m2 = Libbcmath.bc_init_num(); //allow pass-by-ref\n m2 = Libbcmath._bc_rec_mul(d1, d1len, d2, d2len, 0)\n }\n\n if (Libbcmath.bc_is_zero(u0) || Libbcmath.bc_is_zero(v0)) {\n m3 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n } else {\n // m3 = Libbcmath.bc_init_num(); //allow pass-by-ref\n m3 = Libbcmath._bc_rec_mul(u0, u0.n_len, v0, v0.n_len, 0)\n }\n\n // Initialize product\n prodlen = ulen + vlen + 1\n prod = Libbcmath.bc_new_num(prodlen, 0)\n\n if (!m1zero) {\n Libbcmath._bc_shift_addsub(prod, m1, 2 * n, 0)\n Libbcmath._bc_shift_addsub(prod, m1, n, 0)\n }\n Libbcmath._bc_shift_addsub(prod, m3, n, 0)\n Libbcmath._bc_shift_addsub(prod, m3, 0, 0)\n Libbcmath._bc_shift_addsub(prod, m2, n, d1.n_sign !== d2.n_sign)\n\n return prod\n // Now clean up!\n // bc_free_num (&u1);\n // bc_free_num (&u0);\n // bc_free_num (&v1);\n // bc_free_num (&m1);\n // bc_free_num (&v0);\n // bc_free_num (&m2);\n // bc_free_num (&m3);\n // bc_free_num (&d1);\n // bc_free_num (&d2);\n },\n\n /**\n *\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @param {boolean} useSign\n * @param {boolean} ignoreLast\n * @return -1, 0, 1 (see bc_compare)\n */\n _bc_do_compare: function (n1, n2, useSign, ignoreLast) {\n var n1ptr, n2ptr // int\n var count // int\n // First, compare signs.\n if (useSign && (n1.n_sign !== n2.n_sign)) {\n if (n1.n_sign === Libbcmath.PLUS) {\n return (1) // Positive N1 > Negative N2\n } else {\n return (-1) // Negative N1 < Positive N1\n }\n }\n\n // Now compare the magnitude.\n if (n1.n_len !== n2.n_len) {\n if (n1.n_len > n2.n_len) { // Magnitude of n1 > n2.\n if (!useSign || (n1.n_sign === Libbcmath.PLUS)) {\n return (1)\n } else {\n return (-1)\n }\n } else { // Magnitude of n1 < n2.\n if (!useSign || (n1.n_sign === Libbcmath.PLUS)) {\n return (-1)\n } else {\n return (1)\n }\n }\n }\n\n /* If we get here, they have the same number of integer digits.\n check the integer part and the equal length part of the fraction. */\n count = n1.n_len + Math.min(n1.n_scale, n2.n_scale)\n n1ptr = 0\n n2ptr = 0\n\n while ((count > 0) && (n1.n_value[n1ptr] === n2.n_value[n2ptr])) {\n n1ptr++\n n2ptr++\n count--\n }\n\n if (ignoreLast && (count === 1) && (n1.n_scale === n2.n_scale)) {\n return (0)\n }\n\n if (count !== 0) {\n if (n1.n_value[n1ptr] > n2.n_value[n2ptr]) { // Magnitude of n1 > n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (1)\n } else {\n return (-1)\n }\n } else { // Magnitude of n1 < n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (-1)\n } else {\n return (1)\n }\n }\n }\n\n // They are equal up to the last part of the equal part of the fraction.\n if (n1.n_scale !== n2.n_scale) {\n if (n1.n_scale > n2.n_scale) {\n for (count = (n1.n_scale - n2.n_scale); count > 0; count--) {\n if (n1.n_value[n1ptr++] !== 0) { // Magnitude of n1 > n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (1)\n } else {\n return (-1)\n }\n }\n }\n } else {\n for (count = (n2.n_scale - n1.n_scale); count > 0; count--) {\n if (n2.n_value[n2ptr++] !== 0) { // Magnitude of n1 < n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (-1)\n } else {\n return (1)\n }\n }\n }\n }\n }\n\n // They must be equal!\n return (0)\n },\n\n /* Here is the full subtract routine that takes care of negative numbers.\n N2 is subtracted from N1 and the result placed in RESULT. SCALE_MIN\n is the minimum scale for the result. */\n bc_sub: function (n1, n2, scaleMin) {\n var diff // bc_num\n var cmpRes, resScale // int\n if (n1.n_sign !== n2.n_sign) {\n diff = Libbcmath._bc_do_add(n1, n2, scaleMin)\n diff.n_sign = n1.n_sign\n } else { // subtraction must be done.\n // Compare magnitudes.\n cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false)\n switch (cmpRes) {\n case -1:\n // n1 is less than n2, subtract n1 from n2.\n diff = Libbcmath._bc_do_sub(n2, n1, scaleMin)\n diff.n_sign = (n2.n_sign === Libbcmath.PLUS ? Libbcmath.MINUS : Libbcmath.PLUS)\n break\n case 0:\n // They are equal! return zero!\n resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale))\n diff = Libbcmath.bc_new_num(1, resScale)\n Libbcmath.memset(diff.n_value, 0, 0, resScale + 1)\n break\n case 1:\n // n2 is less than n1, subtract n2 from n1.\n diff = Libbcmath._bc_do_sub(n1, n2, scaleMin)\n diff.n_sign = n1.n_sign\n break\n }\n }\n\n // Clean up and return.\n // bc_free_num (result);\n //* result = diff;\n return diff\n },\n\n _bc_do_add: function (n1, n2, scaleMin) {\n var sum // bc_num\n var sumScale, sumDigits // int\n var n1ptr, n2ptr, sumptr // int\n var carry, n1bytes, n2bytes // int\n var tmp // int\n\n // Prepare sum.\n sumScale = Libbcmath.MAX(n1.n_scale, n2.n_scale)\n sumDigits = Libbcmath.MAX(n1.n_len, n2.n_len) + 1\n sum = Libbcmath.bc_new_num(sumDigits, Libbcmath.MAX(sumScale, scaleMin))\n\n // Start with the fraction part. Initialize the pointers.\n n1bytes = n1.n_scale\n n2bytes = n2.n_scale\n n1ptr = (n1.n_len + n1bytes - 1)\n n2ptr = (n2.n_len + n2bytes - 1)\n sumptr = (sumScale + sumDigits - 1)\n\n // Add the fraction part. First copy the longer fraction\n // (ie when adding 1.2345 to 1 we know .2345 is correct already) .\n if (n1bytes !== n2bytes) {\n if (n1bytes > n2bytes) {\n // n1 has more dp then n2\n while (n1bytes > n2bytes) {\n sum.n_value[sumptr--] = n1.n_value[n1ptr--]\n // *sumptr-- = *n1ptr--;\n n1bytes--\n }\n } else {\n // n2 has more dp then n1\n while (n2bytes > n1bytes) {\n sum.n_value[sumptr--] = n2.n_value[n2ptr--]\n // *sumptr-- = *n2ptr--;\n n2bytes--\n }\n }\n }\n\n // Now add the remaining fraction part and equal size integer parts.\n n1bytes += n1.n_len\n n2bytes += n2.n_len\n carry = 0\n while ((n1bytes > 0) && (n2bytes > 0)) {\n // add the two numbers together\n tmp = n1.n_value[n1ptr--] + n2.n_value[n2ptr--] + carry\n // *sumptr = *n1ptr-- + *n2ptr-- + carry;\n // check if they are >= 10 (impossible to be more then 18)\n if (tmp >= Libbcmath.BASE) {\n carry = 1\n tmp -= Libbcmath.BASE // yep, subtract 10, add a carry\n } else {\n carry = 0\n }\n sum.n_value[sumptr] = tmp\n sumptr--\n n1bytes--\n n2bytes--\n }\n\n // Now add carry the [rest of the] longer integer part.\n if (n1bytes === 0) {\n // n2 is a bigger number then n1\n while (n2bytes-- > 0) {\n tmp = n2.n_value[n2ptr--] + carry\n // *sumptr = *n2ptr-- + carry;\n if (tmp >= Libbcmath.BASE) {\n carry = 1\n tmp -= Libbcmath.BASE\n } else {\n carry = 0\n }\n sum.n_value[sumptr--] = tmp\n }\n } else {\n // n1 is bigger then n2..\n while (n1bytes-- > 0) {\n tmp = n1.n_value[n1ptr--] + carry\n // *sumptr = *n1ptr-- + carry;\n if (tmp >= Libbcmath.BASE) {\n carry = 1\n tmp -= Libbcmath.BASE\n } else {\n carry = 0\n }\n sum.n_value[sumptr--] = tmp\n }\n }\n\n // Set final carry.\n if (carry === 1) {\n sum.n_value[sumptr] += 1\n // *sumptr += 1;\n }\n\n // Adjust sum and return.\n Libbcmath._bc_rm_leading_zeros(sum)\n return sum\n },\n\n /**\n * Perform a subtraction\n *\n * Perform subtraction: N2 is subtracted from N1 and the value is\n * returned. The signs of N1 and N2 are ignored. Also, N1 is\n * assumed to be larger than N2. SCALE_MIN is the minimum scale\n * of the result.\n *\n * Basic school maths says to subtract 2 numbers..\n * 1. make them the same length, the decimal places, and the integer part\n * 2. start from the right and subtract the two numbers from each other\n * 3. if the sum of the 2 numbers < 0, carry -1 to the next set and add 10\n * (ie 18 > carry 1 becomes 8). thus 0.9 + 0.9 = 1.8\n *\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @param {int} scaleMin\n * @return bc_num\n */\n _bc_do_sub: function (n1, n2, scaleMin) {\n var diff // bc_num\n var diffScale, diffLen // int\n var minScale, minLen // int\n var n1ptr, n2ptr, diffptr // int\n var borrow, count, val // int\n // Allocate temporary storage.\n diffLen = Libbcmath.MAX(n1.n_len, n2.n_len)\n diffScale = Libbcmath.MAX(n1.n_scale, n2.n_scale)\n minLen = Libbcmath.MIN(n1.n_len, n2.n_len)\n minScale = Libbcmath.MIN(n1.n_scale, n2.n_scale)\n diff = Libbcmath.bc_new_num(diffLen, Libbcmath.MAX(diffScale, scaleMin))\n\n /* Not needed?\n // Zero extra digits made by scaleMin.\n if (scaleMin > diffScale) {\n diffptr = (char *) (diff->n_value + diffLen + diffScale);\n for (count = scaleMin - diffScale; count > 0; count--) {\n *diffptr++ = 0;\n }\n }\n */\n\n // Initialize the subtract.\n n1ptr = (n1.n_len + n1.n_scale - 1)\n n2ptr = (n2.n_len + n2.n_scale - 1)\n diffptr = (diffLen + diffScale - 1)\n\n // Subtract the numbers.\n borrow = 0\n\n // Take care of the longer scaled number.\n if (n1.n_scale !== minScale) {\n // n1 has the longer scale\n for (count = n1.n_scale - minScale; count > 0; count--) {\n diff.n_value[diffptr--] = n1.n_value[n1ptr--]\n // *diffptr-- = *n1ptr--;\n }\n } else {\n // n2 has the longer scale\n for (count = n2.n_scale - minScale; count > 0; count--) {\n val = 0 - n2.n_value[n2ptr--] - borrow\n // val = - *n2ptr-- - borrow;\n if (val < 0) {\n val += Libbcmath.BASE\n borrow = 1\n } else {\n borrow = 0\n }\n diff.n_value[diffptr--] = val\n //* diffptr-- = val;\n }\n }\n\n // Now do the equal length scale and integer parts.\n for (count = 0; count < minLen + minScale; count++) {\n val = n1.n_value[n1ptr--] - n2.n_value[n2ptr--] - borrow\n // val = *n1ptr-- - *n2ptr-- - borrow;\n if (val < 0) {\n val += Libbcmath.BASE\n borrow = 1\n } else {\n borrow = 0\n }\n diff.n_value[diffptr--] = val\n //* diffptr-- = val;\n }\n\n // If n1 has more digits then n2, we now do that subtract.\n if (diffLen !== minLen) {\n for (count = diffLen - minLen; count > 0; count--) {\n val = n1.n_value[n1ptr--] - borrow\n // val = *n1ptr-- - borrow;\n if (val < 0) {\n val += Libbcmath.BASE\n borrow = 1\n } else {\n borrow = 0\n }\n diff.n_value[diffptr--] = val\n }\n }\n\n // Clean up and return.\n Libbcmath._bc_rm_leading_zeros(diff)\n return diff\n },\n\n /**\n *\n * @param {int} length\n * @param {int} scale\n * @return bc_num\n */\n bc_new_num: function (length, scale) {\n var temp // bc_num\n temp = new Libbcmath.bc_num() // eslint-disable-line new-cap\n temp.n_sign = Libbcmath.PLUS\n temp.n_len = length\n temp.n_scale = scale\n temp.n_value = Libbcmath.safe_emalloc(1, length + scale, 0)\n Libbcmath.memset(temp.n_value, 0, 0, length + scale)\n return temp\n },\n\n safe_emalloc: function (size, len, extra) {\n return Array((size * len) + extra)\n },\n\n /**\n * Create a new number\n */\n bc_init_num: function () {\n return new Libbcmath.bc_new_num(1, 0) // eslint-disable-line new-cap\n },\n\n _bc_rm_leading_zeros: function (num) {\n // We can move n_value to point to the first non zero digit!\n while ((num.n_value[0] === 0) && (num.n_len > 1)) {\n num.n_value.shift()\n num.n_len--\n }\n },\n\n /**\n * Convert to bc_num detecting scale\n */\n php_str2num: function (str) {\n var p\n p = str.indexOf('.')\n if (p === -1) {\n return Libbcmath.bc_str2num(str, 0)\n } else {\n return Libbcmath.bc_str2num(str, (str.length - p))\n }\n },\n\n CH_VAL: function (c) {\n return c - '0' // ??\n },\n\n BCD_CHAR: function (d) {\n return d + '0' // ??\n },\n\n isdigit: function (c) {\n return isNaN(parseInt(c, 10))\n },\n\n bc_str2num: function (strIn, scale) {\n var str, num, ptr, digits, strscale, zeroInt, nptr\n // remove any non-expected characters\n // Check for valid number and count digits.\n\n str = strIn.split('') // convert to array\n ptr = 0 // str\n digits = 0\n strscale = 0\n zeroInt = false\n if ((str[ptr] === '+') || (str[ptr] === '-')) {\n ptr++ // Sign\n }\n while (str[ptr] === '0') {\n ptr++ // Skip leading zeros.\n }\n // while (Libbcmath.isdigit(str[ptr])) {\n while ((str[ptr]) % 1 === 0) { // Libbcmath.isdigit(str[ptr])) {\n ptr++\n digits++ // digits\n }\n\n if (str[ptr] === '.') {\n ptr++ // decimal point\n }\n // while (Libbcmath.isdigit(str[ptr])) {\n while ((str[ptr]) % 1 === 0) { // Libbcmath.isdigit(str[ptr])) {\n ptr++\n strscale++ // digits\n }\n\n if ((str[ptr]) || (digits + strscale === 0)) {\n // invalid number, return 0\n return Libbcmath.bc_init_num()\n //* num = bc_copy_num (BCG(_zero_));\n }\n\n // Adjust numbers and allocate storage and initialize fields.\n strscale = Libbcmath.MIN(strscale, scale)\n if (digits === 0) {\n zeroInt = true\n digits = 1\n }\n\n num = Libbcmath.bc_new_num(digits, strscale)\n\n // Build the whole number.\n ptr = 0 // str\n if (str[ptr] === '-') {\n num.n_sign = Libbcmath.MINUS\n // (*num)->n_sign = MINUS;\n ptr++\n } else {\n num.n_sign = Libbcmath.PLUS\n // (*num)->n_sign = PLUS;\n if (str[ptr] === '+') {\n ptr++\n }\n }\n while (str[ptr] === '0') {\n ptr++ // Skip leading zeros.\n }\n\n nptr = 0 // (*num)->n_value;\n if (zeroInt) {\n num.n_value[nptr++] = 0\n digits = 0\n }\n for (; digits > 0; digits--) {\n num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++])\n //* nptr++ = CH_VAL(*ptr++);\n }\n\n // Build the fractional part.\n if (strscale > 0) {\n ptr++ // skip the decimal point!\n for (; strscale > 0; strscale--) {\n num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++])\n }\n }\n\n return num\n },\n\n cint: function (v) {\n if (typeof v === 'undefined') {\n v = 0\n }\n var x = parseInt(v, 10)\n if (isNaN(x)) {\n x = 0\n }\n return x\n },\n\n /**\n * Basic min function\n * @param {int} a\n * @param {int} b\n */\n MIN: function (a, b) {\n return ((a > b) ? b : a)\n },\n\n /**\n * Basic max function\n * @param {int} a\n * @param {int} b\n */\n MAX: function (a, b) {\n return ((a > b) ? a : b)\n },\n\n /**\n * Basic odd function\n * @param {int} a\n */\n ODD: function (a) {\n return (a & 1)\n },\n\n /**\n * replicate c function\n * @param {array} r return (by reference)\n * @param {int} ptr\n * @param {string} chr char to fill\n * @param {int} len length to fill\n */\n memset: function (r, ptr, chr, len) {\n var i\n for (i = 0; i < len; i++) {\n r[ptr + i] = chr\n }\n },\n\n /**\n * Replacement c function\n * Obviously can't work like c does, so we've added an \"offset\"\n * param so you could do memcpy(dest+1, src, len) as memcpy(dest, 1, src, len)\n * Also only works on arrays\n */\n memcpy: function (dest, ptr, src, srcptr, len) {\n var i\n for (i = 0; i < len; i++) {\n dest[ptr + i] = src[srcptr + i]\n }\n return true\n },\n\n /**\n * Determine if the number specified is zero or not\n * @param {bc_num} num number to check\n * @return boolean true when zero, false when not zero.\n */\n bc_is_zero: function (num) {\n var count // int\n var nptr // int\n // Quick check.\n // if (num === BCG(_zero_)) return TRUE;\n // Initialize\n count = num.n_len + num.n_scale\n nptr = 0 // num->n_value;\n // The check\n while ((count > 0) && (num.n_value[nptr++] === 0)) {\n count--\n }\n\n if (count !== 0) {\n return false\n } else {\n return true\n }\n },\n\n bc_out_of_memory: function () {\n throw new Error('(BC) Out of memory')\n }\n }\n return Libbcmath\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/_phpCastString.js b/node_modules/locutus/php/_helpers/_phpCastString.js
deleted file mode 100644
index 8228372..0000000
--- a/node_modules/locutus/php/_helpers/_phpCastString.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function _phpCastString(value) {
- // original by: Rafał Kukawski
- // example 1: _phpCastString(true)
- // returns 1: '1'
- // example 2: _phpCastString(false)
- // returns 2: ''
- // example 3: _phpCastString('foo')
- // returns 3: 'foo'
- // example 4: _phpCastString(0/0)
- // returns 4: 'NAN'
- // example 5: _phpCastString(1/0)
- // returns 5: 'INF'
- // example 6: _phpCastString(-1/0)
- // returns 6: '-INF'
- // example 7: _phpCastString(null)
- // returns 7: ''
- // example 8: _phpCastString(undefined)
- // returns 8: ''
- // example 9: _phpCastString([])
- // returns 9: 'Array'
- // example 10: _phpCastString({})
- // returns 10: 'Object'
- // example 11: _phpCastString(0)
- // returns 11: '0'
- // example 12: _phpCastString(1)
- // returns 12: '1'
- // example 13: _phpCastString(3.14)
- // returns 13: '3.14'
-
- var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
-
- switch (type) {
- case 'boolean':
- return value ? '1' : '';
- case 'string':
- return value;
- case 'number':
- if (isNaN(value)) {
- return 'NAN';
- }
-
- if (!isFinite(value)) {
- return (value < 0 ? '-' : '') + 'INF';
- }
-
- return value + '';
- case 'undefined':
- return '';
- case 'object':
- if (Array.isArray(value)) {
- return 'Array';
- }
-
- if (value !== null) {
- return 'Object';
- }
-
- return '';
- case 'function':
- // fall through
- default:
- throw new Error('Unsupported value type');
- }
-};
-//# sourceMappingURL=_phpCastString.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/_phpCastString.js.map b/node_modules/locutus/php/_helpers/_phpCastString.js.map
deleted file mode 100644
index 281aae6..0000000
--- a/node_modules/locutus/php/_helpers/_phpCastString.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/_helpers/_phpCastString.js"],"names":["module","exports","_phpCastString","value","type","isNaN","isFinite","Array","isArray","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,KAAzB,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAcD,KAAd,yCAAcA,KAAd,CAAJ;;AAEA,UAAQC,IAAR;AACE,SAAK,SAAL;AACE,aAAOD,QAAQ,GAAR,GAAc,EAArB;AACF,SAAK,QAAL;AACE,aAAOA,KAAP;AACF,SAAK,QAAL;AACE,UAAIE,MAAMF,KAAN,CAAJ,EAAkB;AAChB,eAAO,KAAP;AACD;;AAED,UAAI,CAACG,SAASH,KAAT,CAAL,EAAsB;AACpB,eAAO,CAACA,QAAQ,CAAR,GAAY,GAAZ,GAAkB,EAAnB,IAAyB,KAAhC;AACD;;AAED,aAAOA,QAAQ,EAAf;AACF,SAAK,WAAL;AACE,aAAO,EAAP;AACF,SAAK,QAAL;AACE,UAAII,MAAMC,OAAN,CAAcL,KAAd,CAAJ,EAA0B;AACxB,eAAO,OAAP;AACD;;AAED,UAAIA,UAAU,IAAd,EAAoB;AAClB,eAAO,QAAP;AACD;;AAED,aAAO,EAAP;AACF,SAAK,UAAL;AACE;AACF;AACE,YAAM,IAAIM,KAAJ,CAAU,wBAAV,CAAN;AA9BJ;AAgCD,CA/DD","file":"_phpCastString.js","sourcesContent":["module.exports = function _phpCastString (value) {\n // original by: Rafał Kukawski\n // example 1: _phpCastString(true)\n // returns 1: '1'\n // example 2: _phpCastString(false)\n // returns 2: ''\n // example 3: _phpCastString('foo')\n // returns 3: 'foo'\n // example 4: _phpCastString(0/0)\n // returns 4: 'NAN'\n // example 5: _phpCastString(1/0)\n // returns 5: 'INF'\n // example 6: _phpCastString(-1/0)\n // returns 6: '-INF'\n // example 7: _phpCastString(null)\n // returns 7: ''\n // example 8: _phpCastString(undefined)\n // returns 8: ''\n // example 9: _phpCastString([])\n // returns 9: 'Array'\n // example 10: _phpCastString({})\n // returns 10: 'Object'\n // example 11: _phpCastString(0)\n // returns 11: '0'\n // example 12: _phpCastString(1)\n // returns 12: '1'\n // example 13: _phpCastString(3.14)\n // returns 13: '3.14'\n\n var type = typeof value\n\n switch (type) {\n case 'boolean':\n return value ? '1' : ''\n case 'string':\n return value\n case 'number':\n if (isNaN(value)) {\n return 'NAN'\n }\n\n if (!isFinite(value)) {\n return (value < 0 ? '-' : '') + 'INF'\n }\n\n return value + ''\n case 'undefined':\n return ''\n case 'object':\n if (Array.isArray(value)) {\n return 'Array'\n }\n\n if (value !== null) {\n return 'Object'\n }\n\n return ''\n case 'function':\n // fall through\n default:\n throw new Error('Unsupported value type')\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/_php_cast_int.js b/node_modules/locutus/php/_helpers/_php_cast_int.js
deleted file mode 100644
index b9724e4..0000000
--- a/node_modules/locutus/php/_helpers/_php_cast_int.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function _php_cast_int(value) {
- // eslint-disable-line camelcase
- // original by: Rafał Kukawski
- // example 1: _php_cast_int(false)
- // returns 1: 0
- // example 2: _php_cast_int(true)
- // returns 2: 1
- // example 3: _php_cast_int(0)
- // returns 3: 0
- // example 4: _php_cast_int(1)
- // returns 4: 1
- // example 5: _php_cast_int(3.14)
- // returns 5: 3
- // example 6: _php_cast_int('')
- // returns 6: 0
- // example 7: _php_cast_int('0')
- // returns 7: 0
- // example 8: _php_cast_int('abc')
- // returns 8: 0
- // example 9: _php_cast_int(null)
- // returns 9: 0
- // example 10: _php_cast_int(undefined)
- // returns 10: 0
- // example 11: _php_cast_int('123abc')
- // returns 11: 123
- // example 12: _php_cast_int('123e4')
- // returns 12: 123
- // example 13: _php_cast_int(0x200000001)
- // returns 13: 8589934593
-
- var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
-
- switch (type) {
- case 'number':
- if (isNaN(value) || !isFinite(value)) {
- // from PHP 7, NaN and Infinity are casted to 0
- return 0;
- }
-
- return value < 0 ? Math.ceil(value) : Math.floor(value);
- case 'string':
- return parseInt(value, 10) || 0;
- case 'boolean':
- // fall through
- default:
- // Behaviour for types other than float, string, boolean
- // is undefined and can change any time.
- // To not invent complex logic
- // that mimics PHP 7.0 behaviour
- // casting value->bool->number is used
- return +!!value;
- }
-};
-//# sourceMappingURL=_php_cast_int.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/_php_cast_int.js.map b/node_modules/locutus/php/_helpers/_php_cast_int.js.map
deleted file mode 100644
index b16d748..0000000
--- a/node_modules/locutus/php/_helpers/_php_cast_int.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/_helpers/_php_cast_int.js"],"names":["module","exports","_php_cast_int","value","type","isNaN","isFinite","Math","ceil","floor","parseInt"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,KAAxB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAcD,KAAd,yCAAcA,KAAd,CAAJ;;AAEA,UAAQC,IAAR;AACE,SAAK,QAAL;AACE,UAAIC,MAAMF,KAAN,KAAgB,CAACG,SAASH,KAAT,CAArB,EAAsC;AACpC;AACA,eAAO,CAAP;AACD;;AAED,aAAOA,QAAQ,CAAR,GAAYI,KAAKC,IAAL,CAAUL,KAAV,CAAZ,GAA+BI,KAAKE,KAAL,CAAWN,KAAX,CAAtC;AACF,SAAK,QAAL;AACE,aAAOO,SAASP,KAAT,EAAgB,EAAhB,KAAuB,CAA9B;AACF,SAAK,SAAL;AACE;AACF;AACE;AACA;AACA;AACA;AACA;AACA,aAAO,CAAC,CAAC,CAACA,KAAV;AAlBJ;AAoBD,CAnDD","file":"_php_cast_int.js","sourcesContent":["module.exports = function _php_cast_int (value) { // eslint-disable-line camelcase\n // original by: Rafał Kukawski\n // example 1: _php_cast_int(false)\n // returns 1: 0\n // example 2: _php_cast_int(true)\n // returns 2: 1\n // example 3: _php_cast_int(0)\n // returns 3: 0\n // example 4: _php_cast_int(1)\n // returns 4: 1\n // example 5: _php_cast_int(3.14)\n // returns 5: 3\n // example 6: _php_cast_int('')\n // returns 6: 0\n // example 7: _php_cast_int('0')\n // returns 7: 0\n // example 8: _php_cast_int('abc')\n // returns 8: 0\n // example 9: _php_cast_int(null)\n // returns 9: 0\n // example 10: _php_cast_int(undefined)\n // returns 10: 0\n // example 11: _php_cast_int('123abc')\n // returns 11: 123\n // example 12: _php_cast_int('123e4')\n // returns 12: 123\n // example 13: _php_cast_int(0x200000001)\n // returns 13: 8589934593\n\n var type = typeof value\n\n switch (type) {\n case 'number':\n if (isNaN(value) || !isFinite(value)) {\n // from PHP 7, NaN and Infinity are casted to 0\n return 0\n }\n\n return value < 0 ? Math.ceil(value) : Math.floor(value)\n case 'string':\n return parseInt(value, 10) || 0\n case 'boolean':\n // fall through\n default:\n // Behaviour for types other than float, string, boolean\n // is undefined and can change any time.\n // To not invent complex logic\n // that mimics PHP 7.0 behaviour\n // casting value->bool->number is used\n return +!!value\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/index.js b/node_modules/locutus/php/_helpers/index.js
deleted file mode 100644
index df2507e..0000000
--- a/node_modules/locutus/php/_helpers/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports['_bc'] = require('./_bc');
-module.exports['_phpCastString'] = require('./_phpCastString');
-module.exports['_php_cast_int'] = require('./_php_cast_int');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/_helpers/index.js.map b/node_modules/locutus/php/_helpers/index.js.map
deleted file mode 100644
index 7d41666..0000000
--- a/node_modules/locutus/php/_helpers/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/_helpers/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,eAAf,IAAkCC,QAAQ,iBAAR,CAAlC","file":"index.js","sourcesContent":["module.exports['_bc'] = require('./_bc')\nmodule.exports['_phpCastString'] = require('./_phpCastString')\nmodule.exports['_php_cast_int'] = require('./_php_cast_int')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js b/node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js
deleted file mode 100644
index 801430d..0000000
--- a/node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js
+++ /dev/null
@@ -1,1255 +0,0 @@
-'use strict';
-
-module.exports = function _bc() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io
-/php/_helpers/_bc
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $bc = _bc()
- // example 1: var $result = $bc.PLUS
- // returns 1: '+'
-
- /**
- * BC Math Library for Javascript
- * Ported from the PHP5 bcmath extension source code,
- * which uses the Libbcmath package...
- * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
- * Copyright (C) 2000 Philip A. Nelson
- * The Free Software Foundation, Inc.
- * 59 Temple Place, Suite 330
- * Boston, MA 02111-1307 USA.
- * e-mail: philnelson@acm.org
- * us-mail: Philip A. Nelson
- * Computer Science Department, 9062
- * Western Washington University
- * Bellingham, WA 98226-9062
- *
- * bcmath-js homepage:
- *
- * This code is covered under the LGPL licence, and can be used however you want :)
- * Be kind and share any decent code changes.
- */
-
- /**
- * Binary Calculator (BC) Arbitrary Precision Mathematics Lib v0.10 (LGPL)
- * Copy of Libbcmath included in PHP5 src
- *
- * Note: this is just the shared library file and does not include the php-style functions.
- * use bcmath{-min}.js for functions like bcadd, bcsub etc.
- *
- * Feel free to use how-ever you want, just email any bug-fixes/improvements
- * to the sourceforge project:
- *
- *
- * Ported from the PHP5 bcmath extension source code,
- * which uses the Libbcmath package...
- * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
- * Copyright (C) 2000 Philip A. Nelson
- * The Free Software Foundation, Inc.
- * 59 Temple Place, Suite 330
- * Boston, MA 02111-1307 USA.
- * e-mail: philnelson@acm.org
- * us-mail: Philip A. Nelson
- * Computer Science Department, 9062
- * Western Washington University
- * Bellingham, WA 98226-9062
- */
-
- var Libbcmath = {
- PLUS: '+',
- MINUS: '-',
- BASE: 10,
- // must be 10 (for now)
- scale: 0,
- // default scale
- /**
- * Basic number structure
- */
- bc_num: function bc_num() {
- this.n_sign = null; // sign
- this.n_len = null; // (int) The number of digits before the decimal point.
- this.n_scale = null; // (int) The number of digits after the decimal point.
- // this.n_refs = null; // (int) The number of pointers to this number.
- // this.n_text = null; // ?? Linked list for available list.
- this.n_value = null; // array as value, where 1.23 = [1,2,3]
- this.toString = function () {
- var r, tmp;
- tmp = this.n_value.join('');
-
- // add minus sign (if applicable) then add the integer part
- r = (this.n_sign === Libbcmath.PLUS ? '' : this.n_sign) + tmp.substr(0, this.n_len);
-
- // if decimal places, add a . and the decimal part
- if (this.n_scale > 0) {
- r += '.' + tmp.substr(this.n_len, this.n_scale);
- }
- return r;
- };
- },
-
- /**
- * Base add function
- *
- // Here is the full add routine that takes care of negative numbers.
- // N1 is added to N2 and the result placed into RESULT. SCALE_MIN
- // is the minimum scale for the result.
- *
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @param {int} scaleMin
- * @return bc_num
- */
- bc_add: function bc_add(n1, n2, scaleMin) {
- var sum, cmpRes, resScale;
-
- if (n1.n_sign === n2.n_sign) {
- sum = Libbcmath._bc_do_add(n1, n2, scaleMin);
- sum.n_sign = n1.n_sign;
- } else {
- // subtraction must be done.
- cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false); // Compare magnitudes.
- switch (cmpRes) {
- case -1:
- // n1 is less than n2, subtract n1 from n2.
- sum = Libbcmath._bc_do_sub(n2, n1, scaleMin);
- sum.n_sign = n2.n_sign;
- break;
-
- case 0:
- // They are equal! return zero with the correct scale!
- resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale));
- sum = Libbcmath.bc_new_num(1, resScale);
- Libbcmath.memset(sum.n_value, 0, 0, resScale + 1);
- break;
-
- case 1:
- // n2 is less than n1, subtract n2 from n1.
- sum = Libbcmath._bc_do_sub(n1, n2, scaleMin);
- sum.n_sign = n1.n_sign;
- }
- }
- return sum;
- },
-
- /**
- * This is the "user callable" routine to compare numbers N1 and N2.
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @return int -1, 0, 1 (n1 < n2, ===, n1 > n2)
- */
- bc_compare: function bc_compare(n1, n2) {
- return Libbcmath._bc_do_compare(n1, n2, true, false);
- },
-
- _one_mult: function _one_mult(num, nPtr, size, digit, result, rPtr) {
- var carry, value; // int
- var nptr, rptr; // int pointers
- if (digit === 0) {
- Libbcmath.memset(result, 0, 0, size); // memset (result, 0, size);
- } else {
- if (digit === 1) {
- Libbcmath.memcpy(result, rPtr, num, nPtr, size); // memcpy (result, num, size);
- } else {
- // Initialize
- nptr = nPtr + size - 1; // nptr = (unsigned char *) (num+size-1);
- rptr = rPtr + size - 1; // rptr = (unsigned char *) (result+size-1);
- carry = 0;
-
- while (size-- > 0) {
- value = num[nptr--] * digit + carry; // value = *nptr-- * digit + carry;
- result[rptr--] = value % Libbcmath.BASE; // @CHECK cint //*rptr-- = value % BASE;
- carry = Math.floor(value / Libbcmath.BASE); // @CHECK cint //carry = value / BASE;
- }
-
- if (carry !== 0) {
- result[rptr] = carry;
- }
- }
- }
- },
-
- bc_divide: function bc_divide(n1, n2, scale) {
- // var quot // bc_num return
- var qval; // bc_num
- var num1, num2; // string
- var ptr1, ptr2, n2ptr, qptr; // int pointers
- var scale1, val; // int
- var len1, len2, scale2, qdigits, extra, count; // int
- var qdig, qguess, borrow, carry; // int
- var mval; // string
- var zero; // char
- var norm; // int
- // var ptrs // return object from one_mul
- // Test for divide by zero. (return failure)
- if (Libbcmath.bc_is_zero(n2)) {
- return -1;
- }
-
- // Test for zero divide by anything (return zero)
- if (Libbcmath.bc_is_zero(n1)) {
- return Libbcmath.bc_new_num(1, scale);
- }
-
- /* Test for n1 equals n2 (return 1 as n1 nor n2 are zero)
- if (Libbcmath.bc_compare(n1, n2, Libbcmath.MAX(n1.n_scale, n2.n_scale)) === 0) {
- quot=Libbcmath.bc_new_num(1, scale);
- quot.n_value[0] = 1;
- return quot;
- }
- */
-
- // Test for divide by 1. If it is we must truncate.
- // @todo: check where scale > 0 too.. can't see why not
- // (ie bc_is_zero - add bc_is_one function)
- if (n2.n_scale === 0) {
- if (n2.n_len === 1 && n2.n_value[0] === 1) {
- qval = Libbcmath.bc_new_num(n1.n_len, scale); // qval = bc_new_num (n1->n_len, scale);
- qval.n_sign = n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS;
- // memset (&qval->n_value[n1->n_len],0,scale):
- Libbcmath.memset(qval.n_value, n1.n_len, 0, scale);
- // memcpy (qval->n_value, n1->n_value, n1->n_len + MIN(n1->n_scale,scale)):
- Libbcmath.memcpy(qval.n_value, 0, n1.n_value, 0, n1.n_len + Libbcmath.MIN(n1.n_scale, scale));
- // can we return here? not in c src, but can't see why-not.
- // return qval;
- }
- }
-
- /* Set up the divide. Move the decimal point on n1 by n2's scale.
- Remember, zeros on the end of num2 are wasted effort for dividing. */
- scale2 = n2.n_scale; // scale2 = n2->n_scale;
- n2ptr = n2.n_len + scale2 - 1; // n2ptr = (unsigned char *) n2.n_value+n2.n_len+scale2-1;
- while (scale2 > 0 && n2.n_value[n2ptr--] === 0) {
- scale2--;
- }
-
- len1 = n1.n_len + scale2;
- scale1 = n1.n_scale - scale2;
- if (scale1 < scale) {
- extra = scale - scale1;
- } else {
- extra = 0;
- }
-
- // num1 = (unsigned char *) safe_emalloc (1, n1.n_len+n1.n_scale, extra+2):
- num1 = Libbcmath.safe_emalloc(1, n1.n_len + n1.n_scale, extra + 2);
- if (num1 === null) {
- Libbcmath.bc_out_of_memory();
- }
- // memset (num1, 0, n1->n_len+n1->n_scale+extra+2):
- Libbcmath.memset(num1, 0, 0, n1.n_len + n1.n_scale + extra + 2);
- // memcpy (num1+1, n1.n_value, n1.n_len+n1.n_scale):
- Libbcmath.memcpy(num1, 1, n1.n_value, 0, n1.n_len + n1.n_scale);
- // len2 = n2->n_len + scale2:
- len2 = n2.n_len + scale2;
- // num2 = (unsigned char *) safe_emalloc (1, len2, 1):
- num2 = Libbcmath.safe_emalloc(1, len2, 1);
- if (num2 === null) {
- Libbcmath.bc_out_of_memory();
- }
- // memcpy (num2, n2.n_value, len2):
- Libbcmath.memcpy(num2, 0, n2.n_value, 0, len2);
- // *(num2+len2) = 0:
- num2[len2] = 0;
- // n2ptr = num2:
- n2ptr = 0;
- // while (*n2ptr === 0):
- while (num2[n2ptr] === 0) {
- n2ptr++;
- len2--;
- }
-
- // Calculate the number of quotient digits.
- if (len2 > len1 + scale) {
- qdigits = scale + 1;
- zero = true;
- } else {
- zero = false;
- if (len2 > len1) {
- qdigits = scale + 1; // One for the zero integer part.
- } else {
- qdigits = len1 - len2 + scale + 1;
- }
- }
-
- // Allocate and zero the storage for the quotient.
- // qval = bc_new_num (qdigits-scale,scale);
- qval = Libbcmath.bc_new_num(qdigits - scale, scale);
- // memset (qval->n_value, 0, qdigits);
- Libbcmath.memset(qval.n_value, 0, 0, qdigits);
- // Allocate storage for the temporary storage mval.
- // mval = (unsigned char *) safe_emalloc (1, len2, 1);
- mval = Libbcmath.safe_emalloc(1, len2, 1);
- if (mval === null) {
- Libbcmath.bc_out_of_memory();
- }
-
- // Now for the full divide algorithm.
- if (!zero) {
- // Normalize
- // norm = Libbcmath.cint(10 / (Libbcmath.cint(n2.n_value[n2ptr]) + 1));
- // norm = 10 / ((int)*n2ptr + 1)
- norm = Math.floor(10 / (n2.n_value[n2ptr] + 1)); // norm = 10 / ((int)*n2ptr + 1);
- if (norm !== 1) {
- // Libbcmath._one_mult(num1, len1+scale1+extra+1, norm, num1);
- Libbcmath._one_mult(num1, 0, len1 + scale1 + extra + 1, norm, num1, 0);
- // Libbcmath._one_mult(n2ptr, len2, norm, n2ptr);
- Libbcmath._one_mult(n2.n_value, n2ptr, len2, norm, n2.n_value, n2ptr);
- // @todo: Check: Is the pointer affected by the call? if so,
- // maybe need to adjust points on return?
- }
-
- // Initialize divide loop.
- qdig = 0;
- if (len2 > len1) {
- qptr = len2 - len1; // qptr = (unsigned char *) qval.n_value+len2-len1;
- } else {
- qptr = 0; // qptr = (unsigned char *) qval.n_value;
- }
-
- // Loop
- while (qdig <= len1 + scale - len2) {
- // Calculate the quotient digit guess.
- if (n2.n_value[n2ptr] === num1[qdig]) {
- qguess = 9;
- } else {
- qguess = Math.floor((num1[qdig] * 10 + num1[qdig + 1]) / n2.n_value[n2ptr]);
- }
- // Test qguess.
-
- if (n2.n_value[n2ptr + 1] * qguess > (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) * 10 + num1[qdig + 2]) {
- qguess--;
- // And again.
- if (n2.n_value[n2ptr + 1] * qguess > (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) * 10 + num1[qdig + 2]) {
- qguess--;
- }
- }
-
- // Multiply and subtract.
- borrow = 0;
- if (qguess !== 0) {
- mval[0] = 0; //* mval = 0; // @CHECK is this to fix ptr2 < 0?
- // _one_mult (n2ptr, len2, qguess, mval+1); // @CHECK
- Libbcmath._one_mult(n2.n_value, n2ptr, len2, qguess, mval, 1);
- ptr1 = qdig + len2; // (unsigned char *) num1+qdig+len2;
- ptr2 = len2; // (unsigned char *) mval+len2;
- // @todo: CHECK: Does a negative pointer return null?
- // ptr2 can be < 0 here as ptr1 = len2, thus count < len2+1 will always fail ?
- for (count = 0; count < len2 + 1; count++) {
- if (ptr2 < 0) {
- // val = Libbcmath.cint(num1[ptr1]) - 0 - borrow;
- // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- val = num1[ptr1] - 0 - borrow; // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- } else {
- // val = Libbcmath.cint(num1[ptr1]) - Libbcmath.cint(mval[ptr2--]) - borrow;
- // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- // val = (int) *ptr1 - (int) *ptr2-- - borrow;
- val = num1[ptr1] - mval[ptr2--] - borrow;
- }
- if (val < 0) {
- val += 10;
- borrow = 1;
- } else {
- borrow = 0;
- }
- num1[ptr1--] = val;
- }
- }
-
- // Test for negative result.
- if (borrow === 1) {
- qguess--;
- ptr1 = qdig + len2; // (unsigned char *) num1+qdig+len2;
- ptr2 = len2 - 1; // (unsigned char *) n2ptr+len2-1;
- carry = 0;
- for (count = 0; count < len2; count++) {
- if (ptr2 < 0) {
- // val = Libbcmath.cint(num1[ptr1]) + 0 + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- val = num1[ptr1] + 0 + carry;
- } else {
- // val = Libbcmath.cint(num1[ptr1]) + Libbcmath.cint(n2.n_value[ptr2--]) + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- // val = (int) *ptr1 + (int) *ptr2-- + carry;
- val = num1[ptr1] + n2.n_value[ptr2--] + carry;
- }
- if (val > 9) {
- val -= 10;
- carry = 1;
- } else {
- carry = 0;
- }
- num1[ptr1--] = val; //* ptr1-- = val;
- }
- if (carry === 1) {
- // num1[ptr1] = Libbcmath.cint((num1[ptr1] + 1) % 10);
- // *ptr1 = (*ptr1 + 1) % 10; // @CHECK
- // *ptr1 = (*ptr1 + 1) % 10; // @CHECK
- num1[ptr1] = (num1[ptr1] + 1) % 10;
- }
- }
-
- // We now know the quotient digit.
- qval.n_value[qptr++] = qguess; //* qptr++ = qguess;
- qdig++;
- }
- }
-
- // Clean up and return the number.
- qval.n_sign = n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS;
- if (Libbcmath.bc_is_zero(qval)) {
- qval.n_sign = Libbcmath.PLUS;
- }
- Libbcmath._bc_rm_leading_zeros(qval);
-
- return qval;
-
- // return 0; // Everything is OK.
- },
-
- MUL_BASE_DIGITS: 80,
- MUL_SMALL_DIGITS: 80 / 4,
- // #define MUL_SMALL_DIGITS mul_base_digits/4
-
- /* The multiply routine. N2 times N1 is put int PROD with the scale of
- the result being MIN(N2 scale+N1 scale, MAX (SCALE, N2 scale, N1 scale)).
- */
- /**
- * @param n1 bc_num
- * @param n2 bc_num
- * @param scale [int] optional
- */
- bc_multiply: function bc_multiply(n1, n2, scale) {
- var pval; // bc_num
- var len1, len2; // int
- var fullScale, prodScale; // int
- // Initialize things.
- len1 = n1.n_len + n1.n_scale;
- len2 = n2.n_len + n2.n_scale;
- fullScale = n1.n_scale + n2.n_scale;
- prodScale = Libbcmath.MIN(fullScale, Libbcmath.MAX(scale, Libbcmath.MAX(n1.n_scale, n2.n_scale)));
-
- // pval = Libbcmath.bc_init_num(); // allow pass by ref
- // Do the multiply
- pval = Libbcmath._bc_rec_mul(n1, len1, n2, len2, fullScale);
-
- // Assign to prod and clean up the number.
- pval.n_sign = n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS;
- // pval.n_value = pval.nPtr; // @todo: pval.n_len = len2 + len1 + 1 - fullScale
- pval.n_scale = prodScale;
- Libbcmath._bc_rm_leading_zeros(pval);
- if (Libbcmath.bc_is_zero(pval)) {
- pval.n_sign = Libbcmath.PLUS;
- }
- // bc_free_num (prod);
- return pval;
- },
-
- new_sub_num: function new_sub_num(length, scale, value) {
- var temp = new Libbcmath.bc_num(); // eslint-disable-line new-cap
- temp.n_sign = Libbcmath.PLUS;
- temp.n_len = length;
- temp.n_scale = scale;
- temp.n_value = value;
- return temp;
- },
-
- _bc_simp_mul: function _bc_simp_mul(n1, n1len, n2, n2len, fullScale) {
- var prod; // bc_num
- var n1ptr, n2ptr, pvptr; // char *n1ptr, *n2ptr, *pvptr;
- var n1end, n2end; // char *n1end, *n2end; // To the end of n1 and n2.
- var indx, sum, prodlen; // int indx, sum, prodlen;
- prodlen = n1len + n2len + 1;
-
- prod = Libbcmath.bc_new_num(prodlen, 0);
-
- n1end = n1len - 1; // (char *) (n1->n_value + n1len - 1);
- n2end = n2len - 1; // (char *) (n2->n_value + n2len - 1);
- pvptr = prodlen - 1; // (char *) ((*prod)->n_value + prodlen - 1);
- sum = 0;
-
- // Here is the loop...
- for (indx = 0; indx < prodlen - 1; indx++) {
- // (char *) (n1end - MAX(0, indx-n2len+1));
- n1ptr = n1end - Libbcmath.MAX(0, indx - n2len + 1);
- // (char *) (n2end - MIN(indx, n2len-1));
- n2ptr = n2end - Libbcmath.MIN(indx, n2len - 1);
- while (n1ptr >= 0 && n2ptr <= n2end) {
- // sum += *n1ptr-- * *n2ptr++;
- sum += n1.n_value[n1ptr--] * n2.n_value[n2ptr++];
- }
- //* pvptr-- = sum % BASE;
- prod.n_value[pvptr--] = Math.floor(sum % Libbcmath.BASE);
- sum = Math.floor(sum / Libbcmath.BASE); // sum = sum / BASE;
- }
- prod.n_value[pvptr] = sum; //* pvptr = sum;
- return prod;
- },
-
- /* A special adder/subtractor for the recursive divide and conquer
- multiply algorithm. Note: if sub is called, accum must
- be larger that what is being subtracted. Also, accum and val
- must have n_scale = 0. (e.g. they must look like integers. *) */
- _bc_shift_addsub: function _bc_shift_addsub(accum, val, shift, sub) {
- var accp, valp; // signed char *accp, *valp;
- var count, carry; // int count, carry;
- count = val.n_len;
- if (val.n_value[0] === 0) {
- count--;
- }
-
- // assert (accum->n_len+accum->n_scale >= shift+count);
- if (accum.n_len + accum.n_scale < shift + count) {
- throw new Error('len + scale < shift + count'); // ?? I think that's what assert does :)
- }
-
- // Set up pointers and others
- // (signed char *)(accum->n_value + accum->n_len + accum->n_scale - shift - 1);
- accp = accum.n_len + accum.n_scale - shift - 1;
- valp = val.n_len = 1; // (signed char *)(val->n_value + val->n_len - 1);
- carry = 0;
- if (sub) {
- // Subtraction, carry is really borrow.
- while (count--) {
- accum.n_value[accp] -= val.n_value[valp--] + carry; //* accp -= *valp-- + carry;
- if (accum.n_value[accp] < 0) {
- // if (*accp < 0)
- carry = 1;
- accum.n_value[accp--] += Libbcmath.BASE; //* accp-- += BASE;
- } else {
- carry = 0;
- accp--;
- }
- }
- while (carry) {
- accum.n_value[accp] -= carry; //* accp -= carry;
- if (accum.n_value[accp] < 0) {
- // if (*accp < 0)
- accum.n_value[accp--] += Libbcmath.BASE; // *accp-- += BASE;
- } else {
- carry = 0;
- }
- }
- } else {
- // Addition
- while (count--) {
- accum.n_value[accp] += val.n_value[valp--] + carry; //* accp += *valp-- + carry;
- if (accum.n_value[accp] > Libbcmath.BASE - 1) {
- // if (*accp > (BASE-1))
- carry = 1;
- accum.n_value[accp--] -= Libbcmath.BASE; //* accp-- -= BASE;
- } else {
- carry = 0;
- accp--;
- }
- }
- while (carry) {
- accum.n_value[accp] += carry; //* accp += carry;
- if (accum.n_value[accp] > Libbcmath.BASE - 1) {
- // if (*accp > (BASE-1))
- accum.n_value[accp--] -= Libbcmath.BASE; //* accp-- -= BASE;
- } else {
- carry = 0;
- }
- }
- }
- return true; // accum is the pass-by-reference return
- },
-
- /* Recursive divide and conquer multiply algorithm.
- based on
- Let u = u0 + u1*(b^n)
- Let v = v0 + v1*(b^n)
- Then uv = (B^2n+B^n)*u1*v1 + B^n*(u1-u0)*(v0-v1) + (B^n+1)*u0*v0
- B is the base of storage, number of digits in u1,u0 close to equal.
- */
- _bc_rec_mul: function _bc_rec_mul(u, ulen, v, vlen, fullScale) {
- var prod; // @return
- var u0, u1, v0, v1; // bc_num
- // var u0len,
- // var v0len // int
- var m1, m2, m3, d1, d2; // bc_num
- var n, prodlen, m1zero; // int
- var d1len, d2len; // int
- // Base case?
- if (ulen + vlen < Libbcmath.MUL_BASE_DIGITS || ulen < Libbcmath.MUL_SMALL_DIGITS || vlen < Libbcmath.MUL_SMALL_DIGITS) {
- return Libbcmath._bc_simp_mul(u, ulen, v, vlen, fullScale);
- }
-
- // Calculate n -- the u and v split point in digits.
- n = Math.floor((Libbcmath.MAX(ulen, vlen) + 1) / 2);
-
- // Split u and v.
- if (ulen < n) {
- u1 = Libbcmath.bc_init_num(); // u1 = bc_copy_num (BCG(_zero_));
- u0 = Libbcmath.new_sub_num(ulen, 0, u.n_value);
- } else {
- u1 = Libbcmath.new_sub_num(ulen - n, 0, u.n_value);
- u0 = Libbcmath.new_sub_num(n, 0, u.n_value + ulen - n);
- }
- if (vlen < n) {
- v1 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- v0 = Libbcmath.new_sub_num(vlen, 0, v.n_value);
- } else {
- v1 = Libbcmath.new_sub_num(vlen - n, 0, v.n_value);
- v0 = Libbcmath.new_sub_num(n, 0, v.n_value + vlen - n);
- }
- Libbcmath._bc_rm_leading_zeros(u1);
- Libbcmath._bc_rm_leading_zeros(u0);
- // var u0len = u0.n_len
- Libbcmath._bc_rm_leading_zeros(v1);
- Libbcmath._bc_rm_leading_zeros(v0);
- // var v0len = v0.n_len
-
- m1zero = Libbcmath.bc_is_zero(u1) || Libbcmath.bc_is_zero(v1);
-
- // Calculate sub results ...
- d1 = Libbcmath.bc_init_num(); // needed?
- d2 = Libbcmath.bc_init_num(); // needed?
- d1 = Libbcmath.bc_sub(u1, u0, 0);
- d1len = d1.n_len;
-
- d2 = Libbcmath.bc_sub(v0, v1, 0);
- d2len = d2.n_len;
-
- // Do recursive multiplies and shifted adds.
- if (m1zero) {
- m1 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- } else {
- // m1 = Libbcmath.bc_init_num(); //allow pass-by-ref
- m1 = Libbcmath._bc_rec_mul(u1, u1.n_len, v1, v1.n_len, 0);
- }
- if (Libbcmath.bc_is_zero(d1) || Libbcmath.bc_is_zero(d2)) {
- m2 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- } else {
- // m2 = Libbcmath.bc_init_num(); //allow pass-by-ref
- m2 = Libbcmath._bc_rec_mul(d1, d1len, d2, d2len, 0);
- }
-
- if (Libbcmath.bc_is_zero(u0) || Libbcmath.bc_is_zero(v0)) {
- m3 = Libbcmath.bc_init_num(); // bc_copy_num (BCG(_zero_));
- } else {
- // m3 = Libbcmath.bc_init_num(); //allow pass-by-ref
- m3 = Libbcmath._bc_rec_mul(u0, u0.n_len, v0, v0.n_len, 0);
- }
-
- // Initialize product
- prodlen = ulen + vlen + 1;
- prod = Libbcmath.bc_new_num(prodlen, 0);
-
- if (!m1zero) {
- Libbcmath._bc_shift_addsub(prod, m1, 2 * n, 0);
- Libbcmath._bc_shift_addsub(prod, m1, n, 0);
- }
- Libbcmath._bc_shift_addsub(prod, m3, n, 0);
- Libbcmath._bc_shift_addsub(prod, m3, 0, 0);
- Libbcmath._bc_shift_addsub(prod, m2, n, d1.n_sign !== d2.n_sign);
-
- return prod;
- // Now clean up!
- // bc_free_num (&u1);
- // bc_free_num (&u0);
- // bc_free_num (&v1);
- // bc_free_num (&m1);
- // bc_free_num (&v0);
- // bc_free_num (&m2);
- // bc_free_num (&m3);
- // bc_free_num (&d1);
- // bc_free_num (&d2);
- },
-
- /**
- *
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @param {boolean} useSign
- * @param {boolean} ignoreLast
- * @return -1, 0, 1 (see bc_compare)
- */
- _bc_do_compare: function _bc_do_compare(n1, n2, useSign, ignoreLast) {
- var n1ptr, n2ptr; // int
- var count; // int
- // First, compare signs.
- if (useSign && n1.n_sign !== n2.n_sign) {
- if (n1.n_sign === Libbcmath.PLUS) {
- return 1; // Positive N1 > Negative N2
- } else {
- return -1; // Negative N1 < Positive N1
- }
- }
-
- // Now compare the magnitude.
- if (n1.n_len !== n2.n_len) {
- if (n1.n_len > n2.n_len) {
- // Magnitude of n1 > n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return 1;
- } else {
- return -1;
- }
- } else {
- // Magnitude of n1 < n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return -1;
- } else {
- return 1;
- }
- }
- }
-
- /* If we get here, they have the same number of integer digits.
- check the integer part and the equal length part of the fraction. */
- count = n1.n_len + Math.min(n1.n_scale, n2.n_scale);
- n1ptr = 0;
- n2ptr = 0;
-
- while (count > 0 && n1.n_value[n1ptr] === n2.n_value[n2ptr]) {
- n1ptr++;
- n2ptr++;
- count--;
- }
-
- if (ignoreLast && count === 1 && n1.n_scale === n2.n_scale) {
- return 0;
- }
-
- if (count !== 0) {
- if (n1.n_value[n1ptr] > n2.n_value[n2ptr]) {
- // Magnitude of n1 > n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return 1;
- } else {
- return -1;
- }
- } else {
- // Magnitude of n1 < n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return -1;
- } else {
- return 1;
- }
- }
- }
-
- // They are equal up to the last part of the equal part of the fraction.
- if (n1.n_scale !== n2.n_scale) {
- if (n1.n_scale > n2.n_scale) {
- for (count = n1.n_scale - n2.n_scale; count > 0; count--) {
- if (n1.n_value[n1ptr++] !== 0) {
- // Magnitude of n1 > n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return 1;
- } else {
- return -1;
- }
- }
- }
- } else {
- for (count = n2.n_scale - n1.n_scale; count > 0; count--) {
- if (n2.n_value[n2ptr++] !== 0) {
- // Magnitude of n1 < n2.
- if (!useSign || n1.n_sign === Libbcmath.PLUS) {
- return -1;
- } else {
- return 1;
- }
- }
- }
- }
- }
-
- // They must be equal!
- return 0;
- },
-
- /* Here is the full subtract routine that takes care of negative numbers.
- N2 is subtracted from N1 and the result placed in RESULT. SCALE_MIN
- is the minimum scale for the result. */
- bc_sub: function bc_sub(n1, n2, scaleMin) {
- var diff; // bc_num
- var cmpRes, resScale; // int
- if (n1.n_sign !== n2.n_sign) {
- diff = Libbcmath._bc_do_add(n1, n2, scaleMin);
- diff.n_sign = n1.n_sign;
- } else {
- // subtraction must be done.
- // Compare magnitudes.
- cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false);
- switch (cmpRes) {
- case -1:
- // n1 is less than n2, subtract n1 from n2.
- diff = Libbcmath._bc_do_sub(n2, n1, scaleMin);
- diff.n_sign = n2.n_sign === Libbcmath.PLUS ? Libbcmath.MINUS : Libbcmath.PLUS;
- break;
- case 0:
- // They are equal! return zero!
- resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale));
- diff = Libbcmath.bc_new_num(1, resScale);
- Libbcmath.memset(diff.n_value, 0, 0, resScale + 1);
- break;
- case 1:
- // n2 is less than n1, subtract n2 from n1.
- diff = Libbcmath._bc_do_sub(n1, n2, scaleMin);
- diff.n_sign = n1.n_sign;
- break;
- }
- }
-
- // Clean up and return.
- // bc_free_num (result);
- //* result = diff;
- return diff;
- },
-
- _bc_do_add: function _bc_do_add(n1, n2, scaleMin) {
- var sum; // bc_num
- var sumScale, sumDigits; // int
- var n1ptr, n2ptr, sumptr; // int
- var carry, n1bytes, n2bytes; // int
- var tmp; // int
-
- // Prepare sum.
- sumScale = Libbcmath.MAX(n1.n_scale, n2.n_scale);
- sumDigits = Libbcmath.MAX(n1.n_len, n2.n_len) + 1;
- sum = Libbcmath.bc_new_num(sumDigits, Libbcmath.MAX(sumScale, scaleMin));
-
- // Start with the fraction part. Initialize the pointers.
- n1bytes = n1.n_scale;
- n2bytes = n2.n_scale;
- n1ptr = n1.n_len + n1bytes - 1;
- n2ptr = n2.n_len + n2bytes - 1;
- sumptr = sumScale + sumDigits - 1;
-
- // Add the fraction part. First copy the longer fraction
- // (ie when adding 1.2345 to 1 we know .2345 is correct already) .
- if (n1bytes !== n2bytes) {
- if (n1bytes > n2bytes) {
- // n1 has more dp then n2
- while (n1bytes > n2bytes) {
- sum.n_value[sumptr--] = n1.n_value[n1ptr--];
- // *sumptr-- = *n1ptr--;
- n1bytes--;
- }
- } else {
- // n2 has more dp then n1
- while (n2bytes > n1bytes) {
- sum.n_value[sumptr--] = n2.n_value[n2ptr--];
- // *sumptr-- = *n2ptr--;
- n2bytes--;
- }
- }
- }
-
- // Now add the remaining fraction part and equal size integer parts.
- n1bytes += n1.n_len;
- n2bytes += n2.n_len;
- carry = 0;
- while (n1bytes > 0 && n2bytes > 0) {
- // add the two numbers together
- tmp = n1.n_value[n1ptr--] + n2.n_value[n2ptr--] + carry;
- // *sumptr = *n1ptr-- + *n2ptr-- + carry;
- // check if they are >= 10 (impossible to be more then 18)
- if (tmp >= Libbcmath.BASE) {
- carry = 1;
- tmp -= Libbcmath.BASE; // yep, subtract 10, add a carry
- } else {
- carry = 0;
- }
- sum.n_value[sumptr] = tmp;
- sumptr--;
- n1bytes--;
- n2bytes--;
- }
-
- // Now add carry the [rest of the] longer integer part.
- if (n1bytes === 0) {
- // n2 is a bigger number then n1
- while (n2bytes-- > 0) {
- tmp = n2.n_value[n2ptr--] + carry;
- // *sumptr = *n2ptr-- + carry;
- if (tmp >= Libbcmath.BASE) {
- carry = 1;
- tmp -= Libbcmath.BASE;
- } else {
- carry = 0;
- }
- sum.n_value[sumptr--] = tmp;
- }
- } else {
- // n1 is bigger then n2..
- while (n1bytes-- > 0) {
- tmp = n1.n_value[n1ptr--] + carry;
- // *sumptr = *n1ptr-- + carry;
- if (tmp >= Libbcmath.BASE) {
- carry = 1;
- tmp -= Libbcmath.BASE;
- } else {
- carry = 0;
- }
- sum.n_value[sumptr--] = tmp;
- }
- }
-
- // Set final carry.
- if (carry === 1) {
- sum.n_value[sumptr] += 1;
- // *sumptr += 1;
- }
-
- // Adjust sum and return.
- Libbcmath._bc_rm_leading_zeros(sum);
- return sum;
- },
-
- /**
- * Perform a subtraction
- *
- * Perform subtraction: N2 is subtracted from N1 and the value is
- * returned. The signs of N1 and N2 are ignored. Also, N1 is
- * assumed to be larger than N2. SCALE_MIN is the minimum scale
- * of the result.
- *
- * Basic school maths says to subtract 2 numbers..
- * 1. make them the same length, the decimal places, and the integer part
- * 2. start from the right and subtract the two numbers from each other
- * 3. if the sum of the 2 numbers < 0, carry -1 to the next set and add 10
- * (ie 18 > carry 1 becomes 8). thus 0.9 + 0.9 = 1.8
- *
- * @param {bc_num} n1
- * @param {bc_num} n2
- * @param {int} scaleMin
- * @return bc_num
- */
- _bc_do_sub: function _bc_do_sub(n1, n2, scaleMin) {
- var diff; // bc_num
- var diffScale, diffLen; // int
- var minScale, minLen; // int
- var n1ptr, n2ptr, diffptr; // int
- var borrow, count, val; // int
- // Allocate temporary storage.
- diffLen = Libbcmath.MAX(n1.n_len, n2.n_len);
- diffScale = Libbcmath.MAX(n1.n_scale, n2.n_scale);
- minLen = Libbcmath.MIN(n1.n_len, n2.n_len);
- minScale = Libbcmath.MIN(n1.n_scale, n2.n_scale);
- diff = Libbcmath.bc_new_num(diffLen, Libbcmath.MAX(diffScale, scaleMin));
-
- /* Not needed?
- // Zero extra digits made by scaleMin.
- if (scaleMin > diffScale) {
- diffptr = (char *) (diff->n_value + diffLen + diffScale);
- for (count = scaleMin - diffScale; count > 0; count--) {
- *diffptr++ = 0;
- }
- }
- */
-
- // Initialize the subtract.
- n1ptr = n1.n_len + n1.n_scale - 1;
- n2ptr = n2.n_len + n2.n_scale - 1;
- diffptr = diffLen + diffScale - 1;
-
- // Subtract the numbers.
- borrow = 0;
-
- // Take care of the longer scaled number.
- if (n1.n_scale !== minScale) {
- // n1 has the longer scale
- for (count = n1.n_scale - minScale; count > 0; count--) {
- diff.n_value[diffptr--] = n1.n_value[n1ptr--];
- // *diffptr-- = *n1ptr--;
- }
- } else {
- // n2 has the longer scale
- for (count = n2.n_scale - minScale; count > 0; count--) {
- val = 0 - n2.n_value[n2ptr--] - borrow;
- // val = - *n2ptr-- - borrow;
- if (val < 0) {
- val += Libbcmath.BASE;
- borrow = 1;
- } else {
- borrow = 0;
- }
- diff.n_value[diffptr--] = val;
- //* diffptr-- = val;
- }
- }
-
- // Now do the equal length scale and integer parts.
- for (count = 0; count < minLen + minScale; count++) {
- val = n1.n_value[n1ptr--] - n2.n_value[n2ptr--] - borrow;
- // val = *n1ptr-- - *n2ptr-- - borrow;
- if (val < 0) {
- val += Libbcmath.BASE;
- borrow = 1;
- } else {
- borrow = 0;
- }
- diff.n_value[diffptr--] = val;
- //* diffptr-- = val;
- }
-
- // If n1 has more digits then n2, we now do that subtract.
- if (diffLen !== minLen) {
- for (count = diffLen - minLen; count > 0; count--) {
- val = n1.n_value[n1ptr--] - borrow;
- // val = *n1ptr-- - borrow;
- if (val < 0) {
- val += Libbcmath.BASE;
- borrow = 1;
- } else {
- borrow = 0;
- }
- diff.n_value[diffptr--] = val;
- }
- }
-
- // Clean up and return.
- Libbcmath._bc_rm_leading_zeros(diff);
- return diff;
- },
-
- /**
- *
- * @param {int} length
- * @param {int} scale
- * @return bc_num
- */
- bc_new_num: function bc_new_num(length, scale) {
- var temp; // bc_num
- temp = new Libbcmath.bc_num(); // eslint-disable-line new-cap
- temp.n_sign = Libbcmath.PLUS;
- temp.n_len = length;
- temp.n_scale = scale;
- temp.n_value = Libbcmath.safe_emalloc(1, length + scale, 0);
- Libbcmath.memset(temp.n_value, 0, 0, length + scale);
- return temp;
- },
-
- safe_emalloc: function safe_emalloc(size, len, extra) {
- return Array(size * len + extra);
- },
-
- /**
- * Create a new number
- */
- bc_init_num: function bc_init_num() {
- return new Libbcmath.bc_new_num(1, 0); // eslint-disable-line new-cap
- },
-
- _bc_rm_leading_zeros: function _bc_rm_leading_zeros(num) {
- // We can move n_value to point to the first non zero digit!
- while (num.n_value[0] === 0 && num.n_len > 1) {
- num.n_value.shift();
- num.n_len--;
- }
- },
-
- /**
- * Convert to bc_num detecting scale
- */
- php_str2num: function php_str2num(str) {
- var p;
- p = str.indexOf('.');
- if (p === -1) {
- return Libbcmath.bc_str2num(str, 0);
- } else {
- return Libbcmath.bc_str2num(str, str.length - p);
- }
- },
-
- CH_VAL: function CH_VAL(c) {
- return c - '0'; // ??
- },
-
- BCD_CHAR: function BCD_CHAR(d) {
- return d + '0'; // ??
- },
-
- isdigit: function isdigit(c) {
- return isNaN(parseInt(c, 10));
- },
-
- bc_str2num: function bc_str2num(strIn, scale) {
- var str, num, ptr, digits, strscale, zeroInt, nptr;
- // remove any non-expected characters
- // Check for valid number and count digits.
-
- str = strIn.split(''); // convert to array
- ptr = 0; // str
- digits = 0;
- strscale = 0;
- zeroInt = false;
- if (str[ptr] === '+' || str[ptr] === '-') {
- ptr++; // Sign
- }
- while (str[ptr] === '0') {
- ptr++; // Skip leading zeros.
- }
- // while (Libbcmath.isdigit(str[ptr])) {
- while (str[ptr] % 1 === 0) {
- // Libbcmath.isdigit(str[ptr])) {
- ptr++;
- digits++; // digits
- }
-
- if (str[ptr] === '.') {
- ptr++; // decimal point
- }
- // while (Libbcmath.isdigit(str[ptr])) {
- while (str[ptr] % 1 === 0) {
- // Libbcmath.isdigit(str[ptr])) {
- ptr++;
- strscale++; // digits
- }
-
- if (str[ptr] || digits + strscale === 0) {
- // invalid number, return 0
- return Libbcmath.bc_init_num();
- //* num = bc_copy_num (BCG(_zero_));
- }
-
- // Adjust numbers and allocate storage and initialize fields.
- strscale = Libbcmath.MIN(strscale, scale);
- if (digits === 0) {
- zeroInt = true;
- digits = 1;
- }
-
- num = Libbcmath.bc_new_num(digits, strscale);
-
- // Build the whole number.
- ptr = 0; // str
- if (str[ptr] === '-') {
- num.n_sign = Libbcmath.MINUS;
- // (*num)->n_sign = MINUS;
- ptr++;
- } else {
- num.n_sign = Libbcmath.PLUS;
- // (*num)->n_sign = PLUS;
- if (str[ptr] === '+') {
- ptr++;
- }
- }
- while (str[ptr] === '0') {
- ptr++; // Skip leading zeros.
- }
-
- nptr = 0; // (*num)->n_value;
- if (zeroInt) {
- num.n_value[nptr++] = 0;
- digits = 0;
- }
- for (; digits > 0; digits--) {
- num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++]);
- //* nptr++ = CH_VAL(*ptr++);
- }
-
- // Build the fractional part.
- if (strscale > 0) {
- ptr++; // skip the decimal point!
- for (; strscale > 0; strscale--) {
- num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++]);
- }
- }
-
- return num;
- },
-
- cint: function cint(v) {
- if (typeof v === 'undefined') {
- v = 0;
- }
- var x = parseInt(v, 10);
- if (isNaN(x)) {
- x = 0;
- }
- return x;
- },
-
- /**
- * Basic min function
- * @param {int} a
- * @param {int} b
- */
- MIN: function MIN(a, b) {
- return a > b ? b : a;
- },
-
- /**
- * Basic max function
- * @param {int} a
- * @param {int} b
- */
- MAX: function MAX(a, b) {
- return a > b ? a : b;
- },
-
- /**
- * Basic odd function
- * @param {int} a
- */
- ODD: function ODD(a) {
- return a & 1;
- },
-
- /**
- * replicate c function
- * @param {array} r return (by reference)
- * @param {int} ptr
- * @param {string} chr char to fill
- * @param {int} len length to fill
- */
- memset: function memset(r, ptr, chr, len) {
- var i;
- for (i = 0; i < len; i++) {
- r[ptr + i] = chr;
- }
- },
-
- /**
- * Replacement c function
- * Obviously can't work like c does, so we've added an "offset"
- * param so you could do memcpy(dest+1, src, len) as memcpy(dest, 1, src, len)
- * Also only works on arrays
- */
- memcpy: function memcpy(dest, ptr, src, srcptr, len) {
- var i;
- for (i = 0; i < len; i++) {
- dest[ptr + i] = src[srcptr + i];
- }
- return true;
- },
-
- /**
- * Determine if the number specified is zero or not
- * @param {bc_num} num number to check
- * @return boolean true when zero, false when not zero.
- */
- bc_is_zero: function bc_is_zero(num) {
- var count; // int
- var nptr; // int
- // Quick check.
- // if (num === BCG(_zero_)) return TRUE;
- // Initialize
- count = num.n_len + num.n_scale;
- nptr = 0; // num->n_value;
- // The check
- while (count > 0 && num.n_value[nptr++] === 0) {
- count--;
- }
-
- if (count !== 0) {
- return false;
- } else {
- return true;
- }
- },
-
- bc_out_of_memory: function bc_out_of_memory() {
- throw new Error('(BC) Out of memory');
- }
- };
- return Libbcmath;
-};
-//# sourceMappingURL=_bc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js.map b/node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js.map
deleted file mode 100644
index 0317154..0000000
--- a/node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/_locutus_shared/_locutus_shared_bc.js"],"names":[],"mappings":";;AAAA,OAAO,OAAP,GAAiB,SAAS,kBAAT,GAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsD9C,MAAI,YAAY;AACd,UAAM,GADQ;AAEd,WAAO,GAFO;AAGd,UAAM,EAHQ;;AAKd,WAAO,CALO;;;;;AAUd,YAAQ,kBAAY;AAClB,WAAK,MAAL,GAAc,IAAd,C;AACA,WAAK,KAAL,GAAa,IAAb,C;AACA,WAAK,OAAL,GAAe,IAAf,C;;;AAGA,WAAK,OAAL,GAAe,IAAf,C;AACA,WAAK,QAAL,GAAgB,YAAY;AAC1B,YAAI,CAAJ,EAAO,GAAP;AACA,cAAM,KAAK,OAAL,CAAa,IAAb,CAAkB,EAAlB,CAAN;;;AAGA,YAAI,CAAE,KAAK,MAAL,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,KA9pCa;;AAgqCd,sBAAkB,4BAAY;AAC5B,YAAM,IAAI,KAAJ,CAAU,oBAAV,CAAN;AACD;AAlqCa,GAAhB;AAoqCA,SAAO,SAAP;AACD,CA3tCD","file":"_locutus_shared_bc.js","sourcesContent":["module.exports = function _locutus_shared_bc () { // eslint-disable-line camelcase\n // discuss at: http://locutusjs.io/php/_locutus_shared/_locutus_shared_bc\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $bc = _locutus_shared_bc()\n // example 1: var $result = $bc.PLUS\n // returns 1: '+'\n\n /**\n * BC Math Library for Javascript\n * Ported from the PHP5 bcmath extension source code,\n * which uses the Libbcmath package...\n * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.\n * Copyright (C) 2000 Philip A. Nelson\n * The Free Software Foundation, Inc.\n * 59 Temple Place, Suite 330\n * Boston, MA 02111-1307 USA.\n * e-mail: philnelson@acm.org\n * us-mail: Philip A. Nelson\n * Computer Science Department, 9062\n * Western Washington University\n * Bellingham, WA 98226-9062\n *\n * bcmath-js homepage:\n *\n * This code is covered under the LGPL licence, and can be used however you want :)\n * Be kind and share any decent code changes.\n */\n\n /**\n * Binary Calculator (BC) Arbitrary Precision Mathematics Lib v0.10 (LGPL)\n * Copy of Libbcmath included in PHP5 src\n *\n * Note: this is just the shared library file and does not include the php-style functions.\n * use bcmath{-min}.js for functions like bcadd, bcsub etc.\n *\n * Feel free to use how-ever you want, just email any bug-fixes/improvements\n * to the sourceforge project:\n *\n *\n * Ported from the PHP5 bcmath extension source code,\n * which uses the Libbcmath package...\n * Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.\n * Copyright (C) 2000 Philip A. Nelson\n * The Free Software Foundation, Inc.\n * 59 Temple Place, Suite 330\n * Boston, MA 02111-1307 USA.\n * e-mail: philnelson@acm.org\n * us-mail: Philip A. Nelson\n * Computer Science Department, 9062\n * Western Washington University\n * Bellingham, WA 98226-9062\n */\n\n var Libbcmath = {\n PLUS: '+',\n MINUS: '-',\n BASE: 10,\n // must be 10 (for now)\n scale: 0,\n // default scale\n /**\n * Basic number structure\n */\n bc_num: function () {\n this.n_sign = null // sign\n this.n_len = null // (int) The number of digits before the decimal point.\n this.n_scale = null // (int) The number of digits after the decimal point.\n // this.n_refs = null; // (int) The number of pointers to this number.\n // this.n_text = null; // ?? Linked list for available list.\n this.n_value = null // array as value, where 1.23 = [1,2,3]\n this.toString = function () {\n var r, tmp\n tmp = this.n_value.join('')\n\n // add minus sign (if applicable) then add the integer part\n r = ((this.n_sign === Libbcmath.PLUS) ? '' : this.n_sign) + tmp.substr(0, this.n_len)\n\n // if decimal places, add a . and the decimal part\n if (this.n_scale > 0) {\n r += '.' + tmp.substr(this.n_len, this.n_scale)\n }\n return r\n }\n },\n\n /**\n * Base add function\n *\n // Here is the full add routine that takes care of negative numbers.\n // N1 is added to N2 and the result placed into RESULT. SCALE_MIN\n // is the minimum scale for the result.\n *\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @param {int} scaleMin\n * @return bc_num\n */\n bc_add: function (n1, n2, scaleMin) {\n var sum, cmpRes, resScale\n\n if (n1.n_sign === n2.n_sign) {\n sum = Libbcmath._bc_do_add(n1, n2, scaleMin)\n sum.n_sign = n1.n_sign\n } else { // subtraction must be done.\n cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false) // Compare magnitudes.\n switch (cmpRes) {\n case -1:\n // n1 is less than n2, subtract n1 from n2.\n sum = Libbcmath._bc_do_sub(n2, n1, scaleMin)\n sum.n_sign = n2.n_sign\n break\n\n case 0:\n // They are equal! return zero with the correct scale!\n resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale))\n sum = Libbcmath.bc_new_num(1, resScale)\n Libbcmath.memset(sum.n_value, 0, 0, resScale + 1)\n break\n\n case 1:\n // n2 is less than n1, subtract n2 from n1.\n sum = Libbcmath._bc_do_sub(n1, n2, scaleMin)\n sum.n_sign = n1.n_sign\n }\n }\n return sum\n },\n\n /**\n * This is the \"user callable\" routine to compare numbers N1 and N2.\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @return int -1, 0, 1 (n1 < n2, ===, n1 > n2)\n */\n bc_compare: function (n1, n2) {\n return Libbcmath._bc_do_compare(n1, n2, true, false)\n },\n\n _one_mult: function (num, nPtr, size, digit, result, rPtr) {\n var carry, value // int\n var nptr, rptr // int pointers\n if (digit === 0) {\n Libbcmath.memset(result, 0, 0, size) // memset (result, 0, size);\n } else {\n if (digit === 1) {\n Libbcmath.memcpy(result, rPtr, num, nPtr, size) // memcpy (result, num, size);\n } else { // Initialize\n nptr = nPtr + size - 1 // nptr = (unsigned char *) (num+size-1);\n rptr = rPtr + size - 1 // rptr = (unsigned char *) (result+size-1);\n carry = 0\n\n while (size-- > 0) {\n value = num[nptr--] * digit + carry // value = *nptr-- * digit + carry;\n result[rptr--] = value % Libbcmath.BASE // @CHECK cint //*rptr-- = value % BASE;\n carry = Math.floor(value / Libbcmath.BASE) // @CHECK cint //carry = value / BASE;\n }\n\n if (carry !== 0) {\n result[rptr] = carry\n }\n }\n }\n },\n\n bc_divide: function (n1, n2, scale) {\n // var quot // bc_num return\n var qval // bc_num\n var num1, num2 // string\n var ptr1, ptr2, n2ptr, qptr // int pointers\n var scale1, val // int\n var len1, len2, scale2, qdigits, extra, count // int\n var qdig, qguess, borrow, carry // int\n var mval // string\n var zero // char\n var norm // int\n // var ptrs // return object from one_mul\n // Test for divide by zero. (return failure)\n if (Libbcmath.bc_is_zero(n2)) {\n return -1\n }\n\n // Test for zero divide by anything (return zero)\n if (Libbcmath.bc_is_zero(n1)) {\n return Libbcmath.bc_new_num(1, scale)\n }\n\n /* Test for n1 equals n2 (return 1 as n1 nor n2 are zero)\n if (Libbcmath.bc_compare(n1, n2, Libbcmath.MAX(n1.n_scale, n2.n_scale)) === 0) {\n quot=Libbcmath.bc_new_num(1, scale);\n quot.n_value[0] = 1;\n return quot;\n }\n */\n\n // Test for divide by 1. If it is we must truncate.\n // @todo: check where scale > 0 too.. can't see why not\n // (ie bc_is_zero - add bc_is_one function)\n if (n2.n_scale === 0) {\n if (n2.n_len === 1 && n2.n_value[0] === 1) {\n qval = Libbcmath.bc_new_num(n1.n_len, scale) // qval = bc_new_num (n1->n_len, scale);\n qval.n_sign = (n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS)\n // memset (&qval->n_value[n1->n_len],0,scale):\n Libbcmath.memset(qval.n_value, n1.n_len, 0, scale)\n // memcpy (qval->n_value, n1->n_value, n1->n_len + MIN(n1->n_scale,scale)):\n Libbcmath.memcpy(\n qval.n_value, 0, n1.n_value, 0, n1.n_len + Libbcmath.MIN(n1.n_scale, scale)\n )\n // can we return here? not in c src, but can't see why-not.\n // return qval;\n }\n }\n\n /* Set up the divide. Move the decimal point on n1 by n2's scale.\n Remember, zeros on the end of num2 are wasted effort for dividing. */\n scale2 = n2.n_scale // scale2 = n2->n_scale;\n n2ptr = n2.n_len + scale2 - 1 // n2ptr = (unsigned char *) n2.n_value+n2.n_len+scale2-1;\n while ((scale2 > 0) && (n2.n_value[n2ptr--] === 0)) {\n scale2--\n }\n\n len1 = n1.n_len + scale2\n scale1 = n1.n_scale - scale2\n if (scale1 < scale) {\n extra = scale - scale1\n } else {\n extra = 0\n }\n\n // num1 = (unsigned char *) safe_emalloc (1, n1.n_len+n1.n_scale, extra+2):\n num1 = Libbcmath.safe_emalloc(1, n1.n_len + n1.n_scale, extra + 2)\n if (num1 === null) {\n Libbcmath.bc_out_of_memory()\n }\n // memset (num1, 0, n1->n_len+n1->n_scale+extra+2):\n Libbcmath.memset(num1, 0, 0, n1.n_len + n1.n_scale + extra + 2)\n // memcpy (num1+1, n1.n_value, n1.n_len+n1.n_scale):\n Libbcmath.memcpy(num1, 1, n1.n_value, 0, n1.n_len + n1.n_scale)\n // len2 = n2->n_len + scale2:\n len2 = n2.n_len + scale2\n // num2 = (unsigned char *) safe_emalloc (1, len2, 1):\n num2 = Libbcmath.safe_emalloc(1, len2, 1)\n if (num2 === null) {\n Libbcmath.bc_out_of_memory()\n }\n // memcpy (num2, n2.n_value, len2):\n Libbcmath.memcpy(num2, 0, n2.n_value, 0, len2)\n // *(num2+len2) = 0:\n num2[len2] = 0\n // n2ptr = num2:\n n2ptr = 0\n // while (*n2ptr === 0):\n while (num2[n2ptr] === 0) {\n n2ptr++\n len2--\n }\n\n // Calculate the number of quotient digits.\n if (len2 > len1 + scale) {\n qdigits = scale + 1\n zero = true\n } else {\n zero = false\n if (len2 > len1) {\n qdigits = scale + 1 // One for the zero integer part.\n } else {\n qdigits = len1 - len2 + scale + 1\n }\n }\n\n // Allocate and zero the storage for the quotient.\n // qval = bc_new_num (qdigits-scale,scale);\n qval = Libbcmath.bc_new_num(qdigits - scale, scale)\n // memset (qval->n_value, 0, qdigits);\n Libbcmath.memset(qval.n_value, 0, 0, qdigits)\n // Allocate storage for the temporary storage mval.\n // mval = (unsigned char *) safe_emalloc (1, len2, 1);\n mval = Libbcmath.safe_emalloc(1, len2, 1)\n if (mval === null) {\n Libbcmath.bc_out_of_memory()\n }\n\n // Now for the full divide algorithm.\n if (!zero) { // Normalize\n // norm = Libbcmath.cint(10 / (Libbcmath.cint(n2.n_value[n2ptr]) + 1));\n // norm = 10 / ((int)*n2ptr + 1)\n norm = Math.floor(10 / (n2.n_value[n2ptr] + 1)) // norm = 10 / ((int)*n2ptr + 1);\n if (norm !== 1) {\n // Libbcmath._one_mult(num1, len1+scale1+extra+1, norm, num1);\n Libbcmath._one_mult(num1, 0, len1 + scale1 + extra + 1, norm, num1, 0)\n // Libbcmath._one_mult(n2ptr, len2, norm, n2ptr);\n Libbcmath._one_mult(n2.n_value, n2ptr, len2, norm, n2.n_value, n2ptr)\n // @todo: Check: Is the pointer affected by the call? if so,\n // maybe need to adjust points on return?\n }\n\n // Initialize divide loop.\n qdig = 0\n if (len2 > len1) {\n qptr = len2 - len1 // qptr = (unsigned char *) qval.n_value+len2-len1;\n } else {\n qptr = 0 // qptr = (unsigned char *) qval.n_value;\n }\n\n // Loop\n while (qdig <= len1 + scale - len2) { // Calculate the quotient digit guess.\n if (n2.n_value[n2ptr] === num1[qdig]) {\n qguess = 9\n } else {\n qguess = Math.floor((num1[qdig] * 10 + num1[qdig + 1]) / n2.n_value[n2ptr])\n }\n // Test qguess.\n\n if (n2.n_value[n2ptr + 1] * qguess >\n (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) *\n 10 + num1[qdig + 2]) {\n qguess--\n // And again.\n if (n2.n_value[n2ptr + 1] * qguess >\n (num1[qdig] * 10 + num1[qdig + 1] - n2.n_value[n2ptr] * qguess) *\n 10 + num1[qdig + 2]) {\n qguess--\n }\n }\n\n // Multiply and subtract.\n borrow = 0\n if (qguess !== 0) {\n mval[0] = 0 //* mval = 0; // @CHECK is this to fix ptr2 < 0?\n // _one_mult (n2ptr, len2, qguess, mval+1); // @CHECK\n Libbcmath._one_mult(n2.n_value, n2ptr, len2, qguess, mval, 1)\n ptr1 = qdig + len2 // (unsigned char *) num1+qdig+len2;\n ptr2 = len2 // (unsigned char *) mval+len2;\n // @todo: CHECK: Does a negative pointer return null?\n // ptr2 can be < 0 here as ptr1 = len2, thus count < len2+1 will always fail ?\n for (count = 0; count < len2 + 1; count++) {\n if (ptr2 < 0) {\n // val = Libbcmath.cint(num1[ptr1]) - 0 - borrow;\n // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n val = num1[ptr1] - 0 - borrow // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n } else {\n // val = Libbcmath.cint(num1[ptr1]) - Libbcmath.cint(mval[ptr2--]) - borrow;\n // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n // val = (int) *ptr1 - (int) *ptr2-- - borrow;\n val = num1[ptr1] - mval[ptr2--] - borrow\n }\n if (val < 0) {\n val += 10\n borrow = 1\n } else {\n borrow = 0\n }\n num1[ptr1--] = val\n }\n }\n\n // Test for negative result.\n if (borrow === 1) {\n qguess--\n ptr1 = qdig + len2 // (unsigned char *) num1+qdig+len2;\n ptr2 = len2 - 1 // (unsigned char *) n2ptr+len2-1;\n carry = 0\n for (count = 0; count < len2; count++) {\n if (ptr2 < 0) {\n // val = Libbcmath.cint(num1[ptr1]) + 0 + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n val = num1[ptr1] + 0 + carry\n } else {\n // val = Libbcmath.cint(num1[ptr1]) + Libbcmath.cint(n2.n_value[ptr2--]) + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n // val = (int) *ptr1 + (int) *ptr2-- + carry;\n val = num1[ptr1] + n2.n_value[ptr2--] + carry\n }\n if (val > 9) {\n val -= 10\n carry = 1\n } else {\n carry = 0\n }\n num1[ptr1--] = val //* ptr1-- = val;\n }\n if (carry === 1) {\n // num1[ptr1] = Libbcmath.cint((num1[ptr1] + 1) % 10);\n // *ptr1 = (*ptr1 + 1) % 10; // @CHECK\n // *ptr1 = (*ptr1 + 1) % 10; // @CHECK\n num1[ptr1] = (num1[ptr1] + 1) % 10\n }\n }\n\n // We now know the quotient digit.\n qval.n_value[qptr++] = qguess //* qptr++ = qguess;\n qdig++\n }\n }\n\n // Clean up and return the number.\n qval.n_sign = (n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS)\n if (Libbcmath.bc_is_zero(qval)) {\n qval.n_sign = Libbcmath.PLUS\n }\n Libbcmath._bc_rm_leading_zeros(qval)\n\n return qval\n\n // return 0; // Everything is OK.\n },\n\n MUL_BASE_DIGITS: 80,\n MUL_SMALL_DIGITS: (80 / 4),\n // #define MUL_SMALL_DIGITS mul_base_digits/4\n\n /* The multiply routine. N2 times N1 is put int PROD with the scale of\n the result being MIN(N2 scale+N1 scale, MAX (SCALE, N2 scale, N1 scale)).\n */\n /**\n * @param n1 bc_num\n * @param n2 bc_num\n * @param scale [int] optional\n */\n bc_multiply: function (n1, n2, scale) {\n var pval // bc_num\n var len1, len2 // int\n var fullScale, prodScale // int\n // Initialize things.\n len1 = n1.n_len + n1.n_scale\n len2 = n2.n_len + n2.n_scale\n fullScale = n1.n_scale + n2.n_scale\n prodScale = Libbcmath.MIN(\n fullScale, Libbcmath.MAX(scale, Libbcmath.MAX(n1.n_scale, n2.n_scale))\n )\n\n // pval = Libbcmath.bc_init_num(); // allow pass by ref\n // Do the multiply\n pval = Libbcmath._bc_rec_mul(n1, len1, n2, len2, fullScale)\n\n // Assign to prod and clean up the number.\n pval.n_sign = (n1.n_sign === n2.n_sign ? Libbcmath.PLUS : Libbcmath.MINUS)\n // pval.n_value = pval.nPtr; // @todo: pval.n_len = len2 + len1 + 1 - fullScale\n pval.n_scale = prodScale\n Libbcmath._bc_rm_leading_zeros(pval)\n if (Libbcmath.bc_is_zero(pval)) {\n pval.n_sign = Libbcmath.PLUS\n }\n // bc_free_num (prod);\n return pval\n },\n\n new_sub_num: function (length, scale, value) {\n var temp = new Libbcmath.bc_num() // eslint-disable-line new-cap\n temp.n_sign = Libbcmath.PLUS\n temp.n_len = length\n temp.n_scale = scale\n temp.n_value = value\n return temp\n },\n\n _bc_simp_mul: function (n1, n1len, n2, n2len, fullScale) {\n var prod // bc_num\n var n1ptr, n2ptr, pvptr // char *n1ptr, *n2ptr, *pvptr;\n var n1end, n2end // char *n1end, *n2end; // To the end of n1 and n2.\n var indx, sum, prodlen // int indx, sum, prodlen;\n prodlen = n1len + n2len + 1\n\n prod = Libbcmath.bc_new_num(prodlen, 0)\n\n n1end = n1len - 1 // (char *) (n1->n_value + n1len - 1);\n n2end = n2len - 1 // (char *) (n2->n_value + n2len - 1);\n pvptr = prodlen - 1 // (char *) ((*prod)->n_value + prodlen - 1);\n sum = 0\n\n // Here is the loop...\n for (indx = 0; indx < prodlen - 1; indx++) {\n // (char *) (n1end - MAX(0, indx-n2len+1));\n n1ptr = n1end - Libbcmath.MAX(0, indx - n2len + 1)\n // (char *) (n2end - MIN(indx, n2len-1));\n n2ptr = n2end - Libbcmath.MIN(indx, n2len - 1)\n while ((n1ptr >= 0) && (n2ptr <= n2end)) {\n // sum += *n1ptr-- * *n2ptr++;\n sum += n1.n_value[n1ptr--] * n2.n_value[n2ptr++]\n }\n //* pvptr-- = sum % BASE;\n prod.n_value[pvptr--] = Math.floor(sum % Libbcmath.BASE)\n sum = Math.floor(sum / Libbcmath.BASE) // sum = sum / BASE;\n }\n prod.n_value[pvptr] = sum //* pvptr = sum;\n return prod\n },\n\n /* A special adder/subtractor for the recursive divide and conquer\n multiply algorithm. Note: if sub is called, accum must\n be larger that what is being subtracted. Also, accum and val\n must have n_scale = 0. (e.g. they must look like integers. *) */\n _bc_shift_addsub: function (accum, val, shift, sub) {\n var accp, valp // signed char *accp, *valp;\n var count, carry // int count, carry;\n count = val.n_len\n if (val.n_value[0] === 0) {\n count--\n }\n\n // assert (accum->n_len+accum->n_scale >= shift+count);\n if (accum.n_len + accum.n_scale < shift + count) {\n throw new Error('len + scale < shift + count') // ?? I think that's what assert does :)\n }\n\n // Set up pointers and others\n // (signed char *)(accum->n_value + accum->n_len + accum->n_scale - shift - 1);\n accp = accum.n_len + accum.n_scale - shift - 1\n valp = val.n_len = 1 // (signed char *)(val->n_value + val->n_len - 1);\n carry = 0\n if (sub) {\n // Subtraction, carry is really borrow.\n while (count--) {\n accum.n_value[accp] -= val.n_value[valp--] + carry //* accp -= *valp-- + carry;\n if (accum.n_value[accp] < 0) { // if (*accp < 0)\n carry = 1\n accum.n_value[accp--] += Libbcmath.BASE //* accp-- += BASE;\n } else {\n carry = 0\n accp--\n }\n }\n while (carry) {\n accum.n_value[accp] -= carry //* accp -= carry;\n if (accum.n_value[accp] < 0) { // if (*accp < 0)\n accum.n_value[accp--] += Libbcmath.BASE // *accp-- += BASE;\n } else {\n carry = 0\n }\n }\n } else {\n // Addition\n while (count--) {\n accum.n_value[accp] += val.n_value[valp--] + carry //* accp += *valp-- + carry;\n if (accum.n_value[accp] > (Libbcmath.BASE - 1)) { // if (*accp > (BASE-1))\n carry = 1\n accum.n_value[accp--] -= Libbcmath.BASE //* accp-- -= BASE;\n } else {\n carry = 0\n accp--\n }\n }\n while (carry) {\n accum.n_value[accp] += carry //* accp += carry;\n if (accum.n_value[accp] > (Libbcmath.BASE - 1)) { // if (*accp > (BASE-1))\n accum.n_value[accp--] -= Libbcmath.BASE //* accp-- -= BASE;\n } else {\n carry = 0\n }\n }\n }\n return true // accum is the pass-by-reference return\n },\n\n /* Recursive divide and conquer multiply algorithm.\n based on\n Let u = u0 + u1*(b^n)\n Let v = v0 + v1*(b^n)\n Then uv = (B^2n+B^n)*u1*v1 + B^n*(u1-u0)*(v0-v1) + (B^n+1)*u0*v0\n\n B is the base of storage, number of digits in u1,u0 close to equal.\n */\n _bc_rec_mul: function (u, ulen, v, vlen, fullScale) {\n var prod // @return\n var u0, u1, v0, v1 // bc_num\n // var u0len,\n // var v0len // int\n var m1, m2, m3, d1, d2 // bc_num\n var n, prodlen, m1zero // int\n var d1len, d2len // int\n // Base case?\n if ((ulen + vlen) < Libbcmath.MUL_BASE_DIGITS ||\n ulen < Libbcmath.MUL_SMALL_DIGITS ||\n vlen < Libbcmath.MUL_SMALL_DIGITS) {\n return Libbcmath._bc_simp_mul(u, ulen, v, vlen, fullScale)\n }\n\n // Calculate n -- the u and v split point in digits.\n n = Math.floor((Libbcmath.MAX(ulen, vlen) + 1) / 2)\n\n // Split u and v.\n if (ulen < n) {\n u1 = Libbcmath.bc_init_num() // u1 = bc_copy_num (BCG(_zero_));\n u0 = Libbcmath.new_sub_num(ulen, 0, u.n_value)\n } else {\n u1 = Libbcmath.new_sub_num(ulen - n, 0, u.n_value)\n u0 = Libbcmath.new_sub_num(n, 0, u.n_value + ulen - n)\n }\n if (vlen < n) {\n v1 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n v0 = Libbcmath.new_sub_num(vlen, 0, v.n_value)\n } else {\n v1 = Libbcmath.new_sub_num(vlen - n, 0, v.n_value)\n v0 = Libbcmath.new_sub_num(n, 0, v.n_value + vlen - n)\n }\n Libbcmath._bc_rm_leading_zeros(u1)\n Libbcmath._bc_rm_leading_zeros(u0)\n // var u0len = u0.n_len\n Libbcmath._bc_rm_leading_zeros(v1)\n Libbcmath._bc_rm_leading_zeros(v0)\n // var v0len = v0.n_len\n\n m1zero = Libbcmath.bc_is_zero(u1) || Libbcmath.bc_is_zero(v1)\n\n // Calculate sub results ...\n d1 = Libbcmath.bc_init_num() // needed?\n d2 = Libbcmath.bc_init_num() // needed?\n d1 = Libbcmath.bc_sub(u1, u0, 0)\n d1len = d1.n_len\n\n d2 = Libbcmath.bc_sub(v0, v1, 0)\n d2len = d2.n_len\n\n // Do recursive multiplies and shifted adds.\n if (m1zero) {\n m1 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n } else {\n // m1 = Libbcmath.bc_init_num(); //allow pass-by-ref\n m1 = Libbcmath._bc_rec_mul(u1, u1.n_len, v1, v1.n_len, 0)\n }\n if (Libbcmath.bc_is_zero(d1) || Libbcmath.bc_is_zero(d2)) {\n m2 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n } else {\n // m2 = Libbcmath.bc_init_num(); //allow pass-by-ref\n m2 = Libbcmath._bc_rec_mul(d1, d1len, d2, d2len, 0)\n }\n\n if (Libbcmath.bc_is_zero(u0) || Libbcmath.bc_is_zero(v0)) {\n m3 = Libbcmath.bc_init_num() // bc_copy_num (BCG(_zero_));\n } else {\n // m3 = Libbcmath.bc_init_num(); //allow pass-by-ref\n m3 = Libbcmath._bc_rec_mul(u0, u0.n_len, v0, v0.n_len, 0)\n }\n\n // Initialize product\n prodlen = ulen + vlen + 1\n prod = Libbcmath.bc_new_num(prodlen, 0)\n\n if (!m1zero) {\n Libbcmath._bc_shift_addsub(prod, m1, 2 * n, 0)\n Libbcmath._bc_shift_addsub(prod, m1, n, 0)\n }\n Libbcmath._bc_shift_addsub(prod, m3, n, 0)\n Libbcmath._bc_shift_addsub(prod, m3, 0, 0)\n Libbcmath._bc_shift_addsub(prod, m2, n, d1.n_sign !== d2.n_sign)\n\n return prod\n // Now clean up!\n // bc_free_num (&u1);\n // bc_free_num (&u0);\n // bc_free_num (&v1);\n // bc_free_num (&m1);\n // bc_free_num (&v0);\n // bc_free_num (&m2);\n // bc_free_num (&m3);\n // bc_free_num (&d1);\n // bc_free_num (&d2);\n },\n\n /**\n *\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @param {boolean} useSign\n * @param {boolean} ignoreLast\n * @return -1, 0, 1 (see bc_compare)\n */\n _bc_do_compare: function (n1, n2, useSign, ignoreLast) {\n var n1ptr, n2ptr // int\n var count // int\n // First, compare signs.\n if (useSign && (n1.n_sign !== n2.n_sign)) {\n if (n1.n_sign === Libbcmath.PLUS) {\n return (1) // Positive N1 > Negative N2\n } else {\n return (-1) // Negative N1 < Positive N1\n }\n }\n\n // Now compare the magnitude.\n if (n1.n_len !== n2.n_len) {\n if (n1.n_len > n2.n_len) { // Magnitude of n1 > n2.\n if (!useSign || (n1.n_sign === Libbcmath.PLUS)) {\n return (1)\n } else {\n return (-1)\n }\n } else { // Magnitude of n1 < n2.\n if (!useSign || (n1.n_sign === Libbcmath.PLUS)) {\n return (-1)\n } else {\n return (1)\n }\n }\n }\n\n /* If we get here, they have the same number of integer digits.\n check the integer part and the equal length part of the fraction. */\n count = n1.n_len + Math.min(n1.n_scale, n2.n_scale)\n n1ptr = 0\n n2ptr = 0\n\n while ((count > 0) && (n1.n_value[n1ptr] === n2.n_value[n2ptr])) {\n n1ptr++\n n2ptr++\n count--\n }\n\n if (ignoreLast && (count === 1) && (n1.n_scale === n2.n_scale)) {\n return (0)\n }\n\n if (count !== 0) {\n if (n1.n_value[n1ptr] > n2.n_value[n2ptr]) { // Magnitude of n1 > n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (1)\n } else {\n return (-1)\n }\n } else { // Magnitude of n1 < n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (-1)\n } else {\n return (1)\n }\n }\n }\n\n // They are equal up to the last part of the equal part of the fraction.\n if (n1.n_scale !== n2.n_scale) {\n if (n1.n_scale > n2.n_scale) {\n for (count = (n1.n_scale - n2.n_scale); count > 0; count--) {\n if (n1.n_value[n1ptr++] !== 0) { // Magnitude of n1 > n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (1)\n } else {\n return (-1)\n }\n }\n }\n } else {\n for (count = (n2.n_scale - n1.n_scale); count > 0; count--) {\n if (n2.n_value[n2ptr++] !== 0) { // Magnitude of n1 < n2.\n if (!useSign || n1.n_sign === Libbcmath.PLUS) {\n return (-1)\n } else {\n return (1)\n }\n }\n }\n }\n }\n\n // They must be equal!\n return (0)\n },\n\n /* Here is the full subtract routine that takes care of negative numbers.\n N2 is subtracted from N1 and the result placed in RESULT. SCALE_MIN\n is the minimum scale for the result. */\n bc_sub: function (n1, n2, scaleMin) {\n var diff // bc_num\n var cmpRes, resScale // int\n if (n1.n_sign !== n2.n_sign) {\n diff = Libbcmath._bc_do_add(n1, n2, scaleMin)\n diff.n_sign = n1.n_sign\n } else { // subtraction must be done.\n // Compare magnitudes.\n cmpRes = Libbcmath._bc_do_compare(n1, n2, false, false)\n switch (cmpRes) {\n case -1:\n // n1 is less than n2, subtract n1 from n2.\n diff = Libbcmath._bc_do_sub(n2, n1, scaleMin)\n diff.n_sign = (n2.n_sign === Libbcmath.PLUS ? Libbcmath.MINUS : Libbcmath.PLUS)\n break\n case 0:\n // They are equal! return zero!\n resScale = Libbcmath.MAX(scaleMin, Libbcmath.MAX(n1.n_scale, n2.n_scale))\n diff = Libbcmath.bc_new_num(1, resScale)\n Libbcmath.memset(diff.n_value, 0, 0, resScale + 1)\n break\n case 1:\n // n2 is less than n1, subtract n2 from n1.\n diff = Libbcmath._bc_do_sub(n1, n2, scaleMin)\n diff.n_sign = n1.n_sign\n break\n }\n }\n\n // Clean up and return.\n // bc_free_num (result);\n //* result = diff;\n return diff\n },\n\n _bc_do_add: function (n1, n2, scaleMin) {\n var sum // bc_num\n var sumScale, sumDigits // int\n var n1ptr, n2ptr, sumptr // int\n var carry, n1bytes, n2bytes // int\n var tmp // int\n\n // Prepare sum.\n sumScale = Libbcmath.MAX(n1.n_scale, n2.n_scale)\n sumDigits = Libbcmath.MAX(n1.n_len, n2.n_len) + 1\n sum = Libbcmath.bc_new_num(sumDigits, Libbcmath.MAX(sumScale, scaleMin))\n\n // Start with the fraction part. Initialize the pointers.\n n1bytes = n1.n_scale\n n2bytes = n2.n_scale\n n1ptr = (n1.n_len + n1bytes - 1)\n n2ptr = (n2.n_len + n2bytes - 1)\n sumptr = (sumScale + sumDigits - 1)\n\n // Add the fraction part. First copy the longer fraction\n // (ie when adding 1.2345 to 1 we know .2345 is correct already) .\n if (n1bytes !== n2bytes) {\n if (n1bytes > n2bytes) {\n // n1 has more dp then n2\n while (n1bytes > n2bytes) {\n sum.n_value[sumptr--] = n1.n_value[n1ptr--]\n // *sumptr-- = *n1ptr--;\n n1bytes--\n }\n } else {\n // n2 has more dp then n1\n while (n2bytes > n1bytes) {\n sum.n_value[sumptr--] = n2.n_value[n2ptr--]\n // *sumptr-- = *n2ptr--;\n n2bytes--\n }\n }\n }\n\n // Now add the remaining fraction part and equal size integer parts.\n n1bytes += n1.n_len\n n2bytes += n2.n_len\n carry = 0\n while ((n1bytes > 0) && (n2bytes > 0)) {\n // add the two numbers together\n tmp = n1.n_value[n1ptr--] + n2.n_value[n2ptr--] + carry\n // *sumptr = *n1ptr-- + *n2ptr-- + carry;\n // check if they are >= 10 (impossible to be more then 18)\n if (tmp >= Libbcmath.BASE) {\n carry = 1\n tmp -= Libbcmath.BASE // yep, subtract 10, add a carry\n } else {\n carry = 0\n }\n sum.n_value[sumptr] = tmp\n sumptr--\n n1bytes--\n n2bytes--\n }\n\n // Now add carry the [rest of the] longer integer part.\n if (n1bytes === 0) {\n // n2 is a bigger number then n1\n while (n2bytes-- > 0) {\n tmp = n2.n_value[n2ptr--] + carry\n // *sumptr = *n2ptr-- + carry;\n if (tmp >= Libbcmath.BASE) {\n carry = 1\n tmp -= Libbcmath.BASE\n } else {\n carry = 0\n }\n sum.n_value[sumptr--] = tmp\n }\n } else {\n // n1 is bigger then n2..\n while (n1bytes-- > 0) {\n tmp = n1.n_value[n1ptr--] + carry\n // *sumptr = *n1ptr-- + carry;\n if (tmp >= Libbcmath.BASE) {\n carry = 1\n tmp -= Libbcmath.BASE\n } else {\n carry = 0\n }\n sum.n_value[sumptr--] = tmp\n }\n }\n\n // Set final carry.\n if (carry === 1) {\n sum.n_value[sumptr] += 1\n // *sumptr += 1;\n }\n\n // Adjust sum and return.\n Libbcmath._bc_rm_leading_zeros(sum)\n return sum\n },\n\n /**\n * Perform a subtraction\n *\n * Perform subtraction: N2 is subtracted from N1 and the value is\n * returned. The signs of N1 and N2 are ignored. Also, N1 is\n * assumed to be larger than N2. SCALE_MIN is the minimum scale\n * of the result.\n *\n * Basic school maths says to subtract 2 numbers..\n * 1. make them the same length, the decimal places, and the integer part\n * 2. start from the right and subtract the two numbers from each other\n * 3. if the sum of the 2 numbers < 0, carry -1 to the next set and add 10\n * (ie 18 > carry 1 becomes 8). thus 0.9 + 0.9 = 1.8\n *\n * @param {bc_num} n1\n * @param {bc_num} n2\n * @param {int} scaleMin\n * @return bc_num\n */\n _bc_do_sub: function (n1, n2, scaleMin) {\n var diff // bc_num\n var diffScale, diffLen // int\n var minScale, minLen // int\n var n1ptr, n2ptr, diffptr // int\n var borrow, count, val // int\n // Allocate temporary storage.\n diffLen = Libbcmath.MAX(n1.n_len, n2.n_len)\n diffScale = Libbcmath.MAX(n1.n_scale, n2.n_scale)\n minLen = Libbcmath.MIN(n1.n_len, n2.n_len)\n minScale = Libbcmath.MIN(n1.n_scale, n2.n_scale)\n diff = Libbcmath.bc_new_num(diffLen, Libbcmath.MAX(diffScale, scaleMin))\n\n /* Not needed?\n // Zero extra digits made by scaleMin.\n if (scaleMin > diffScale) {\n diffptr = (char *) (diff->n_value + diffLen + diffScale);\n for (count = scaleMin - diffScale; count > 0; count--) {\n *diffptr++ = 0;\n }\n }\n */\n\n // Initialize the subtract.\n n1ptr = (n1.n_len + n1.n_scale - 1)\n n2ptr = (n2.n_len + n2.n_scale - 1)\n diffptr = (diffLen + diffScale - 1)\n\n // Subtract the numbers.\n borrow = 0\n\n // Take care of the longer scaled number.\n if (n1.n_scale !== minScale) {\n // n1 has the longer scale\n for (count = n1.n_scale - minScale; count > 0; count--) {\n diff.n_value[diffptr--] = n1.n_value[n1ptr--]\n // *diffptr-- = *n1ptr--;\n }\n } else {\n // n2 has the longer scale\n for (count = n2.n_scale - minScale; count > 0; count--) {\n val = 0 - n2.n_value[n2ptr--] - borrow\n // val = - *n2ptr-- - borrow;\n if (val < 0) {\n val += Libbcmath.BASE\n borrow = 1\n } else {\n borrow = 0\n }\n diff.n_value[diffptr--] = val\n //* diffptr-- = val;\n }\n }\n\n // Now do the equal length scale and integer parts.\n for (count = 0; count < minLen + minScale; count++) {\n val = n1.n_value[n1ptr--] - n2.n_value[n2ptr--] - borrow\n // val = *n1ptr-- - *n2ptr-- - borrow;\n if (val < 0) {\n val += Libbcmath.BASE\n borrow = 1\n } else {\n borrow = 0\n }\n diff.n_value[diffptr--] = val\n //* diffptr-- = val;\n }\n\n // If n1 has more digits then n2, we now do that subtract.\n if (diffLen !== minLen) {\n for (count = diffLen - minLen; count > 0; count--) {\n val = n1.n_value[n1ptr--] - borrow\n // val = *n1ptr-- - borrow;\n if (val < 0) {\n val += Libbcmath.BASE\n borrow = 1\n } else {\n borrow = 0\n }\n diff.n_value[diffptr--] = val\n }\n }\n\n // Clean up and return.\n Libbcmath._bc_rm_leading_zeros(diff)\n return diff\n },\n\n /**\n *\n * @param {int} length\n * @param {int} scale\n * @return bc_num\n */\n bc_new_num: function (length, scale) {\n var temp // bc_num\n temp = new Libbcmath.bc_num() // eslint-disable-line new-cap\n temp.n_sign = Libbcmath.PLUS\n temp.n_len = length\n temp.n_scale = scale\n temp.n_value = Libbcmath.safe_emalloc(1, length + scale, 0)\n Libbcmath.memset(temp.n_value, 0, 0, length + scale)\n return temp\n },\n\n safe_emalloc: function (size, len, extra) {\n return Array((size * len) + extra)\n },\n\n /**\n * Create a new number\n */\n bc_init_num: function () {\n return new Libbcmath.bc_new_num(1, 0) // eslint-disable-line new-cap\n },\n\n _bc_rm_leading_zeros: function (num) {\n // We can move n_value to point to the first non zero digit!\n while ((num.n_value[0] === 0) && (num.n_len > 1)) {\n num.n_value.shift()\n num.n_len--\n }\n },\n\n /**\n * Convert to bc_num detecting scale\n */\n php_str2num: function (str) {\n var p\n p = str.indexOf('.')\n if (p === -1) {\n return Libbcmath.bc_str2num(str, 0)\n } else {\n return Libbcmath.bc_str2num(str, (str.length - p))\n }\n },\n\n CH_VAL: function (c) {\n return c - '0' // ??\n },\n\n BCD_CHAR: function (d) {\n return d + '0' // ??\n },\n\n isdigit: function (c) {\n return isNaN(parseInt(c, 10))\n },\n\n bc_str2num: function (strIn, scale) {\n var str, num, ptr, digits, strscale, zeroInt, nptr\n // remove any non-expected characters\n // Check for valid number and count digits.\n\n str = strIn.split('') // convert to array\n ptr = 0 // str\n digits = 0\n strscale = 0\n zeroInt = false\n if ((str[ptr] === '+') || (str[ptr] === '-')) {\n ptr++ // Sign\n }\n while (str[ptr] === '0') {\n ptr++ // Skip leading zeros.\n }\n // while (Libbcmath.isdigit(str[ptr])) {\n while ((str[ptr]) % 1 === 0) { // Libbcmath.isdigit(str[ptr])) {\n ptr++\n digits++ // digits\n }\n\n if (str[ptr] === '.') {\n ptr++ // decimal point\n }\n // while (Libbcmath.isdigit(str[ptr])) {\n while ((str[ptr]) % 1 === 0) { // Libbcmath.isdigit(str[ptr])) {\n ptr++\n strscale++ // digits\n }\n\n if ((str[ptr]) || (digits + strscale === 0)) {\n // invalid number, return 0\n return Libbcmath.bc_init_num()\n //* num = bc_copy_num (BCG(_zero_));\n }\n\n // Adjust numbers and allocate storage and initialize fields.\n strscale = Libbcmath.MIN(strscale, scale)\n if (digits === 0) {\n zeroInt = true\n digits = 1\n }\n\n num = Libbcmath.bc_new_num(digits, strscale)\n\n // Build the whole number.\n ptr = 0 // str\n if (str[ptr] === '-') {\n num.n_sign = Libbcmath.MINUS\n // (*num)->n_sign = MINUS;\n ptr++\n } else {\n num.n_sign = Libbcmath.PLUS\n // (*num)->n_sign = PLUS;\n if (str[ptr] === '+') {\n ptr++\n }\n }\n while (str[ptr] === '0') {\n ptr++ // Skip leading zeros.\n }\n\n nptr = 0 // (*num)->n_value;\n if (zeroInt) {\n num.n_value[nptr++] = 0\n digits = 0\n }\n for (; digits > 0; digits--) {\n num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++])\n //* nptr++ = CH_VAL(*ptr++);\n }\n\n // Build the fractional part.\n if (strscale > 0) {\n ptr++ // skip the decimal point!\n for (; strscale > 0; strscale--) {\n num.n_value[nptr++] = Libbcmath.CH_VAL(str[ptr++])\n }\n }\n\n return num\n },\n\n cint: function (v) {\n if (typeof v === 'undefined') {\n v = 0\n }\n var x = parseInt(v, 10)\n if (isNaN(x)) {\n x = 0\n }\n return x\n },\n\n /**\n * Basic min function\n * @param {int} a\n * @param {int} b\n */\n MIN: function (a, b) {\n return ((a > b) ? b : a)\n },\n\n /**\n * Basic max function\n * @param {int} a\n * @param {int} b\n */\n MAX: function (a, b) {\n return ((a > b) ? a : b)\n },\n\n /**\n * Basic odd function\n * @param {int} a\n */\n ODD: function (a) {\n return (a & 1)\n },\n\n /**\n * replicate c function\n * @param {array} r return (by reference)\n * @param {int} ptr\n * @param {string} chr char to fill\n * @param {int} len length to fill\n */\n memset: function (r, ptr, chr, len) {\n var i\n for (i = 0; i < len; i++) {\n r[ptr + i] = chr\n }\n },\n\n /**\n * Replacement c function\n * Obviously can't work like c does, so we've added an \"offset\"\n * param so you could do memcpy(dest+1, src, len) as memcpy(dest, 1, src, len)\n * Also only works on arrays\n */\n memcpy: function (dest, ptr, src, srcptr, len) {\n var i\n for (i = 0; i < len; i++) {\n dest[ptr + i] = src[srcptr + i]\n }\n return true\n },\n\n /**\n * Determine if the number specified is zero or not\n * @param {bc_num} num number to check\n * @return boolean true when zero, false when not zero.\n */\n bc_is_zero: function (num) {\n var count // int\n var nptr // int\n // Quick check.\n // if (num === BCG(_zero_)) return TRUE;\n // Initialize\n count = num.n_len + num.n_scale\n nptr = 0 // num->n_value;\n // The check\n while ((count > 0) && (num.n_value[nptr++] === 0)) {\n count--\n }\n\n if (count !== 0) {\n return false\n } else {\n return true\n }\n },\n\n bc_out_of_memory: function () {\n throw new Error('(BC) Out of memory')\n }\n }\n return Libbcmath\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/_locutus_shared/index.js b/node_modules/locutus/php/_locutus_shared/index.js
deleted file mode 100644
index 56cacca..0000000
--- a/node_modules/locutus/php/_locutus_shared/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['_bc'] = require('./_bc');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/_locutus_shared/index.js.map b/node_modules/locutus/php/_locutus_shared/index.js.map
deleted file mode 100644
index e8a29e9..0000000
--- a/node_modules/locutus/php/_locutus_shared/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/_locutus_shared/index.js"],"names":[],"mappings":";;AAAA,OAAO,OAAP,CAAe,oBAAf,IAAuC,QAAQ,sBAAR,CAAvC","file":"index.js","sourcesContent":["module.exports['_locutus_shared_bc'] = require('./_locutus_shared_bc')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_change_key_case.js b/node_modules/locutus/php/array/array_change_key_case.js
deleted file mode 100644
index 6dac772..0000000
--- a/node_modules/locutus/php/array/array_change_key_case.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_change_key_case(array, cs) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_change_key_case/
- // original by: Ates Goral (http://magnetiq.com)
- // improved by: marrtins
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_change_key_case(42)
- // returns 1: false
- // example 2: array_change_key_case([ 3, 5 ])
- // returns 2: [3, 5]
- // example 3: array_change_key_case({ FuBaR: 42 })
- // returns 3: {"fubar": 42}
- // example 4: array_change_key_case({ FuBaR: 42 }, 'CASE_LOWER')
- // returns 4: {"fubar": 42}
- // example 5: array_change_key_case({ FuBaR: 42 }, 'CASE_UPPER')
- // returns 5: {"FUBAR": 42}
- // example 6: array_change_key_case({ FuBaR: 42 }, 2)
- // returns 6: {"FUBAR": 42}
-
- var caseFnc;
- var key;
- var tmpArr = {};
-
- if (Object.prototype.toString.call(array) === '[object Array]') {
- return array;
- }
-
- if (array && (typeof array === 'undefined' ? 'undefined' : _typeof(array)) === 'object') {
- caseFnc = !cs || cs === 'CASE_LOWER' ? 'toLowerCase' : 'toUpperCase';
- for (key in array) {
- tmpArr[key[caseFnc]()] = array[key];
- }
- return tmpArr;
- }
-
- return false;
-};
-//# sourceMappingURL=array_change_key_case.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_change_key_case.js.map b/node_modules/locutus/php/array/array_change_key_case.js.map
deleted file mode 100644
index 2bc1a3a..0000000
--- a/node_modules/locutus/php/array/array_change_key_case.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_change_key_case.js"],"names":["module","exports","array_change_key_case","array","cs","caseFnc","key","tmpArr","Object","prototype","toString","call"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,qBAAT,CAAgCC,KAAhC,EAAuCC,EAAvC,EAA2C;AAAE;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,SAAS,EAAb;;AAEA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BR,KAA/B,MAA0C,gBAA9C,EAAgE;AAC9D,WAAOA,KAAP;AACD;;AAED,MAAIA,SAAS,QAAOA,KAAP,yCAAOA,KAAP,OAAiB,QAA9B,EAAwC;AACtCE,cAAW,CAACD,EAAD,IAAOA,OAAO,YAAf,GAA+B,aAA/B,GAA+C,aAAzD;AACA,SAAKE,GAAL,IAAYH,KAAZ,EAAmB;AACjBI,aAAOD,IAAID,OAAJ,GAAP,IAAyBF,MAAMG,GAAN,CAAzB;AACD;AACD,WAAOC,MAAP;AACD;;AAED,SAAO,KAAP;AACD,CAnCD","file":"array_change_key_case.js","sourcesContent":["module.exports = function array_change_key_case (array, cs) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_change_key_case/\n // original by: Ates Goral (http://magnetiq.com)\n // improved by: marrtins\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_change_key_case(42)\n // returns 1: false\n // example 2: array_change_key_case([ 3, 5 ])\n // returns 2: [3, 5]\n // example 3: array_change_key_case({ FuBaR: 42 })\n // returns 3: {\"fubar\": 42}\n // example 4: array_change_key_case({ FuBaR: 42 }, 'CASE_LOWER')\n // returns 4: {\"fubar\": 42}\n // example 5: array_change_key_case({ FuBaR: 42 }, 'CASE_UPPER')\n // returns 5: {\"FUBAR\": 42}\n // example 6: array_change_key_case({ FuBaR: 42 }, 2)\n // returns 6: {\"FUBAR\": 42}\n\n var caseFnc\n var key\n var tmpArr = {}\n\n if (Object.prototype.toString.call(array) === '[object Array]') {\n return array\n }\n\n if (array && typeof array === 'object') {\n caseFnc = (!cs || cs === 'CASE_LOWER') ? 'toLowerCase' : 'toUpperCase'\n for (key in array) {\n tmpArr[key[caseFnc]()] = array[key]\n }\n return tmpArr\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_chunk.js b/node_modules/locutus/php/array/array_chunk.js
deleted file mode 100644
index 953d0e2..0000000
--- a/node_modules/locutus/php/array/array_chunk.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict';
-
-module.exports = function array_chunk(input, size, preserveKeys) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_chunk/
- // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Important note: Per the ECMAScript specification,
- // note 1: objects may not always iterate in a predictable order
- // example 1: array_chunk(['Kevin', 'van', 'Zonneveld'], 2)
- // returns 1: [['Kevin', 'van'], ['Zonneveld']]
- // example 2: array_chunk(['Kevin', 'van', 'Zonneveld'], 2, true)
- // returns 2: [{0:'Kevin', 1:'van'}, {2: 'Zonneveld'}]
- // example 3: array_chunk({1:'Kevin', 2:'van', 3:'Zonneveld'}, 2)
- // returns 3: [['Kevin', 'van'], ['Zonneveld']]
- // example 4: array_chunk({1:'Kevin', 2:'van', 3:'Zonneveld'}, 2, true)
- // returns 4: [{1: 'Kevin', 2: 'van'}, {3: 'Zonneveld'}]
-
- var x;
- var p = '';
- var i = 0;
- var c = -1;
- var l = input.length || 0;
- var n = [];
-
- if (size < 1) {
- return null;
- }
-
- if (Object.prototype.toString.call(input) === '[object Array]') {
- if (preserveKeys) {
- while (i < l) {
- (x = i % size) ? n[c][i] = input[i] : n[++c] = {};n[c][i] = input[i];
- i++;
- }
- } else {
- while (i < l) {
- (x = i % size) ? n[c][x] = input[i] : n[++c] = [input[i]];
- i++;
- }
- }
- } else {
- if (preserveKeys) {
- for (p in input) {
- if (input.hasOwnProperty(p)) {
- (x = i % size) ? n[c][p] = input[p] : n[++c] = {};n[c][p] = input[p];
- i++;
- }
- }
- } else {
- for (p in input) {
- if (input.hasOwnProperty(p)) {
- (x = i % size) ? n[c][x] = input[p] : n[++c] = [input[p]];
- i++;
- }
- }
- }
- }
-
- return n;
-};
-//# sourceMappingURL=array_chunk.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_chunk.js.map b/node_modules/locutus/php/array/array_chunk.js.map
deleted file mode 100644
index a46a624..0000000
--- a/node_modules/locutus/php/array/array_chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_chunk.js"],"names":["module","exports","array_chunk","input","size","preserveKeys","x","p","i","c","l","length","n","Object","prototype","toString","call","hasOwnProperty"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,KAAtB,EAA6BC,IAA7B,EAAmCC,YAAnC,EAAiD;AAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,CAAJ;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAC,CAAT;AACA,MAAIC,IAAIP,MAAMQ,MAAN,IAAgB,CAAxB;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIR,OAAO,CAAX,EAAc;AACZ,WAAO,IAAP;AACD;;AAED,MAAIS,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+Bb,KAA/B,MAA0C,gBAA9C,EAAgE;AAC9D,QAAIE,YAAJ,EAAkB;AAChB,aAAOG,IAAIE,CAAX,EAAc;AACZ,SAACJ,IAAIE,IAAIJ,IAAT,IACIQ,EAAEH,CAAF,EAAKD,CAAL,IAAUL,MAAMK,CAAN,CADd,GAEII,EAAE,EAAEH,CAAJ,IAAS,EAFb,CAEiBG,EAAEH,CAAF,EAAKD,CAAL,IAAUL,MAAMK,CAAN,CAAV;AACjBA;AACD;AACF,KAPD,MAOO;AACL,aAAOA,IAAIE,CAAX,EAAc;AACZ,SAACJ,IAAIE,IAAIJ,IAAT,IACIQ,EAAEH,CAAF,EAAKH,CAAL,IAAUH,MAAMK,CAAN,CADd,GAEII,EAAE,EAAEH,CAAJ,IAAS,CAACN,MAAMK,CAAN,CAAD,CAFb;AAGAA;AACD;AACF;AACF,GAhBD,MAgBO;AACL,QAAIH,YAAJ,EAAkB;AAChB,WAAKE,CAAL,IAAUJ,KAAV,EAAiB;AACf,YAAIA,MAAMc,cAAN,CAAqBV,CAArB,CAAJ,EAA6B;AAC3B,WAACD,IAAIE,IAAIJ,IAAT,IACIQ,EAAEH,CAAF,EAAKF,CAAL,IAAUJ,MAAMI,CAAN,CADd,GAEIK,EAAE,EAAEH,CAAJ,IAAS,EAFb,CAEiBG,EAAEH,CAAF,EAAKF,CAAL,IAAUJ,MAAMI,CAAN,CAAV;AACjBC;AACD;AACF;AACF,KATD,MASO;AACL,WAAKD,CAAL,IAAUJ,KAAV,EAAiB;AACf,YAAIA,MAAMc,cAAN,CAAqBV,CAArB,CAAJ,EAA6B;AAC3B,WAACD,IAAIE,IAAIJ,IAAT,IACIQ,EAAEH,CAAF,EAAKH,CAAL,IAAUH,MAAMI,CAAN,CADd,GAEIK,EAAE,EAAEH,CAAJ,IAAS,CAACN,MAAMI,CAAN,CAAD,CAFb;AAGAC;AACD;AACF;AACF;AACF;;AAED,SAAOI,CAAP;AACD,CAjED","file":"array_chunk.js","sourcesContent":["module.exports = function array_chunk (input, size, preserveKeys) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_chunk/\n // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Important note: Per the ECMAScript specification,\n // note 1: objects may not always iterate in a predictable order\n // example 1: array_chunk(['Kevin', 'van', 'Zonneveld'], 2)\n // returns 1: [['Kevin', 'van'], ['Zonneveld']]\n // example 2: array_chunk(['Kevin', 'van', 'Zonneveld'], 2, true)\n // returns 2: [{0:'Kevin', 1:'van'}, {2: 'Zonneveld'}]\n // example 3: array_chunk({1:'Kevin', 2:'van', 3:'Zonneveld'}, 2)\n // returns 3: [['Kevin', 'van'], ['Zonneveld']]\n // example 4: array_chunk({1:'Kevin', 2:'van', 3:'Zonneveld'}, 2, true)\n // returns 4: [{1: 'Kevin', 2: 'van'}, {3: 'Zonneveld'}]\n\n var x\n var p = ''\n var i = 0\n var c = -1\n var l = input.length || 0\n var n = []\n\n if (size < 1) {\n return null\n }\n\n if (Object.prototype.toString.call(input) === '[object Array]') {\n if (preserveKeys) {\n while (i < l) {\n (x = i % size)\n ? n[c][i] = input[i]\n : n[++c] = {}; n[c][i] = input[i]\n i++\n }\n } else {\n while (i < l) {\n (x = i % size)\n ? n[c][x] = input[i]\n : n[++c] = [input[i]]\n i++\n }\n }\n } else {\n if (preserveKeys) {\n for (p in input) {\n if (input.hasOwnProperty(p)) {\n (x = i % size)\n ? n[c][p] = input[p]\n : n[++c] = {}; n[c][p] = input[p]\n i++\n }\n }\n } else {\n for (p in input) {\n if (input.hasOwnProperty(p)) {\n (x = i % size)\n ? n[c][x] = input[p]\n : n[++c] = [input[p]]\n i++\n }\n }\n }\n }\n\n return n\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_combine.js b/node_modules/locutus/php/array/array_combine.js
deleted file mode 100644
index 124f5fa..0000000
--- a/node_modules/locutus/php/array/array_combine.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_combine(keys, values) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_combine/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_combine([0,1,2], ['kevin','van','zonneveld'])
- // returns 1: {0: 'kevin', 1: 'van', 2: 'zonneveld'}
-
- var newArray = {};
- var i = 0;
-
- // input sanitation
- // Only accept arrays or array-like objects
- // Require arrays to have a count
- if ((typeof keys === 'undefined' ? 'undefined' : _typeof(keys)) !== 'object') {
- return false;
- }
- if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) !== 'object') {
- return false;
- }
- if (typeof keys.length !== 'number') {
- return false;
- }
- if (typeof values.length !== 'number') {
- return false;
- }
- if (!keys.length) {
- return false;
- }
-
- // number of elements does not match
- if (keys.length !== values.length) {
- return false;
- }
-
- for (i = 0; i < keys.length; i++) {
- newArray[keys[i]] = values[i];
- }
-
- return newArray;
-};
-//# sourceMappingURL=array_combine.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_combine.js.map b/node_modules/locutus/php/array/array_combine.js.map
deleted file mode 100644
index 32506e6..0000000
--- a/node_modules/locutus/php/array/array_combine.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_combine.js"],"names":["module","exports","array_combine","keys","values","newArray","i","length"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,IAAxB,EAA8BC,MAA9B,EAAsC;AAAE;AACvD;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAW,EAAf;AACA,MAAIC,IAAI,CAAR;;AAEA;AACA;AACA;AACA,MAAI,QAAOH,IAAP,yCAAOA,IAAP,OAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD,MAAI,QAAOC,MAAP,yCAAOA,MAAP,OAAkB,QAAtB,EAAgC;AAC9B,WAAO,KAAP;AACD;AACD,MAAI,OAAOD,KAAKI,MAAZ,KAAuB,QAA3B,EAAqC;AACnC,WAAO,KAAP;AACD;AACD,MAAI,OAAOH,OAAOG,MAAd,KAAyB,QAA7B,EAAuC;AACrC,WAAO,KAAP;AACD;AACD,MAAI,CAACJ,KAAKI,MAAV,EAAkB;AAChB,WAAO,KAAP;AACD;;AAED;AACA,MAAIJ,KAAKI,MAAL,KAAgBH,OAAOG,MAA3B,EAAmC;AACjC,WAAO,KAAP;AACD;;AAED,OAAKD,IAAI,CAAT,EAAYA,IAAIH,KAAKI,MAArB,EAA6BD,GAA7B,EAAkC;AAChCD,aAASF,KAAKG,CAAL,CAAT,IAAoBF,OAAOE,CAAP,CAApB;AACD;;AAED,SAAOD,QAAP;AACD,CAvCD","file":"array_combine.js","sourcesContent":["module.exports = function array_combine (keys, values) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_combine/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_combine([0,1,2], ['kevin','van','zonneveld'])\n // returns 1: {0: 'kevin', 1: 'van', 2: 'zonneveld'}\n\n var newArray = {}\n var i = 0\n\n // input sanitation\n // Only accept arrays or array-like objects\n // Require arrays to have a count\n if (typeof keys !== 'object') {\n return false\n }\n if (typeof values !== 'object') {\n return false\n }\n if (typeof keys.length !== 'number') {\n return false\n }\n if (typeof values.length !== 'number') {\n return false\n }\n if (!keys.length) {\n return false\n }\n\n // number of elements does not match\n if (keys.length !== values.length) {\n return false\n }\n\n for (i = 0; i < keys.length; i++) {\n newArray[keys[i]] = values[i]\n }\n\n return newArray\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_count_values.js b/node_modules/locutus/php/array/array_count_values.js
deleted file mode 100644
index 58a9fba..0000000
--- a/node_modules/locutus/php/array/array_count_values.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_count_values(array) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_count_values/
- // original by: Ates Goral (http://magnetiq.com)
- // improved by: Michael White (http://getsprink.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: sankai
- // input by: Shingo
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_count_values([ 3, 5, 3, "foo", "bar", "foo" ])
- // returns 1: {3:2, 5:1, "foo":2, "bar":1}
- // example 2: array_count_values({ p1: 3, p2: 5, p3: 3, p4: "foo", p5: "bar", p6: "foo" })
- // returns 2: {3:2, 5:1, "foo":2, "bar":1}
- // example 3: array_count_values([ true, 4.2, 42, "fubar" ])
- // returns 3: {42:1, "fubar":1}
-
- var tmpArr = {};
- var key = '';
- var t = '';
-
- var _getType = function _getType(obj) {
- // Objects are php associative arrays.
- var t = typeof obj === 'undefined' ? 'undefined' : _typeof(obj);
- t = t.toLowerCase();
- if (t === 'object') {
- t = 'array';
- }
- return t;
- };
-
- var _countValue = function _countValue(tmpArr, value) {
- if (typeof value === 'number') {
- if (Math.floor(value) !== value) {
- return;
- }
- } else if (typeof value !== 'string') {
- return;
- }
-
- if (value in tmpArr && tmpArr.hasOwnProperty(value)) {
- ++tmpArr[value];
- } else {
- tmpArr[value] = 1;
- }
- };
-
- t = _getType(array);
- if (t === 'array') {
- for (key in array) {
- if (array.hasOwnProperty(key)) {
- _countValue.call(this, tmpArr, array[key]);
- }
- }
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_count_values.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_count_values.js.map b/node_modules/locutus/php/array/array_count_values.js.map
deleted file mode 100644
index 02af331..0000000
--- a/node_modules/locutus/php/array/array_count_values.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_count_values.js"],"names":["module","exports","array_count_values","array","tmpArr","key","t","_getType","obj","toLowerCase","_countValue","value","Math","floor","hasOwnProperty","call"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,kBAAT,CAA6BC,KAA7B,EAAoC;AAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIC,WAAW,SAAXA,QAAW,CAAUC,GAAV,EAAe;AAC5B;AACA,QAAIF,WAAWE,GAAX,yCAAWA,GAAX,CAAJ;AACAF,QAAIA,EAAEG,WAAF,EAAJ;AACA,QAAIH,MAAM,QAAV,EAAoB;AAClBA,UAAI,OAAJ;AACD;AACD,WAAOA,CAAP;AACD,GARD;;AAUA,MAAII,cAAc,SAAdA,WAAc,CAAUN,MAAV,EAAkBO,KAAlB,EAAyB;AACzC,QAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AAC7B,UAAIC,KAAKC,KAAL,CAAWF,KAAX,MAAsBA,KAA1B,EAAiC;AAC/B;AACD;AACF,KAJD,MAIO,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AACpC;AACD;;AAED,QAAIA,SAASP,MAAT,IAAmBA,OAAOU,cAAP,CAAsBH,KAAtB,CAAvB,EAAqD;AACnD,QAAEP,OAAOO,KAAP,CAAF;AACD,KAFD,MAEO;AACLP,aAAOO,KAAP,IAAgB,CAAhB;AACD;AACF,GAdD;;AAgBAL,MAAIC,SAASJ,KAAT,CAAJ;AACA,MAAIG,MAAM,OAAV,EAAmB;AACjB,SAAKD,GAAL,IAAYF,KAAZ,EAAmB;AACjB,UAAIA,MAAMW,cAAN,CAAqBT,GAArB,CAAJ,EAA+B;AAC7BK,oBAAYK,IAAZ,CAAiB,IAAjB,EAAuBX,MAAvB,EAA+BD,MAAME,GAAN,CAA/B;AACD;AACF;AACF;;AAED,SAAOD,MAAP;AACD,CAvDD","file":"array_count_values.js","sourcesContent":["module.exports = function array_count_values (array) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_count_values/\n // original by: Ates Goral (http://magnetiq.com)\n // improved by: Michael White (http://getsprink.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: sankai\n // input by: Shingo\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_count_values([ 3, 5, 3, \"foo\", \"bar\", \"foo\" ])\n // returns 1: {3:2, 5:1, \"foo\":2, \"bar\":1}\n // example 2: array_count_values({ p1: 3, p2: 5, p3: 3, p4: \"foo\", p5: \"bar\", p6: \"foo\" })\n // returns 2: {3:2, 5:1, \"foo\":2, \"bar\":1}\n // example 3: array_count_values([ true, 4.2, 42, \"fubar\" ])\n // returns 3: {42:1, \"fubar\":1}\n\n var tmpArr = {}\n var key = ''\n var t = ''\n\n var _getType = function (obj) {\n // Objects are php associative arrays.\n var t = typeof obj\n t = t.toLowerCase()\n if (t === 'object') {\n t = 'array'\n }\n return t\n }\n\n var _countValue = function (tmpArr, value) {\n if (typeof value === 'number') {\n if (Math.floor(value) !== value) {\n return\n }\n } else if (typeof value !== 'string') {\n return\n }\n\n if (value in tmpArr && tmpArr.hasOwnProperty(value)) {\n ++tmpArr[value]\n } else {\n tmpArr[value] = 1\n }\n }\n\n t = _getType(array)\n if (t === 'array') {\n for (key in array) {\n if (array.hasOwnProperty(key)) {\n _countValue.call(this, tmpArr, array[key])\n }\n }\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff.js b/node_modules/locutus/php/array/array_diff.js
deleted file mode 100644
index 5c437f0..0000000
--- a/node_modules/locutus/php/array/array_diff.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-module.exports = function array_diff(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_diff/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Sanjoy Roy
- // revised by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_diff(['Kevin', 'van', 'Zonneveld'], ['van', 'Zonneveld'])
- // returns 1: {0:'Kevin'}
-
- var retArr = {};
- var argl = arguments.length;
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < argl; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (arr[k] === arr1[k1]) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_diff.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff.js.map b/node_modules/locutus/php/array/array_diff.js.map
deleted file mode 100644
index dd7a498..0000000
--- a/node_modules/locutus/php/array/array_diff.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_diff.js"],"names":["module","exports","array_diff","arr1","retArr","argl","arguments","length","k1","i","k","arr","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,IAArB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEAC,YAAU,KAAKJ,EAAL,IAAWL,IAAX,EAAiB;AAAE;AAC3B,SAAKM,IAAI,CAAT,EAAYA,IAAIJ,IAAhB,EAAsBI,GAAtB,EAA2B;AACzBE,YAAML,UAAUG,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAIA,IAAID,CAAJ,MAAWP,KAAKK,EAAL,CAAf,EAAyB;AACvB;AACA,mBAASI,QAAT,CAFuB,CAEL;AACnB;AACF;AACDR,aAAOI,EAAP,IAAaL,KAAKK,EAAL,CAAb;AACD;AACF;;AAED,SAAOJ,MAAP;AACD,CA7BD","file":"array_diff.js","sourcesContent":["module.exports = function array_diff (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_diff/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Sanjoy Roy\n // revised by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_diff(['Kevin', 'van', 'Zonneveld'], ['van', 'Zonneveld'])\n // returns 1: {0:'Kevin'}\n\n var retArr = {}\n var argl = arguments.length\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < argl; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (arr[k] === arr1[k1]) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_assoc.js b/node_modules/locutus/php/array/array_diff_assoc.js
deleted file mode 100644
index 8422e73..0000000
--- a/node_modules/locutus/php/array/array_diff_assoc.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-module.exports = function array_diff_assoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_diff_assoc/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: 0m3r
- // revised by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_diff_assoc({0: 'Kevin', 1: 'van', 2: 'Zonneveld'}, {0: 'Kevin', 4: 'van', 5: 'Zonneveld'})
- // returns 1: {1: 'van', 2: 'Zonneveld'}
-
- var retArr = {};
- var argl = arguments.length;
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < argl; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (arr[k] === arr1[k1] && k === k1) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_diff_assoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_assoc.js.map b/node_modules/locutus/php/array/array_diff_assoc.js.map
deleted file mode 100644
index 1fcd5cd..0000000
--- a/node_modules/locutus/php/array/array_diff_assoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_diff_assoc.js"],"names":["module","exports","array_diff_assoc","arr1","retArr","argl","arguments","length","k1","i","k","arr","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,gBAAT,CAA2BC,IAA3B,EAAiC;AAAE;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEAC,YAAU,KAAKJ,EAAL,IAAWL,IAAX,EAAiB;AAAE;AAC3B,SAAKM,IAAI,CAAT,EAAYA,IAAIJ,IAAhB,EAAsBI,GAAtB,EAA2B;AACzBE,YAAML,UAAUG,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAIA,IAAID,CAAJ,MAAWP,KAAKK,EAAL,CAAX,IAAuBE,MAAMF,EAAjC,EAAqC;AACnC;AACA,mBAASI,QAAT,CAFmC,CAEjB;AACnB;AACF;AACDR,aAAOI,EAAP,IAAaL,KAAKK,EAAL,CAAb;AACD;AACF;;AAED,SAAOJ,MAAP;AACD,CA7BD","file":"array_diff_assoc.js","sourcesContent":["module.exports = function array_diff_assoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_diff_assoc/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: 0m3r\n // revised by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_diff_assoc({0: 'Kevin', 1: 'van', 2: 'Zonneveld'}, {0: 'Kevin', 4: 'van', 5: 'Zonneveld'})\n // returns 1: {1: 'van', 2: 'Zonneveld'}\n\n var retArr = {}\n var argl = arguments.length\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < argl; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (arr[k] === arr1[k1] && k === k1) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_key.js b/node_modules/locutus/php/array/array_diff_key.js
deleted file mode 100644
index 3fd0f6d..0000000
--- a/node_modules/locutus/php/array/array_diff_key.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-module.exports = function array_diff_key(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_diff_key/
- // original by: Ates Goral (http://magnetiq.com)
- // revised by: Brett Zamir (http://brett-zamir.me)
- // input by: Everlasto
- // example 1: array_diff_key({red: 1, green: 2, blue: 3, white: 4}, {red: 5})
- // returns 1: {"green":2, "blue":3, "white":4}
- // example 2: array_diff_key({red: 1, green: 2, blue: 3, white: 4}, {red: 5}, {red: 5})
- // returns 2: {"green":2, "blue":3, "white":4}
-
- var argl = arguments.length;
- var retArr = {};
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < argl; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (k === k1) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_diff_key.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_key.js.map b/node_modules/locutus/php/array/array_diff_key.js.map
deleted file mode 100644
index f220c9c..0000000
--- a/node_modules/locutus/php/array/array_diff_key.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_diff_key.js"],"names":["module","exports","array_diff_key","arr1","argl","arguments","length","retArr","k1","i","k","arr","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,IAAzB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEAC,YAAU,KAAKJ,EAAL,IAAWL,IAAX,EAAiB;AAAE;AAC3B,SAAKM,IAAI,CAAT,EAAYA,IAAIL,IAAhB,EAAsBK,GAAtB,EAA2B;AACzBE,YAAMN,UAAUI,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAID,MAAMF,EAAV,EAAc;AACZ;AACA,mBAASI,QAAT,CAFY,CAEM;AACnB;AACF;AACDL,aAAOC,EAAP,IAAaL,KAAKK,EAAL,CAAb;AACD;AACF;;AAED,SAAOD,MAAP;AACD,CA/BD","file":"array_diff_key.js","sourcesContent":["module.exports = function array_diff_key (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_diff_key/\n // original by: Ates Goral (http://magnetiq.com)\n // revised by: Brett Zamir (http://brett-zamir.me)\n // input by: Everlasto\n // example 1: array_diff_key({red: 1, green: 2, blue: 3, white: 4}, {red: 5})\n // returns 1: {\"green\":2, \"blue\":3, \"white\":4}\n // example 2: array_diff_key({red: 1, green: 2, blue: 3, white: 4}, {red: 5}, {red: 5})\n // returns 2: {\"green\":2, \"blue\":3, \"white\":4}\n\n var argl = arguments.length\n var retArr = {}\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < argl; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (k === k1) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_uassoc.js b/node_modules/locutus/php/array/array_diff_uassoc.js
deleted file mode 100644
index 35cbb4b..0000000
--- a/node_modules/locutus/php/array/array_diff_uassoc.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function array_diff_uassoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_diff_uassoc/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
- // example 1: array_diff_uassoc($array1, $array2, function (key1, key2) { return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)) })
- // returns 1: {b: 'brown', c: 'blue', 0: 'red'}
- // test: skip-1
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var cb = arguments[arglm1];
- var arr = {};
- var i = 1;
- var k1 = '';
- var k = '';
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < arglm1; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (arr[k] === arr1[k1] && cb(k, k1) === 0) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_diff_uassoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_uassoc.js.map b/node_modules/locutus/php/array/array_diff_uassoc.js.map
deleted file mode 100644
index f92fe89..0000000
--- a/node_modules/locutus/php/array/array_diff_uassoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_diff_uassoc.js"],"names":["module","exports","array_diff_uassoc","arr1","retArr","arglm1","arguments","length","cb","arr","i","k1","k","$global","window","global","Object","prototype","toString","call","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,iBAAT,CAA4BC,IAA5B,EAAkC;AAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,KAAKF,UAAUD,MAAV,CAAT;AACA,MAAII,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAY,YAAU,KAAKT,EAAL,IAAWR,IAAX,EAAiB;AAAE;AAC3B,SAAKO,IAAI,CAAT,EAAYA,IAAIL,MAAhB,EAAwBK,GAAxB,EAA6B;AAC3BD,YAAMH,UAAUI,CAAV,CAAN;AACA,WAAKE,CAAL,IAAUH,GAAV,EAAe;AACb,YAAIA,IAAIG,CAAJ,MAAWT,KAAKQ,EAAL,CAAX,IAAuBH,GAAGI,CAAH,EAAMD,EAAN,MAAc,CAAzC,EAA4C;AAC1C;AACA,mBAASS,QAAT,CAF0C,CAExB;AACnB;AACF;AACDhB,aAAOO,EAAP,IAAaR,KAAKQ,EAAL,CAAb;AACD;AACF;;AAED,SAAOP,MAAP;AACD,CAvCD","file":"array_diff_uassoc.js","sourcesContent":["module.exports = function array_diff_uassoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_diff_uassoc/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}\n // example 1: array_diff_uassoc($array1, $array2, function (key1, key2) { return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)) })\n // returns 1: {b: 'brown', c: 'blue', 0: 'red'}\n // test: skip-1\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var cb = arguments[arglm1]\n var arr = {}\n var i = 1\n var k1 = ''\n var k = ''\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < arglm1; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (arr[k] === arr1[k1] && cb(k, k1) === 0) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_ukey.js b/node_modules/locutus/php/array/array_diff_ukey.js
deleted file mode 100644
index 15c287d..0000000
--- a/node_modules/locutus/php/array/array_diff_ukey.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function array_diff_ukey(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_diff_ukey/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {blue: 1, red: 2, green: 3, purple: 4}
- // example 1: var $array2 = {green: 5, blue: 6, yellow: 7, cyan: 8}
- // example 1: array_diff_ukey($array1, $array2, function (key1, key2){ return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)); })
- // returns 1: {red: 2, purple: 4}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- // var arglm2 = arglm1 - 1
- var cb = arguments[arglm1];
- var k1 = '';
- var i = 1;
- var arr = {};
- var k = '';
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < arglm1; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (cb(k, k1) === 0) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_diff_ukey.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_diff_ukey.js.map b/node_modules/locutus/php/array/array_diff_ukey.js.map
deleted file mode 100644
index 143d9c8..0000000
--- a/node_modules/locutus/php/array/array_diff_ukey.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_diff_ukey.js"],"names":["module","exports","array_diff_ukey","arr1","retArr","arglm1","arguments","length","cb","k1","i","arr","k","$global","window","global","Object","prototype","toString","call","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,IAA1B,EAAgC;AAAE;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA;AACA,MAAIC,KAAKF,UAAUD,MAAV,CAAT;AACA,MAAII,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAY,YAAU,KAAKX,EAAL,IAAWN,IAAX,EAAiB;AAAE;AAC3B,SAAKO,IAAI,CAAT,EAAYA,IAAIL,MAAhB,EAAwBK,GAAxB,EAA6B;AAC3BC,YAAML,UAAUI,CAAV,CAAN;AACA,WAAKE,CAAL,IAAUD,GAAV,EAAe;AACb,YAAIH,GAAGI,CAAH,EAAMH,EAAN,MAAc,CAAlB,EAAqB;AACnB;AACA,mBAASW,QAAT,CAFmB,CAED;AACnB;AACF;AACDhB,aAAOK,EAAP,IAAaN,KAAKM,EAAL,CAAb;AACD;AACF;;AAED,SAAOL,MAAP;AACD,CAvCD","file":"array_diff_ukey.js","sourcesContent":["module.exports = function array_diff_ukey (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_diff_ukey/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {blue: 1, red: 2, green: 3, purple: 4}\n // example 1: var $array2 = {green: 5, blue: 6, yellow: 7, cyan: 8}\n // example 1: array_diff_ukey($array1, $array2, function (key1, key2){ return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)); })\n // returns 1: {red: 2, purple: 4}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n // var arglm2 = arglm1 - 1\n var cb = arguments[arglm1]\n var k1 = ''\n var i = 1\n var arr = {}\n var k = ''\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < arglm1; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (cb(k, k1) === 0) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_fill.js b/node_modules/locutus/php/array/array_fill.js
deleted file mode 100644
index 372c35c..0000000
--- a/node_modules/locutus/php/array/array_fill.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-module.exports = function array_fill(startIndex, num, mixedVal) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_fill/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Waldo Malqui Silva (http://waldo.malqui.info)
- // example 1: array_fill(5, 6, 'banana')
- // returns 1: { 5: 'banana', 6: 'banana', 7: 'banana', 8: 'banana', 9: 'banana', 10: 'banana' }
-
- var key;
- var tmpArr = {};
-
- if (!isNaN(startIndex) && !isNaN(num)) {
- for (key = 0; key < num; key++) {
- tmpArr[key + startIndex] = mixedVal;
- }
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_fill.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_fill.js.map b/node_modules/locutus/php/array/array_fill.js.map
deleted file mode 100644
index 5b2f10e..0000000
--- a/node_modules/locutus/php/array/array_fill.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_fill.js"],"names":["module","exports","array_fill","startIndex","num","mixedVal","key","tmpArr","isNaN"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,UAArB,EAAiCC,GAAjC,EAAsCC,QAAtC,EAAgD;AAAE;AACjE;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,SAAS,EAAb;;AAEA,MAAI,CAACC,MAAML,UAAN,CAAD,IAAsB,CAACK,MAAMJ,GAAN,CAA3B,EAAuC;AACrC,SAAKE,MAAM,CAAX,EAAcA,MAAMF,GAApB,EAAyBE,KAAzB,EAAgC;AAC9BC,aAAQD,MAAMH,UAAd,IAA6BE,QAA7B;AACD;AACF;;AAED,SAAOE,MAAP;AACD,CAjBD","file":"array_fill.js","sourcesContent":["module.exports = function array_fill (startIndex, num, mixedVal) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_fill/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Waldo Malqui Silva (http://waldo.malqui.info)\n // example 1: array_fill(5, 6, 'banana')\n // returns 1: { 5: 'banana', 6: 'banana', 7: 'banana', 8: 'banana', 9: 'banana', 10: 'banana' }\n\n var key\n var tmpArr = {}\n\n if (!isNaN(startIndex) && !isNaN(num)) {\n for (key = 0; key < num; key++) {\n tmpArr[(key + startIndex)] = mixedVal\n }\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_fill_keys.js b/node_modules/locutus/php/array/array_fill_keys.js
deleted file mode 100644
index a98a1cc..0000000
--- a/node_modules/locutus/php/array/array_fill_keys.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = function array_fill_keys(keys, value) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_fill_keys/
- // original by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $keys = {'a': 'foo', 2: 5, 3: 10, 4: 'bar'}
- // example 1: array_fill_keys($keys, 'banana')
- // returns 1: {"foo": "banana", 5: "banana", 10: "banana", "bar": "banana"}
-
- var retObj = {};
- var key = '';
-
- for (key in keys) {
- retObj[keys[key]] = value;
- }
-
- return retObj;
-};
-//# sourceMappingURL=array_fill_keys.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_fill_keys.js.map b/node_modules/locutus/php/array/array_fill_keys.js.map
deleted file mode 100644
index c480878..0000000
--- a/node_modules/locutus/php/array/array_fill_keys.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_fill_keys.js"],"names":["module","exports","array_fill_keys","keys","value","retObj","key"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,IAA1B,EAAgCC,KAAhC,EAAuC;AAAE;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,MAAM,EAAV;;AAEA,OAAKA,GAAL,IAAYH,IAAZ,EAAkB;AAChBE,WAAOF,KAAKG,GAAL,CAAP,IAAoBF,KAApB;AACD;;AAED,SAAOC,MAAP;AACD,CAhBD","file":"array_fill_keys.js","sourcesContent":["module.exports = function array_fill_keys (keys, value) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_fill_keys/\n // original by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $keys = {'a': 'foo', 2: 5, 3: 10, 4: 'bar'}\n // example 1: array_fill_keys($keys, 'banana')\n // returns 1: {\"foo\": \"banana\", 5: \"banana\", 10: \"banana\", \"bar\": \"banana\"}\n\n var retObj = {}\n var key = ''\n\n for (key in keys) {\n retObj[keys[key]] = value\n }\n\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_filter.js b/node_modules/locutus/php/array/array_filter.js
deleted file mode 100644
index cbdaa57..0000000
--- a/node_modules/locutus/php/array/array_filter.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-module.exports = function array_filter(arr, func) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_filter/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: max4ever
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Takes a function as an argument, not a function's name
- // example 1: var odd = function (num) {return (num & 1);}
- // example 1: array_filter({"a": 1, "b": 2, "c": 3, "d": 4, "e": 5}, odd)
- // returns 1: {"a": 1, "c": 3, "e": 5}
- // example 2: var even = function (num) {return (!(num & 1));}
- // example 2: array_filter([6, 7, 8, 9, 10, 11, 12], even)
- // returns 2: [ 6, , 8, , 10, , 12 ]
- // example 3: array_filter({"a": 1, "b": false, "c": -1, "d": 0, "e": null, "f":'', "g":undefined})
- // returns 3: {"a":1, "c":-1}
-
- var retObj = {};
- var k;
-
- func = func || function (v) {
- return v;
- };
-
- // @todo: Issue #73
- if (Object.prototype.toString.call(arr) === '[object Array]') {
- retObj = [];
- }
-
- for (k in arr) {
- if (func(arr[k])) {
- retObj[k] = arr[k];
- }
- }
-
- return retObj;
-};
-//# sourceMappingURL=array_filter.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_filter.js.map b/node_modules/locutus/php/array/array_filter.js.map
deleted file mode 100644
index fa3f6a4..0000000
--- a/node_modules/locutus/php/array/array_filter.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_filter.js"],"names":["module","exports","array_filter","arr","func","retObj","k","v","Object","prototype","toString","call"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,GAAvB,EAA4BC,IAA5B,EAAkC;AAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,CAAJ;;AAEAF,SAAOA,QAAQ,UAAUG,CAAV,EAAa;AAC1B,WAAOA,CAAP;AACD,GAFD;;AAIA;AACA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BR,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5DE,aAAS,EAAT;AACD;;AAED,OAAKC,CAAL,IAAUH,GAAV,EAAe;AACb,QAAIC,KAAKD,IAAIG,CAAJ,CAAL,CAAJ,EAAkB;AAChBD,aAAOC,CAAP,IAAYH,IAAIG,CAAJ,CAAZ;AACD;AACF;;AAED,SAAOD,MAAP;AACD,CAlCD","file":"array_filter.js","sourcesContent":["module.exports = function array_filter (arr, func) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_filter/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: max4ever\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Takes a function as an argument, not a function's name\n // example 1: var odd = function (num) {return (num & 1);}\n // example 1: array_filter({\"a\": 1, \"b\": 2, \"c\": 3, \"d\": 4, \"e\": 5}, odd)\n // returns 1: {\"a\": 1, \"c\": 3, \"e\": 5}\n // example 2: var even = function (num) {return (!(num & 1));}\n // example 2: array_filter([6, 7, 8, 9, 10, 11, 12], even)\n // returns 2: [ 6, , 8, , 10, , 12 ]\n // example 3: array_filter({\"a\": 1, \"b\": false, \"c\": -1, \"d\": 0, \"e\": null, \"f\":'', \"g\":undefined})\n // returns 3: {\"a\":1, \"c\":-1}\n\n var retObj = {}\n var k\n\n func = func || function (v) {\n return v\n }\n\n // @todo: Issue #73\n if (Object.prototype.toString.call(arr) === '[object Array]') {\n retObj = []\n }\n\n for (k in arr) {\n if (func(arr[k])) {\n retObj[k] = arr[k]\n }\n }\n\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_flip.js b/node_modules/locutus/php/array/array_flip.js
deleted file mode 100644
index 64af345..0000000
--- a/node_modules/locutus/php/array/array_flip.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-
-module.exports = function array_flip(trans) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_flip/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Pier Paolo Ramon (http://www.mastersoup.com/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_flip( {a: 1, b: 1, c: 2} )
- // returns 1: {1: 'b', 2: 'c'}
-
- var key;
- var tmpArr = {};
-
- for (key in trans) {
- if (!trans.hasOwnProperty(key)) {
- continue;
- }
- tmpArr[trans[key]] = key;
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_flip.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_flip.js.map b/node_modules/locutus/php/array/array_flip.js.map
deleted file mode 100644
index 0fd52ad..0000000
--- a/node_modules/locutus/php/array/array_flip.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_flip.js"],"names":["module","exports","array_flip","trans","key","tmpArr","hasOwnProperty"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,SAAS,EAAb;;AAEA,OAAKD,GAAL,IAAYD,KAAZ,EAAmB;AACjB,QAAI,CAACA,MAAMG,cAAN,CAAqBF,GAArB,CAAL,EAAgC;AAC9B;AACD;AACDC,WAAOF,MAAMC,GAAN,CAAP,IAAqBA,GAArB;AACD;;AAED,SAAOC,MAAP;AACD,CAnBD","file":"array_flip.js","sourcesContent":["module.exports = function array_flip (trans) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_flip/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Pier Paolo Ramon (http://www.mastersoup.com/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_flip( {a: 1, b: 1, c: 2} )\n // returns 1: {1: 'b', 2: 'c'}\n\n var key\n var tmpArr = {}\n\n for (key in trans) {\n if (!trans.hasOwnProperty(key)) {\n continue\n }\n tmpArr[trans[key]] = key\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect.js b/node_modules/locutus/php/array/array_intersect.js
deleted file mode 100644
index 4e0b5c0..0000000
--- a/node_modules/locutus/php/array/array_intersect.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-module.exports = function array_intersect(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_intersect/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: These only output associative arrays (would need to be
- // note 1: all numeric and counting from zero to be numeric)
- // example 1: var $array1 = {'a' : 'green', 0:'red', 1: 'blue'}
- // example 1: var $array2 = {'b' : 'green', 0:'yellow', 1:'red'}
- // example 1: var $array3 = ['green', 'red']
- // example 1: var $result = array_intersect($array1, $array2, $array3)
- // returns 1: {0: 'red', a: 'green'}
-
- var retArr = {};
- var argl = arguments.length;
- var arglm1 = argl - 1;
- var k1 = '';
- var arr = {};
- var i = 0;
- var k = '';
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- arrs: for (i = 1; i < argl; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (arr[k] === arr1[k1]) {
- if (i === arglm1) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_intersect.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect.js.map b/node_modules/locutus/php/array/array_intersect.js.map
deleted file mode 100644
index b65ecc1..0000000
--- a/node_modules/locutus/php/array/array_intersect.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_intersect.js"],"names":["module","exports","array_intersect","arr1","retArr","argl","arguments","length","arglm1","k1","arr","i","k","arr1keys","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,IAA1B,EAAgC;AAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,SAASH,OAAO,CAApB;AACA,MAAII,KAAK,EAAT;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;;AAEAC,YAAU,KAAKJ,EAAL,IAAWN,IAAX,EAAiB;AAAE;AAC3BW,UAAM,KAAKH,IAAI,CAAT,EAAYA,IAAIN,IAAhB,EAAsBM,GAAtB,EAA2B;AAAE;AACjCD,YAAMJ,UAAUK,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUF,GAAV,EAAe;AACb,YAAIA,IAAIE,CAAJ,MAAWT,KAAKM,EAAL,CAAf,EAAyB;AACvB,cAAIE,MAAMH,MAAV,EAAkB;AAChBJ,mBAAOK,EAAP,IAAaN,KAAKM,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASK,IAAT,CANuB,CAMV;AACd;AACF;AACD;AACA,eAASD,QAAT,CAb+B,CAad;AAClB;AACF;;AAED,SAAOT,MAAP;AACD,CAtCD","file":"array_intersect.js","sourcesContent":["module.exports = function array_intersect (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_intersect/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: These only output associative arrays (would need to be\n // note 1: all numeric and counting from zero to be numeric)\n // example 1: var $array1 = {'a' : 'green', 0:'red', 1: 'blue'}\n // example 1: var $array2 = {'b' : 'green', 0:'yellow', 1:'red'}\n // example 1: var $array3 = ['green', 'red']\n // example 1: var $result = array_intersect($array1, $array2, $array3)\n // returns 1: {0: 'red', a: 'green'}\n\n var retArr = {}\n var argl = arguments.length\n var arglm1 = argl - 1\n var k1 = ''\n var arr = {}\n var i = 0\n var k = ''\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n arrs: for (i = 1; i < argl; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (arr[k] === arr1[k1]) {\n if (i === arglm1) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs// eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys// eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_assoc.js b/node_modules/locutus/php/array/array_intersect_assoc.js
deleted file mode 100644
index fa5e051..0000000
--- a/node_modules/locutus/php/array/array_intersect_assoc.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-module.exports = function array_intersect_assoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_intersect_assoc/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: These only output associative arrays (would need to be
- // note 1: all numeric and counting from zero to be numeric)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'green', 0: 'yellow', 1: 'red'}
- // example 1: array_intersect_assoc($array1, $array2)
- // returns 1: {a: 'green'}
-
- var retArr = {};
- var argl = arguments.length;
- var arglm1 = argl - 1;
- var k1 = '';
- var arr = {};
- var i = 0;
- var k = '';
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- arrs: for (i = 1; i < argl; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (arr[k] === arr1[k1] && k === k1) {
- if (i === arglm1) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_intersect_assoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_assoc.js.map b/node_modules/locutus/php/array/array_intersect_assoc.js.map
deleted file mode 100644
index ecb6426..0000000
--- a/node_modules/locutus/php/array/array_intersect_assoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_intersect_assoc.js"],"names":["module","exports","array_intersect_assoc","arr1","retArr","argl","arguments","length","arglm1","k1","arr","i","k","arr1keys","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,qBAAT,CAAgCC,IAAhC,EAAsC;AAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,SAASH,OAAO,CAApB;AACA,MAAII,KAAK,EAAT;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;;AAEAC,YAAU,KAAKJ,EAAL,IAAWN,IAAX,EAAiB;AAAE;AAC3BW,UAAM,KAAKH,IAAI,CAAT,EAAYA,IAAIN,IAAhB,EAAsBM,GAAtB,EAA2B;AAAE;AACjCD,YAAMJ,UAAUK,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUF,GAAV,EAAe;AACb,YAAIA,IAAIE,CAAJ,MAAWT,KAAKM,EAAL,CAAX,IAAuBG,MAAMH,EAAjC,EAAqC;AACnC,cAAIE,MAAMH,MAAV,EAAkB;AAChBJ,mBAAOK,EAAP,IAAaN,KAAKM,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASK,IAAT,CANmC,CAMrB;AACf;AACF;AACD;AACA,eAASD,QAAT,CAb+B,CAab;AACnB;AACF;;AAED,SAAOT,MAAP;AACD,CArCD","file":"array_intersect_assoc.js","sourcesContent":["module.exports = function array_intersect_assoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_intersect_assoc/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: These only output associative arrays (would need to be\n // note 1: all numeric and counting from zero to be numeric)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'green', 0: 'yellow', 1: 'red'}\n // example 1: array_intersect_assoc($array1, $array2)\n // returns 1: {a: 'green'}\n\n var retArr = {}\n var argl = arguments.length\n var arglm1 = argl - 1\n var k1 = ''\n var arr = {}\n var i = 0\n var k = ''\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n arrs: for (i = 1; i < argl; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (arr[k] === arr1[k1] && k === k1) {\n if (i === arglm1) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs // eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_key.js b/node_modules/locutus/php/array/array_intersect_key.js
deleted file mode 100644
index 4fec133..0000000
--- a/node_modules/locutus/php/array/array_intersect_key.js
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-module.exports = function array_intersect_key(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_intersect_key/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: These only output associative arrays (would need to be
- // note 1: all numeric and counting from zero to be numeric)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'green', 0: 'yellow', 1: 'red'}
- // example 1: array_intersect_key($array1, $array2)
- // returns 1: {0: 'red', a: 'green'}
-
- var retArr = {};
- var argl = arguments.length;
- var arglm1 = argl - 1;
- var k1 = '';
- var arr = {};
- var i = 0;
- var k = '';
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- if (!arr1.hasOwnProperty(k1)) {
- continue;
- }
- arrs: for (i = 1; i < argl; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (!arr.hasOwnProperty(k)) {
- continue;
- }
- if (k === k1) {
- if (i === arglm1) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_intersect_key.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_key.js.map b/node_modules/locutus/php/array/array_intersect_key.js.map
deleted file mode 100644
index 3645254..0000000
--- a/node_modules/locutus/php/array/array_intersect_key.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_intersect_key.js"],"names":["module","exports","array_intersect_key","arr1","retArr","argl","arguments","length","arglm1","k1","arr","i","k","arr1keys","hasOwnProperty","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,mBAAT,CAA8BC,IAA9B,EAAoC;AAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,SAASH,OAAO,CAApB;AACA,MAAII,KAAK,EAAT;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;;AAEAC,YAAU,KAAKJ,EAAL,IAAWN,IAAX,EAAiB;AAAE;AAC3B,QAAI,CAACA,KAAKW,cAAL,CAAoBL,EAApB,CAAL,EAA8B;AAC5B;AACD;AACDM,UAAM,KAAKJ,IAAI,CAAT,EAAYA,IAAIN,IAAhB,EAAsBM,GAAtB,EAA2B;AAAE;AACjCD,YAAMJ,UAAUK,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUF,GAAV,EAAe;AACb,YAAI,CAACA,IAAII,cAAJ,CAAmBF,CAAnB,CAAL,EAA4B;AAC1B;AACD;AACD,YAAIA,MAAMH,EAAV,EAAc;AACZ,cAAIE,MAAMH,MAAV,EAAkB;AAChBJ,mBAAOK,EAAP,IAAaN,KAAKM,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASM,IAAT,CANY,CAME;AACf;AACF;AACD;AACA,eAASF,QAAT,CAhB+B,CAgBb;AACnB;AACF;;AAED,SAAOT,MAAP;AACD,CA3CD","file":"array_intersect_key.js","sourcesContent":["module.exports = function array_intersect_key (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_intersect_key/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: These only output associative arrays (would need to be\n // note 1: all numeric and counting from zero to be numeric)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'green', 0: 'yellow', 1: 'red'}\n // example 1: array_intersect_key($array1, $array2)\n // returns 1: {0: 'red', a: 'green'}\n\n var retArr = {}\n var argl = arguments.length\n var arglm1 = argl - 1\n var k1 = ''\n var arr = {}\n var i = 0\n var k = ''\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n if (!arr1.hasOwnProperty(k1)) {\n continue\n }\n arrs: for (i = 1; i < argl; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (!arr.hasOwnProperty(k)) {\n continue\n }\n if (k === k1) {\n if (i === arglm1) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs // eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_uassoc.js b/node_modules/locutus/php/array/array_intersect_uassoc.js
deleted file mode 100644
index 8511640..0000000
--- a/node_modules/locutus/php/array/array_intersect_uassoc.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-module.exports = function array_intersect_uassoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_intersect_uassoc/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
- // example 1: array_intersect_uassoc($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})
- // returns 1: {b: 'brown'}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var arglm2 = arglm1 - 1;
- var cb = arguments[arglm1];
- // var cb0 = arguments[arglm2]
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- // cb0 = (typeof cb0 === 'string')
- // ? $global[cb0]
- // : (Object.prototype.toString.call(cb0) === '[object Array]')
- // ? $global[cb0[0]][cb0[1]]
- // : cb0
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- arrs: for (i = 1; i < arglm1; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (arr[k] === arr1[k1] && cb(k, k1) === 0) {
- if (i === arglm2) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_intersect_uassoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_uassoc.js.map b/node_modules/locutus/php/array/array_intersect_uassoc.js.map
deleted file mode 100644
index d35964c..0000000
--- a/node_modules/locutus/php/array/array_intersect_uassoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_intersect_uassoc.js"],"names":["module","exports","array_intersect_uassoc","arr1","retArr","arglm1","arguments","length","arglm2","cb","k1","i","k","arr","$global","window","global","Object","prototype","toString","call","arr1keys","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,sBAAT,CAAiCC,IAAjC,EAAuC;AAAE;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,SAASH,SAAS,CAAtB;AACA,MAAII,KAAKH,UAAUD,MAAV,CAAT;AACA;AACA,MAAIK,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMA;AACA;AACA;AACA;AACA;;AAEAY,YAAU,KAAKX,EAAL,IAAWP,IAAX,EAAiB;AAAE;AAC3BmB,UAAM,KAAKX,IAAI,CAAT,EAAYA,IAAIN,MAAhB,EAAwBM,GAAxB,EAA6B;AAAE;AACnCE,YAAMP,UAAUK,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAIA,IAAID,CAAJ,MAAWT,KAAKO,EAAL,CAAX,IAAuBD,GAAGG,CAAH,EAAMF,EAAN,MAAc,CAAzC,EAA4C;AAC1C,cAAIC,MAAMH,MAAV,EAAkB;AAChBJ,mBAAOM,EAAP,IAAaP,KAAKO,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASY,IAAT,CAN0C,CAM5B;AACf;AACF;AACD;AACA,eAASD,QAAT,CAbiC,CAaf;AACnB;AACF;;AAED,SAAOjB,MAAP;AACD,CAnDD","file":"array_intersect_uassoc.js","sourcesContent":["module.exports = function array_intersect_uassoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_intersect_uassoc/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}\n // example 1: array_intersect_uassoc($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})\n // returns 1: {b: 'brown'}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var arglm2 = arglm1 - 1\n var cb = arguments[arglm1]\n // var cb0 = arguments[arglm2]\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n // cb0 = (typeof cb0 === 'string')\n // ? $global[cb0]\n // : (Object.prototype.toString.call(cb0) === '[object Array]')\n // ? $global[cb0[0]][cb0[1]]\n // : cb0\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n arrs: for (i = 1; i < arglm1; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (arr[k] === arr1[k1] && cb(k, k1) === 0) {\n if (i === arglm2) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs // eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_ukey.js b/node_modules/locutus/php/array/array_intersect_ukey.js
deleted file mode 100644
index 0ebcc77..0000000
--- a/node_modules/locutus/php/array/array_intersect_ukey.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-module.exports = function array_intersect_ukey(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_intersect_ukey/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {blue: 1, red: 2, green: 3, purple: 4}
- // example 1: var $array2 = {green: 5, blue: 6, yellow: 7, cyan: 8}
- // example 1: array_intersect_ukey ($array1, $array2, function (key1, key2){ return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)); })
- // returns 1: {blue: 1, green: 3}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var arglm2 = arglm1 - 1;
- var cb = arguments[arglm1];
- // var cb0 = arguments[arglm2]
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- // cb0 = (typeof cb0 === 'string')
- // ? $global[cb0]
- // : (Object.prototype.toString.call(cb0) === '[object Array]')
- // ? $global[cb0[0]][cb0[1]]
- // : cb0
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- arrs: for (i = 1; i < arglm1; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (cb(k, k1) === 0) {
- if (i === arglm2) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_intersect_ukey.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_intersect_ukey.js.map b/node_modules/locutus/php/array/array_intersect_ukey.js.map
deleted file mode 100644
index d87e254..0000000
--- a/node_modules/locutus/php/array/array_intersect_ukey.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_intersect_ukey.js"],"names":["module","exports","array_intersect_ukey","arr1","retArr","arglm1","arguments","length","arglm2","cb","k1","i","k","arr","$global","window","global","Object","prototype","toString","call","arr1keys","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,oBAAT,CAA+BC,IAA/B,EAAqC;AAAE;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,SAASH,SAAS,CAAtB;AACA,MAAII,KAAKH,UAAUD,MAAV,CAAT;AACA;AACA,MAAIK,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMA;AACA;AACA;AACA;AACA;;AAEAY,YAAU,KAAKX,EAAL,IAAWP,IAAX,EAAiB;AAAE;AAC3BmB,UAAM,KAAKX,IAAI,CAAT,EAAYA,IAAIN,MAAhB,EAAwBM,GAAxB,EAA6B;AAAE;AACnCE,YAAMP,UAAUK,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAIJ,GAAGG,CAAH,EAAMF,EAAN,MAAc,CAAlB,EAAqB;AACnB,cAAIC,MAAMH,MAAV,EAAkB;AAChBJ,mBAAOM,EAAP,IAAaP,KAAKO,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASY,IAAT,CANmB,CAML;AACf;AACF;AACD;AACA,eAASD,QAAT,CAbiC,CAaf;AACnB;AACF;;AAED,SAAOjB,MAAP;AACD,CAnDD","file":"array_intersect_ukey.js","sourcesContent":["module.exports = function array_intersect_ukey (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_intersect_ukey/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {blue: 1, red: 2, green: 3, purple: 4}\n // example 1: var $array2 = {green: 5, blue: 6, yellow: 7, cyan: 8}\n // example 1: array_intersect_ukey ($array1, $array2, function (key1, key2){ return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)); })\n // returns 1: {blue: 1, green: 3}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var arglm2 = arglm1 - 1\n var cb = arguments[arglm1]\n // var cb0 = arguments[arglm2]\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n // cb0 = (typeof cb0 === 'string')\n // ? $global[cb0]\n // : (Object.prototype.toString.call(cb0) === '[object Array]')\n // ? $global[cb0[0]][cb0[1]]\n // : cb0\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n arrs: for (i = 1; i < arglm1; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (cb(k, k1) === 0) {\n if (i === arglm2) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs // eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_key_exists.js b/node_modules/locutus/php/array/array_key_exists.js
deleted file mode 100644
index 6c9efdf..0000000
--- a/node_modules/locutus/php/array/array_key_exists.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-module.exports = function array_key_exists(key, search) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_key_exists/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Felix Geisendoerfer (http://www.debuggable.com/felix)
- // example 1: array_key_exists('kevin', {'kevin': 'van Zonneveld'})
- // returns 1: true
-
- if (!search || search.constructor !== Array && search.constructor !== Object) {
- return false;
- }
-
- return key in search;
-};
-//# sourceMappingURL=array_key_exists.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_key_exists.js.map b/node_modules/locutus/php/array/array_key_exists.js.map
deleted file mode 100644
index db4dbba..0000000
--- a/node_modules/locutus/php/array/array_key_exists.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_key_exists.js"],"names":["module","exports","array_key_exists","key","search","constructor","Array","Object"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,gBAAT,CAA2BC,GAA3B,EAAgCC,MAAhC,EAAwC;AAAE;AACzD;AACA;AACA;AACA;AACA;;AAEA,MAAI,CAACA,MAAD,IAAYA,OAAOC,WAAP,KAAuBC,KAAvB,IAAgCF,OAAOC,WAAP,KAAuBE,MAAvE,EAAgF;AAC9E,WAAO,KAAP;AACD;;AAED,SAAOJ,OAAOC,MAAd;AACD,CAZD","file":"array_key_exists.js","sourcesContent":["module.exports = function array_key_exists (key, search) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_key_exists/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Felix Geisendoerfer (http://www.debuggable.com/felix)\n // example 1: array_key_exists('kevin', {'kevin': 'van Zonneveld'})\n // returns 1: true\n\n if (!search || (search.constructor !== Array && search.constructor !== Object)) {\n return false\n }\n\n return key in search\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_keys.js b/node_modules/locutus/php/array/array_keys.js
deleted file mode 100644
index 46b2830..0000000
--- a/node_modules/locutus/php/array/array_keys.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function array_keys(input, searchValue, argStrict) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_keys/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: P
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // improved by: jd
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_keys( {firstname: 'Kevin', surname: 'van Zonneveld'} )
- // returns 1: [ 'firstname', 'surname' ]
-
- var search = typeof searchValue !== 'undefined';
- var tmpArr = [];
- var strict = !!argStrict;
- var include = true;
- var key = '';
-
- for (key in input) {
- if (input.hasOwnProperty(key)) {
- include = true;
- if (search) {
- if (strict && input[key] !== searchValue) {
- include = false;
- } else if (input[key] !== searchValue) {
- include = false;
- }
- }
-
- if (include) {
- tmpArr[tmpArr.length] = key;
- }
- }
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_keys.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_keys.js.map b/node_modules/locutus/php/array/array_keys.js.map
deleted file mode 100644
index 82f86ab..0000000
--- a/node_modules/locutus/php/array/array_keys.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_keys.js"],"names":["module","exports","array_keys","input","searchValue","argStrict","search","tmpArr","strict","include","key","hasOwnProperty","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,WAA5B,EAAyCC,SAAzC,EAAoD;AAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,OAAOF,WAAP,KAAuB,WAApC;AACA,MAAIG,SAAS,EAAb;AACA,MAAIC,SAAS,CAAC,CAACH,SAAf;AACA,MAAII,UAAU,IAAd;AACA,MAAIC,MAAM,EAAV;;AAEA,OAAKA,GAAL,IAAYP,KAAZ,EAAmB;AACjB,QAAIA,MAAMQ,cAAN,CAAqBD,GAArB,CAAJ,EAA+B;AAC7BD,gBAAU,IAAV;AACA,UAAIH,MAAJ,EAAY;AACV,YAAIE,UAAUL,MAAMO,GAAN,MAAeN,WAA7B,EAA0C;AACxCK,oBAAU,KAAV;AACD,SAFD,MAEO,IAAIN,MAAMO,GAAN,MAAeN,WAAnB,EAAgC;AACrCK,oBAAU,KAAV;AACD;AACF;;AAED,UAAIA,OAAJ,EAAa;AACXF,eAAOA,OAAOK,MAAd,IAAwBF,GAAxB;AACD;AACF;AACF;;AAED,SAAOH,MAAP;AACD,CApCD","file":"array_keys.js","sourcesContent":["module.exports = function array_keys (input, searchValue, argStrict) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_keys/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: P\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // improved by: jd\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_keys( {firstname: 'Kevin', surname: 'van Zonneveld'} )\n // returns 1: [ 'firstname', 'surname' ]\n\n var search = typeof searchValue !== 'undefined'\n var tmpArr = []\n var strict = !!argStrict\n var include = true\n var key = ''\n\n for (key in input) {\n if (input.hasOwnProperty(key)) {\n include = true\n if (search) {\n if (strict && input[key] !== searchValue) {\n include = false\n } else if (input[key] !== searchValue) {\n include = false\n }\n }\n\n if (include) {\n tmpArr[tmpArr.length] = key\n }\n }\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_map.js b/node_modules/locutus/php/array/array_map.js
deleted file mode 100644
index 6e5d7c3..0000000
--- a/node_modules/locutus/php/array/array_map.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_map(callback) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_map/
- // original by: Andrea Giammarchi (http://webreflection.blogspot.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: thekid
- // note 1: If the callback is a string (or object, if an array is supplied),
- // note 1: it can only work if the function name is in the global context
- // example 1: array_map( function (a){return (a * a * a)}, [1, 2, 3, 4, 5] )
- // returns 1: [ 1, 8, 27, 64, 125 ]
-
- var argc = arguments.length;
- var argv = arguments;
- var obj = null;
- var cb = callback;
- var j = argv[1].length;
- var i = 0;
- var k = 1;
- var m = 0;
- var tmp = [];
- var tmpArr = [];
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- while (i < j) {
- while (k < argc) {
- tmp[m++] = argv[k++][i];
- }
-
- m = 0;
- k = 1;
-
- if (callback) {
- if (typeof callback === 'string') {
- cb = $global[callback];
- } else if ((typeof callback === 'undefined' ? 'undefined' : _typeof(callback)) === 'object' && callback.length) {
- obj = typeof callback[0] === 'string' ? $global[callback[0]] : callback[0];
- if (typeof obj === 'undefined') {
- throw new Error('Object not found: ' + callback[0]);
- }
- cb = typeof callback[1] === 'string' ? obj[callback[1]] : callback[1];
- }
- tmpArr[i++] = cb.apply(obj, tmp);
- } else {
- tmpArr[i++] = tmp;
- }
-
- tmp = [];
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_map.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_map.js.map b/node_modules/locutus/php/array/array_map.js.map
deleted file mode 100644
index df02f02..0000000
--- a/node_modules/locutus/php/array/array_map.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_map.js"],"names":["module","exports","array_map","callback","argc","arguments","length","argv","obj","cb","j","i","k","m","tmp","tmpArr","$global","window","global","Error","apply"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,OAAOF,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map.js","sourcesContent":["module.exports = function array_map (callback) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_map/\n // original by: Andrea Giammarchi (http://webreflection.blogspot.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: thekid\n // note 1: If the callback is a string (or object, if an array is supplied),\n // note 1: it can only work if the function name is in the global context\n // example 1: array_map( function (a){return (a * a * a)}, [1, 2, 3, 4, 5] )\n // returns 1: [ 1, 8, 27, 64, 125 ]\n\n var argc = arguments.length\n var argv = arguments\n var obj = null\n var cb = callback\n var j = argv[1].length\n var i = 0\n var k = 1\n var m = 0\n var tmp = []\n var tmpArr = []\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n while (i < j) {\n while (k < argc) {\n tmp[m++] = argv[k++][i]\n }\n\n m = 0\n k = 1\n\n if (callback) {\n if (typeof callback === 'string') {\n cb = $global[callback]\n } else if (typeof callback === 'object' && callback.length) {\n obj = typeof callback[0] === 'string' ? $global[callback[0]] : callback[0]\n if (typeof obj === 'undefined') {\n throw new Error('Object not found: ' + callback[0])\n }\n cb = typeof callback[1] === 'string' ? obj[callback[1]] : callback[1]\n }\n tmpArr[i++] = cb.apply(obj, tmp)\n } else {\n tmpArr[i++] = tmp\n }\n\n tmp = []\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_merge.js b/node_modules/locutus/php/array/array_merge.js
deleted file mode 100644
index 564d536..0000000
--- a/node_modules/locutus/php/array/array_merge.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-module.exports = function array_merge() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_merge/
- // original by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Nate
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: josh
- // example 1: var $arr1 = {"color": "red", 0: 2, 1: 4}
- // example 1: var $arr2 = {0: "a", 1: "b", "color": "green", "shape": "trapezoid", 2: 4}
- // example 1: array_merge($arr1, $arr2)
- // returns 1: {"color": "green", 0: 2, 1: 4, 2: "a", 3: "b", "shape": "trapezoid", 4: 4}
- // example 2: var $arr1 = []
- // example 2: var $arr2 = {1: "data"}
- // example 2: array_merge($arr1, $arr2)
- // returns 2: {0: "data"}
-
- var args = Array.prototype.slice.call(arguments);
- var argl = args.length;
- var arg;
- var retObj = {};
- var k = '';
- var argil = 0;
- var j = 0;
- var i = 0;
- var ct = 0;
- var toStr = Object.prototype.toString;
- var retArr = true;
-
- for (i = 0; i < argl; i++) {
- if (toStr.call(args[i]) !== '[object Array]') {
- retArr = false;
- break;
- }
- }
-
- if (retArr) {
- retArr = [];
- for (i = 0; i < argl; i++) {
- retArr = retArr.concat(args[i]);
- }
- return retArr;
- }
-
- for (i = 0, ct = 0; i < argl; i++) {
- arg = args[i];
- if (toStr.call(arg) === '[object Array]') {
- for (j = 0, argil = arg.length; j < argil; j++) {
- retObj[ct++] = arg[j];
- }
- } else {
- for (k in arg) {
- if (arg.hasOwnProperty(k)) {
- if (parseInt(k, 10) + '' === k) {
- retObj[ct++] = arg[k];
- } else {
- retObj[k] = arg[k];
- }
- }
- }
- }
- }
-
- return retObj;
-};
-//# sourceMappingURL=array_merge.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_merge.js.map b/node_modules/locutus/php/array/array_merge.js.map
deleted file mode 100644
index 2bac08e..0000000
--- a/node_modules/locutus/php/array/array_merge.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_merge.js"],"names":["module","exports","array_merge","args","Array","prototype","slice","call","arguments","argl","length","arg","retObj","k","argil","j","i","ct","toStr","Object","toString","retArr","concat","hasOwnProperty","parseInt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,GAAwB;AAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,MAAMC,SAA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C;AAC9BD,mBAAOK,IAAP,IAAeN,IAAIE,CAAJ,CAAf;AACD,WAFD,MAEO;AACLD,mBAAOC,CAAP,IAAYF,IAAIE,CAAJ,CAAZ;AACD;AACF;AACF;AACF;AACF;;AAED,SAAOD,MAAP;AACD,CA9DD","file":"array_merge.js","sourcesContent":["module.exports = function array_merge () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_merge/\n // original by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Nate\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: josh\n // example 1: var $arr1 = {\"color\": \"red\", 0: 2, 1: 4}\n // example 1: var $arr2 = {0: \"a\", 1: \"b\", \"color\": \"green\", \"shape\": \"trapezoid\", 2: 4}\n // example 1: array_merge($arr1, $arr2)\n // returns 1: {\"color\": \"green\", 0: 2, 1: 4, 2: \"a\", 3: \"b\", \"shape\": \"trapezoid\", 4: 4}\n // example 2: var $arr1 = []\n // example 2: var $arr2 = {1: \"data\"}\n // example 2: array_merge($arr1, $arr2)\n // returns 2: {0: \"data\"}\n\n var args = Array.prototype.slice.call(arguments)\n var argl = args.length\n var arg\n var retObj = {}\n var k = ''\n var argil = 0\n var j = 0\n var i = 0\n var ct = 0\n var toStr = Object.prototype.toString\n var retArr = true\n\n for (i = 0; i < argl; i++) {\n if (toStr.call(args[i]) !== '[object Array]') {\n retArr = false\n break\n }\n }\n\n if (retArr) {\n retArr = []\n for (i = 0; i < argl; i++) {\n retArr = retArr.concat(args[i])\n }\n return retArr\n }\n\n for (i = 0, ct = 0; i < argl; i++) {\n arg = args[i]\n if (toStr.call(arg) === '[object Array]') {\n for (j = 0, argil = arg.length; j < argil; j++) {\n retObj[ct++] = arg[j]\n }\n } else {\n for (k in arg) {\n if (arg.hasOwnProperty(k)) {\n if (parseInt(k, 10) + '' === k) {\n retObj[ct++] = arg[k]\n } else {\n retObj[k] = arg[k]\n }\n }\n }\n }\n }\n\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_merge_recursive.js b/node_modules/locutus/php/array/array_merge_recursive.js
deleted file mode 100644
index eba8906..0000000
--- a/node_modules/locutus/php/array/array_merge_recursive.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_merge_recursive(arr1, arr2) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_merge_recursive/
- // original by: Subhasis Deb
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // example 1: var $arr1 = {'color': {'favorite': 'red'}, 0: 5}
- // example 1: var $arr2 = {0: 10, 'color': {'favorite': 'green', 0: 'blue'}}
- // example 1: array_merge_recursive($arr1, $arr2)
- // returns 1: {'color': {'favorite': {0: 'red', 1: 'green'}, 0: 'blue'}, 1: 5, 1: 10}
- // test: skip-1
-
- var arrayMerge = require('../array/array_merge');
- var idx = '';
-
- if (arr1 && Object.prototype.toString.call(arr1) === '[object Array]' && arr2 && Object.prototype.toString.call(arr2) === '[object Array]') {
- for (idx in arr2) {
- arr1.push(arr2[idx]);
- }
- } else if (arr1 && arr1 instanceof Object && arr2 && arr2 instanceof Object) {
- for (idx in arr2) {
- if (idx in arr1) {
- if (_typeof(arr1[idx]) === 'object' && (typeof arr2 === 'undefined' ? 'undefined' : _typeof(arr2)) === 'object') {
- arr1[idx] = arrayMerge(arr1[idx], arr2[idx]);
- } else {
- arr1[idx] = arr2[idx];
- }
- } else {
- arr1[idx] = arr2[idx];
- }
- }
- }
-
- return arr1;
-};
-//# sourceMappingURL=array_merge_recursive.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_merge_recursive.js.map b/node_modules/locutus/php/array/array_merge_recursive.js.map
deleted file mode 100644
index e647b8d..0000000
--- a/node_modules/locutus/php/array/array_merge_recursive.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_merge_recursive.js"],"names":["module","exports","array_merge_recursive","arr1","arr2","arrayMerge","require","idx","Object","prototype","toString","call","push"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,qBAAT,CAAgCC,IAAhC,EAAsCC,IAAtC,EAA4C;AAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,aAAaC,QAAQ,sBAAR,CAAjB;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIJ,QAAQK,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BR,IAA/B,MAAyC,gBAAjD,IACFC,IADE,IACMI,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BP,IAA/B,MAAyC,gBADnD,EACqE;AACnE,SAAKG,GAAL,IAAYH,IAAZ,EAAkB;AAChBD,WAAKS,IAAL,CAAUR,KAAKG,GAAL,CAAV;AACD;AACF,GALD,MAKO,IAAKJ,QAASA,gBAAgBK,MAA1B,IAAuCJ,QAASA,gBAAgBI,MAApE,EAA8E;AACnF,SAAKD,GAAL,IAAYH,IAAZ,EAAkB;AAChB,UAAIG,OAAOJ,IAAX,EAAiB;AACf,YAAI,QAAOA,KAAKI,GAAL,CAAP,MAAqB,QAArB,IAAiC,QAAOH,IAAP,yCAAOA,IAAP,OAAgB,QAArD,EAA+D;AAC7DD,eAAKI,GAAL,IAAYF,WAAWF,KAAKI,GAAL,CAAX,EAAsBH,KAAKG,GAAL,CAAtB,CAAZ;AACD,SAFD,MAEO;AACLJ,eAAKI,GAAL,IAAYH,KAAKG,GAAL,CAAZ;AACD;AACF,OAND,MAMO;AACLJ,aAAKI,GAAL,IAAYH,KAAKG,GAAL,CAAZ;AACD;AACF;AACF;;AAED,SAAOJ,IAAP;AACD,CAlCD","file":"array_merge_recursive.js","sourcesContent":["module.exports = function array_merge_recursive (arr1, arr2) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_merge_recursive/\n // original by: Subhasis Deb\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // example 1: var $arr1 = {'color': {'favorite': 'red'}, 0: 5}\n // example 1: var $arr2 = {0: 10, 'color': {'favorite': 'green', 0: 'blue'}}\n // example 1: array_merge_recursive($arr1, $arr2)\n // returns 1: {'color': {'favorite': {0: 'red', 1: 'green'}, 0: 'blue'}, 1: 5, 1: 10}\n // test: skip-1\n\n var arrayMerge = require('../array/array_merge')\n var idx = ''\n\n if (arr1 && Object.prototype.toString.call(arr1) === '[object Array]' &&\n arr2 && Object.prototype.toString.call(arr2) === '[object Array]') {\n for (idx in arr2) {\n arr1.push(arr2[idx])\n }\n } else if ((arr1 && (arr1 instanceof Object)) && (arr2 && (arr2 instanceof Object))) {\n for (idx in arr2) {\n if (idx in arr1) {\n if (typeof arr1[idx] === 'object' && typeof arr2 === 'object') {\n arr1[idx] = arrayMerge(arr1[idx], arr2[idx])\n } else {\n arr1[idx] = arr2[idx]\n }\n } else {\n arr1[idx] = arr2[idx]\n }\n }\n }\n\n return arr1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_multisort.js b/node_modules/locutus/php/array/array_multisort.js
deleted file mode 100644
index 903afd3..0000000
--- a/node_modules/locutus/php/array/array_multisort.js
+++ /dev/null
@@ -1,288 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_multisort(arr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_multisort/
- // original by: Theriault (https://github.com/Theriault)
- // improved by: Oleg Andreyev (https://github.com/oleg-andreyev)
- // example 1: array_multisort([1, 2, 1, 2, 1, 2], [1, 2, 3, 4, 5, 6])
- // returns 1: true
- // example 2: var $characters = {A: 'Edward', B: 'Locke', C: 'Sabin', D: 'Terra', E: 'Edward'}
- // example 2: var $jobs = {A: 'Warrior', B: 'Thief', C: 'Monk', D: 'Mage', E: 'Knight'}
- // example 2: array_multisort($characters, 'SORT_DESC', 'SORT_STRING', $jobs, 'SORT_ASC', 'SORT_STRING')
- // returns 2: true
- // example 3: var $lastnames = [ 'Carter','Adams','Monroe','Tyler','Madison','Kennedy','Adams']
- // example 3: var $firstnames = ['James', 'John' ,'James', 'John', 'James', 'John', 'John']
- // example 3: var $president = [ 39, 6, 5, 10, 4, 35, 2 ]
- // example 3: array_multisort($firstnames, 'SORT_DESC', 'SORT_STRING', $lastnames, 'SORT_ASC', 'SORT_STRING', $president, 'SORT_NUMERIC')
- // returns 3: true
- // note 1: flags: Translation table for sort arguments.
- // note 1: Each argument turns on certain bits in the flag byte through addition.
- // note 1: bits: HGFE DCBA
- // note 1: args: Holds pointer to arguments for reassignment
-
- var g;
- var i;
- var j;
- var k;
- var l;
- var sal;
- var vkey;
- var elIndex;
- var lastSorts;
- var tmpArray;
- var zlast;
-
- var sortFlag = [0];
- var thingsToSort = [];
- var nLastSort = [];
- var lastSort = [];
- // possibly redundant
- var args = arguments;
-
- var flags = {
- 'SORT_REGULAR': 16,
- 'SORT_NUMERIC': 17,
- 'SORT_STRING': 18,
- 'SORT_ASC': 32,
- 'SORT_DESC': 40
- };
-
- var sortDuplicator = function sortDuplicator(a, b) {
- return nLastSort.shift();
- };
-
- var sortFunctions = [[function (a, b) {
- lastSort.push(a > b ? 1 : a < b ? -1 : 0);
- return a > b ? 1 : a < b ? -1 : 0;
- }, function (a, b) {
- lastSort.push(b > a ? 1 : b < a ? -1 : 0);
- return b > a ? 1 : b < a ? -1 : 0;
- }], [function (a, b) {
- lastSort.push(a - b);
- return a - b;
- }, function (a, b) {
- lastSort.push(b - a);
- return b - a;
- }], [function (a, b) {
- lastSort.push(a + '' > b + '' ? 1 : a + '' < b + '' ? -1 : 0);
- return a + '' > b + '' ? 1 : a + '' < b + '' ? -1 : 0;
- }, function (a, b) {
- lastSort.push(b + '' > a + '' ? 1 : b + '' < a + '' ? -1 : 0);
- return b + '' > a + '' ? 1 : b + '' < a + '' ? -1 : 0;
- }]];
-
- var sortArrs = [[]];
-
- var sortKeys = [[]];
-
- // Store first argument into sortArrs and sortKeys if an Object.
- // First Argument should be either a Javascript Array or an Object,
- // otherwise function would return FALSE like in PHP
- if (Object.prototype.toString.call(arr) === '[object Array]') {
- sortArrs[0] = arr;
- } else if (arr && (typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) === 'object') {
- for (i in arr) {
- if (arr.hasOwnProperty(i)) {
- sortKeys[0].push(i);
- sortArrs[0].push(arr[i]);
- }
- }
- } else {
- return false;
- }
-
- // arrMainLength: Holds the length of the first array.
- // All other arrays must be of equal length, otherwise function would return FALSE like in PHP
- // sortComponents: Holds 2 indexes per every section of the array
- // that can be sorted. As this is the start, the whole array can be sorted.
- var arrMainLength = sortArrs[0].length;
- var sortComponents = [0, arrMainLength];
-
- // Loop through all other arguments, checking lengths and sort flags
- // of arrays and adding them to the above variables.
- var argl = arguments.length;
- for (j = 1; j < argl; j++) {
- if (Object.prototype.toString.call(arguments[j]) === '[object Array]') {
- sortArrs[j] = arguments[j];
- sortFlag[j] = 0;
- if (arguments[j].length !== arrMainLength) {
- return false;
- }
- } else if (arguments[j] && _typeof(arguments[j]) === 'object') {
- sortKeys[j] = [];
- sortArrs[j] = [];
- sortFlag[j] = 0;
- for (i in arguments[j]) {
- if (arguments[j].hasOwnProperty(i)) {
- sortKeys[j].push(i);
- sortArrs[j].push(arguments[j][i]);
- }
- }
- if (sortArrs[j].length !== arrMainLength) {
- return false;
- }
- } else if (typeof arguments[j] === 'string') {
- var lFlag = sortFlag.pop();
- // Keep extra parentheses around latter flags check
- // to avoid minimization leading to CDATA closer
- if (typeof flags[arguments[j]] === 'undefined' || (flags[arguments[j]] >>> 4 & lFlag >>> 4) > 0) {
- return false;
- }
- sortFlag.push(lFlag + flags[arguments[j]]);
- } else {
- return false;
- }
- }
-
- for (i = 0; i !== arrMainLength; i++) {
- thingsToSort.push(true);
- }
-
- // Sort all the arrays....
- for (i in sortArrs) {
- if (sortArrs.hasOwnProperty(i)) {
- lastSorts = [];
- tmpArray = [];
- elIndex = 0;
- nLastSort = [];
- lastSort = [];
-
- // If there are no sortComponents, then no more sorting is neeeded.
- // Copy the array back to the argument.
- if (sortComponents.length === 0) {
- if (Object.prototype.toString.call(arguments[i]) === '[object Array]') {
- args[i] = sortArrs[i];
- } else {
- for (k in arguments[i]) {
- if (arguments[i].hasOwnProperty(k)) {
- delete arguments[i][k];
- }
- }
- sal = sortArrs[i].length;
- for (j = 0, vkey = 0; j < sal; j++) {
- vkey = sortKeys[i][j];
- args[i][vkey] = sortArrs[i][j];
- }
- }
- sortArrs.splice(i, 1);
- sortKeys.splice(i, 1);
- continue;
- }
-
- // Sort function for sorting. Either sorts asc or desc, regular/string or numeric.
- var sFunction = sortFunctions[sortFlag[i] & 3][(sortFlag[i] & 8) > 0 ? 1 : 0];
-
- // Sort current array.
- for (l = 0; l !== sortComponents.length; l += 2) {
- tmpArray = sortArrs[i].slice(sortComponents[l], sortComponents[l + 1] + 1);
- tmpArray.sort(sFunction);
- // Is there a better way to copy an array in Javascript?
- lastSorts[l] = [].concat(lastSort);
- elIndex = sortComponents[l];
- for (g in tmpArray) {
- if (tmpArray.hasOwnProperty(g)) {
- sortArrs[i][elIndex] = tmpArray[g];
- elIndex++;
- }
- }
- }
-
- // Duplicate the sorting of the current array on future arrays.
- sFunction = sortDuplicator;
- for (j in sortArrs) {
- if (sortArrs.hasOwnProperty(j)) {
- if (sortArrs[j] === sortArrs[i]) {
- continue;
- }
- for (l = 0; l !== sortComponents.length; l += 2) {
- tmpArray = sortArrs[j].slice(sortComponents[l], sortComponents[l + 1] + 1);
- // alert(l + ':' + nLastSort);
- nLastSort = [].concat(lastSorts[l]);
- tmpArray.sort(sFunction);
- elIndex = sortComponents[l];
- for (g in tmpArray) {
- if (tmpArray.hasOwnProperty(g)) {
- sortArrs[j][elIndex] = tmpArray[g];
- elIndex++;
- }
- }
- }
- }
- }
-
- // Duplicate the sorting of the current array on array keys
- for (j in sortKeys) {
- if (sortKeys.hasOwnProperty(j)) {
- for (l = 0; l !== sortComponents.length; l += 2) {
- tmpArray = sortKeys[j].slice(sortComponents[l], sortComponents[l + 1] + 1);
- nLastSort = [].concat(lastSorts[l]);
- tmpArray.sort(sFunction);
- elIndex = sortComponents[l];
- for (g in tmpArray) {
- if (tmpArray.hasOwnProperty(g)) {
- sortKeys[j][elIndex] = tmpArray[g];
- elIndex++;
- }
- }
- }
- }
- }
-
- // Generate the next sortComponents
- zlast = null;
- sortComponents = [];
- for (j in sortArrs[i]) {
- if (sortArrs[i].hasOwnProperty(j)) {
- if (!thingsToSort[j]) {
- if (sortComponents.length & 1) {
- sortComponents.push(j - 1);
- }
- zlast = null;
- continue;
- }
- if (!(sortComponents.length & 1)) {
- if (zlast !== null) {
- if (sortArrs[i][j] === zlast) {
- sortComponents.push(j - 1);
- } else {
- thingsToSort[j] = false;
- }
- }
- zlast = sortArrs[i][j];
- } else {
- if (sortArrs[i][j] !== zlast) {
- sortComponents.push(j - 1);
- zlast = sortArrs[i][j];
- }
- }
- }
- }
-
- if (sortComponents.length & 1) {
- sortComponents.push(j);
- }
- if (Object.prototype.toString.call(arguments[i]) === '[object Array]') {
- args[i] = sortArrs[i];
- } else {
- for (j in arguments[i]) {
- if (arguments[i].hasOwnProperty(j)) {
- delete arguments[i][j];
- }
- }
-
- sal = sortArrs[i].length;
- for (j = 0, vkey = 0; j < sal; j++) {
- vkey = sortKeys[i][j];
- args[i][vkey] = sortArrs[i][j];
- }
- }
- sortArrs.splice(i, 1);
- sortKeys.splice(i, 1);
- }
- }
- return true;
-};
-//# sourceMappingURL=array_multisort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_multisort.js.map b/node_modules/locutus/php/array/array_multisort.js.map
deleted file mode 100644
index b6f72b2..0000000
--- a/node_modules/locutus/php/array/array_multisort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_multisort.js"],"names":["module","exports","array_multisort","arr","g","i","j","k","l","sal","vkey","elIndex","lastSorts","tmpArray","zlast","sortFlag","thingsToSort","nLastSort","lastSort","args","arguments","flags","sortDuplicator","a","b","shift","sortFunctions","push","sortArrs","sortKeys","Object","prototype","toString","call","hasOwnProperty","arrMainLength","length","sortComponents","argl","lFlag","pop","splice","sFunction","slice","sort","concat"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,GAA1B,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,IAAJ;AACA,MAAIC,OAAJ;AACA,MAAIC,SAAJ;AACA,MAAIC,QAAJ;AACA,MAAIC,KAAJ;;AAEA,MAAIC,WAAW,CAAC,CAAD,CAAf;AACA,MAAIC,eAAe,EAAnB;AACA,MAAIC,YAAY,EAAhB;AACA,MAAIC,WAAW,EAAf;AACA;AACA,MAAIC,OAAOC,SAAX;;AAEA,MAAIC,QAAQ;AACV,oBAAgB,EADN;AAEV,oBAAgB,EAFN;AAGV,mBAAe,EAHL;AAIV,gBAAY,EAJF;AAKV,iBAAa;AALH,GAAZ;;AAQA,MAAIC,iBAAiB,SAAjBA,cAAiB,CAAUC,CAAV,EAAaC,CAAb,EAAgB;AACnC,WAAOP,UAAUQ,KAAV,EAAP;AACD,GAFD;;AAIA,MAAIC,gBAAgB,CAClB,CAEE,UAAUH,CAAV,EAAaC,CAAb,EAAgB;AACdN,aAASS,IAAT,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C5BuB,6BAAeV,IAAf,CAAoBrB,IAAI,CAAxB;AACAQ,sBAAQc,SAASvB,CAAT,EAAYC,CAAZ,CAAR;AACD;AACF;AACF;AACF;;AAED,UAAI+B,eAAeD,MAAf,GAAwB,CAA5B,EAA+B;AAC7BC,uBAAeV,IAAf,CAAoBrB,CAApB;AACD;AACD,UAAIwB,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+Bb,UAAUf,CAAV,CAA/B,MAAiD,gBAArD,EAAuE;AACrEc,aAAKd,CAAL,IAAUuB,SAASvB,CAAT,CAAV;AACD,OAFD,MAEO;AACL,aAAKC,CAAL,IAAUc,UAAUf,CAAV,CAAV,EAAwB;AACtB,cAAIe,UAAUf,CAAV,EAAa6B,cAAb,CAA4B5B,CAA5B,CAAJ,EAAoC;AAClC,mBAAOc,UAAUf,CAAV,EAAaC,CAAb,CAAP;AACD;AACF;;AAEDG,cAAMmB,SAASvB,CAAT,EAAY+B,MAAlB;AACA,aAAK9B,IAAI,CAAJ,EAAOI,OAAO,CAAnB,EAAsBJ,IAAIG,GAA1B,EAA+BH,GAA/B,EAAoC;AAClCI,iBAAOmB,SAASxB,CAAT,EAAYC,CAAZ,CAAP;AACAa,eAAKd,CAAL,EAAQK,IAAR,IAAgBkB,SAASvB,CAAT,EAAYC,CAAZ,CAAhB;AACD;AACF;AACDsB,eAASa,MAAT,CAAgBpC,CAAhB,EAAmB,CAAnB;AACAwB,eAASY,MAAT,CAAgBpC,CAAhB,EAAmB,CAAnB;AACD;AACF;AACD,SAAO,IAAP;AACD,CA9SD","file":"array_multisort.js","sourcesContent":["module.exports = function array_multisort (arr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_multisort/\n // original by: Theriault (https://github.com/Theriault)\n // improved by: Oleg Andreyev (https://github.com/oleg-andreyev)\n // example 1: array_multisort([1, 2, 1, 2, 1, 2], [1, 2, 3, 4, 5, 6])\n // returns 1: true\n // example 2: var $characters = {A: 'Edward', B: 'Locke', C: 'Sabin', D: 'Terra', E: 'Edward'}\n // example 2: var $jobs = {A: 'Warrior', B: 'Thief', C: 'Monk', D: 'Mage', E: 'Knight'}\n // example 2: array_multisort($characters, 'SORT_DESC', 'SORT_STRING', $jobs, 'SORT_ASC', 'SORT_STRING')\n // returns 2: true\n // example 3: var $lastnames = [ 'Carter','Adams','Monroe','Tyler','Madison','Kennedy','Adams']\n // example 3: var $firstnames = ['James', 'John' ,'James', 'John', 'James', 'John', 'John']\n // example 3: var $president = [ 39, 6, 5, 10, 4, 35, 2 ]\n // example 3: array_multisort($firstnames, 'SORT_DESC', 'SORT_STRING', $lastnames, 'SORT_ASC', 'SORT_STRING', $president, 'SORT_NUMERIC')\n // returns 3: true\n // note 1: flags: Translation table for sort arguments.\n // note 1: Each argument turns on certain bits in the flag byte through addition.\n // note 1: bits: HGFE DCBA\n // note 1: args: Holds pointer to arguments for reassignment\n\n var g\n var i\n var j\n var k\n var l\n var sal\n var vkey\n var elIndex\n var lastSorts\n var tmpArray\n var zlast\n\n var sortFlag = [0]\n var thingsToSort = []\n var nLastSort = []\n var lastSort = []\n // possibly redundant\n var args = arguments\n\n var flags = {\n 'SORT_REGULAR': 16,\n 'SORT_NUMERIC': 17,\n 'SORT_STRING': 18,\n 'SORT_ASC': 32,\n 'SORT_DESC': 40\n }\n\n var sortDuplicator = function (a, b) {\n return nLastSort.shift()\n }\n\n var sortFunctions = [\n [\n\n function (a, b) {\n lastSort.push(a > b ? 1 : (a < b ? -1 : 0))\n return a > b ? 1 : (a < b ? -1 : 0)\n },\n function (a, b) {\n lastSort.push(b > a ? 1 : (b < a ? -1 : 0))\n return b > a ? 1 : (b < a ? -1 : 0)\n }\n ],\n [\n\n function (a, b) {\n lastSort.push(a - b)\n return a - b\n },\n function (a, b) {\n lastSort.push(b - a)\n return b - a\n }\n ],\n [\n\n function (a, b) {\n lastSort.push((a + '') > (b + '') ? 1 : ((a + '') < (b + '') ? -1 : 0))\n return (a + '') > (b + '') ? 1 : ((a + '') < (b + '') ? -1 : 0)\n },\n function (a, b) {\n lastSort.push((b + '') > (a + '') ? 1 : ((b + '') < (a + '') ? -1 : 0))\n return (b + '') > (a + '') ? 1 : ((b + '') < (a + '') ? -1 : 0)\n }\n ]\n ]\n\n var sortArrs = [\n []\n ]\n\n var sortKeys = [\n []\n ]\n\n // Store first argument into sortArrs and sortKeys if an Object.\n // First Argument should be either a Javascript Array or an Object,\n // otherwise function would return FALSE like in PHP\n if (Object.prototype.toString.call(arr) === '[object Array]') {\n sortArrs[0] = arr\n } else if (arr && typeof arr === 'object') {\n for (i in arr) {\n if (arr.hasOwnProperty(i)) {\n sortKeys[0].push(i)\n sortArrs[0].push(arr[i])\n }\n }\n } else {\n return false\n }\n\n // arrMainLength: Holds the length of the first array.\n // All other arrays must be of equal length, otherwise function would return FALSE like in PHP\n // sortComponents: Holds 2 indexes per every section of the array\n // that can be sorted. As this is the start, the whole array can be sorted.\n var arrMainLength = sortArrs[0].length\n var sortComponents = [0, arrMainLength]\n\n // Loop through all other arguments, checking lengths and sort flags\n // of arrays and adding them to the above variables.\n var argl = arguments.length\n for (j = 1; j < argl; j++) {\n if (Object.prototype.toString.call(arguments[j]) === '[object Array]') {\n sortArrs[j] = arguments[j]\n sortFlag[j] = 0\n if (arguments[j].length !== arrMainLength) {\n return false\n }\n } else if (arguments[j] && typeof arguments[j] === 'object') {\n sortKeys[j] = []\n sortArrs[j] = []\n sortFlag[j] = 0\n for (i in arguments[j]) {\n if (arguments[j].hasOwnProperty(i)) {\n sortKeys[j].push(i)\n sortArrs[j].push(arguments[j][i])\n }\n }\n if (sortArrs[j].length !== arrMainLength) {\n return false\n }\n } else if (typeof arguments[j] === 'string') {\n var lFlag = sortFlag.pop()\n // Keep extra parentheses around latter flags check\n // to avoid minimization leading to CDATA closer\n if (typeof flags[arguments[j]] === 'undefined' ||\n ((((flags[arguments[j]]) >>> 4) & (lFlag >>> 4)) > 0)) {\n return false\n }\n sortFlag.push(lFlag + flags[arguments[j]])\n } else {\n return false\n }\n }\n\n for (i = 0; i !== arrMainLength; i++) {\n thingsToSort.push(true)\n }\n\n // Sort all the arrays....\n for (i in sortArrs) {\n if (sortArrs.hasOwnProperty(i)) {\n lastSorts = []\n tmpArray = []\n elIndex = 0\n nLastSort = []\n lastSort = []\n\n // If there are no sortComponents, then no more sorting is neeeded.\n // Copy the array back to the argument.\n if (sortComponents.length === 0) {\n if (Object.prototype.toString.call(arguments[i]) === '[object Array]') {\n args[i] = sortArrs[i]\n } else {\n for (k in arguments[i]) {\n if (arguments[i].hasOwnProperty(k)) {\n delete arguments[i][k]\n }\n }\n sal = sortArrs[i].length\n for (j = 0, vkey = 0; j < sal; j++) {\n vkey = sortKeys[i][j]\n args[i][vkey] = sortArrs[i][j]\n }\n }\n sortArrs.splice(i, 1)\n sortKeys.splice(i, 1)\n continue\n }\n\n // Sort function for sorting. Either sorts asc or desc, regular/string or numeric.\n var sFunction = sortFunctions[(sortFlag[i] & 3)][((sortFlag[i] & 8) > 0) ? 1 : 0]\n\n // Sort current array.\n for (l = 0; l !== sortComponents.length; l += 2) {\n tmpArray = sortArrs[i].slice(sortComponents[l], sortComponents[l + 1] + 1)\n tmpArray.sort(sFunction)\n // Is there a better way to copy an array in Javascript?\n lastSorts[l] = [].concat(lastSort)\n elIndex = sortComponents[l]\n for (g in tmpArray) {\n if (tmpArray.hasOwnProperty(g)) {\n sortArrs[i][elIndex] = tmpArray[g]\n elIndex++\n }\n }\n }\n\n // Duplicate the sorting of the current array on future arrays.\n sFunction = sortDuplicator\n for (j in sortArrs) {\n if (sortArrs.hasOwnProperty(j)) {\n if (sortArrs[j] === sortArrs[i]) {\n continue\n }\n for (l = 0; l !== sortComponents.length; l += 2) {\n tmpArray = sortArrs[j].slice(sortComponents[l], sortComponents[l + 1] + 1)\n // alert(l + ':' + nLastSort);\n nLastSort = [].concat(lastSorts[l])\n tmpArray.sort(sFunction)\n elIndex = sortComponents[l]\n for (g in tmpArray) {\n if (tmpArray.hasOwnProperty(g)) {\n sortArrs[j][elIndex] = tmpArray[g]\n elIndex++\n }\n }\n }\n }\n }\n\n // Duplicate the sorting of the current array on array keys\n for (j in sortKeys) {\n if (sortKeys.hasOwnProperty(j)) {\n for (l = 0; l !== sortComponents.length; l += 2) {\n tmpArray = sortKeys[j].slice(sortComponents[l], sortComponents[l + 1] + 1)\n nLastSort = [].concat(lastSorts[l])\n tmpArray.sort(sFunction)\n elIndex = sortComponents[l]\n for (g in tmpArray) {\n if (tmpArray.hasOwnProperty(g)) {\n sortKeys[j][elIndex] = tmpArray[g]\n elIndex++\n }\n }\n }\n }\n }\n\n // Generate the next sortComponents\n zlast = null\n sortComponents = []\n for (j in sortArrs[i]) {\n if (sortArrs[i].hasOwnProperty(j)) {\n if (!thingsToSort[j]) {\n if ((sortComponents.length & 1)) {\n sortComponents.push(j - 1)\n }\n zlast = null\n continue\n }\n if (!(sortComponents.length & 1)) {\n if (zlast !== null) {\n if (sortArrs[i][j] === zlast) {\n sortComponents.push(j - 1)\n } else {\n thingsToSort[j] = false\n }\n }\n zlast = sortArrs[i][j]\n } else {\n if (sortArrs[i][j] !== zlast) {\n sortComponents.push(j - 1)\n zlast = sortArrs[i][j]\n }\n }\n }\n }\n\n if (sortComponents.length & 1) {\n sortComponents.push(j)\n }\n if (Object.prototype.toString.call(arguments[i]) === '[object Array]') {\n args[i] = sortArrs[i]\n } else {\n for (j in arguments[i]) {\n if (arguments[i].hasOwnProperty(j)) {\n delete arguments[i][j]\n }\n }\n\n sal = sortArrs[i].length\n for (j = 0, vkey = 0; j < sal; j++) {\n vkey = sortKeys[i][j]\n args[i][vkey] = sortArrs[i][j]\n }\n }\n sortArrs.splice(i, 1)\n sortKeys.splice(i, 1)\n }\n }\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_pad.js b/node_modules/locutus/php/array/array_pad.js
deleted file mode 100644
index 3d3452e..0000000
--- a/node_modules/locutus/php/array/array_pad.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = function array_pad(input, padSize, padValue) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_pad/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // example 1: array_pad([ 7, 8, 9 ], 2, 'a')
- // returns 1: [ 7, 8, 9]
- // example 2: array_pad([ 7, 8, 9 ], 5, 'a')
- // returns 2: [ 7, 8, 9, 'a', 'a']
- // example 3: array_pad([ 7, 8, 9 ], 5, 2)
- // returns 3: [ 7, 8, 9, 2, 2]
- // example 4: array_pad([ 7, 8, 9 ], -5, 'a')
- // returns 4: [ 'a', 'a', 7, 8, 9 ]
-
- var pad = [];
- var newArray = [];
- var newLength;
- var diff = 0;
- var i = 0;
-
- if (Object.prototype.toString.call(input) === '[object Array]' && !isNaN(padSize)) {
- newLength = padSize < 0 ? padSize * -1 : padSize;
- diff = newLength - input.length;
-
- if (diff > 0) {
- for (i = 0; i < diff; i++) {
- newArray[i] = padValue;
- }
- pad = padSize < 0 ? newArray.concat(input) : input.concat(newArray);
- } else {
- pad = input;
- }
- }
-
- return pad;
-};
-//# sourceMappingURL=array_pad.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_pad.js.map b/node_modules/locutus/php/array/array_pad.js.map
deleted file mode 100644
index 25894c2..0000000
--- a/node_modules/locutus/php/array/array_pad.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_pad.js"],"names":["module","exports","array_pad","input","padSize","padValue","pad","newArray","newLength","diff","i","Object","prototype","toString","call","isNaN","length","concat"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,KAApB,EAA2BC,OAA3B,EAAoCC,QAApC,EAA8C;AAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,WAAW,EAAf;AACA,MAAIC,SAAJ;AACA,MAAIC,OAAO,CAAX;AACA,MAAIC,IAAI,CAAR;;AAEA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,KAA/B,MAA0C,gBAA1C,IAA8D,CAACY,MAAMX,OAAN,CAAnE,EAAmF;AACjFI,gBAAcJ,UAAU,CAAX,GAAiBA,UAAU,CAAC,CAA5B,GAAiCA,OAA9C;AACAK,WAAOD,YAAYL,MAAMa,MAAzB;;AAEA,QAAIP,OAAO,CAAX,EAAc;AACZ,WAAKC,IAAI,CAAT,EAAYA,IAAID,IAAhB,EAAsBC,GAAtB,EAA2B;AACzBH,iBAASG,CAAT,IAAcL,QAAd;AACD;AACDC,YAAQF,UAAU,CAAX,GAAgBG,SAASU,MAAT,CAAgBd,KAAhB,CAAhB,GAAyCA,MAAMc,MAAN,CAAaV,QAAb,CAAhD;AACD,KALD,MAKO;AACLD,YAAMH,KAAN;AACD;AACF;;AAED,SAAOG,GAAP;AACD,CAjCD","file":"array_pad.js","sourcesContent":["module.exports = function array_pad (input, padSize, padValue) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_pad/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // example 1: array_pad([ 7, 8, 9 ], 2, 'a')\n // returns 1: [ 7, 8, 9]\n // example 2: array_pad([ 7, 8, 9 ], 5, 'a')\n // returns 2: [ 7, 8, 9, 'a', 'a']\n // example 3: array_pad([ 7, 8, 9 ], 5, 2)\n // returns 3: [ 7, 8, 9, 2, 2]\n // example 4: array_pad([ 7, 8, 9 ], -5, 'a')\n // returns 4: [ 'a', 'a', 7, 8, 9 ]\n\n var pad = []\n var newArray = []\n var newLength\n var diff = 0\n var i = 0\n\n if (Object.prototype.toString.call(input) === '[object Array]' && !isNaN(padSize)) {\n newLength = ((padSize < 0) ? (padSize * -1) : padSize)\n diff = newLength - input.length\n\n if (diff > 0) {\n for (i = 0; i < diff; i++) {\n newArray[i] = padValue\n }\n pad = ((padSize < 0) ? newArray.concat(input) : input.concat(newArray))\n } else {\n pad = input\n }\n }\n\n return pad\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_pop.js b/node_modules/locutus/php/array/array_pop.js
deleted file mode 100644
index 08e857c..0000000
--- a/node_modules/locutus/php/array/array_pop.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-module.exports = function array_pop(inputArr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_pop/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Theriault (https://github.com/Theriault)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // note 1: While IE (and other browsers) support iterating an object's
- // note 1: own properties in order, if one attempts to add back properties
- // note 1: in IE, they may end up in their former position due to their position
- // note 1: being retained. So use of this function with "associative arrays"
- // note 1: (objects) may lead to unexpected behavior in an IE environment if
- // note 1: you add back properties with the same keys that you removed
- // example 1: array_pop([0,1,2])
- // returns 1: 2
- // example 2: var $data = {firstName: 'Kevin', surName: 'van Zonneveld'}
- // example 2: var $lastElem = array_pop($data)
- // example 2: var $result = $data
- // returns 2: {firstName: 'Kevin'}
-
- var key = '';
- var lastKey = '';
-
- if (inputArr.hasOwnProperty('length')) {
- // Indexed
- if (!inputArr.length) {
- // Done popping, are we?
- return null;
- }
- return inputArr.pop();
- } else {
- // Associative
- for (key in inputArr) {
- if (inputArr.hasOwnProperty(key)) {
- lastKey = key;
- }
- }
- if (lastKey) {
- var tmp = inputArr[lastKey];
- delete inputArr[lastKey];
- return tmp;
- } else {
- return null;
- }
- }
-};
-//# sourceMappingURL=array_pop.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_pop.js.map b/node_modules/locutus/php/array/array_pop.js.map
deleted file mode 100644
index 81bb95a..0000000
--- a/node_modules/locutus/php/array/array_pop.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_pop.js"],"names":["module","exports","array_pop","inputArr","key","lastKey","hasOwnProperty","length","pop","tmp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,UAAU,EAAd;;AAEA,MAAIF,SAASG,cAAT,CAAwB,QAAxB,CAAJ,EAAuC;AACrC;AACA,QAAI,CAACH,SAASI,MAAd,EAAsB;AACpB;AACA,aAAO,IAAP;AACD;AACD,WAAOJ,SAASK,GAAT,EAAP;AACD,GAPD,MAOO;AACL;AACA,SAAKJ,GAAL,IAAYD,QAAZ,EAAsB;AACpB,UAAIA,SAASG,cAAT,CAAwBF,GAAxB,CAAJ,EAAkC;AAChCC,kBAAUD,GAAV;AACD;AACF;AACD,QAAIC,OAAJ,EAAa;AACX,UAAII,MAAMN,SAASE,OAAT,CAAV;AACA,aAAQF,SAASE,OAAT,CAAR;AACA,aAAOI,GAAP;AACD,KAJD,MAIO;AACL,aAAO,IAAP;AACD;AACF;AACF,CA9CD","file":"array_pop.js","sourcesContent":["module.exports = function array_pop (inputArr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_pop/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Theriault (https://github.com/Theriault)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // note 1: While IE (and other browsers) support iterating an object's\n // note 1: own properties in order, if one attempts to add back properties\n // note 1: in IE, they may end up in their former position due to their position\n // note 1: being retained. So use of this function with \"associative arrays\"\n // note 1: (objects) may lead to unexpected behavior in an IE environment if\n // note 1: you add back properties with the same keys that you removed\n // example 1: array_pop([0,1,2])\n // returns 1: 2\n // example 2: var $data = {firstName: 'Kevin', surName: 'van Zonneveld'}\n // example 2: var $lastElem = array_pop($data)\n // example 2: var $result = $data\n // returns 2: {firstName: 'Kevin'}\n\n var key = ''\n var lastKey = ''\n\n if (inputArr.hasOwnProperty('length')) {\n // Indexed\n if (!inputArr.length) {\n // Done popping, are we?\n return null\n }\n return inputArr.pop()\n } else {\n // Associative\n for (key in inputArr) {\n if (inputArr.hasOwnProperty(key)) {\n lastKey = key\n }\n }\n if (lastKey) {\n var tmp = inputArr[lastKey]\n delete (inputArr[lastKey])\n return tmp\n } else {\n return null\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_product.js b/node_modules/locutus/php/array/array_product.js
deleted file mode 100644
index 27021ce..0000000
--- a/node_modules/locutus/php/array/array_product.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function array_product(input) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_product/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // example 1: array_product([ 2, 4, 6, 8 ])
- // returns 1: 384
-
- var idx = 0;
- var product = 1;
- var il = 0;
-
- if (Object.prototype.toString.call(input) !== '[object Array]') {
- return null;
- }
-
- il = input.length;
- while (idx < il) {
- product *= !isNaN(input[idx]) ? input[idx] : 0;
- idx++;
- }
-
- return product;
-};
-//# sourceMappingURL=array_product.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_product.js.map b/node_modules/locutus/php/array/array_product.js.map
deleted file mode 100644
index 7543cfe..0000000
--- a/node_modules/locutus/php/array/array_product.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_product.js"],"names":["module","exports","array_product","input","idx","product","il","Object","prototype","toString","call","length","isNaN"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,KAAxB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,CAAV;AACA,MAAIC,UAAU,CAAd;AACA,MAAIC,KAAK,CAAT;;AAEA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BP,KAA/B,MAA0C,gBAA9C,EAAgE;AAC9D,WAAO,IAAP;AACD;;AAEDG,OAAKH,MAAMQ,MAAX;AACA,SAAOP,MAAME,EAAb,EAAiB;AACfD,eAAY,CAACO,MAAMT,MAAMC,GAAN,CAAN,CAAD,GAAqBD,MAAMC,GAAN,CAArB,GAAkC,CAA9C;AACAA;AACD;;AAED,SAAOC,OAAP;AACD,CArBD","file":"array_product.js","sourcesContent":["module.exports = function array_product (input) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_product/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // example 1: array_product([ 2, 4, 6, 8 ])\n // returns 1: 384\n\n var idx = 0\n var product = 1\n var il = 0\n\n if (Object.prototype.toString.call(input) !== '[object Array]') {\n return null\n }\n\n il = input.length\n while (idx < il) {\n product *= (!isNaN(input[idx]) ? input[idx] : 0)\n idx++\n }\n\n return product\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_push.js b/node_modules/locutus/php/array/array_push.js
deleted file mode 100644
index cf2f0ba..0000000
--- a/node_modules/locutus/php/array/array_push.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = function array_push(inputArr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_push/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Note also that IE retains information about property position even
- // note 1: after being supposedly deleted, so if you delete properties and then
- // note 1: add back properties with the same keys (including numeric) that had
- // note 1: been deleted, the order will be as before; thus, this function is not
- // note 1: really recommended with associative arrays (objects) in IE environments
- // example 1: array_push(['kevin','van'], 'zonneveld')
- // returns 1: 3
-
- var i = 0;
- var pr = '';
- var argv = arguments;
- var argc = argv.length;
- var allDigits = /^\d$/;
- var size = 0;
- var highestIdx = 0;
- var len = 0;
-
- if (inputArr.hasOwnProperty('length')) {
- for (i = 1; i < argc; i++) {
- inputArr[inputArr.length] = argv[i];
- }
- return inputArr.length;
- }
-
- // Associative (object)
- for (pr in inputArr) {
- if (inputArr.hasOwnProperty(pr)) {
- ++len;
- if (pr.search(allDigits) !== -1) {
- size = parseInt(pr, 10);
- highestIdx = size > highestIdx ? size : highestIdx;
- }
- }
- }
- for (i = 1; i < argc; i++) {
- inputArr[++highestIdx] = argv[i];
- }
-
- return len + i - 1;
-};
-//# sourceMappingURL=array_push.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_push.js.map b/node_modules/locutus/php/array/array_push.js.map
deleted file mode 100644
index 0ba5386..0000000
--- a/node_modules/locutus/php/array/array_push.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_push.js"],"names":["module","exports","array_push","inputArr","i","pr","argv","arguments","argc","length","allDigits","size","highestIdx","len","hasOwnProperty","search","parseInt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,QAArB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,OAAOC,SAAX;AACA,MAAIC,OAAOF,KAAKG,MAAhB;AACA,MAAIC,YAAY,MAAhB;AACA,MAAIC,OAAO,CAAX;AACA,MAAIC,aAAa,CAAjB;AACA,MAAIC,MAAM,CAAV;;AAEA,MAAIV,SAASW,cAAT,CAAwB,QAAxB,CAAJ,EAAuC;AACrC,SAAKV,IAAI,CAAT,EAAYA,IAAII,IAAhB,EAAsBJ,GAAtB,EAA2B;AACzBD,eAASA,SAASM,MAAlB,IAA4BH,KAAKF,CAAL,CAA5B;AACD;AACD,WAAOD,SAASM,MAAhB;AACD;;AAED;AACA,OAAKJ,EAAL,IAAWF,QAAX,EAAqB;AACnB,QAAIA,SAASW,cAAT,CAAwBT,EAAxB,CAAJ,EAAiC;AAC/B,QAAEQ,GAAF;AACA,UAAIR,GAAGU,MAAH,CAAUL,SAAV,MAAyB,CAAC,CAA9B,EAAiC;AAC/BC,eAAOK,SAASX,EAAT,EAAa,EAAb,CAAP;AACAO,qBAAaD,OAAOC,UAAP,GAAoBD,IAApB,GAA2BC,UAAxC;AACD;AACF;AACF;AACD,OAAKR,IAAI,CAAT,EAAYA,IAAII,IAAhB,EAAsBJ,GAAtB,EAA2B;AACzBD,aAAS,EAAES,UAAX,IAAyBN,KAAKF,CAAL,CAAzB;AACD;;AAED,SAAOS,MAAMT,CAAN,GAAU,CAAjB;AACD,CA3CD","file":"array_push.js","sourcesContent":["module.exports = function array_push (inputArr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_push/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Note also that IE retains information about property position even\n // note 1: after being supposedly deleted, so if you delete properties and then\n // note 1: add back properties with the same keys (including numeric) that had\n // note 1: been deleted, the order will be as before; thus, this function is not\n // note 1: really recommended with associative arrays (objects) in IE environments\n // example 1: array_push(['kevin','van'], 'zonneveld')\n // returns 1: 3\n\n var i = 0\n var pr = ''\n var argv = arguments\n var argc = argv.length\n var allDigits = /^\\d$/\n var size = 0\n var highestIdx = 0\n var len = 0\n\n if (inputArr.hasOwnProperty('length')) {\n for (i = 1; i < argc; i++) {\n inputArr[inputArr.length] = argv[i]\n }\n return inputArr.length\n }\n\n // Associative (object)\n for (pr in inputArr) {\n if (inputArr.hasOwnProperty(pr)) {\n ++len\n if (pr.search(allDigits) !== -1) {\n size = parseInt(pr, 10)\n highestIdx = size > highestIdx ? size : highestIdx\n }\n }\n }\n for (i = 1; i < argc; i++) {\n inputArr[++highestIdx] = argv[i]\n }\n\n return len + i - 1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_rand.js b/node_modules/locutus/php/array/array_rand.js
deleted file mode 100644
index dbdfc08..0000000
--- a/node_modules/locutus/php/array/array_rand.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-module.exports = function array_rand(array, num) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_rand/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // reimplemented by: Rafał Kukawski
- // example 1: array_rand( ['Kevin'], 1 )
- // returns 1: '0'
-
- // By using Object.keys we support both, arrays and objects
- // which phpjs wants to support
- var keys = Object.keys(array);
-
- if (typeof num === 'undefined' || num === null) {
- num = 1;
- } else {
- num = +num;
- }
-
- if (isNaN(num) || num < 1 || num > keys.length) {
- return null;
- }
-
- // shuffle the array of keys
- for (var i = keys.length - 1; i > 0; i--) {
- var j = Math.floor(Math.random() * (i + 1)); // 0 ≤ j ≤ i
-
- var tmp = keys[j];
- keys[j] = keys[i];
- keys[i] = tmp;
- }
-
- return num === 1 ? keys[0] : keys.slice(0, num);
-};
-//# sourceMappingURL=array_rand.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_rand.js.map b/node_modules/locutus/php/array/array_rand.js.map
deleted file mode 100644
index 8c4d255..0000000
--- a/node_modules/locutus/php/array/array_rand.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_rand.js"],"names":["module","exports","array_rand","array","num","keys","Object","isNaN","length","i","j","Math","floor","random","tmp","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;AAAE;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAIC,OAAOC,OAAOD,IAAP,CAAYF,KAAZ,CAAX;;AAEA,MAAI,OAAOC,GAAP,KAAe,WAAf,IAA8BA,QAAQ,IAA1C,EAAgD;AAC9CA,UAAM,CAAN;AACD,GAFD,MAEO;AACLA,UAAM,CAACA,GAAP;AACD;;AAED,MAAIG,MAAMH,GAAN,KAAcA,MAAM,CAApB,IAAyBA,MAAMC,KAAKG,MAAxC,EAAgD;AAC9C,WAAO,IAAP;AACD;;AAED;AACA,OAAK,IAAIC,IAAIJ,KAAKG,MAAL,GAAc,CAA3B,EAA8BC,IAAI,CAAlC,EAAqCA,GAArC,EAA0C;AACxC,QAAIC,IAAIC,KAAKC,KAAL,CAAWD,KAAKE,MAAL,MAAiBJ,IAAI,CAArB,CAAX,CAAR,CADwC,CACI;;AAE5C,QAAIK,MAAMT,KAAKK,CAAL,CAAV;AACAL,SAAKK,CAAL,IAAUL,KAAKI,CAAL,CAAV;AACAJ,SAAKI,CAAL,IAAUK,GAAV;AACD;;AAED,SAAOV,QAAQ,CAAR,GAAYC,KAAK,CAAL,CAAZ,GAAsBA,KAAKU,KAAL,CAAW,CAAX,EAAcX,GAAd,CAA7B;AACD,CA/BD","file":"array_rand.js","sourcesContent":["module.exports = function array_rand (array, num) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_rand/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // reimplemented by: Rafał Kukawski\n // example 1: array_rand( ['Kevin'], 1 )\n // returns 1: '0'\n\n // By using Object.keys we support both, arrays and objects\n // which phpjs wants to support\n var keys = Object.keys(array)\n\n if (typeof num === 'undefined' || num === null) {\n num = 1\n } else {\n num = +num\n }\n\n if (isNaN(num) || num < 1 || num > keys.length) {\n return null\n }\n\n // shuffle the array of keys\n for (var i = keys.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1)) // 0 ≤ j ≤ i\n\n var tmp = keys[j]\n keys[j] = keys[i]\n keys[i] = tmp\n }\n\n return num === 1 ? keys[0] : keys.slice(0, num)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_reduce.js b/node_modules/locutus/php/array/array_reduce.js
deleted file mode 100644
index 41200ab..0000000
--- a/node_modules/locutus/php/array/array_reduce.js
+++ /dev/null
@@ -1,29 +0,0 @@
-"use strict";
-
-module.exports = function array_reduce(aInput, callback) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_reduce/
- // original by: Alfonso Jimenez (http://www.alfonsojimenez.com)
- // note 1: Takes a function as an argument, not a function's name
- // example 1: array_reduce([1, 2, 3, 4, 5], function (v, w){v += w;return v;})
- // returns 1: 15
-
- var lon = aInput.length;
- var res = 0;
- var i = 0;
- var tmp = [];
-
- for (i = 0; i < lon; i += 2) {
- tmp[0] = aInput[i];
- if (aInput[i + 1]) {
- tmp[1] = aInput[i + 1];
- } else {
- tmp[1] = 0;
- }
- res += callback.apply(null, tmp);
- tmp = [];
- }
-
- return res;
-};
-//# sourceMappingURL=array_reduce.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_reduce.js.map b/node_modules/locutus/php/array/array_reduce.js.map
deleted file mode 100644
index 5910fb8..0000000
--- a/node_modules/locutus/php/array/array_reduce.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_reduce.js"],"names":["module","exports","array_reduce","aInput","callback","lon","length","res","i","tmp","apply"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,QAA/B,EAAyC;AAAE;AAC1D;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAMF,OAAOG,MAAjB;AACA,MAAIC,MAAM,CAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,MAAM,EAAV;;AAEA,OAAKD,IAAI,CAAT,EAAYA,IAAIH,GAAhB,EAAqBG,KAAK,CAA1B,EAA6B;AAC3BC,QAAI,CAAJ,IAASN,OAAOK,CAAP,CAAT;AACA,QAAIL,OAAQK,IAAI,CAAZ,CAAJ,EAAqB;AACnBC,UAAI,CAAJ,IAASN,OAAQK,IAAI,CAAZ,CAAT;AACD,KAFD,MAEO;AACLC,UAAI,CAAJ,IAAS,CAAT;AACD;AACDF,WAAOH,SAASM,KAAT,CAAe,IAAf,EAAqBD,GAArB,CAAP;AACAA,UAAM,EAAN;AACD;;AAED,SAAOF,GAAP;AACD,CAxBD","file":"array_reduce.js","sourcesContent":["module.exports = function array_reduce (aInput, callback) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_reduce/\n // original by: Alfonso Jimenez (http://www.alfonsojimenez.com)\n // note 1: Takes a function as an argument, not a function's name\n // example 1: array_reduce([1, 2, 3, 4, 5], function (v, w){v += w;return v;})\n // returns 1: 15\n\n var lon = aInput.length\n var res = 0\n var i = 0\n var tmp = []\n\n for (i = 0; i < lon; i += 2) {\n tmp[0] = aInput[i]\n if (aInput[(i + 1)]) {\n tmp[1] = aInput[(i + 1)]\n } else {\n tmp[1] = 0\n }\n res += callback.apply(null, tmp)\n tmp = []\n }\n\n return res\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_replace.js b/node_modules/locutus/php/array/array_replace.js
deleted file mode 100644
index ec29c9a..0000000
--- a/node_modules/locutus/php/array/array_replace.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function array_replace(arr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_replace/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_replace(["orange", "banana", "apple", "raspberry"], {0 : "pineapple", 4 : "cherry"}, {0:"grape"})
- // returns 1: {0: 'grape', 1: 'banana', 2: 'apple', 3: 'raspberry', 4: 'cherry'}
-
- var retObj = {};
- var i = 0;
- var p = '';
- var argl = arguments.length;
-
- if (argl < 2) {
- throw new Error('There should be at least 2 arguments passed to array_replace()');
- }
-
- // Although docs state that the arguments are passed in by reference,
- // it seems they are not altered, but rather the copy that is returned
- // (just guessing), so we make a copy here, instead of acting on arr itself
- for (p in arr) {
- retObj[p] = arr[p];
- }
-
- for (i = 1; i < argl; i++) {
- for (p in arguments[i]) {
- retObj[p] = arguments[i][p];
- }
- }
-
- return retObj;
-};
-//# sourceMappingURL=array_replace.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_replace.js.map b/node_modules/locutus/php/array/array_replace.js.map
deleted file mode 100644
index 821f45d..0000000
--- a/node_modules/locutus/php/array/array_replace.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_replace.js"],"names":["module","exports","array_replace","arr","retObj","i","p","argl","arguments","length","Error"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,GAAxB,EAA6B;AAAE;AAC9C;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,OAAOC,UAAUC,MAArB;;AAEA,MAAIF,OAAO,CAAX,EAAc;AACZ,UAAM,IAAIG,KAAJ,CAAU,gEAAV,CAAN;AACD;;AAED;AACA;AACA;AACA,OAAKJ,CAAL,IAAUH,GAAV,EAAe;AACbC,WAAOE,CAAP,IAAYH,IAAIG,CAAJ,CAAZ;AACD;;AAED,OAAKD,IAAI,CAAT,EAAYA,IAAIE,IAAhB,EAAsBF,GAAtB,EAA2B;AACzB,SAAKC,CAAL,IAAUE,UAAUH,CAAV,CAAV,EAAwB;AACtBD,aAAOE,CAAP,IAAYE,UAAUH,CAAV,EAAaC,CAAb,CAAZ;AACD;AACF;;AAED,SAAOF,MAAP;AACD,CA7BD","file":"array_replace.js","sourcesContent":["module.exports = function array_replace (arr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_replace/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_replace([\"orange\", \"banana\", \"apple\", \"raspberry\"], {0 : \"pineapple\", 4 : \"cherry\"}, {0:\"grape\"})\n // returns 1: {0: 'grape', 1: 'banana', 2: 'apple', 3: 'raspberry', 4: 'cherry'}\n\n var retObj = {}\n var i = 0\n var p = ''\n var argl = arguments.length\n\n if (argl < 2) {\n throw new Error('There should be at least 2 arguments passed to array_replace()')\n }\n\n // Although docs state that the arguments are passed in by reference,\n // it seems they are not altered, but rather the copy that is returned\n // (just guessing), so we make a copy here, instead of acting on arr itself\n for (p in arr) {\n retObj[p] = arr[p]\n }\n\n for (i = 1; i < argl; i++) {\n for (p in arguments[i]) {\n retObj[p] = arguments[i][p]\n }\n }\n\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_replace_recursive.js b/node_modules/locutus/php/array/array_replace_recursive.js
deleted file mode 100644
index b4cc56b..0000000
--- a/node_modules/locutus/php/array/array_replace_recursive.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_replace_recursive(arr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_replace_recursive/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_replace_recursive({'citrus' : ['orange'], 'berries' : ['blackberry', 'raspberry']}, {'citrus' : ['pineapple'], 'berries' : ['blueberry']})
- // returns 1: {citrus : ['pineapple'], berries : ['blueberry', 'raspberry']}
-
- var i = 0;
- var p = '';
- var argl = arguments.length;
- var retObj;
-
- if (argl < 2) {
- throw new Error('There should be at least 2 arguments passed to array_replace_recursive()');
- }
-
- // Although docs state that the arguments are passed in by reference,
- // it seems they are not altered, but rather the copy that is returned
- // So we make a copy here, instead of acting on arr itself
- if (Object.prototype.toString.call(arr) === '[object Array]') {
- retObj = [];
- for (p in arr) {
- retObj.push(arr[p]);
- }
- } else {
- retObj = {};
- for (p in arr) {
- retObj[p] = arr[p];
- }
- }
-
- for (i = 1; i < argl; i++) {
- for (p in arguments[i]) {
- if (retObj[p] && _typeof(retObj[p]) === 'object') {
- retObj[p] = array_replace_recursive(retObj[p], arguments[i][p]);
- } else {
- retObj[p] = arguments[i][p];
- }
- }
- }
-
- return retObj;
-};
-//# sourceMappingURL=array_replace_recursive.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_replace_recursive.js.map b/node_modules/locutus/php/array/array_replace_recursive.js.map
deleted file mode 100644
index 3b4b0fc..0000000
--- a/node_modules/locutus/php/array/array_replace_recursive.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_replace_recursive.js"],"names":["module","exports","array_replace_recursive","arr","i","p","argl","arguments","length","retObj","Error","Object","prototype","toString","call","push"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,uBAAT,CAAkCC,GAAlC,EAAuC;AAAE;AACxD;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIC,MAAJ;;AAEA,MAAIH,OAAO,CAAX,EAAc;AACZ,UAAM,IAAII,KAAJ,CAAU,0EAAV,CAAN;AACD;;AAED;AACA;AACA;AACA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5DM,aAAS,EAAT;AACA,SAAKJ,CAAL,IAAUF,GAAV,EAAe;AACbM,aAAOM,IAAP,CAAYZ,IAAIE,CAAJ,CAAZ;AACD;AACF,GALD,MAKO;AACLI,aAAS,EAAT;AACA,SAAKJ,CAAL,IAAUF,GAAV,EAAe;AACbM,aAAOJ,CAAP,IAAYF,IAAIE,CAAJ,CAAZ;AACD;AACF;;AAED,OAAKD,IAAI,CAAT,EAAYA,IAAIE,IAAhB,EAAsBF,GAAtB,EAA2B;AACzB,SAAKC,CAAL,IAAUE,UAAUH,CAAV,CAAV,EAAwB;AACtB,UAAIK,OAAOJ,CAAP,KAAa,QAAOI,OAAOJ,CAAP,CAAP,MAAqB,QAAtC,EAAgD;AAC9CI,eAAOJ,CAAP,IAAYH,wBAAwBO,OAAOJ,CAAP,CAAxB,EAAmCE,UAAUH,CAAV,EAAaC,CAAb,CAAnC,CAAZ;AACD,OAFD,MAEO;AACLI,eAAOJ,CAAP,IAAYE,UAAUH,CAAV,EAAaC,CAAb,CAAZ;AACD;AACF;AACF;;AAED,SAAOI,MAAP;AACD,CAzCD","file":"array_replace_recursive.js","sourcesContent":["module.exports = function array_replace_recursive (arr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_replace_recursive/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_replace_recursive({'citrus' : ['orange'], 'berries' : ['blackberry', 'raspberry']}, {'citrus' : ['pineapple'], 'berries' : ['blueberry']})\n // returns 1: {citrus : ['pineapple'], berries : ['blueberry', 'raspberry']}\n\n var i = 0\n var p = ''\n var argl = arguments.length\n var retObj\n\n if (argl < 2) {\n throw new Error('There should be at least 2 arguments passed to array_replace_recursive()')\n }\n\n // Although docs state that the arguments are passed in by reference,\n // it seems they are not altered, but rather the copy that is returned\n // So we make a copy here, instead of acting on arr itself\n if (Object.prototype.toString.call(arr) === '[object Array]') {\n retObj = []\n for (p in arr) {\n retObj.push(arr[p])\n }\n } else {\n retObj = {}\n for (p in arr) {\n retObj[p] = arr[p]\n }\n }\n\n for (i = 1; i < argl; i++) {\n for (p in arguments[i]) {\n if (retObj[p] && typeof retObj[p] === 'object') {\n retObj[p] = array_replace_recursive(retObj[p], arguments[i][p])\n } else {\n retObj[p] = arguments[i][p]\n }\n }\n }\n\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_reverse.js b/node_modules/locutus/php/array/array_reverse.js
deleted file mode 100644
index fe157aa..0000000
--- a/node_modules/locutus/php/array/array_reverse.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function array_reverse(array, preserveKeys) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_reverse/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Karol Kowalski
- // example 1: array_reverse( [ 'php', '4.0', ['green', 'red'] ], true)
- // returns 1: { 2: ['green', 'red'], 1: '4.0', 0: 'php'}
-
- var isArray = Object.prototype.toString.call(array) === '[object Array]';
- var tmpArr = preserveKeys ? {} : [];
- var key;
-
- if (isArray && !preserveKeys) {
- return array.slice(0).reverse();
- }
-
- if (preserveKeys) {
- var keys = [];
- for (key in array) {
- keys.push(key);
- }
-
- var i = keys.length;
- while (i--) {
- key = keys[i];
- // @todo: don't rely on browsers keeping keys in insertion order
- // it's implementation specific
- // eg. the result will differ from expected in Google Chrome
- tmpArr[key] = array[key];
- }
- } else {
- for (key in array) {
- tmpArr.unshift(array[key]);
- }
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_reverse.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_reverse.js.map b/node_modules/locutus/php/array/array_reverse.js.map
deleted file mode 100644
index 9b6bea1..0000000
--- a/node_modules/locutus/php/array/array_reverse.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_reverse.js"],"names":["module","exports","array_reverse","array","preserveKeys","isArray","Object","prototype","toString","call","tmpArr","key","slice","reverse","keys","push","i","length","unshift"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,KAAxB,EAA+BC,YAA/B,EAA6C;AAAE;AAC9D;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BN,KAA/B,MAA0C,gBAAxD;AACA,MAAIO,SAASN,eAAe,EAAf,GAAoB,EAAjC;AACA,MAAIO,GAAJ;;AAEA,MAAIN,WAAW,CAACD,YAAhB,EAA8B;AAC5B,WAAOD,MAAMS,KAAN,CAAY,CAAZ,EAAeC,OAAf,EAAP;AACD;;AAED,MAAIT,YAAJ,EAAkB;AAChB,QAAIU,OAAO,EAAX;AACA,SAAKH,GAAL,IAAYR,KAAZ,EAAmB;AACjBW,WAAKC,IAAL,CAAUJ,GAAV;AACD;;AAED,QAAIK,IAAIF,KAAKG,MAAb;AACA,WAAOD,GAAP,EAAY;AACVL,YAAMG,KAAKE,CAAL,CAAN;AACA;AACA;AACA;AACAN,aAAOC,GAAP,IAAcR,MAAMQ,GAAN,CAAd;AACD;AACF,GAdD,MAcO;AACL,SAAKA,GAAL,IAAYR,KAAZ,EAAmB;AACjBO,aAAOQ,OAAP,CAAef,MAAMQ,GAAN,CAAf;AACD;AACF;;AAED,SAAOD,MAAP;AACD,CApCD","file":"array_reverse.js","sourcesContent":["module.exports = function array_reverse (array, preserveKeys) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_reverse/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Karol Kowalski\n // example 1: array_reverse( [ 'php', '4.0', ['green', 'red'] ], true)\n // returns 1: { 2: ['green', 'red'], 1: '4.0', 0: 'php'}\n\n var isArray = Object.prototype.toString.call(array) === '[object Array]'\n var tmpArr = preserveKeys ? {} : []\n var key\n\n if (isArray && !preserveKeys) {\n return array.slice(0).reverse()\n }\n\n if (preserveKeys) {\n var keys = []\n for (key in array) {\n keys.push(key)\n }\n\n var i = keys.length\n while (i--) {\n key = keys[i]\n // @todo: don't rely on browsers keeping keys in insertion order\n // it's implementation specific\n // eg. the result will differ from expected in Google Chrome\n tmpArr[key] = array[key]\n }\n } else {\n for (key in array) {\n tmpArr.unshift(array[key])\n }\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_search.js b/node_modules/locutus/php/array/array_search.js
deleted file mode 100644
index 9765630..0000000
--- a/node_modules/locutus/php/array/array_search.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_search(needle, haystack, argStrict) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_search/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Reynier de la Rosa (http://scriptinside.blogspot.com.es/)
- // test: skip-all
- // example 1: array_search('zonneveld', {firstname: 'kevin', middle: 'van', surname: 'zonneveld'})
- // returns 1: 'surname'
- // example 2: array_search('3', {a: 3, b: 5, c: 7})
- // returns 2: 'a'
-
- var strict = !!argStrict;
- var key = '';
-
- if ((typeof needle === 'undefined' ? 'undefined' : _typeof(needle)) === 'object' && needle.exec) {
- // Duck-type for RegExp
- if (!strict) {
- // Let's consider case sensitive searches as strict
- var flags = 'i' + (needle.global ? 'g' : '') + (needle.multiline ? 'm' : '') + (
- // sticky is FF only
- needle.sticky ? 'y' : '');
- needle = new RegExp(needle.source, flags);
- }
- for (key in haystack) {
- if (haystack.hasOwnProperty(key)) {
- if (needle.test(haystack[key])) {
- return key;
- }
- }
- }
- return false;
- }
-
- for (key in haystack) {
- if (haystack.hasOwnProperty(key)) {
- if (strict && haystack[key] === needle || !strict && haystack[key] == needle) {
- // eslint-disable-line eqeqeq
- return key;
- }
- }
- }
-
- return false;
-};
-//# sourceMappingURL=array_search.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_search.js.map b/node_modules/locutus/php/array/array_search.js.map
deleted file mode 100644
index 97b2c5b..0000000
--- a/node_modules/locutus/php/array/array_search.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_search.js"],"names":["module","exports","array_search","needle","haystack","argStrict","strict","key","exec","flags","global","multiline","sticky","RegExp","source","hasOwnProperty","test"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,QAA/B,EAAyCC,SAAzC,EAAoD;AAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,CAAC,CAACD,SAAf;AACA,MAAIE,MAAM,EAAV;;AAEA,MAAI,QAAOJ,MAAP,yCAAOA,MAAP,OAAkB,QAAlB,IAA8BA,OAAOK,IAAzC,EAA+C;AAC7C;AACA,QAAI,CAACF,MAAL,EAAa;AACX;AACA,UAAIG,QAAQ,OAAON,OAAOO,MAAP,GAAgB,GAAhB,GAAsB,EAA7B,KACTP,OAAOQ,SAAP,GAAmB,GAAnB,GAAyB,EADhB;AAEV;AACCR,aAAOS,MAAP,GAAgB,GAAhB,GAAsB,EAHb,CAAZ;AAIAT,eAAS,IAAIU,MAAJ,CAAWV,OAAOW,MAAlB,EAA0BL,KAA1B,CAAT;AACD;AACD,SAAKF,GAAL,IAAYH,QAAZ,EAAsB;AACpB,UAAIA,SAASW,cAAT,CAAwBR,GAAxB,CAAJ,EAAkC;AAChC,YAAIJ,OAAOa,IAAP,CAAYZ,SAASG,GAAT,CAAZ,CAAJ,EAAgC;AAC9B,iBAAOA,GAAP;AACD;AACF;AACF;AACD,WAAO,KAAP;AACD;;AAED,OAAKA,GAAL,IAAYH,QAAZ,EAAsB;AACpB,QAAIA,SAASW,cAAT,CAAwBR,GAAxB,CAAJ,EAAkC;AAChC,UAAKD,UAAUF,SAASG,GAAT,MAAkBJ,MAA7B,IAAyC,CAACG,MAAD,IAAWF,SAASG,GAAT,KAAiBJ,MAAzE,EAAkF;AAAE;AAClF,eAAOI,GAAP;AACD;AACF;AACF;;AAED,SAAO,KAAP;AACD,CA5CD","file":"array_search.js","sourcesContent":["module.exports = function array_search (needle, haystack, argStrict) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_search/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Reynier de la Rosa (http://scriptinside.blogspot.com.es/)\n // test: skip-all\n // example 1: array_search('zonneveld', {firstname: 'kevin', middle: 'van', surname: 'zonneveld'})\n // returns 1: 'surname'\n // example 2: array_search('3', {a: 3, b: 5, c: 7})\n // returns 2: 'a'\n\n var strict = !!argStrict\n var key = ''\n\n if (typeof needle === 'object' && needle.exec) {\n // Duck-type for RegExp\n if (!strict) {\n // Let's consider case sensitive searches as strict\n var flags = 'i' + (needle.global ? 'g' : '') +\n (needle.multiline ? 'm' : '') +\n // sticky is FF only\n (needle.sticky ? 'y' : '')\n needle = new RegExp(needle.source, flags)\n }\n for (key in haystack) {\n if (haystack.hasOwnProperty(key)) {\n if (needle.test(haystack[key])) {\n return key\n }\n }\n }\n return false\n }\n\n for (key in haystack) {\n if (haystack.hasOwnProperty(key)) {\n if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) { // eslint-disable-line eqeqeq\n return key\n }\n }\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_shift.js b/node_modules/locutus/php/array/array_shift.js
deleted file mode 100644
index f68ba7d..0000000
--- a/node_modules/locutus/php/array/array_shift.js
+++ /dev/null
@@ -1,38 +0,0 @@
-"use strict";
-
-module.exports = function array_shift(inputArr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_shift/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Martijn Wieringa
- // note 1: Currently does not handle objects
- // example 1: array_shift(['Kevin', 'van', 'Zonneveld'])
- // returns 1: 'Kevin'
-
- var _checkToUpIndices = function _checkToUpIndices(arr, ct, key) {
- // Deal with situation, e.g., if encounter index 4 and try
- // to set it to 0, but 0 exists later in loop (need to
- // increment all subsequent (skipping current key, since
- // we need its value below) until find unused)
- if (arr[ct] !== undefined) {
- var tmp = ct;
- ct += 1;
- if (ct === key) {
- ct += 1;
- }
- ct = _checkToUpIndices(arr, ct, key);
- arr[ct] = arr[tmp];
- delete arr[tmp];
- }
-
- return ct;
- };
-
- if (inputArr.length === 0) {
- return null;
- }
- if (inputArr.length > 0) {
- return inputArr.shift();
- }
-};
-//# sourceMappingURL=array_shift.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_shift.js.map b/node_modules/locutus/php/array/array_shift.js.map
deleted file mode 100644
index 3a83c19..0000000
--- a/node_modules/locutus/php/array/array_shift.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_shift.js"],"names":["module","exports","array_shift","inputArr","_checkToUpIndices","arr","ct","key","undefined","tmp","length","shift"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,QAAtB,EAAgC;AAAE;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,oBAAoB,SAApBA,iBAAoB,CAAUC,GAAV,EAAeC,EAAf,EAAmBC,GAAnB,EAAwB;AAC9C;AACA;AACA;AACA;AACA,QAAIF,IAAIC,EAAJ,MAAYE,SAAhB,EAA2B;AACzB,UAAIC,MAAMH,EAAV;AACAA,YAAM,CAAN;AACA,UAAIA,OAAOC,GAAX,EAAgB;AACdD,cAAM,CAAN;AACD;AACDA,WAAKF,kBAAkBC,GAAlB,EAAuBC,EAAvB,EAA2BC,GAA3B,CAAL;AACAF,UAAIC,EAAJ,IAAUD,IAAII,GAAJ,CAAV;AACA,aAAOJ,IAAII,GAAJ,CAAP;AACD;;AAED,WAAOH,EAAP;AACD,GAjBD;;AAmBA,MAAIH,SAASO,MAAT,KAAoB,CAAxB,EAA2B;AACzB,WAAO,IAAP;AACD;AACD,MAAIP,SAASO,MAAT,GAAkB,CAAtB,EAAyB;AACvB,WAAOP,SAASQ,KAAT,EAAP;AACD;AACF,CAjCD","file":"array_shift.js","sourcesContent":["module.exports = function array_shift (inputArr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_shift/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Martijn Wieringa\n // note 1: Currently does not handle objects\n // example 1: array_shift(['Kevin', 'van', 'Zonneveld'])\n // returns 1: 'Kevin'\n\n var _checkToUpIndices = function (arr, ct, key) {\n // Deal with situation, e.g., if encounter index 4 and try\n // to set it to 0, but 0 exists later in loop (need to\n // increment all subsequent (skipping current key, since\n // we need its value below) until find unused)\n if (arr[ct] !== undefined) {\n var tmp = ct\n ct += 1\n if (ct === key) {\n ct += 1\n }\n ct = _checkToUpIndices(arr, ct, key)\n arr[ct] = arr[tmp]\n delete arr[tmp]\n }\n\n return ct\n }\n\n if (inputArr.length === 0) {\n return null\n }\n if (inputArr.length > 0) {\n return inputArr.shift()\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_slice.js b/node_modules/locutus/php/array/array_slice.js
deleted file mode 100644
index 0d90d80..0000000
--- a/node_modules/locutus/php/array/array_slice.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-module.exports = function array_slice(arr, offst, lgth, preserveKeys) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_slice/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // note 1: Relies on is_int because !isNaN accepts floats
- // example 1: array_slice(["a", "b", "c", "d", "e"], 2, -1)
- // returns 1: [ 'c', 'd' ]
- // example 2: array_slice(["a", "b", "c", "d", "e"], 2, -1, true)
- // returns 2: {2: 'c', 3: 'd'}
-
- var isInt = require('../var/is_int');
-
- /*
- if ('callee' in arr && 'length' in arr) {
- arr = Array.prototype.slice.call(arr);
- }
- */
-
- var key = '';
-
- if (Object.prototype.toString.call(arr) !== '[object Array]' || preserveKeys && offst !== 0) {
- // Assoc. array as input or if required as output
- var lgt = 0;
- var newAssoc = {};
- for (key in arr) {
- lgt += 1;
- newAssoc[key] = arr[key];
- }
- arr = newAssoc;
-
- offst = offst < 0 ? lgt + offst : offst;
- lgth = lgth === undefined ? lgt : lgth < 0 ? lgt + lgth - offst : lgth;
-
- var assoc = {};
- var start = false;
- var it = -1;
- var arrlgth = 0;
- var noPkIdx = 0;
-
- for (key in arr) {
- ++it;
- if (arrlgth >= lgth) {
- break;
- }
- if (it === offst) {
- start = true;
- }
- if (!start) {
- continue;
- }++arrlgth;
- if (isInt(key) && !preserveKeys) {
- assoc[noPkIdx++] = arr[key];
- } else {
- assoc[key] = arr[key];
- }
- }
- // Make as array-like object (though length will not be dynamic)
- // assoc.length = arrlgth;
- return assoc;
- }
-
- if (lgth === undefined) {
- return arr.slice(offst);
- } else if (lgth >= 0) {
- return arr.slice(offst, offst + lgth);
- } else {
- return arr.slice(offst, lgth);
- }
-};
-//# sourceMappingURL=array_slice.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_slice.js.map b/node_modules/locutus/php/array/array_slice.js.map
deleted file mode 100644
index f9e65d0..0000000
--- a/node_modules/locutus/php/array/array_slice.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_slice.js"],"names":["module","exports","array_slice","arr","offst","lgth","preserveKeys","isInt","require","key","Object","prototype","toString","call","lgt","newAssoc","undefined","assoc","start","it","arrlgth","noPkIdx","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,GAAtB,EAA2BC,KAA3B,EAAkCC,IAAlC,EAAwCC,YAAxC,EAAsD;AAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,QAAQC,QAAQ,eAAR,CAAZ;;AAEA;;;;;;AAMA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BV,GAA/B,MAAwC,gBAAxC,IAA6DG,gBAAgBF,UAAU,CAA3F,EAA+F;AAC7F;AACA,QAAIU,MAAM,CAAV;AACA,QAAIC,WAAW,EAAf;AACA,SAAKN,GAAL,IAAYN,GAAZ,EAAiB;AACfW,aAAO,CAAP;AACAC,eAASN,GAAT,IAAgBN,IAAIM,GAAJ,CAAhB;AACD;AACDN,UAAMY,QAAN;;AAEAX,YAASA,QAAQ,CAAT,GAAcU,MAAMV,KAApB,GAA4BA,KAApC;AACAC,WAAOA,SAASW,SAAT,GAAqBF,GAArB,GAA4BT,OAAO,CAAR,GAAaS,MAAMT,IAAN,GAAaD,KAA1B,GAAkCC,IAApE;;AAEA,QAAIY,QAAQ,EAAZ;AACA,QAAIC,QAAQ,KAAZ;AACA,QAAIC,KAAK,CAAC,CAAV;AACA,QAAIC,UAAU,CAAd;AACA,QAAIC,UAAU,CAAd;;AAEA,SAAKZ,GAAL,IAAYN,GAAZ,EAAiB;AACf,QAAEgB,EAAF;AACA,UAAIC,WAAWf,IAAf,EAAqB;AACnB;AACD;AACD,UAAIc,OAAOf,KAAX,EAAkB;AAChBc,gBAAQ,IAAR;AACD;AACD,UAAI,CAACA,KAAL,EAAY;AACV;AACD,SAAEE,OAAF;AACD,UAAIb,MAAME,GAAN,KAAc,CAACH,YAAnB,EAAiC;AAC/BW,cAAMI,SAAN,IAAmBlB,IAAIM,GAAJ,CAAnB;AACD,OAFD,MAEO;AACLQ,cAAMR,GAAN,IAAaN,IAAIM,GAAJ,CAAb;AACD;AACF;AACD;AACA;AACA,WAAOQ,KAAP;AACD;;AAED,MAAIZ,SAASW,SAAb,EAAwB;AACtB,WAAOb,IAAImB,KAAJ,CAAUlB,KAAV,CAAP;AACD,GAFD,MAEO,IAAIC,QAAQ,CAAZ,EAAe;AACpB,WAAOF,IAAImB,KAAJ,CAAUlB,KAAV,EAAiBA,QAAQC,IAAzB,CAAP;AACD,GAFM,MAEA;AACL,WAAOF,IAAImB,KAAJ,CAAUlB,KAAV,EAAiBC,IAAjB,CAAP;AACD;AACF,CArED","file":"array_slice.js","sourcesContent":["module.exports = function array_slice (arr, offst, lgth, preserveKeys) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_slice/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // note 1: Relies on is_int because !isNaN accepts floats\n // example 1: array_slice([\"a\", \"b\", \"c\", \"d\", \"e\"], 2, -1)\n // returns 1: [ 'c', 'd' ]\n // example 2: array_slice([\"a\", \"b\", \"c\", \"d\", \"e\"], 2, -1, true)\n // returns 2: {2: 'c', 3: 'd'}\n\n var isInt = require('../var/is_int')\n\n /*\n if ('callee' in arr && 'length' in arr) {\n arr = Array.prototype.slice.call(arr);\n }\n */\n\n var key = ''\n\n if (Object.prototype.toString.call(arr) !== '[object Array]' || (preserveKeys && offst !== 0)) {\n // Assoc. array as input or if required as output\n var lgt = 0\n var newAssoc = {}\n for (key in arr) {\n lgt += 1\n newAssoc[key] = arr[key]\n }\n arr = newAssoc\n\n offst = (offst < 0) ? lgt + offst : offst\n lgth = lgth === undefined ? lgt : (lgth < 0) ? lgt + lgth - offst : lgth\n\n var assoc = {}\n var start = false\n var it = -1\n var arrlgth = 0\n var noPkIdx = 0\n\n for (key in arr) {\n ++it\n if (arrlgth >= lgth) {\n break\n }\n if (it === offst) {\n start = true\n }\n if (!start) {\n continue\n }++arrlgth\n if (isInt(key) && !preserveKeys) {\n assoc[noPkIdx++] = arr[key]\n } else {\n assoc[key] = arr[key]\n }\n }\n // Make as array-like object (though length will not be dynamic)\n // assoc.length = arrlgth;\n return assoc\n }\n\n if (lgth === undefined) {\n return arr.slice(offst)\n } else if (lgth >= 0) {\n return arr.slice(offst, offst + lgth)\n } else {\n return arr.slice(offst, lgth)\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_splice.js b/node_modules/locutus/php/array/array_splice.js
deleted file mode 100644
index 443ef91..0000000
--- a/node_modules/locutus/php/array/array_splice.js
+++ /dev/null
@@ -1,123 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_splice(arr, offst, lgth, replacement) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_splice/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: Theriault (https://github.com/Theriault)
- // note 1: Order does get shifted in associative array input with numeric indices,
- // note 1: since PHP behavior doesn't preserve keys, but I understand order is
- // note 1: not reliable anyways
- // note 1: Note also that IE retains information about property position even
- // note 1: after being supposedly deleted, so use of this function may produce
- // note 1: unexpected results in IE if you later attempt to add back properties
- // note 1: with the same keys that had been deleted
- // example 1: var $input = {4: "red", 'abc': "green", 2: "blue", 'dud': "yellow"}
- // example 1: array_splice($input, 2)
- // returns 1: {4: "red", 'abc': "green"}
- // example 2: var $input = ["red", "green", "blue", "yellow"]
- // example 2: array_splice($input, 3, 0, "purple")
- // returns 2: []
- // example 3: var $input = ["red", "green", "blue", "yellow"]
- // example 3: array_splice($input, -1, 1, ["black", "maroon"])
- // returns 3: ["yellow"]
- // test: skip-1
-
- var isInt = require('../var/is_int');
-
- var _checkToUpIndices = function _checkToUpIndices(arr, ct, key) {
- // Deal with situation, e.g., if encounter index 4 and try
- // to set it to 0, but 0 exists later in loop (need to
- // increment all subsequent (skipping current key,
- // since we need its value below) until find unused)
- if (arr[ct] !== undefined) {
- var tmp = ct;
- ct += 1;
- if (ct === key) {
- ct += 1;
- }
- ct = _checkToUpIndices(arr, ct, key);
- arr[ct] = arr[tmp];
- delete arr[tmp];
- }
- return ct;
- };
-
- if (replacement && (typeof replacement === 'undefined' ? 'undefined' : _typeof(replacement)) !== 'object') {
- replacement = [replacement];
- }
- if (lgth === undefined) {
- lgth = offst >= 0 ? arr.length - offst : -offst;
- } else if (lgth < 0) {
- lgth = (offst >= 0 ? arr.length - offst : -offst) + lgth;
- }
-
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- /* if (arr.length !== undefined) {
- // Deal with array-like objects as input
- delete arr.length;
- } */
- var lgt = 0;
- var ct = -1;
- var rmvd = [];
- var rmvdObj = {};
- var replCt = -1;
- var intCt = -1;
- var returnArr = true;
- var rmvdCt = 0;
- // var rmvdLngth = 0
- var key = '';
- // rmvdObj.length = 0;
- for (key in arr) {
- // Can do arr.__count__ in some browsers
- lgt += 1;
- }
- offst = offst >= 0 ? offst : lgt + offst;
- for (key in arr) {
- ct += 1;
- if (ct < offst) {
- if (isInt(key)) {
- intCt += 1;
- if (parseInt(key, 10) === intCt) {
- // Key is already numbered ok, so don't need to change key for value
- continue;
- }
- // Deal with situation, e.g.,
- _checkToUpIndices(arr, intCt, key);
- // if encounter index 4 and try to set it to 0, but 0 exists later in loop
- arr[intCt] = arr[key];
- delete arr[key];
- }
- continue;
- }
- if (returnArr && isInt(key)) {
- rmvd.push(arr[key]);
- // PHP starts over here too
- rmvdObj[rmvdCt++] = arr[key];
- } else {
- rmvdObj[key] = arr[key];
- returnArr = false;
- }
- // rmvdLngth += 1
- // rmvdObj.length += 1;
- if (replacement && replacement[++replCt]) {
- arr[key] = replacement[replCt];
- } else {
- delete arr[key];
- }
- }
- // Make (back) into an array-like object
- // arr.length = lgt - rmvdLngth + (replacement ? replacement.length : 0);
- return returnArr ? rmvd : rmvdObj;
- }
-
- if (replacement) {
- replacement.unshift(offst, lgth);
- return Array.prototype.splice.apply(arr, replacement);
- }
-
- return arr.splice(offst, lgth);
-};
-//# sourceMappingURL=array_splice.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_splice.js.map b/node_modules/locutus/php/array/array_splice.js.map
deleted file mode 100644
index 4027e16..0000000
--- a/node_modules/locutus/php/array/array_splice.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_splice.js"],"names":["module","exports","array_splice","arr","offst","lgth","replacement","isInt","require","_checkToUpIndices","ct","key","undefined","tmp","length","Object","prototype","toString","call","lgt","rmvd","rmvdObj","replCt","intCt","returnArr","rmvdCt","parseInt","push","unshift","Array","splice","apply"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,GAAvB,EAA4BC,KAA5B,EAAmCC,IAAnC,EAAyCC,WAAzC,EAAsD;AAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AW1B,KAAX,EAAkBC,IAAlB,CAAP;AACD,CApHD","file":"array_splice.js","sourcesContent":["module.exports = function array_splice (arr, offst, lgth, replacement) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_splice/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: Theriault (https://github.com/Theriault)\n // note 1: Order does get shifted in associative array input with numeric indices,\n // note 1: since PHP behavior doesn't preserve keys, but I understand order is\n // note 1: not reliable anyways\n // note 1: Note also that IE retains information about property position even\n // note 1: after being supposedly deleted, so use of this function may produce\n // note 1: unexpected results in IE if you later attempt to add back properties\n // note 1: with the same keys that had been deleted\n // example 1: var $input = {4: \"red\", 'abc': \"green\", 2: \"blue\", 'dud': \"yellow\"}\n // example 1: array_splice($input, 2)\n // returns 1: {4: \"red\", 'abc': \"green\"}\n // example 2: var $input = [\"red\", \"green\", \"blue\", \"yellow\"]\n // example 2: array_splice($input, 3, 0, \"purple\")\n // returns 2: []\n // example 3: var $input = [\"red\", \"green\", \"blue\", \"yellow\"]\n // example 3: array_splice($input, -1, 1, [\"black\", \"maroon\"])\n // returns 3: [\"yellow\"]\n // test: skip-1\n\n var isInt = require('../var/is_int')\n\n var _checkToUpIndices = function (arr, ct, key) {\n // Deal with situation, e.g., if encounter index 4 and try\n // to set it to 0, but 0 exists later in loop (need to\n // increment all subsequent (skipping current key,\n // since we need its value below) until find unused)\n if (arr[ct] !== undefined) {\n var tmp = ct\n ct += 1\n if (ct === key) {\n ct += 1\n }\n ct = _checkToUpIndices(arr, ct, key)\n arr[ct] = arr[tmp]\n delete arr[tmp]\n }\n return ct\n }\n\n if (replacement && typeof replacement !== 'object') {\n replacement = [replacement]\n }\n if (lgth === undefined) {\n lgth = offst >= 0 ? arr.length - offst : -offst\n } else if (lgth < 0) {\n lgth = (offst >= 0 ? arr.length - offst : -offst) + lgth\n }\n\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n /* if (arr.length !== undefined) {\n // Deal with array-like objects as input\n delete arr.length;\n } */\n var lgt = 0\n var ct = -1\n var rmvd = []\n var rmvdObj = {}\n var replCt = -1\n var intCt = -1\n var returnArr = true\n var rmvdCt = 0\n // var rmvdLngth = 0\n var key = ''\n // rmvdObj.length = 0;\n for (key in arr) {\n // Can do arr.__count__ in some browsers\n lgt += 1\n }\n offst = (offst >= 0) ? offst : lgt + offst\n for (key in arr) {\n ct += 1\n if (ct < offst) {\n if (isInt(key)) {\n intCt += 1\n if (parseInt(key, 10) === intCt) {\n // Key is already numbered ok, so don't need to change key for value\n continue\n }\n // Deal with situation, e.g.,\n _checkToUpIndices(arr, intCt, key)\n // if encounter index 4 and try to set it to 0, but 0 exists later in loop\n arr[intCt] = arr[key]\n delete arr[key]\n }\n continue\n }\n if (returnArr && isInt(key)) {\n rmvd.push(arr[key])\n // PHP starts over here too\n rmvdObj[rmvdCt++] = arr[key]\n } else {\n rmvdObj[key] = arr[key]\n returnArr = false\n }\n // rmvdLngth += 1\n // rmvdObj.length += 1;\n if (replacement && replacement[++replCt]) {\n arr[key] = replacement[replCt]\n } else {\n delete arr[key]\n }\n }\n // Make (back) into an array-like object\n // arr.length = lgt - rmvdLngth + (replacement ? replacement.length : 0);\n return returnArr ? rmvd : rmvdObj\n }\n\n if (replacement) {\n replacement.unshift(offst, lgth)\n return Array.prototype.splice.apply(arr, replacement)\n }\n\n return arr.splice(offst, lgth)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_sum.js b/node_modules/locutus/php/array/array_sum.js
deleted file mode 100644
index 336688c..0000000
--- a/node_modules/locutus/php/array/array_sum.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_sum(array) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_sum/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Nate
- // bugfixed by: Gilbert
- // improved by: David Pilia (http://www.beteck.it/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_sum([4, 9, 182.6])
- // returns 1: 195.6
- // example 2: var $total = []
- // example 2: var $index = 0.1
- // example 2: for (var $y = 0; $y < 12; $y++){ $total[$y] = $y + $index }
- // example 2: array_sum($total)
- // returns 2: 67.2
-
- var key;
- var sum = 0;
-
- // input sanitation
- if ((typeof array === 'undefined' ? 'undefined' : _typeof(array)) !== 'object') {
- return null;
- }
-
- for (key in array) {
- if (!isNaN(parseFloat(array[key]))) {
- sum += parseFloat(array[key]);
- }
- }
-
- return sum;
-};
-//# sourceMappingURL=array_sum.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_sum.js.map b/node_modules/locutus/php/array/array_sum.js.map
deleted file mode 100644
index 218f22b..0000000
--- a/node_modules/locutus/php/array/array_sum.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_sum.js"],"names":["module","exports","array_sum","array","key","sum","isNaN","parseFloat"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,KAApB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,MAAM,CAAV;;AAEA;AACA,MAAI,QAAOF,KAAP,yCAAOA,KAAP,OAAiB,QAArB,EAA+B;AAC7B,WAAO,IAAP;AACD;;AAED,OAAKC,GAAL,IAAYD,KAAZ,EAAmB;AACjB,QAAI,CAACG,MAAMC,WAAWJ,MAAMC,GAAN,CAAX,CAAN,CAAL,EAAoC;AAClCC,aAAOE,WAAWJ,MAAMC,GAAN,CAAX,CAAP;AACD;AACF;;AAED,SAAOC,GAAP;AACD,CA9BD","file":"array_sum.js","sourcesContent":["module.exports = function array_sum (array) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_sum/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Nate\n // bugfixed by: Gilbert\n // improved by: David Pilia (http://www.beteck.it/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_sum([4, 9, 182.6])\n // returns 1: 195.6\n // example 2: var $total = []\n // example 2: var $index = 0.1\n // example 2: for (var $y = 0; $y < 12; $y++){ $total[$y] = $y + $index }\n // example 2: array_sum($total)\n // returns 2: 67.2\n\n var key\n var sum = 0\n\n // input sanitation\n if (typeof array !== 'object') {\n return null\n }\n\n for (key in array) {\n if (!isNaN(parseFloat(array[key]))) {\n sum += parseFloat(array[key])\n }\n }\n\n return sum\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_udiff.js b/node_modules/locutus/php/array/array_udiff.js
deleted file mode 100644
index 5d7da80..0000000
--- a/node_modules/locutus/php/array/array_udiff.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function array_udiff(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_udiff/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
- // example 1: array_udiff($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})
- // returns 1: {c: 'blue'}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var cb = arguments[arglm1];
- var arr = '';
- var i = 1;
- var k1 = '';
- var k = '';
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < arglm1; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (cb(arr[k], arr1[k1]) === 0) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_udiff.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_udiff.js.map b/node_modules/locutus/php/array/array_udiff.js.map
deleted file mode 100644
index 443c7fd..0000000
--- a/node_modules/locutus/php/array/array_udiff.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_udiff.js"],"names":["module","exports","array_udiff","arr1","retArr","arglm1","arguments","length","cb","arr","i","k1","k","$global","window","global","Object","prototype","toString","call","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,KAAKF,UAAUD,MAAV,CAAT;AACA,MAAII,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAY,YAAU,KAAKT,EAAL,IAAWR,IAAX,EAAiB;AAAE;AAC3B,SAAKO,IAAI,CAAT,EAAYA,IAAIL,MAAhB,EAAwBK,GAAxB,EAA6B;AAAE;AAC7BD,YAAMH,UAAUI,CAAV,CAAN;AACA,WAAKE,CAAL,IAAUH,GAAV,EAAe;AACb,YAAID,GAAGC,IAAIG,CAAJ,CAAH,EAAWT,KAAKQ,EAAL,CAAX,MAAyB,CAA7B,EAAgC;AAC9B;AACA,mBAASS,QAAT,CAF8B,CAEZ;AACnB;AACF;AACDhB,aAAOO,EAAP,IAAaR,KAAKQ,EAAL,CAAb;AACD;AACF;;AAED,SAAOP,MAAP;AACD,CAtCD","file":"array_udiff.js","sourcesContent":["module.exports = function array_udiff (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_udiff/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}\n // example 1: array_udiff($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})\n // returns 1: {c: 'blue'}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var cb = arguments[arglm1]\n var arr = ''\n var i = 1\n var k1 = ''\n var k = ''\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < arglm1; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (cb(arr[k], arr1[k1]) === 0) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_udiff_assoc.js b/node_modules/locutus/php/array/array_udiff_assoc.js
deleted file mode 100644
index 0506af7..0000000
--- a/node_modules/locutus/php/array/array_udiff_assoc.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = function array_udiff_assoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_udiff_assoc/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_udiff_assoc({0: 'kevin', 1: 'van', 2: 'Zonneveld'}, {0: 'Kevin', 4: 'van', 5: 'Zonneveld'}, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})
- // returns 1: {1: 'van', 2: 'Zonneveld'}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var cb = arguments[arglm1];
- var arr = {};
- var i = 1;
- var k1 = '';
- var k = '';
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < arglm1; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (cb(arr[k], arr1[k1]) === 0 && k === k1) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_udiff_assoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_udiff_assoc.js.map b/node_modules/locutus/php/array/array_udiff_assoc.js.map
deleted file mode 100644
index 80c488f..0000000
--- a/node_modules/locutus/php/array/array_udiff_assoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_udiff_assoc.js"],"names":["module","exports","array_udiff_assoc","arr1","retArr","arglm1","arguments","length","cb","arr","i","k1","k","$global","window","global","Object","prototype","toString","call","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,iBAAT,CAA4BC,IAA5B,EAAkC;AAAE;AACnD;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,KAAKF,UAAUD,MAAV,CAAT;AACA,MAAII,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,EAAT;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAY,YAAU,KAAKT,EAAL,IAAWR,IAAX,EAAiB;AAAE;AAC3B,SAAKO,IAAI,CAAT,EAAYA,IAAIL,MAAhB,EAAwBK,GAAxB,EAA6B;AAC3BD,YAAMH,UAAUI,CAAV,CAAN;AACA,WAAKE,CAAL,IAAUH,GAAV,EAAe;AACb,YAAID,GAAGC,IAAIG,CAAJ,CAAH,EAAWT,KAAKQ,EAAL,CAAX,MAAyB,CAAzB,IAA8BC,MAAMD,EAAxC,EAA4C;AAC1C;AACA,mBAASS,QAAT,CAF0C,CAExB;AACnB;AACF;AACDhB,aAAOO,EAAP,IAAaR,KAAKQ,EAAL,CAAb;AACD;AACF;;AAED,SAAOP,MAAP;AACD,CApCD","file":"array_udiff_assoc.js","sourcesContent":["module.exports = function array_udiff_assoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_udiff_assoc/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_udiff_assoc({0: 'kevin', 1: 'van', 2: 'Zonneveld'}, {0: 'Kevin', 4: 'van', 5: 'Zonneveld'}, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})\n // returns 1: {1: 'van', 2: 'Zonneveld'}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var cb = arguments[arglm1]\n var arr = {}\n var i = 1\n var k1 = ''\n var k = ''\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < arglm1; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (cb(arr[k], arr1[k1]) === 0 && k === k1) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_udiff_uassoc.js b/node_modules/locutus/php/array/array_udiff_uassoc.js
deleted file mode 100644
index 5706197..0000000
--- a/node_modules/locutus/php/array/array_udiff_uassoc.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-module.exports = function array_udiff_uassoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_udiff_uassoc/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
- // example 1: array_udiff_uassoc($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;}, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})
- // returns 1: {0: 'red', c: 'blue'}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var arglm2 = arglm1 - 1;
- var cb = arguments[arglm1];
- var cb0 = arguments[arglm2];
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- cb0 = typeof cb0 === 'string' ? $global[cb0] : Object.prototype.toString.call(cb0) === '[object Array]' ? $global[cb0[0]][cb0[1]] : cb0;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- for (i = 1; i < arglm2; i++) {
- arr = arguments[i];
- for (k in arr) {
- if (cb0(arr[k], arr1[k1]) === 0 && cb(k, k1) === 0) {
- // If it reaches here, it was found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
- retArr[k1] = arr1[k1];
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_udiff_uassoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_udiff_uassoc.js.map b/node_modules/locutus/php/array/array_udiff_uassoc.js.map
deleted file mode 100644
index 8cf93e4..0000000
--- a/node_modules/locutus/php/array/array_udiff_uassoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_udiff_uassoc.js"],"names":["module","exports","array_udiff_uassoc","arr1","retArr","arglm1","arguments","length","arglm2","cb","cb0","k1","i","k","arr","$global","window","global","Object","prototype","toString","call","arr1keys"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,kBAAT,CAA6BC,IAA7B,EAAmC;AAAE;AACpD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,SAASH,SAAS,CAAtB;AACA,MAAII,KAAKH,UAAUD,MAAV,CAAT;AACA,MAAIK,MAAMJ,UAAUE,MAAV,CAAV;AACA,MAAIG,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAR,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDM,QAAQN,EAAR,CADC,GAEAS,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BZ,EAA/B,MAAuC,gBAAxC,GACEM,QAAQN,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAC,QAAO,OAAOA,GAAP,KAAe,QAAhB,GACFK,QAAQL,GAAR,CADE,GAEDQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,GAA/B,MAAwC,gBAAzC,GACEK,QAAQL,IAAI,CAAJ,CAAR,EAAgBA,IAAI,CAAJ,CAAhB,CADF,GAEEA,GAJN;;AAMAY,YAAU,KAAKX,EAAL,IAAWR,IAAX,EAAiB;AAAE;AAC3B,SAAKS,IAAI,CAAT,EAAYA,IAAIJ,MAAhB,EAAwBI,GAAxB,EAA6B;AAC3BE,YAAMR,UAAUM,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAIJ,IAAII,IAAID,CAAJ,CAAJ,EAAYV,KAAKQ,EAAL,CAAZ,MAA0B,CAA1B,IAA+BF,GAAGI,CAAH,EAAMF,EAAN,MAAc,CAAjD,EAAoD;AAClD;AACA,mBAASW,QAAT,CAFkD,CAEhC;AACnB;AACF;AACDlB,aAAOO,EAAP,IAAaR,KAAKQ,EAAL,CAAb;AACD;AACF;;AAED,SAAOP,MAAP;AACD,CA9CD","file":"array_udiff_uassoc.js","sourcesContent":["module.exports = function array_udiff_uassoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_udiff_uassoc/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}\n // example 1: array_udiff_uassoc($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;}, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})\n // returns 1: {0: 'red', c: 'blue'}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var arglm2 = arglm1 - 1\n var cb = arguments[arglm1]\n var cb0 = arguments[arglm2]\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n cb0 = (typeof cb0 === 'string')\n ? $global[cb0]\n : (Object.prototype.toString.call(cb0) === '[object Array]')\n ? $global[cb0[0]][cb0[1]]\n : cb0\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n for (i = 1; i < arglm2; i++) {\n arr = arguments[i]\n for (k in arr) {\n if (cb0(arr[k], arr1[k1]) === 0 && cb(k, k1) === 0) {\n // If it reaches here, it was found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n retArr[k1] = arr1[k1]\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_uintersect.js b/node_modules/locutus/php/array/array_uintersect.js
deleted file mode 100644
index 6fc9b28..0000000
--- a/node_modules/locutus/php/array/array_uintersect.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = function array_uintersect(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_uintersect/
- // original by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Demosthenes Koptsis
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
- // example 1: array_uintersect($array1, $array2, function( f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})
- // returns 1: {a: 'green', b: 'brown', 0: 'red'}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var arglm2 = arglm1 - 1;
- var cb = arguments[arglm1];
- var k1 = '';
- var i = 1;
- var arr = {};
- var k = '';
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- arrs: for (i = 1; i < arglm1; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (cb(arr[k], arr1[k1]) === 0) {
- if (i === arglm2) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_uintersect.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_uintersect.js.map b/node_modules/locutus/php/array/array_uintersect.js.map
deleted file mode 100644
index 091615e..0000000
--- a/node_modules/locutus/php/array/array_uintersect.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_uintersect.js"],"names":["module","exports","array_uintersect","arr1","retArr","arglm1","arguments","length","arglm2","cb","k1","i","arr","k","$global","window","global","Object","prototype","toString","call","arr1keys","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,gBAAT,CAA2BC,IAA3B,EAAiC;AAAE;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,SAASH,SAAS,CAAtB;AACA,MAAII,KAAKH,UAAUD,MAAV,CAAT;AACA,MAAIK,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAP,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDK,QAAQL,EAAR,CADC,GAEAQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,EAA/B,MAAuC,gBAAxC,GACEK,QAAQL,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAY,YAAU,KAAKX,EAAL,IAAWP,IAAX,EAAiB;AAAE;AAC3BmB,UAAM,KAAKX,IAAI,CAAT,EAAYA,IAAIN,MAAhB,EAAwBM,GAAxB,EAA6B;AAAE;AACnCC,YAAMN,UAAUK,CAAV,CAAN;AACA,WAAKE,CAAL,IAAUD,GAAV,EAAe;AACb,YAAIH,GAAGG,IAAIC,CAAJ,CAAH,EAAWV,KAAKO,EAAL,CAAX,MAAyB,CAA7B,EAAgC;AAC9B,cAAIC,MAAMH,MAAV,EAAkB;AAChBJ,mBAAOM,EAAP,IAAaP,KAAKO,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASY,IAAT,CAN8B,CAMhB;AACf;AACF;AACD;AACA,eAASD,QAAT,CAbiC,CAaf;AACnB;AACF;;AAED,SAAOjB,MAAP;AACD,CA7CD","file":"array_uintersect.js","sourcesContent":["module.exports = function array_uintersect (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_uintersect/\n // original by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Demosthenes Koptsis\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}\n // example 1: array_uintersect($array1, $array2, function( f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})\n // returns 1: {a: 'green', b: 'brown', 0: 'red'}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var arglm2 = arglm1 - 1\n var cb = arguments[arglm1]\n var k1 = ''\n var i = 1\n var arr = {}\n var k = ''\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n arrs: for (i = 1; i < arglm1; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (cb(arr[k], arr1[k1]) === 0) {\n if (i === arglm2) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs // eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_uintersect_uassoc.js b/node_modules/locutus/php/array/array_uintersect_uassoc.js
deleted file mode 100644
index 63581a9..0000000
--- a/node_modules/locutus/php/array/array_uintersect_uassoc.js
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-module.exports = function array_uintersect_uassoc(arr1) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_uintersect_uassoc/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}
- // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}
- // example 1: array_uintersect_uassoc($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;}, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})
- // returns 1: {a: 'green', b: 'brown'}
-
- var retArr = {};
- var arglm1 = arguments.length - 1;
- var arglm2 = arglm1 - 1;
- var cb = arguments[arglm1];
- var cb0 = arguments[arglm2];
- var k1 = '';
- var i = 1;
- var k = '';
- var arr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- cb = typeof cb === 'string' ? $global[cb] : Object.prototype.toString.call(cb) === '[object Array]' ? $global[cb[0]][cb[1]] : cb;
-
- cb0 = typeof cb0 === 'string' ? $global[cb0] : Object.prototype.toString.call(cb0) === '[object Array]' ? $global[cb0[0]][cb0[1]] : cb0;
-
- arr1keys: for (k1 in arr1) {
- // eslint-disable-line no-labels
- arrs: for (i = 1; i < arglm2; i++) {
- // eslint-disable-line no-labels
- arr = arguments[i];
- for (k in arr) {
- if (cb0(arr[k], arr1[k1]) === 0 && cb(k, k1) === 0) {
- if (i === arguments.length - 3) {
- retArr[k1] = arr1[k1];
- }
- // If the innermost loop always leads at least once to an equal value,
- // continue the loop until done
- continue arrs; // eslint-disable-line no-labels
- }
- }
- // If it reaches here, it wasn't found in at least one array, so try next value
- continue arr1keys; // eslint-disable-line no-labels
- }
- }
-
- return retArr;
-};
-//# sourceMappingURL=array_uintersect_uassoc.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_uintersect_uassoc.js.map b/node_modules/locutus/php/array/array_uintersect_uassoc.js.map
deleted file mode 100644
index 7e6d068..0000000
--- a/node_modules/locutus/php/array/array_uintersect_uassoc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_uintersect_uassoc.js"],"names":["module","exports","array_uintersect_uassoc","arr1","retArr","arglm1","arguments","length","arglm2","cb","cb0","k1","i","k","arr","$global","window","global","Object","prototype","toString","call","arr1keys","arrs"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,uBAAT,CAAkCC,IAAlC,EAAwC;AAAE;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAASC,UAAUC,MAAV,GAAmB,CAAhC;AACA,MAAIC,SAASH,SAAS,CAAtB;AACA,MAAII,KAAKH,UAAUD,MAAV,CAAT;AACA,MAAIK,MAAMJ,UAAUE,MAAV,CAAV;AACA,MAAIG,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEAR,OAAM,OAAOA,EAAP,KAAc,QAAf,GACDM,QAAQN,EAAR,CADC,GAEAS,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BZ,EAA/B,MAAuC,gBAAxC,GACEM,QAAQN,GAAG,CAAH,CAAR,EAAeA,GAAG,CAAH,CAAf,CADF,GAEEA,EAJN;;AAMAC,QAAO,OAAOA,GAAP,KAAe,QAAhB,GACFK,QAAQL,GAAR,CADE,GAEDQ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,GAA/B,MAAwC,gBAAzC,GACEK,QAAQL,IAAI,CAAJ,CAAR,EAAgBA,IAAI,CAAJ,CAAhB,CADF,GAEEA,GAJN;;AAMAY,YAAU,KAAKX,EAAL,IAAWR,IAAX,EAAiB;AAAE;AAC3BoB,UAAM,KAAKX,IAAI,CAAT,EAAYA,IAAIJ,MAAhB,EAAwBI,GAAxB,EAA6B;AAAE;AACnCE,YAAMR,UAAUM,CAAV,CAAN;AACA,WAAKC,CAAL,IAAUC,GAAV,EAAe;AACb,YAAIJ,IAAII,IAAID,CAAJ,CAAJ,EAAYV,KAAKQ,EAAL,CAAZ,MAA0B,CAA1B,IAA+BF,GAAGI,CAAH,EAAMF,EAAN,MAAc,CAAjD,EAAoD;AAClD,cAAIC,MAAMN,UAAUC,MAAV,GAAmB,CAA7B,EAAgC;AAC9BH,mBAAOO,EAAP,IAAaR,KAAKQ,EAAL,CAAb;AACD;AACD;AACA;AACA,mBAASY,IAAT,CANkD,CAMpC;AACf;AACF;AACD;AACA,eAASD,QAAT,CAbiC,CAaf;AACnB;AACF;;AAED,SAAOlB,MAAP;AACD,CAnDD","file":"array_uintersect_uassoc.js","sourcesContent":["module.exports = function array_uintersect_uassoc (arr1) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_uintersect_uassoc/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $array1 = {a: 'green', b: 'brown', c: 'blue', 0: 'red'}\n // example 1: var $array2 = {a: 'GREEN', B: 'brown', 0: 'yellow', 1: 'red'}\n // example 1: array_uintersect_uassoc($array1, $array2, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;}, function (f_string1, f_string2){var string1 = (f_string1+'').toLowerCase(); var string2 = (f_string2+'').toLowerCase(); if (string1 > string2) return 1; if (string1 === string2) return 0; return -1;})\n // returns 1: {a: 'green', b: 'brown'}\n\n var retArr = {}\n var arglm1 = arguments.length - 1\n var arglm2 = arglm1 - 1\n var cb = arguments[arglm1]\n var cb0 = arguments[arglm2]\n var k1 = ''\n var i = 1\n var k = ''\n var arr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n cb = (typeof cb === 'string')\n ? $global[cb]\n : (Object.prototype.toString.call(cb) === '[object Array]')\n ? $global[cb[0]][cb[1]]\n : cb\n\n cb0 = (typeof cb0 === 'string')\n ? $global[cb0]\n : (Object.prototype.toString.call(cb0) === '[object Array]')\n ? $global[cb0[0]][cb0[1]]\n : cb0\n\n arr1keys: for (k1 in arr1) { // eslint-disable-line no-labels\n arrs: for (i = 1; i < arglm2; i++) { // eslint-disable-line no-labels\n arr = arguments[i]\n for (k in arr) {\n if (cb0(arr[k], arr1[k1]) === 0 && cb(k, k1) === 0) {\n if (i === arguments.length - 3) {\n retArr[k1] = arr1[k1]\n }\n // If the innermost loop always leads at least once to an equal value,\n // continue the loop until done\n continue arrs // eslint-disable-line no-labels\n }\n }\n // If it reaches here, it wasn't found in at least one array, so try next value\n continue arr1keys // eslint-disable-line no-labels\n }\n }\n\n return retArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_unique.js b/node_modules/locutus/php/array/array_unique.js
deleted file mode 100644
index 0e8faa1..0000000
--- a/node_modules/locutus/php/array/array_unique.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = function array_unique(inputArr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_unique/
- // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
- // input by: duncan
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Nate
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // improved by: Michael Grier
- // note 1: The second argument, sort_flags is not implemented;
- // note 1: also should be sorted (asort?) first according to docs
- // example 1: array_unique(['Kevin','Kevin','van','Zonneveld','Kevin'])
- // returns 1: {0: 'Kevin', 2: 'van', 3: 'Zonneveld'}
- // example 2: array_unique({'a': 'green', 0: 'red', 'b': 'green', 1: 'blue', 2: 'red'})
- // returns 2: {a: 'green', 0: 'red', 1: 'blue'}
-
- var key = '';
- var tmpArr2 = {};
- var val = '';
-
- var _arraySearch = function _arraySearch(needle, haystack) {
- var fkey = '';
- for (fkey in haystack) {
- if (haystack.hasOwnProperty(fkey)) {
- if (haystack[fkey] + '' === needle + '') {
- return fkey;
- }
- }
- }
- return false;
- };
-
- for (key in inputArr) {
- if (inputArr.hasOwnProperty(key)) {
- val = inputArr[key];
- if (_arraySearch(val, tmpArr2) === false) {
- tmpArr2[key] = val;
- }
- }
- }
-
- return tmpArr2;
-};
-//# sourceMappingURL=array_unique.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_unique.js.map b/node_modules/locutus/php/array/array_unique.js.map
deleted file mode 100644
index 818449f..0000000
--- a/node_modules/locutus/php/array/array_unique.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_unique.js"],"names":["module","exports","array_unique","inputArr","key","tmpArr2","val","_arraySearch","needle","haystack","fkey","hasOwnProperty"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,QAAvB,EAAiC;AAAE;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,UAAU,EAAd;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,eAAe,SAAfA,YAAe,CAAUC,MAAV,EAAkBC,QAAlB,EAA4B;AAC7C,QAAIC,OAAO,EAAX;AACA,SAAKA,IAAL,IAAaD,QAAb,EAAuB;AACrB,UAAIA,SAASE,cAAT,CAAwBD,IAAxB,CAAJ,EAAmC;AACjC,YAAKD,SAASC,IAAT,IAAiB,EAAlB,KAA2BF,SAAS,EAAxC,EAA6C;AAC3C,iBAAOE,IAAP;AACD;AACF;AACF;AACD,WAAO,KAAP;AACD,GAVD;;AAYA,OAAKN,GAAL,IAAYD,QAAZ,EAAsB;AACpB,QAAIA,SAASQ,cAAT,CAAwBP,GAAxB,CAAJ,EAAkC;AAChCE,YAAMH,SAASC,GAAT,CAAN;AACA,UAAIG,aAAaD,GAAb,EAAkBD,OAAlB,MAA+B,KAAnC,EAA0C;AACxCA,gBAAQD,GAAR,IAAeE,GAAf;AACD;AACF;AACF;;AAED,SAAOD,OAAP;AACD,CA3CD","file":"array_unique.js","sourcesContent":["module.exports = function array_unique (inputArr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_unique/\n // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)\n // input by: duncan\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Nate\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // improved by: Michael Grier\n // note 1: The second argument, sort_flags is not implemented;\n // note 1: also should be sorted (asort?) first according to docs\n // example 1: array_unique(['Kevin','Kevin','van','Zonneveld','Kevin'])\n // returns 1: {0: 'Kevin', 2: 'van', 3: 'Zonneveld'}\n // example 2: array_unique({'a': 'green', 0: 'red', 'b': 'green', 1: 'blue', 2: 'red'})\n // returns 2: {a: 'green', 0: 'red', 1: 'blue'}\n\n var key = ''\n var tmpArr2 = {}\n var val = ''\n\n var _arraySearch = function (needle, haystack) {\n var fkey = ''\n for (fkey in haystack) {\n if (haystack.hasOwnProperty(fkey)) {\n if ((haystack[fkey] + '') === (needle + '')) {\n return fkey\n }\n }\n }\n return false\n }\n\n for (key in inputArr) {\n if (inputArr.hasOwnProperty(key)) {\n val = inputArr[key]\n if (_arraySearch(val, tmpArr2) === false) {\n tmpArr2[key] = val\n }\n }\n }\n\n return tmpArr2\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_unshift.js b/node_modules/locutus/php/array/array_unshift.js
deleted file mode 100644
index 251bd7a..0000000
--- a/node_modules/locutus/php/array/array_unshift.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-module.exports = function array_unshift(array) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_unshift/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Martijn Wieringa
- // improved by: jmweb
- // note 1: Currently does not handle objects
- // example 1: array_unshift(['van', 'Zonneveld'], 'Kevin')
- // returns 1: 3
-
- var i = arguments.length;
-
- while (--i !== 0) {
- arguments[0].unshift(arguments[i]);
- }
-
- return arguments[0].length;
-};
-//# sourceMappingURL=array_unshift.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_unshift.js.map b/node_modules/locutus/php/array/array_unshift.js.map
deleted file mode 100644
index 40fce00..0000000
--- a/node_modules/locutus/php/array/array_unshift.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_unshift.js"],"names":["module","exports","array_unshift","array","i","arguments","length","unshift"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,KAAxB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAIC,UAAUC,MAAlB;;AAEA,SAAO,EAAEF,CAAF,KAAQ,CAAf,EAAkB;AAChBC,cAAU,CAAV,EAAaE,OAAb,CAAqBF,UAAUD,CAAV,CAArB;AACD;;AAED,SAAOC,UAAU,CAAV,EAAaC,MAApB;AACD,CAhBD","file":"array_unshift.js","sourcesContent":["module.exports = function array_unshift (array) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_unshift/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Martijn Wieringa\n // improved by: jmweb\n // note 1: Currently does not handle objects\n // example 1: array_unshift(['van', 'Zonneveld'], 'Kevin')\n // returns 1: 3\n\n var i = arguments.length\n\n while (--i !== 0) {\n arguments[0].unshift(arguments[i])\n }\n\n return arguments[0].length\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_values.js b/node_modules/locutus/php/array/array_values.js
deleted file mode 100644
index 119cd0d..0000000
--- a/node_modules/locutus/php/array/array_values.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = function array_values(input) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_values/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: array_values( {firstname: 'Kevin', surname: 'van Zonneveld'} )
- // returns 1: [ 'Kevin', 'van Zonneveld' ]
-
- var tmpArr = [];
- var key = '';
-
- for (key in input) {
- tmpArr[tmpArr.length] = input[key];
- }
-
- return tmpArr;
-};
-//# sourceMappingURL=array_values.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_values.js.map b/node_modules/locutus/php/array/array_values.js.map
deleted file mode 100644
index cd36e14..0000000
--- a/node_modules/locutus/php/array/array_values.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_values.js"],"names":["module","exports","array_values","input","tmpArr","key","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,KAAvB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,MAAM,EAAV;;AAEA,OAAKA,GAAL,IAAYF,KAAZ,EAAmB;AACjBC,WAAOA,OAAOE,MAAd,IAAwBH,MAAME,GAAN,CAAxB;AACD;;AAED,SAAOD,MAAP;AACD,CAfD","file":"array_values.js","sourcesContent":["module.exports = function array_values (input) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_values/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: array_values( {firstname: 'Kevin', surname: 'van Zonneveld'} )\n // returns 1: [ 'Kevin', 'van Zonneveld' ]\n\n var tmpArr = []\n var key = ''\n\n for (key in input) {\n tmpArr[tmpArr.length] = input[key]\n }\n\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_walk.js b/node_modules/locutus/php/array/array_walk.js
deleted file mode 100644
index f193479..0000000
--- a/node_modules/locutus/php/array/array_walk.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_walk(array, funcname, userdata) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/array_walk/
- // original by: Johnny Mast (http://www.phpvrouwen.nl)
- // bugfixed by: David
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Only works with user-defined functions, not built-in functions like void()
- // example 1: array_walk ([3, 4], function () {}, 'userdata')
- // returns 1: true
- // example 2: array_walk ('mystring', function () {})
- // returns 2: false
- // example 3: array_walk ({"title":"my title"}, function () {})
- // returns 3: true
-
- if (!array || (typeof array === 'undefined' ? 'undefined' : _typeof(array)) !== 'object') {
- return false;
- }
-
- try {
- if (typeof funcname === 'function') {
- for (var key in array) {
- if (arguments.length > 2) {
- funcname(array[key], key, userdata);
- } else {
- funcname(array[key], key);
- }
- }
- } else {
- return false;
- }
- } catch (e) {
- return false;
- }
-
- return true;
-};
-//# sourceMappingURL=array_walk.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_walk.js.map b/node_modules/locutus/php/array/array_walk.js.map
deleted file mode 100644
index a69b1a7..0000000
--- a/node_modules/locutus/php/array/array_walk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_walk.js"],"names":["module","exports","array_walk","array","funcname","userdata","key","arguments","length","e"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,QAA5B,EAAsCC,QAAtC,EAAgD;AAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI,CAACF,KAAD,IAAU,QAAOA,KAAP,yCAAOA,KAAP,OAAiB,QAA/B,EAAyC;AACvC,WAAO,KAAP;AACD;;AAED,MAAI;AACF,QAAI,OAAOC,QAAP,KAAoB,UAAxB,EAAoC;AAClC,WAAK,IAAIE,GAAT,IAAgBH,KAAhB,EAAuB;AACrB,YAAII,UAAUC,MAAV,GAAmB,CAAvB,EAA0B;AACxBJ,mBAASD,MAAMG,GAAN,CAAT,EAAqBA,GAArB,EAA0BD,QAA1B;AACD,SAFD,MAEO;AACLD,mBAASD,MAAMG,GAAN,CAAT,EAAqBA,GAArB;AACD;AACF;AACF,KARD,MAQO;AACL,aAAO,KAAP;AACD;AACF,GAZD,CAYE,OAAOG,CAAP,EAAU;AACV,WAAO,KAAP;AACD;;AAED,SAAO,IAAP;AACD,CAlCD","file":"array_walk.js","sourcesContent":["module.exports = function array_walk (array, funcname, userdata) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/array_walk/\n // original by: Johnny Mast (http://www.phpvrouwen.nl)\n // bugfixed by: David\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Only works with user-defined functions, not built-in functions like void()\n // example 1: array_walk ([3, 4], function () {}, 'userdata')\n // returns 1: true\n // example 2: array_walk ('mystring', function () {})\n // returns 2: false\n // example 3: array_walk ({\"title\":\"my title\"}, function () {})\n // returns 3: true\n\n if (!array || typeof array !== 'object') {\n return false\n }\n\n try {\n if (typeof funcname === 'function') {\n for (var key in array) {\n if (arguments.length > 2) {\n funcname(array[key], key, userdata)\n } else {\n funcname(array[key], key)\n }\n }\n } else {\n return false\n }\n } catch (e) {\n return false\n }\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_walk_recursive.js b/node_modules/locutus/php/array/array_walk_recursive.js
deleted file mode 100644
index c4d3090..0000000
--- a/node_modules/locutus/php/array/array_walk_recursive.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function array_walk_recursive(array, funcname, userdata) {
- // eslint-disable-line camelcase
- // original by: Hugues Peccatte
- // note 1: Only works with user-defined functions, not built-in functions like void()
- // example 1: array_walk_recursive([3, 4], function () {}, 'userdata')
- // returns 1: true
- // example 2: array_walk_recursive([3, [4]], function () {}, 'userdata')
- // returns 2: true
- // example 3: array_walk_recursive([3, []], function () {}, 'userdata')
- // returns 3: true
-
- if (!array || (typeof array === 'undefined' ? 'undefined' : _typeof(array)) !== 'object') {
- return false;
- }
-
- if (typeof funcname !== 'function') {
- return false;
- }
-
- for (var key in array) {
- // apply "funcname" recursively only on arrays
- if (Object.prototype.toString.call(array[key]) === '[object Array]') {
- var funcArgs = [array[key], funcname];
- if (arguments.length > 2) {
- funcArgs.push(userdata);
- }
- if (array_walk_recursive.apply(null, funcArgs) === false) {
- return false;
- }
- continue;
- }
- try {
- if (arguments.length > 2) {
- funcname(array[key], key, userdata);
- } else {
- funcname(array[key], key);
- }
- } catch (e) {
- return false;
- }
- }
-
- return true;
-};
-//# sourceMappingURL=array_walk_recursive.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/array_walk_recursive.js.map b/node_modules/locutus/php/array/array_walk_recursive.js.map
deleted file mode 100644
index 8c46fe1..0000000
--- a/node_modules/locutus/php/array/array_walk_recursive.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/array_walk_recursive.js"],"names":["module","exports","array_walk_recursive","array","funcname","userdata","key","Object","prototype","toString","call","funcArgs","arguments","length","push","apply","e"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,oBAAT,CAA+BC,KAA/B,EAAsCC,QAAtC,EAAgDC,QAAhD,EAA0D;AAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI,CAACF,KAAD,IAAU,QAAOA,KAAP,yCAAOA,KAAP,OAAiB,QAA/B,EAAyC;AACvC,WAAO,KAAP;AACD;;AAED,MAAI,OAAOC,QAAP,KAAoB,UAAxB,EAAoC;AAClC,WAAO,KAAP;AACD;;AAED,OAAK,IAAIE,GAAT,IAAgBH,KAAhB,EAAuB;AACrB;AACA,QAAII,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BP,MAAMG,GAAN,CAA/B,MAA+C,gBAAnD,EAAqE;AACnE,UAAIK,WAAW,CAACR,MAAMG,GAAN,CAAD,EAAaF,QAAb,CAAf;AACA,UAAIQ,UAAUC,MAAV,GAAmB,CAAvB,EAA0B;AACxBF,iBAASG,IAAT,CAAcT,QAAd;AACD;AACD,UAAIH,qBAAqBa,KAArB,CAA2B,IAA3B,EAAiCJ,QAAjC,MAA+C,KAAnD,EAA0D;AACxD,eAAO,KAAP;AACD;AACD;AACD;AACD,QAAI;AACF,UAAIC,UAAUC,MAAV,GAAmB,CAAvB,EAA0B;AACxBT,iBAASD,MAAMG,GAAN,CAAT,EAAqBA,GAArB,EAA0BD,QAA1B;AACD,OAFD,MAEO;AACLD,iBAASD,MAAMG,GAAN,CAAT,EAAqBA,GAArB;AACD;AACF,KAND,CAME,OAAOU,CAAP,EAAU;AACV,aAAO,KAAP;AACD;AACF;;AAED,SAAO,IAAP;AACD,CA1CD","file":"array_walk_recursive.js","sourcesContent":["module.exports = function array_walk_recursive (array, funcname, userdata) { // eslint-disable-line camelcase\n // original by: Hugues Peccatte\n // note 1: Only works with user-defined functions, not built-in functions like void()\n // example 1: array_walk_recursive([3, 4], function () {}, 'userdata')\n // returns 1: true\n // example 2: array_walk_recursive([3, [4]], function () {}, 'userdata')\n // returns 2: true\n // example 3: array_walk_recursive([3, []], function () {}, 'userdata')\n // returns 3: true\n\n if (!array || typeof array !== 'object') {\n return false\n }\n\n if (typeof funcname !== 'function') {\n return false\n }\n\n for (var key in array) {\n // apply \"funcname\" recursively only on arrays\n if (Object.prototype.toString.call(array[key]) === '[object Array]') {\n var funcArgs = [array[key], funcname]\n if (arguments.length > 2) {\n funcArgs.push(userdata)\n }\n if (array_walk_recursive.apply(null, funcArgs) === false) {\n return false\n }\n continue\n }\n try {\n if (arguments.length > 2) {\n funcname(array[key], key, userdata)\n } else {\n funcname(array[key], key)\n }\n } catch (e) {\n return false\n }\n }\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/arsort.js b/node_modules/locutus/php/array/arsort.js
deleted file mode 100644
index 66ab91e..0000000
--- a/node_modules/locutus/php/array/arsort.js
+++ /dev/null
@@ -1,121 +0,0 @@
-'use strict';
-
-module.exports = function arsort(inputArr, sortFlags) {
- // discuss at: http://locutus.io/php/arsort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // note 1: SORT_STRING (as well as natsort and natcasesort) might also be
- // note 1: integrated into all of these functions by adapting the code at
- // note 1: http://sourcefrog.net/projects/natsort/natcompare.js
- // note 1: The examples are correct, this is a new way
- // note 1: Credits to: http://javascript.internet.com/math-related/bubble-sort.html
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: Since JS objects' keys are always strings, and (the
- // note 1: default) SORT_REGULAR flag distinguishes by key type,
- // note 1: if the content is a numeric string, we treat the
- // note 1: "original type" as numeric.
- // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 1: arsort($data)
- // example 1: var $result = $data
- // returns 1: {a: 'orange', d: 'lemon', b: 'banana', c: 'apple'}
- // example 2: ini_set('locutus.sortByReference', true)
- // example 2: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 2: arsort($data)
- // example 2: var $result = $data
- // returns 2: {a: 'orange', d: 'lemon', b: 'banana', c: 'apple'}
- // test: skip-1
-
- var i18lgd = require('../i18n/i18n_loc_get_default');
- var strnatcmp = require('../strings/strnatcmp');
- var valArr = [];
- var valArrLen = 0;
- var k;
- var i;
- var sorter;
- var sortByReference = false;
- var populateArr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- switch (sortFlags) {
- case 'SORT_STRING':
- // compare items as strings
- sorter = function sorter(a, b) {
- return strnatcmp(b, a);
- };
- break;
- case 'SORT_LOCALE_STRING':
- // compare items as strings, based on the current locale
- // (set with i18n_loc_set_default() as of PHP6)
- var loc = i18lgd();
- sorter = $locutus.php.locales[loc].sorting;
- break;
- case 'SORT_NUMERIC':
- // compare items numerically
- sorter = function sorter(a, b) {
- return a - b;
- };
- break;
- case 'SORT_REGULAR':
- // compare items normally (don't change types)
- break;
- default:
- sorter = function sorter(b, a) {
- var aFloat = parseFloat(a);
- var bFloat = parseFloat(b);
- var aNumeric = aFloat + '' === a;
- var bNumeric = bFloat + '' === b;
-
- if (aNumeric && bNumeric) {
- return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0;
- } else if (aNumeric && !bNumeric) {
- return 1;
- } else if (!aNumeric && bNumeric) {
- return -1;
- }
-
- return a > b ? 1 : a < b ? -1 : 0;
- };
- break;
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
-
- // Get key and value arrays
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- valArr.push([k, inputArr[k]]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
- valArr.sort(function (a, b) {
- return sorter(a[1], b[1]);
- });
-
- // Repopulate the old array
- for (i = 0, valArrLen = valArr.length; i < valArrLen; i++) {
- populateArr[valArr[i][0]] = valArr[i][1];
- if (sortByReference) {
- inputArr[valArr[i][0]] = valArr[i][1];
- }
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=arsort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/arsort.js.map b/node_modules/locutus/php/array/arsort.js.map
deleted file mode 100644
index 5b73d11..0000000
--- a/node_modules/locutus/php/array/arsort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/arsort.js"],"names":["module","exports","arsort","inputArr","sortFlags","i18lgd","require","strnatcmp","valArr","valArrLen","k","i","sorter","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","iniVal","undefined","hasOwnProperty","push","sort","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,SAA3B,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAASC,QAAQ,8BAAR,CAAb;AACA,MAAIC,YAAYD,QAAQ,sBAAR,CAAhB;AACA,MAAIE,SAAS,EAAb;AACA,MAAIC,YAAY,CAAhB;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,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GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFyB,SAA1F,KAAwG,IAArH;AACAlB,oBAAkBiB,WAAW,IAA7B;;AAEA;AACA,OAAKpB,CAAL,IAAUP,QAAV,EAAoB;AAClB,QAAIA,SAAS6B,cAAT,CAAwBtB,CAAxB,CAAJ,EAAgC;AAC9BF,aAAOyB,IAAP,CAAY,CAACvB,CAAD,EAAIP,SAASO,CAAT,CAAJ,CAAZ;AACA,UAAIG,eAAJ,EAAqB;AACnB,eAAOV,SAASO,CAAT,CAAP;AACD;AACF;AACF;AACDF,SAAO0B,IAAP,CAAY,UAAUb,CAAV,EAAaC,CAAb,EAAgB;AAC1B,WAAOV,OAAOS,EAAE,CAAF,CAAP,EAAaC,EAAE,CAAF,CAAb,CAAP;AACD,GAFD;;AAIA;AACA,OAAKX,IAAI,CAAJ,EAAOF,YAAYD,OAAO2B,MAA/B,EAAuCxB,IAAIF,SAA3C,EAAsDE,GAAtD,EAA2D;AACzDG,gBAAYN,OAAOG,CAAP,EAAU,CAAV,CAAZ,IAA4BH,OAAOG,CAAP,EAAU,CAAV,CAA5B;AACA,QAAIE,eAAJ,EAAqB;AACnBV,eAASK,OAAOG,CAAP,EAAU,CAAV,CAAT,IAAyBH,OAAOG,CAAP,EAAU,CAAV,CAAzB;AACD;AACF;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CArHD","file":"arsort.js","sourcesContent":["module.exports = function arsort (inputArr, sortFlags) {\n // discuss at: http://locutus.io/php/arsort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // note 1: SORT_STRING (as well as natsort and natcasesort) might also be\n // note 1: integrated into all of these functions by adapting the code at\n // note 1: http://sourcefrog.net/projects/natsort/natcompare.js\n // note 1: The examples are correct, this is a new way\n // note 1: Credits to: http://javascript.internet.com/math-related/bubble-sort.html\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: Since JS objects' keys are always strings, and (the\n // note 1: default) SORT_REGULAR flag distinguishes by key type,\n // note 1: if the content is a numeric string, we treat the\n // note 1: \"original type\" as numeric.\n // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 1: arsort($data)\n // example 1: var $result = $data\n // returns 1: {a: 'orange', d: 'lemon', b: 'banana', c: 'apple'}\n // example 2: ini_set('locutus.sortByReference', true)\n // example 2: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 2: arsort($data)\n // example 2: var $result = $data\n // returns 2: {a: 'orange', d: 'lemon', b: 'banana', c: 'apple'}\n // test: skip-1\n\n var i18lgd = require('../i18n/i18n_loc_get_default')\n var strnatcmp = require('../strings/strnatcmp')\n var valArr = []\n var valArrLen = 0\n var k\n var i\n var sorter\n var sortByReference = false\n var populateArr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n switch (sortFlags) {\n case 'SORT_STRING':\n // compare items as strings\n sorter = function (a, b) {\n return strnatcmp(b, a)\n }\n break\n case 'SORT_LOCALE_STRING':\n // compare items as strings, based on the current locale\n // (set with i18n_loc_set_default() as of PHP6)\n var loc = i18lgd()\n sorter = $locutus.php.locales[loc].sorting\n break\n case 'SORT_NUMERIC':\n // compare items numerically\n sorter = function (a, b) {\n return (a - b)\n }\n break\n case 'SORT_REGULAR':\n // compare items normally (don't change types)\n break\n default:\n sorter = function (b, a) {\n var aFloat = parseFloat(a)\n var bFloat = parseFloat(b)\n var aNumeric = aFloat + '' === a\n var bNumeric = bFloat + '' === b\n\n if (aNumeric && bNumeric) {\n return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n } else if (aNumeric && !bNumeric) {\n return 1\n } else if (!aNumeric && bNumeric) {\n return -1\n }\n\n return a > b ? 1 : a < b ? -1 : 0\n }\n break\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n\n // Get key and value arrays\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n valArr.push([k, inputArr[k]])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n valArr.sort(function (a, b) {\n return sorter(a[1], b[1])\n })\n\n // Repopulate the old array\n for (i = 0, valArrLen = valArr.length; i < valArrLen; i++) {\n populateArr[valArr[i][0]] = valArr[i][1]\n if (sortByReference) {\n inputArr[valArr[i][0]] = valArr[i][1]\n }\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/asort.js b/node_modules/locutus/php/array/asort.js
deleted file mode 100644
index bc2cfad..0000000
--- a/node_modules/locutus/php/array/asort.js
+++ /dev/null
@@ -1,121 +0,0 @@
-'use strict';
-
-module.exports = function asort(inputArr, sortFlags) {
- // discuss at: http://locutus.io/php/asort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // input by: paulo kuong
- // bugfixed by: Adam Wallner (http://web2.bitbaro.hu/)
- // note 1: SORT_STRING (as well as natsort and natcasesort) might also be
- // note 1: integrated into all of these functions by adapting the code at
- // note 1: http://sourcefrog.net/projects/natsort/natcompare.js
- // note 1: The examples are correct, this is a new way
- // note 1: Credits to: http://javascript.internet.com/math-related/bubble-sort.html
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: Since JS objects' keys are always strings, and (the
- // note 1: default) SORT_REGULAR flag distinguishes by key type,
- // note 1: if the content is a numeric string, we treat the
- // note 1: "original type" as numeric.
- // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 1: asort($data)
- // example 1: var $result = $data
- // returns 1: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}
- // example 2: ini_set('locutus.sortByReference', true)
- // example 2: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 2: asort($data)
- // example 2: var $result = $data
- // returns 2: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}
-
- var strnatcmp = require('../strings/strnatcmp');
- var i18nlgd = require('../i18n/i18n_loc_get_default');
-
- var valArr = [];
- var valArrLen = 0;
- var k;
- var i;
- var sorter;
- var sortByReference = false;
- var populateArr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- switch (sortFlags) {
- case 'SORT_STRING':
- // compare items as strings
- sorter = function sorter(a, b) {
- return strnatcmp(a, b);
- };
- break;
- case 'SORT_LOCALE_STRING':
- // compare items as strings, based on the current locale
- // (set with i18n_loc_set_default() as of PHP6)
- var loc = i18nlgd();
- sorter = $locutus.php.locales[loc].sorting;
- break;
- case 'SORT_NUMERIC':
- // compare items numerically
- sorter = function sorter(a, b) {
- return a - b;
- };
- break;
- case 'SORT_REGULAR':
- // compare items normally (don't change types)
- break;
- default:
- sorter = function sorter(a, b) {
- var aFloat = parseFloat(a);
- var bFloat = parseFloat(b);
- var aNumeric = aFloat + '' === a;
- var bNumeric = bFloat + '' === b;
- if (aNumeric && bNumeric) {
- return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0;
- } else if (aNumeric && !bNumeric) {
- return 1;
- } else if (!aNumeric && bNumeric) {
- return -1;
- }
- return a > b ? 1 : a < b ? -1 : 0;
- };
- break;
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- // Get key and value arrays
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- valArr.push([k, inputArr[k]]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
-
- valArr.sort(function (a, b) {
- return sorter(a[1], b[1]);
- });
-
- // Repopulate the old array
- for (i = 0, valArrLen = valArr.length; i < valArrLen; i++) {
- populateArr[valArr[i][0]] = valArr[i][1];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=asort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/asort.js.map b/node_modules/locutus/php/array/asort.js.map
deleted file mode 100644
index a24b7f5..0000000
--- a/node_modules/locutus/php/array/asort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/asort.js"],"names":["module","exports","asort","inputArr","sortFlags","strnatcmp","require","i18nlgd","valArr","valArrLen","k","i","sorter","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","iniVal","undefined","hasOwnProperty","push","sort","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,SAA1B,EAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAOG,CAAP,EAAU,CAAV,CAA5B;AACD;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CArHD","file":"asort.js","sourcesContent":["module.exports = function asort (inputArr, sortFlags) {\n // discuss at: http://locutus.io/php/asort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // input by: paulo kuong\n // bugfixed by: Adam Wallner (http://web2.bitbaro.hu/)\n // note 1: SORT_STRING (as well as natsort and natcasesort) might also be\n // note 1: integrated into all of these functions by adapting the code at\n // note 1: http://sourcefrog.net/projects/natsort/natcompare.js\n // note 1: The examples are correct, this is a new way\n // note 1: Credits to: http://javascript.internet.com/math-related/bubble-sort.html\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: Since JS objects' keys are always strings, and (the\n // note 1: default) SORT_REGULAR flag distinguishes by key type,\n // note 1: if the content is a numeric string, we treat the\n // note 1: \"original type\" as numeric.\n // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 1: asort($data)\n // example 1: var $result = $data\n // returns 1: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}\n // example 2: ini_set('locutus.sortByReference', true)\n // example 2: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 2: asort($data)\n // example 2: var $result = $data\n // returns 2: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}\n\n var strnatcmp = require('../strings/strnatcmp')\n var i18nlgd = require('../i18n/i18n_loc_get_default')\n\n var valArr = []\n var valArrLen = 0\n var k\n var i\n var sorter\n var sortByReference = false\n var populateArr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n switch (sortFlags) {\n case 'SORT_STRING':\n // compare items as strings\n sorter = function (a, b) {\n return strnatcmp(a, b)\n }\n break\n case 'SORT_LOCALE_STRING':\n // compare items as strings, based on the current locale\n // (set with i18n_loc_set_default() as of PHP6)\n var loc = i18nlgd()\n sorter = $locutus.php.locales[loc].sorting\n break\n case 'SORT_NUMERIC':\n // compare items numerically\n sorter = function (a, b) {\n return (a - b)\n }\n break\n case 'SORT_REGULAR':\n // compare items normally (don't change types)\n break\n default:\n sorter = function (a, b) {\n var aFloat = parseFloat(a)\n var bFloat = parseFloat(b)\n var aNumeric = aFloat + '' === a\n var bNumeric = bFloat + '' === b\n if (aNumeric && bNumeric) {\n return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n } else if (aNumeric && !bNumeric) {\n return 1\n } else if (!aNumeric && bNumeric) {\n return -1\n }\n return a > b ? 1 : a < b ? -1 : 0\n }\n break\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n // Get key and value arrays\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n valArr.push([k, inputArr[k]])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n\n valArr.sort(function (a, b) {\n return sorter(a[1], b[1])\n })\n\n // Repopulate the old array\n for (i = 0, valArrLen = valArr.length; i < valArrLen; i++) {\n populateArr[valArr[i][0]] = valArr[i][1]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/count.js b/node_modules/locutus/php/array/count.js
deleted file mode 100644
index 379699b..0000000
--- a/node_modules/locutus/php/array/count.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-module.exports = function count(mixedVar, mode) {
- // discuss at: http://locutus.io/php/count/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: Waldo Malqui Silva (http://waldo.malqui.info)
- // input by: merabi
- // bugfixed by: Soren Hansen
- // bugfixed by: Olivier Louvignes (http://mg-crea.com/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: count([[0,0],[0,-4]], 'COUNT_RECURSIVE')
- // returns 1: 6
- // example 2: count({'one' : [1,2,3,4,5]}, 'COUNT_RECURSIVE')
- // returns 2: 6
-
- var key;
- var cnt = 0;
-
- if (mixedVar === null || typeof mixedVar === 'undefined') {
- return 0;
- } else if (mixedVar.constructor !== Array && mixedVar.constructor !== Object) {
- return 1;
- }
-
- if (mode === 'COUNT_RECURSIVE') {
- mode = 1;
- }
- if (mode !== 1) {
- mode = 0;
- }
-
- for (key in mixedVar) {
- if (mixedVar.hasOwnProperty(key)) {
- cnt++;
- if (mode === 1 && mixedVar[key] && (mixedVar[key].constructor === Array || mixedVar[key].constructor === Object)) {
- cnt += count(mixedVar[key], 1);
- }
- }
- }
-
- return cnt;
-};
-//# sourceMappingURL=count.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/count.js.map b/node_modules/locutus/php/array/count.js.map
deleted file mode 100644
index 7ca0deb..0000000
--- a/node_modules/locutus/php/array/count.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/count.js"],"names":["module","exports","count","mixedVar","mode","key","cnt","constructor","Array","Object","hasOwnProperty"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,IAA1B,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,MAAM,CAAV;;AAEA,MAAIH,aAAa,IAAb,IAAqB,OAAOA,QAAP,KAAoB,WAA7C,EAA0D;AACxD,WAAO,CAAP;AACD,GAFD,MAEO,IAAIA,SAASI,WAAT,KAAyBC,KAAzB,IAAkCL,SAASI,WAAT,KAAyBE,MAA/D,EAAuE;AAC5E,WAAO,CAAP;AACD;;AAED,MAAIL,SAAS,iBAAb,EAAgC;AAC9BA,WAAO,CAAP;AACD;AACD,MAAIA,SAAS,CAAb,EAAgB;AACdA,WAAO,CAAP;AACD;;AAED,OAAKC,GAAL,IAAYF,QAAZ,EAAsB;AACpB,QAAIA,SAASO,cAAT,CAAwBL,GAAxB,CAAJ,EAAkC;AAChCC;AACA,UAAIF,SAAS,CAAT,IAAcD,SAASE,GAAT,CAAd,KACDF,SAASE,GAAT,EAAcE,WAAd,KAA8BC,KAA9B,IACCL,SAASE,GAAT,EAAcE,WAAd,KAA8BE,MAF9B,CAAJ,EAE2C;AACzCH,eAAOJ,MAAMC,SAASE,GAAT,CAAN,EAAqB,CAArB,CAAP;AACD;AACF;AACF;;AAED,SAAOC,GAAP;AACD,CAzCD","file":"count.js","sourcesContent":["module.exports = function count (mixedVar, mode) {\n // discuss at: http://locutus.io/php/count/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: Waldo Malqui Silva (http://waldo.malqui.info)\n // input by: merabi\n // bugfixed by: Soren Hansen\n // bugfixed by: Olivier Louvignes (http://mg-crea.com/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: count([[0,0],[0,-4]], 'COUNT_RECURSIVE')\n // returns 1: 6\n // example 2: count({'one' : [1,2,3,4,5]}, 'COUNT_RECURSIVE')\n // returns 2: 6\n\n var key\n var cnt = 0\n\n if (mixedVar === null || typeof mixedVar === 'undefined') {\n return 0\n } else if (mixedVar.constructor !== Array && mixedVar.constructor !== Object) {\n return 1\n }\n\n if (mode === 'COUNT_RECURSIVE') {\n mode = 1\n }\n if (mode !== 1) {\n mode = 0\n }\n\n for (key in mixedVar) {\n if (mixedVar.hasOwnProperty(key)) {\n cnt++\n if (mode === 1 && mixedVar[key] &&\n (mixedVar[key].constructor === Array ||\n mixedVar[key].constructor === Object)) {\n cnt += count(mixedVar[key], 1)\n }\n }\n }\n\n return cnt\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/current.js b/node_modules/locutus/php/array/current.js
deleted file mode 100644
index 3cfc05c..0000000
--- a/node_modules/locutus/php/array/current.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-
-module.exports = function current(arr) {
- // discuss at: http://locutus.io/php/current/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: var $transport = ['foot', 'bike', 'car', 'plane']
- // example 1: current($transport)
- // returns 1: 'foot'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- }
- var arrpos = pointers.indexOf(arr);
- var cursor = pointers[arrpos + 1];
- if (Object.prototype.toString.call(arr) === '[object Array]') {
- return arr[cursor] || false;
- }
- var ct = 0;
- for (var k in arr) {
- if (ct === cursor) {
- return arr[k];
- }
- ct++;
- }
- // Empty
- return false;
-};
-//# sourceMappingURL=current.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/current.js.map b/node_modules/locutus/php/array/current.js.map
deleted file mode 100644
index 37ed9b0..0000000
--- a/node_modules/locutus/php/array/current.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/current.js"],"names":["module","exports","current","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","push","arrpos","cursor","Object","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AmB;AACjB,QAAIkB,OAAOL,MAAX,EAAmB;AACjB,aAAOb,IAAImB,CAAJ,CAAP;AACD;AACDD;AACD;AACD;AACA,SAAO,KAAP;AACD,CA3CD","file":"current.js","sourcesContent":["module.exports = function current (arr) {\n // discuss at: http://locutus.io/php/current/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: var $transport = ['foot', 'bike', 'car', 'plane']\n // example 1: current($transport)\n // returns 1: 'foot'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n }\n var arrpos = pointers.indexOf(arr)\n var cursor = pointers[arrpos + 1]\n if (Object.prototype.toString.call(arr) === '[object Array]') {\n return arr[cursor] || false\n }\n var ct = 0\n for (var k in arr) {\n if (ct === cursor) {\n return arr[k]\n }\n ct++\n }\n // Empty\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/each.js b/node_modules/locutus/php/array/each.js
deleted file mode 100644
index 162ed28..0000000
--- a/node_modules/locutus/php/array/each.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-module.exports = function each(arr) {
- // discuss at: http://locutus.io/php/each/
- // original by: Ates Goral (http://magnetiq.com)
- // revised by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: each({a: "apple", b: "balloon"})
- // returns 1: {0: "a", 1: "apple", key: "a", value: "apple"}
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
-
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- }
- var arrpos = pointers.indexOf(arr);
- var cursor = pointers[arrpos + 1];
- var pos = 0;
-
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- var ct = 0;
- for (var k in arr) {
- if (ct === cursor) {
- pointers[arrpos + 1] += 1;
- if (each.returnArrayOnly) {
- return [k, arr[k]];
- } else {
- return {
- 1: arr[k],
- value: arr[k],
- 0: k,
- key: k
- };
- }
- }
- ct++;
- }
- // Empty
- return false;
- }
- if (arr.length === 0 || cursor === arr.length) {
- return false;
- }
- pos = cursor;
- pointers[arrpos + 1] += 1;
- if (each.returnArrayOnly) {
- return [pos, arr[pos]];
- } else {
- return {
- 1: arr[pos],
- value: arr[pos],
- 0: pos,
- key: pos
- };
- }
-};
-//# sourceMappingURL=each.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/each.js.map b/node_modules/locutus/php/array/each.js.map
deleted file mode 100644
index dca7d1a..0000000
--- a/node_modules/locutus/php/array/each.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/each.js"],"names":["module","exports","each","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","push","arrpos","cursor","pos","Object","prototype","toString","call","ct","k","returnArrayOnly","key"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAA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,eAAGA,CAHE;AAILE,iBAAKF;AAJA,WAAP;AAMD;AACF;AACDD;AACD;AACD;AACA,WAAO,KAAP;AACD;AACD,MAAInB,IAAIU,MAAJ,KAAe,CAAf,IAAoBG,WAAWb,IAAIU,MAAvC,EAA+C;AAC7C,WAAO,KAAP;AACD;AACDI,QAAMD,MAAN;AACAP,WAASM,SAAS,CAAlB,KAAwB,CAAxB;AACA,MAAIb,KAAKsB,eAAT,EAA0B;AACxB,WAAO,CAACP,GAAD,EAAMd,IAAIc,GAAJ,CAAN,CAAP;AACD,GAFD,MAEO;AACL,WAAO;AACL,SAAGd,IAAIc,GAAJ,CADE;AAELN,aAAOR,IAAIc,GAAJ,CAFF;AAGL,SAAGA,GAHE;AAILQ,WAAKR;AAJA,KAAP;AAMD;AACF,CAtED","file":"each.js","sourcesContent":["module.exports = function each (arr) {\n // discuss at: http://locutus.io/php/each/\n // original by: Ates Goral (http://magnetiq.com)\n // revised by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: each({a: \"apple\", b: \"balloon\"})\n // returns 1: {0: \"a\", 1: \"apple\", key: \"a\", value: \"apple\"}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n }\n var arrpos = pointers.indexOf(arr)\n var cursor = pointers[arrpos + 1]\n var pos = 0\n\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n var ct = 0\n for (var k in arr) {\n if (ct === cursor) {\n pointers[arrpos + 1] += 1\n if (each.returnArrayOnly) {\n return [k, arr[k]]\n } else {\n return {\n 1: arr[k],\n value: arr[k],\n 0: k,\n key: k\n }\n }\n }\n ct++\n }\n // Empty\n return false\n }\n if (arr.length === 0 || cursor === arr.length) {\n return false\n }\n pos = cursor\n pointers[arrpos + 1] += 1\n if (each.returnArrayOnly) {\n return [pos, arr[pos]]\n } else {\n return {\n 1: arr[pos],\n value: arr[pos],\n 0: pos,\n key: pos\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/end.js b/node_modules/locutus/php/array/end.js
deleted file mode 100644
index e028212..0000000
--- a/node_modules/locutus/php/array/end.js
+++ /dev/null
@@ -1,60 +0,0 @@
-'use strict';
-
-module.exports = function end(arr) {
- // discuss at: http://locutus.io/php/end/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Legaev Andrey
- // revised by: J A R
- // revised by: Brett Zamir (http://brett-zamir.me)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: end({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})
- // returns 1: 'Zonneveld'
- // example 2: end(['Kevin', 'van', 'Zonneveld'])
- // returns 2: 'Zonneveld'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
-
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- }
- var arrpos = pointers.indexOf(arr);
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- var ct = 0;
- var val;
- for (var k in arr) {
- ct++;
- val = arr[k];
- }
- if (ct === 0) {
- // Empty
- return false;
- }
- pointers[arrpos + 1] = ct - 1;
- return val;
- }
- if (arr.length === 0) {
- return false;
- }
- pointers[arrpos + 1] = arr.length - 1;
- return arr[pointers[arrpos + 1]];
-};
-//# sourceMappingURL=end.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/end.js.map b/node_modules/locutus/php/array/end.js.map
deleted file mode 100644
index 5fbe41b..0000000
--- a/node_modules/locutus/php/array/end.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/end.js"],"names":["module","exports","end","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","push","arrpos","Object","prototype","toString","call","ct","val","k"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,QAAb,GAAwBF,SAASC,GAAT,CAAaC,QAAb,IAAyB,EAAjD;AACA,MAAIA,WAAWF,SAASC,GAAT,CAAaC,QAA5B;;AAEA,MAAIC,UAAU,SAAVA,OAAU,CAAUC,KAAV,EAAiB;AAC7B,SAAK,IAAIC,IAAI,CAAR,EAAWC,SAAS,KAAKA,MAA9B,EAAsCD,IAAIC,MAA1C,EAAkDD,GAAlD,EAAuD;AACrD,UAAI,KAAKA,CAAL,MAAYD,KAAhB,EAAuB;AACrB,eAAOC,CAAP;AACD;AACF;AACD,WAAO,CAAC,CAAR;AACD,GAPD;;AASA,MAAI,CAACH,SAASC,OAAd,EAAuB;AACrBD,aAASC,OAAT,GAAmBA,OAAnB;AACD;AACD,MAAID,SAASC,OAAT,CAAiBP,GAAjB,MAA0B,CAAC,CAA/B,EAAkC;AAChCM,aAASK,IAAT,CAAcX,GAAd,EAAmB,CAAnB;AACD;AACD,MAAIY,SAASN,SAASC,OAAT,CAAiBP,GAAjB,CAAb;AACA,MAAIa,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BhB,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5D,QAAIiB,KAAK,CAAT;AACA,QAAIC,GAAJ;AACA,SAAK,IAAIC,CAAT,IAAcnB,GAAd,EAAmB;AACjBiB;AACAC,YAAMlB,IAAImB,CAAJ,CAAN;AACD;AACD,QAAIF,OAAO,CAAX,EAAc;AACZ;AACA,aAAO,KAAP;AACD;AACDX,aAASM,SAAS,CAAlB,IAAuBK,KAAK,CAA5B;AACA,WAAOC,GAAP;AACD;AACD,MAAIlB,IAAIU,MAAJ,KAAe,CAAnB,EAAsB;AACpB,WAAO,KAAP;AACD;AACDJ,WAASM,SAAS,CAAlB,IAAuBZ,IAAIU,MAAJ,GAAa,CAApC;AACA,SAAOV,IAAIM,SAASM,SAAS,CAAlB,CAAJ,CAAP;AACD,CAxDD","file":"end.js","sourcesContent":["module.exports = function end (arr) {\n // discuss at: http://locutus.io/php/end/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Legaev Andrey\n // revised by: J A R\n // revised by: Brett Zamir (http://brett-zamir.me)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: end({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})\n // returns 1: 'Zonneveld'\n // example 2: end(['Kevin', 'van', 'Zonneveld'])\n // returns 2: 'Zonneveld'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n }\n var arrpos = pointers.indexOf(arr)\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n var ct = 0\n var val\n for (var k in arr) {\n ct++\n val = arr[k]\n }\n if (ct === 0) {\n // Empty\n return false\n }\n pointers[arrpos + 1] = ct - 1\n return val\n }\n if (arr.length === 0) {\n return false\n }\n pointers[arrpos + 1] = arr.length - 1\n return arr[pointers[arrpos + 1]]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/in_array.js b/node_modules/locutus/php/array/in_array.js
deleted file mode 100644
index ad9f8fb..0000000
--- a/node_modules/locutus/php/array/in_array.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-module.exports = function in_array(needle, haystack, argStrict) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/in_array/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: vlado houba
- // improved by: Jonas Sciangula Street (Joni2Back)
- // input by: Billy
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: in_array('van', ['Kevin', 'van', 'Zonneveld'])
- // returns 1: true
- // example 2: in_array('vlado', {0: 'Kevin', vlado: 'van', 1: 'Zonneveld'})
- // returns 2: false
- // example 3: in_array(1, ['1', '2', '3'])
- // example 3: in_array(1, ['1', '2', '3'], false)
- // returns 3: true
- // returns 3: true
- // example 4: in_array(1, ['1', '2', '3'], true)
- // returns 4: false
-
- var key = '';
- var strict = !!argStrict;
-
- // we prevent the double check (strict && arr[key] === ndl) || (!strict && arr[key] === ndl)
- // in just one for, in order to improve the performance
- // deciding wich type of comparation will do before walk array
- if (strict) {
- for (key in haystack) {
- if (haystack[key] === needle) {
- return true;
- }
- }
- } else {
- for (key in haystack) {
- if (haystack[key] == needle) {
- // eslint-disable-line eqeqeq
- return true;
- }
- }
- }
-
- return false;
-};
-//# sourceMappingURL=in_array.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/in_array.js.map b/node_modules/locutus/php/array/in_array.js.map
deleted file mode 100644
index c79e1ec..0000000
--- a/node_modules/locutus/php/array/in_array.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/in_array.js"],"names":["module","exports","in_array","needle","haystack","argStrict","key","strict"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,MAAnB,EAA2BC,QAA3B,EAAqCC,SAArC,EAAgD;AAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,SAAS,CAAC,CAACF,SAAf;;AAEA;AACA;AACA;AACA,MAAIE,MAAJ,EAAY;AACV,SAAKD,GAAL,IAAYF,QAAZ,EAAsB;AACpB,UAAIA,SAASE,GAAT,MAAkBH,MAAtB,EAA8B;AAC5B,eAAO,IAAP;AACD;AACF;AACF,GAND,MAMO;AACL,SAAKG,GAAL,IAAYF,QAAZ,EAAsB;AACpB,UAAIA,SAASE,GAAT,KAAiBH,MAArB,EAA6B;AAAE;AAC7B,eAAO,IAAP;AACD;AACF;AACF;;AAED,SAAO,KAAP;AACD,CAvCD","file":"in_array.js","sourcesContent":["module.exports = function in_array (needle, haystack, argStrict) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/in_array/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: vlado houba\n // improved by: Jonas Sciangula Street (Joni2Back)\n // input by: Billy\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: in_array('van', ['Kevin', 'van', 'Zonneveld'])\n // returns 1: true\n // example 2: in_array('vlado', {0: 'Kevin', vlado: 'van', 1: 'Zonneveld'})\n // returns 2: false\n // example 3: in_array(1, ['1', '2', '3'])\n // example 3: in_array(1, ['1', '2', '3'], false)\n // returns 3: true\n // returns 3: true\n // example 4: in_array(1, ['1', '2', '3'], true)\n // returns 4: false\n\n var key = ''\n var strict = !!argStrict\n\n // we prevent the double check (strict && arr[key] === ndl) || (!strict && arr[key] === ndl)\n // in just one for, in order to improve the performance\n // deciding wich type of comparation will do before walk array\n if (strict) {\n for (key in haystack) {\n if (haystack[key] === needle) {\n return true\n }\n }\n } else {\n for (key in haystack) {\n if (haystack[key] == needle) { // eslint-disable-line eqeqeq\n return true\n }\n }\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/index.js b/node_modules/locutus/php/array/index.js
deleted file mode 100644
index 5268e9e..0000000
--- a/node_modules/locutus/php/array/index.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-module.exports['array_change_key_case'] = require('./array_change_key_case');
-module.exports['array_chunk'] = require('./array_chunk');
-module.exports['array_combine'] = require('./array_combine');
-module.exports['array_count_values'] = require('./array_count_values');
-module.exports['array_diff'] = require('./array_diff');
-module.exports['array_diff_assoc'] = require('./array_diff_assoc');
-module.exports['array_diff_key'] = require('./array_diff_key');
-module.exports['array_diff_uassoc'] = require('./array_diff_uassoc');
-module.exports['array_diff_ukey'] = require('./array_diff_ukey');
-module.exports['array_fill'] = require('./array_fill');
-module.exports['array_fill_keys'] = require('./array_fill_keys');
-module.exports['array_filter'] = require('./array_filter');
-module.exports['array_flip'] = require('./array_flip');
-module.exports['array_intersect'] = require('./array_intersect');
-module.exports['array_intersect_assoc'] = require('./array_intersect_assoc');
-module.exports['array_intersect_key'] = require('./array_intersect_key');
-module.exports['array_intersect_uassoc'] = require('./array_intersect_uassoc');
-module.exports['array_intersect_ukey'] = require('./array_intersect_ukey');
-module.exports['array_key_exists'] = require('./array_key_exists');
-module.exports['array_keys'] = require('./array_keys');
-module.exports['array_map'] = require('./array_map');
-module.exports['array_merge'] = require('./array_merge');
-module.exports['array_merge_recursive'] = require('./array_merge_recursive');
-module.exports['array_multisort'] = require('./array_multisort');
-module.exports['array_pad'] = require('./array_pad');
-module.exports['array_pop'] = require('./array_pop');
-module.exports['array_product'] = require('./array_product');
-module.exports['array_push'] = require('./array_push');
-module.exports['array_rand'] = require('./array_rand');
-module.exports['array_reduce'] = require('./array_reduce');
-module.exports['array_replace'] = require('./array_replace');
-module.exports['array_replace_recursive'] = require('./array_replace_recursive');
-module.exports['array_reverse'] = require('./array_reverse');
-module.exports['array_search'] = require('./array_search');
-module.exports['array_shift'] = require('./array_shift');
-module.exports['array_slice'] = require('./array_slice');
-module.exports['array_splice'] = require('./array_splice');
-module.exports['array_sum'] = require('./array_sum');
-module.exports['array_udiff'] = require('./array_udiff');
-module.exports['array_udiff_assoc'] = require('./array_udiff_assoc');
-module.exports['array_udiff_uassoc'] = require('./array_udiff_uassoc');
-module.exports['array_uintersect'] = require('./array_uintersect');
-module.exports['array_uintersect_uassoc'] = require('./array_uintersect_uassoc');
-module.exports['array_unique'] = require('./array_unique');
-module.exports['array_unshift'] = require('./array_unshift');
-module.exports['array_values'] = require('./array_values');
-module.exports['array_walk'] = require('./array_walk');
-module.exports['array_walk_recursive'] = require('./array_walk_recursive');
-module.exports['arsort'] = require('./arsort');
-module.exports['asort'] = require('./asort');
-module.exports['count'] = require('./count');
-module.exports['current'] = require('./current');
-module.exports['each'] = require('./each');
-module.exports['end'] = require('./end');
-module.exports['in_array'] = require('./in_array');
-module.exports['key'] = require('./key');
-module.exports['krsort'] = require('./krsort');
-module.exports['ksort'] = require('./ksort');
-module.exports['natcasesort'] = require('./natcasesort');
-module.exports['natsort'] = require('./natsort');
-module.exports['next'] = require('./next');
-module.exports['pos'] = require('./pos');
-module.exports['prev'] = require('./prev');
-module.exports['range'] = require('./range');
-module.exports['reset'] = require('./reset');
-module.exports['rsort'] = require('./rsort');
-module.exports['shuffle'] = require('./shuffle');
-module.exports['sizeof'] = require('./sizeof');
-module.exports['sort'] = require('./sort');
-module.exports['uasort'] = require('./uasort');
-module.exports['uksort'] = require('./uksort');
-module.exports['usort'] = require('./usort');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/index.js.map b/node_modules/locutus/php/array/index.js.map
deleted file mode 100644
index 1679e79..0000000
--- a/node_modules/locutus/php/array/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,uBAAf,IAA0CC,QAAQ,yBAAR,CAA1C;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,eAAf,IAAkCC,QAAQ,iBAAR,CAAlC;AACAF,OAAOC,OAAP,CAAe,oBAAf,IAAuCC,QAAQ,sBAAR,CAAvC;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,kBAAf,IAAqCC,QAAQ,oBAAR,CAArC;AACAF,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,mBAAf,IAAsCC,QAAQ,qBAAR,CAAtC;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC;AACAF,OAAOC,OAAP,CAAe,uBAAf,IAA0CC,QAAQ,yBAAR,CAA1C;AACAF,OAAOC,OAAP,CAAe,qBAAf,IAAwCC,QAAQ,uBAAR,CAAx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Ae,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B","file":"index.js","sourcesContent":["module.exports['array_change_key_case'] = require('./array_change_key_case')\nmodule.exports['array_chunk'] = require('./array_chunk')\nmodule.exports['array_combine'] = require('./array_combine')\nmodule.exports['array_count_values'] = require('./array_count_values')\nmodule.exports['array_diff'] = require('./array_diff')\nmodule.exports['array_diff_assoc'] = require('./array_diff_assoc')\nmodule.exports['array_diff_key'] = require('./array_diff_key')\nmodule.exports['array_diff_uassoc'] = require('./array_diff_uassoc')\nmodule.exports['array_diff_ukey'] = require('./array_diff_ukey')\nmodule.exports['array_fill'] = require('./array_fill')\nmodule.exports['array_fill_keys'] = require('./array_fill_keys')\nmodule.exports['array_filter'] = require('./array_filter')\nmodule.exports['array_flip'] = require('./array_flip')\nmodule.exports['array_intersect'] = require('./array_intersect')\nmodule.exports['array_intersect_assoc'] = require('./array_intersect_assoc')\nmodule.exports['array_intersect_key'] = require('./array_intersect_key')\nmodule.exports['array_intersect_uassoc'] = require('./array_intersect_uassoc')\nmodule.exports['array_intersect_ukey'] = require('./array_intersect_ukey')\nmodule.exports['array_key_exists'] = require('./array_key_exists')\nmodule.exports['array_keys'] = require('./array_keys')\nmodule.exports['array_map'] = require('./array_map')\nmodule.exports['array_merge'] = require('./array_merge')\nmodule.exports['array_merge_recursive'] = require('./array_merge_recursive')\nmodule.exports['array_multisort'] = require('./array_multisort')\nmodule.exports['array_pad'] = require('./array_pad')\nmodule.exports['array_pop'] = require('./array_pop')\nmodule.exports['array_product'] = require('./array_product')\nmodule.exports['array_push'] = require('./array_push')\nmodule.exports['array_rand'] = require('./array_rand')\nmodule.exports['array_reduce'] = require('./array_reduce')\nmodule.exports['array_replace'] = require('./array_replace')\nmodule.exports['array_replace_recursive'] = require('./array_replace_recursive')\nmodule.exports['array_reverse'] = require('./array_reverse')\nmodule.exports['array_search'] = require('./array_search')\nmodule.exports['array_shift'] = require('./array_shift')\nmodule.exports['array_slice'] = require('./array_slice')\nmodule.exports['array_splice'] = require('./array_splice')\nmodule.exports['array_sum'] = require('./array_sum')\nmodule.exports['array_udiff'] = require('./array_udiff')\nmodule.exports['array_udiff_assoc'] = require('./array_udiff_assoc')\nmodule.exports['array_udiff_uassoc'] = require('./array_udiff_uassoc')\nmodule.exports['array_uintersect'] = require('./array_uintersect')\nmodule.exports['array_uintersect_uassoc'] = require('./array_uintersect_uassoc')\nmodule.exports['array_unique'] = require('./array_unique')\nmodule.exports['array_unshift'] = require('./array_unshift')\nmodule.exports['array_values'] = require('./array_values')\nmodule.exports['array_walk'] = require('./array_walk')\nmodule.exports['array_walk_recursive'] = require('./array_walk_recursive')\nmodule.exports['arsort'] = require('./arsort')\nmodule.exports['asort'] = require('./asort')\nmodule.exports['count'] = require('./count')\nmodule.exports['current'] = require('./current')\nmodule.exports['each'] = require('./each')\nmodule.exports['end'] = require('./end')\nmodule.exports['in_array'] = require('./in_array')\nmodule.exports['key'] = require('./key')\nmodule.exports['krsort'] = require('./krsort')\nmodule.exports['ksort'] = require('./ksort')\nmodule.exports['natcasesort'] = require('./natcasesort')\nmodule.exports['natsort'] = require('./natsort')\nmodule.exports['next'] = require('./next')\nmodule.exports['pos'] = require('./pos')\nmodule.exports['prev'] = require('./prev')\nmodule.exports['range'] = require('./range')\nmodule.exports['reset'] = require('./reset')\nmodule.exports['rsort'] = require('./rsort')\nmodule.exports['shuffle'] = require('./shuffle')\nmodule.exports['sizeof'] = require('./sizeof')\nmodule.exports['sort'] = require('./sort')\nmodule.exports['uasort'] = require('./uasort')\nmodule.exports['uksort'] = require('./uksort')\nmodule.exports['usort'] = require('./usort')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/key.js b/node_modules/locutus/php/array/key.js
deleted file mode 100644
index 0fc5977..0000000
--- a/node_modules/locutus/php/array/key.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-module.exports = function key(arr) {
- // discuss at: http://locutus.io/php/key/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: Riddler (http://www.frontierwebdev.com/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: var $array = {fruit1: 'apple', 'fruit2': 'orange'}
- // example 1: key($array)
- // returns 1: 'fruit1'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
-
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
-
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- }
- var cursor = pointers[pointers.indexOf(arr) + 1];
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- var ct = 0;
- for (var k in arr) {
- if (ct === cursor) {
- return k;
- }
- ct++;
- }
- // Empty
- return false;
- }
- if (arr.length === 0) {
- return false;
- }
-
- return cursor;
-};
-//# sourceMappingURL=key.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/key.js.map b/node_modules/locutus/php/array/key.js.map
deleted file mode 100644
index 9776e32..0000000
--- a/node_modules/locutus/php/array/key.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/key.js"],"names":["module","exports","key","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","push","cursor","Object","prototype","toString","call","ct","k"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,QAAb,GAAwBF,SAASC,GAAT,CAAaC,QAAb,IAAyB,EAAjD;AACA,MAAIA,WAAWF,SAASC,GAAT,CAAaC,QAA5B;;AAEA,MAAIC,UAAU,SAAVA,OAAU,CAAUC,KAAV,EAAiB;AAC7B,SAAK,IAAIC,IAAI,CAAR,EAAWC,SAAS,KAAKA,MAA9B,EAAsCD,IAAIC,MAA1C,EAAkDD,GAAlD,EAAuD;AACrD,UAAI,KAAKA,CAAL,MAAYD,KAAhB,EAAuB;AACrB,eAAOC,CAAP;AACD;AACF;AACD,WAAO,CAAC,CAAR;AACD,GAPD;;AASA,MAAI,CAACH,SAASC,OAAd,EAAuB;AACrBD,aAASC,OAAT,GAAmBA,OAAnB;AACD;;AAED,MAAID,SAASC,OAAT,CAAiBP,GAAjB,MAA0B,CAAC,CAA/B,EAAkC;AAChCM,aAASK,IAAT,CAAcX,GAAd,EAAmB,CAAnB;AACD;AACD,MAAIY,SAASN,SAASA,SAASC,OAAT,CAAiBP,GAAjB,IAAwB,CAAjC,CAAb;AACA,MAAIa,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BhB,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5D,QAAIiB,KAAK,CAAT;AACA,SAAK,IAAIC,CAAT,IAAclB,GAAd,EAAmB;AACjB,UAAIiB,OAAOL,MAAX,EAAmB;AACjB,eAAOM,CAAP;AACD;AACDD;AACD;AACD;AACA,WAAO,KAAP;AACD;AACD,MAAIjB,IAAIU,MAAJ,KAAe,CAAnB,EAAsB;AACpB,WAAO,KAAP;AACD;;AAED,SAAOE,MAAP;AACD,CAlDD","file":"key.js","sourcesContent":["module.exports = function key (arr) {\n // discuss at: http://locutus.io/php/key/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: Riddler (http://www.frontierwebdev.com/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: var $array = {fruit1: 'apple', 'fruit2': 'orange'}\n // example 1: key($array)\n // returns 1: 'fruit1'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n }\n var cursor = pointers[pointers.indexOf(arr) + 1]\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n var ct = 0\n for (var k in arr) {\n if (ct === cursor) {\n return k\n }\n ct++\n }\n // Empty\n return false\n }\n if (arr.length === 0) {\n return false\n }\n\n return cursor\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/krsort.js b/node_modules/locutus/php/array/krsort.js
deleted file mode 100644
index 2574091..0000000
--- a/node_modules/locutus/php/array/krsort.js
+++ /dev/null
@@ -1,117 +0,0 @@
-'use strict';
-
-module.exports = function krsort(inputArr, sortFlags) {
- // discuss at: http://locutus.io/php/krsort/
- // original by: GeekFG (http://geekfg.blogspot.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: pseudaria (https://github.com/pseudaria)
- // note 1: The examples are correct, this is a new way
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: Since JS objects' keys are always strings, and (the
- // note 1: default) SORT_REGULAR flag distinguishes by key type,
- // note 1: if the content is a numeric string, we treat the
- // note 1: "original type" as numeric.
- // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 1: krsort($data)
- // example 1: var $result = $data
- // returns 1: {d: 'lemon', c: 'apple', b: 'banana', a: 'orange'}
- // example 2: ini_set('locutus.sortByReference', true)
- // example 2: var $data = {2: 'van', 3: 'Zonneveld', 1: 'Kevin'}
- // example 2: krsort($data)
- // example 2: var $result = $data
- // returns 2: {3: 'Zonneveld', 2: 'van', 1: 'Kevin'}
-
- var i18nlgd = require('../i18n/i18n_loc_get_default');
- var strnatcmp = require('../strings/strnatcmp');
-
- var tmpArr = {};
- var keys = [];
- var sorter;
- var i;
- var k;
- var sortByReference = false;
- var populateArr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- switch (sortFlags) {
- case 'SORT_STRING':
- // compare items as strings
- sorter = function sorter(a, b) {
- return strnatcmp(b, a);
- };
- break;
- case 'SORT_LOCALE_STRING':
- // compare items as strings, based on the current locale
- // (set with i18n_loc_set_default() as of PHP6)
- var loc = i18nlgd();
- sorter = $locutus.locales[loc].sorting;
- break;
- case 'SORT_NUMERIC':
- // compare items numerically
- sorter = function sorter(a, b) {
- return b - a;
- };
- break;
- case 'SORT_REGULAR':
- default:
- // compare items normally (don't change types)
- sorter = function sorter(b, a) {
- var aFloat = parseFloat(a);
- var bFloat = parseFloat(b);
- var aNumeric = aFloat + '' === a;
- var bNumeric = bFloat + '' === b;
- if (aNumeric && bNumeric) {
- return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0;
- } else if (aNumeric && !bNumeric) {
- return 1;
- } else if (!aNumeric && bNumeric) {
- return -1;
- }
- return a > b ? 1 : a < b ? -1 : 0;
- };
- break;
- }
-
- // Make a list of key names
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- keys.sort(sorter);
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- // Rebuild array with sorted key names
- for (i = 0; i < keys.length; i++) {
- k = keys[i];
- tmpArr[k] = inputArr[k];
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- for (i in tmpArr) {
- if (tmpArr.hasOwnProperty(i)) {
- populateArr[i] = tmpArr[i];
- }
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=krsort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/krsort.js.map b/node_modules/locutus/php/array/krsort.js.map
deleted file mode 100644
index 7e369ea..0000000
--- a/node_modules/locutus/php/array/krsort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/krsort.js"],"names":["module","exports","krsort","inputArr","sortFlags","i18nlgd","require","strnatcmp","tmpArr","keys","sorter","i","k","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","hasOwnProperty","push","sort","iniVal","undefined","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,SAA3B,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,8BAAR,CAAd;AACA,MAAIC,YAAYD,QAAQ,sBAAR,CAAhB;;AAEA,MAAIE,SAAS,EAAb;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,MAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,OAAb,GAAuBF,SAASC,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AAL,CAAUtB,MAAV;;AAEA,MAAIuB,SAAS,CAAC,OAAO3B,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyF4B,SAA1F,KAAwG,IAArH;AACArB,oBAAkBoB,WAAW,IAA7B;AACAnB,gBAAcD,kBAAkBV,QAAlB,GAA6BW,WAA3C;;AAEA;AACA,OAAKH,IAAI,CAAT,EAAYA,IAAIF,KAAK0B,MAArB,EAA6BxB,GAA7B,EAAkC;AAChCC,QAAIH,KAAKE,CAAL,CAAJ;AACAH,WAAOI,CAAP,IAAYT,SAASS,CAAT,CAAZ;AACA,QAAIC,eAAJ,EAAqB;AACnB,aAAOV,SAASS,CAAT,CAAP;AACD;AACF;AACD,OAAKD,CAAL,IAAUH,MAAV,EAAkB;AAChB,QAAIA,OAAOsB,cAAP,CAAsBnB,CAAtB,CAAJ,EAA8B;AAC5BG,kBAAYH,CAAZ,IAAiBH,OAAOG,CAAP,CAAjB;AACD;AACF;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CAjHD","file":"krsort.js","sourcesContent":["module.exports = function krsort (inputArr, sortFlags) {\n // discuss at: http://locutus.io/php/krsort/\n // original by: GeekFG (http://geekfg.blogspot.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: pseudaria (https://github.com/pseudaria)\n // note 1: The examples are correct, this is a new way\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: Since JS objects' keys are always strings, and (the\n // note 1: default) SORT_REGULAR flag distinguishes by key type,\n // note 1: if the content is a numeric string, we treat the\n // note 1: \"original type\" as numeric.\n // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 1: krsort($data)\n // example 1: var $result = $data\n // returns 1: {d: 'lemon', c: 'apple', b: 'banana', a: 'orange'}\n // example 2: ini_set('locutus.sortByReference', true)\n // example 2: var $data = {2: 'van', 3: 'Zonneveld', 1: 'Kevin'}\n // example 2: krsort($data)\n // example 2: var $result = $data\n // returns 2: {3: 'Zonneveld', 2: 'van', 1: 'Kevin'}\n\n var i18nlgd = require('../i18n/i18n_loc_get_default')\n var strnatcmp = require('../strings/strnatcmp')\n\n var tmpArr = {}\n var keys = []\n var sorter\n var i\n var k\n var sortByReference = false\n var populateArr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n switch (sortFlags) {\n case 'SORT_STRING':\n // compare items as strings\n sorter = function (a, b) {\n return strnatcmp(b, a)\n }\n break\n case 'SORT_LOCALE_STRING':\n // compare items as strings, based on the current locale\n // (set with i18n_loc_set_default() as of PHP6)\n var loc = i18nlgd()\n sorter = $locutus.locales[loc].sorting\n break\n case 'SORT_NUMERIC':\n // compare items numerically\n sorter = function (a, b) {\n return (b - a)\n }\n break\n case 'SORT_REGULAR':\n default:\n // compare items normally (don't change types)\n sorter = function (b, a) {\n var aFloat = parseFloat(a)\n var bFloat = parseFloat(b)\n var aNumeric = aFloat + '' === a\n var bNumeric = bFloat + '' === b\n if (aNumeric && bNumeric) {\n return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n } else if (aNumeric && !bNumeric) {\n return 1\n } else if (!aNumeric && bNumeric) {\n return -1\n }\n return a > b ? 1 : a < b ? -1 : 0\n }\n break\n }\n\n // Make a list of key names\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n keys.push(k)\n }\n }\n keys.sort(sorter)\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n // Rebuild array with sorted key names\n for (i = 0; i < keys.length; i++) {\n k = keys[i]\n tmpArr[k] = inputArr[k]\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n for (i in tmpArr) {\n if (tmpArr.hasOwnProperty(i)) {\n populateArr[i] = tmpArr[i]\n }\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/ksort.js b/node_modules/locutus/php/array/ksort.js
deleted file mode 100644
index c85b1be..0000000
--- a/node_modules/locutus/php/array/ksort.js
+++ /dev/null
@@ -1,114 +0,0 @@
-'use strict';
-
-module.exports = function ksort(inputArr, sortFlags) {
- // discuss at: http://locutus.io/php/ksort/
- // original by: GeekFG (http://geekfg.blogspot.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: Since JS objects' keys are always strings, and (the
- // note 1: default) SORT_REGULAR flag distinguishes by key type,
- // note 1: if the content is a numeric string, we treat the
- // note 1: "original type" as numeric.
- // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 1: ksort($data)
- // example 1: var $result = $data
- // returns 1: {a: 'orange', b: 'banana', c: 'apple', d: 'lemon'}
- // example 2: ini_set('locutus.sortByReference', true)
- // example 2: var $data = {2: 'van', 3: 'Zonneveld', 1: 'Kevin'}
- // example 2: ksort($data)
- // example 2: var $result = $data
- // returns 2: {1: 'Kevin', 2: 'van', 3: 'Zonneveld'}
-
- var i18nlgd = require('../i18n/i18n_loc_get_default');
- var strnatcmp = require('../strings/strnatcmp');
-
- var tmpArr = {};
- var keys = [];
- var sorter;
- var i;
- var k;
- var sortByReference = false;
- var populateArr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- switch (sortFlags) {
- case 'SORT_STRING':
- // compare items as strings
- sorter = function sorter(a, b) {
- return strnatcmp(b, a);
- };
- break;
- case 'SORT_LOCALE_STRING':
- // compare items as strings, based on the current locale
- // (set with i18n_loc_set_default() as of PHP6)
- var loc = i18nlgd();
- sorter = $locutus.locales[loc].sorting;
- break;
- case 'SORT_NUMERIC':
- // compare items numerically
- sorter = function sorter(a, b) {
- return a + 0 - (b + 0);
- };
- break;
- default:
- // case 'SORT_REGULAR': // compare items normally (don't change types)
- sorter = function sorter(a, b) {
- var aFloat = parseFloat(a);
- var bFloat = parseFloat(b);
- var aNumeric = aFloat + '' === a;
- var bNumeric = bFloat + '' === b;
- if (aNumeric && bNumeric) {
- return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0;
- } else if (aNumeric && !bNumeric) {
- return 1;
- } else if (!aNumeric && bNumeric) {
- return -1;
- }
- return a > b ? 1 : a < b ? -1 : 0;
- };
- break;
- }
-
- // Make a list of key names
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- keys.sort(sorter);
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- // Rebuild array with sorted key names
- for (i = 0; i < keys.length; i++) {
- k = keys[i];
- tmpArr[k] = inputArr[k];
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- for (i in tmpArr) {
- if (tmpArr.hasOwnProperty(i)) {
- populateArr[i] = tmpArr[i];
- }
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=ksort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/ksort.js.map b/node_modules/locutus/php/array/ksort.js.map
deleted file mode 100644
index 9b55654..0000000
--- a/node_modules/locutus/php/array/ksort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/ksort.js"],"names":["module","exports","ksort","inputArr","sortFlags","i18nlgd","require","strnatcmp","tmpArr","keys","sorter","i","k","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","hasOwnProperty","push","sort","iniVal","undefined","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,SAA1B,EAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,8BAAR,CAAd;AACA,MAAIC,YAAYD,QAAQ,sBAAR,CAAhB;;AAEA,MAAIE,SAAS,EAAb;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,MAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAa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,CAAV;AACD;AACF;AACDH,OAAKuB,IAAL,CAAUtB,MAAV;;AAEA,MAAIuB,SAAS,CAAC,OAAO3B,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyF4B,SAA1F,KAAwG,IAArH;AACArB,oBAAkBoB,WAAW,IAA7B;AACAnB,gBAAcD,kBAAkBV,QAAlB,GAA6BW,WAA3C;;AAEA;AACA,OAAKH,IAAI,CAAT,EAAYA,IAAIF,KAAK0B,MAArB,EAA6BxB,GAA7B,EAAkC;AAChCC,QAAIH,KAAKE,CAAL,CAAJ;AACAH,WAAOI,CAAP,IAAYT,SAASS,CAAT,CAAZ;AACA,QAAIC,eAAJ,EAAqB;AACnB,aAAOV,SAASS,CAAT,CAAP;AACD;AACF;AACD,OAAKD,CAAL,IAAUH,MAAV,EAAkB;AAChB,QAAIA,OAAOsB,cAAP,CAAsBnB,CAAtB,CAAJ,EAA8B;AAC5BG,kBAAYH,CAAZ,IAAiBH,OAAOG,CAAP,CAAjB;AACD;AACF;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CA9GD","file":"ksort.js","sourcesContent":["module.exports = function ksort (inputArr, sortFlags) {\n // discuss at: http://locutus.io/php/ksort/\n // original by: GeekFG (http://geekfg.blogspot.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: Since JS objects' keys are always strings, and (the\n // note 1: default) SORT_REGULAR flag distinguishes by key type,\n // note 1: if the content is a numeric string, we treat the\n // note 1: \"original type\" as numeric.\n // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 1: ksort($data)\n // example 1: var $result = $data\n // returns 1: {a: 'orange', b: 'banana', c: 'apple', d: 'lemon'}\n // example 2: ini_set('locutus.sortByReference', true)\n // example 2: var $data = {2: 'van', 3: 'Zonneveld', 1: 'Kevin'}\n // example 2: ksort($data)\n // example 2: var $result = $data\n // returns 2: {1: 'Kevin', 2: 'van', 3: 'Zonneveld'}\n\n var i18nlgd = require('../i18n/i18n_loc_get_default')\n var strnatcmp = require('../strings/strnatcmp')\n\n var tmpArr = {}\n var keys = []\n var sorter\n var i\n var k\n var sortByReference = false\n var populateArr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n switch (sortFlags) {\n case 'SORT_STRING':\n // compare items as strings\n sorter = function (a, b) {\n return strnatcmp(b, a)\n }\n break\n case 'SORT_LOCALE_STRING':\n // compare items as strings, based on the current locale\n // (set with i18n_loc_set_default() as of PHP6)\n var loc = i18nlgd()\n sorter = $locutus.locales[loc].sorting\n break\n case 'SORT_NUMERIC':\n // compare items numerically\n sorter = function (a, b) {\n return ((a + 0) - (b + 0))\n }\n break\n default:\n // case 'SORT_REGULAR': // compare items normally (don't change types)\n sorter = function (a, b) {\n var aFloat = parseFloat(a)\n var bFloat = parseFloat(b)\n var aNumeric = aFloat + '' === a\n var bNumeric = bFloat + '' === b\n if (aNumeric && bNumeric) {\n return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n } else if (aNumeric && !bNumeric) {\n return 1\n } else if (!aNumeric && bNumeric) {\n return -1\n }\n return a > b ? 1 : a < b ? -1 : 0\n }\n break\n }\n\n // Make a list of key names\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n keys.push(k)\n }\n }\n keys.sort(sorter)\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n // Rebuild array with sorted key names\n for (i = 0; i < keys.length; i++) {\n k = keys[i]\n tmpArr[k] = inputArr[k]\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n for (i in tmpArr) {\n if (tmpArr.hasOwnProperty(i)) {\n populateArr[i] = tmpArr[i]\n }\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/natcasesort.js b/node_modules/locutus/php/array/natcasesort.js
deleted file mode 100644
index 7dfa8c8..0000000
--- a/node_modules/locutus/php/array/natcasesort.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-module.exports = function natcasesort(inputArr) {
- // discuss at: http://locutus.io/php/natcasesort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: We cannot use numbers as keys and have them be reordered since they
- // note 1: adhere to numerical order in some implementations
- // example 1: var $array1 = {a:'IMG0.png', b:'img12.png', c:'img10.png', d:'img2.png', e:'img1.png', f:'IMG3.png'}
- // example 1: natcasesort($array1)
- // example 1: var $result = $array1
- // returns 1: {a: 'IMG0.png', e: 'img1.png', d: 'img2.png', f: 'IMG3.png', c: 'img10.png', b: 'img12.png'}
-
- var strnatcasecmp = require('../strings/strnatcasecmp');
- var valArr = [];
- var k;
- var i;
- var sortByReference = false;
- var populateArr = {};
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- // Get key and value arrays
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- valArr.push([k, inputArr[k]]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
- valArr.sort(function (a, b) {
- return strnatcasecmp(a[1], b[1]);
- });
-
- // Repopulate the old array
- for (i = 0; i < valArr.length; i++) {
- populateArr[valArr[i][0]] = valArr[i][1];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=natcasesort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/natcasesort.js.map b/node_modules/locutus/php/array/natcasesort.js.map
deleted file mode 100644
index e373569..0000000
--- a/node_modules/locutus/php/array/natcasesort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/natcasesort.js"],"names":["module","exports","natcasesort","inputArr","strnatcasecmp","require","valArr","k","i","sortByReference","populateArr","iniVal","undefined","hasOwnProperty","push","sort","a","b","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,QAAtB,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,gBAAgBC,QAAQ,0BAAR,CAApB;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,SAAS,CAAC,OAAON,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFO,SAA1F,KAAwG,IAArH;AACAH,oBAAkBE,WAAW,IAA7B;AACAD,gBAAcD,kBAAkBN,QAAlB,GAA6BO,WAA3C;;AAEA;AACA,OAAKH,CAAL,IAAUJ,QAAV,EAAoB;AAClB,QAAIA,SAASU,cAAT,CAAwBN,CAAxB,CAAJ,EAAgC;AAC9BD,aAAOQ,IAAP,CAAY,CAACP,CAAD,EAAIJ,SAASI,CAAT,CAAJ,CAAZ;AACA,UAAIE,eAAJ,EAAqB;AACnB,eAAON,SAASI,CAAT,CAAP;AACD;AACF;AACF;AACDD,SAAOS,IAAP,CAAY,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAC1B,WAAOb,cAAcY,EAAE,CAAF,CAAd,EAAoBC,EAAE,CAAF,CAApB,CAAP;AACD,GAFD;;AAIA;AACA,OAAKT,IAAI,CAAT,EAAYA,IAAIF,OAAOY,MAAvB,EAA+BV,GAA/B,EAAoC;AAClCE,gBAAYJ,OAAOE,CAAP,EAAU,CAAV,CAAZ,IAA4BF,OAAOE,CAAP,EAAU,CAAV,CAA5B;AACD;;AAED,SAAOC,mBAAmBC,WAA1B;AACD,CAnDD","file":"natcasesort.js","sourcesContent":["module.exports = function natcasesort (inputArr) {\n // discuss at: http://locutus.io/php/natcasesort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: We cannot use numbers as keys and have them be reordered since they\n // note 1: adhere to numerical order in some implementations\n // example 1: var $array1 = {a:'IMG0.png', b:'img12.png', c:'img10.png', d:'img2.png', e:'img1.png', f:'IMG3.png'}\n // example 1: natcasesort($array1)\n // example 1: var $result = $array1\n // returns 1: {a: 'IMG0.png', e: 'img1.png', d: 'img2.png', f: 'IMG3.png', c: 'img10.png', b: 'img12.png'}\n\n var strnatcasecmp = require('../strings/strnatcasecmp')\n var valArr = []\n var k\n var i\n var sortByReference = false\n var populateArr = {}\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n // Get key and value arrays\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n valArr.push([k, inputArr[k]])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n valArr.sort(function (a, b) {\n return strnatcasecmp(a[1], b[1])\n })\n\n // Repopulate the old array\n for (i = 0; i < valArr.length; i++) {\n populateArr[valArr[i][0]] = valArr[i][1]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/natsort.js b/node_modules/locutus/php/array/natsort.js
deleted file mode 100644
index bb6b5b0..0000000
--- a/node_modules/locutus/php/array/natsort.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-module.exports = function natsort(inputArr) {
- // discuss at: http://locutus.io/php/natsort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // example 1: var $array1 = {a:"img12.png", b:"img10.png", c:"img2.png", d:"img1.png"}
- // example 1: natsort($array1)
- // example 1: var $result = $array1
- // returns 1: {d: 'img1.png', c: 'img2.png', b: 'img10.png', a: 'img12.png'}
-
- var strnatcmp = require('../strings/strnatcmp');
-
- var valArr = [];
- var k;
- var i;
- var sortByReference = false;
- var populateArr = {};
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- // Get key and value arrays
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- valArr.push([k, inputArr[k]]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
- valArr.sort(function (a, b) {
- return strnatcmp(a[1], b[1]);
- });
-
- // Repopulate the old array
- for (i = 0; i < valArr.length; i++) {
- populateArr[valArr[i][0]] = valArr[i][1];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=natsort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/natsort.js.map b/node_modules/locutus/php/array/natsort.js.map
deleted file mode 100644
index 7690b08..0000000
--- a/node_modules/locutus/php/array/natsort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/natsort.js"],"names":["module","exports","natsort","inputArr","strnatcmp","require","valArr","k","i","sortByReference","populateArr","iniVal","undefined","hasOwnProperty","push","sort","a","b","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,SAAS,CAAC,OAAON,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFO,SAA1F,KAAwG,IAArH;AACAH,oBAAkBE,WAAW,IAA7B;AACAD,gBAAcD,kBAAkBN,QAAlB,GAA6BO,WAA3C;;AAEA;AACA,OAAKH,CAAL,IAAUJ,QAAV,EAAoB;AAClB,QAAIA,SAASU,cAAT,CAAwBN,CAAxB,CAAJ,EAAgC;AAC9BD,aAAOQ,IAAP,CAAY,CAACP,CAAD,EAAIJ,SAASI,CAAT,CAAJ,CAAZ;AACA,UAAIE,eAAJ,EAAqB;AACnB,eAAON,SAASI,CAAT,CAAP;AACD;AACF;AACF;AACDD,SAAOS,IAAP,CAAY,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAC1B,WAAOb,UAAUY,EAAE,CAAF,CAAV,EAAgBC,EAAE,CAAF,CAAhB,CAAP;AACD,GAFD;;AAIA;AACA,OAAKT,IAAI,CAAT,EAAYA,IAAIF,OAAOY,MAAvB,EAA+BV,GAA/B,EAAoC;AAClCE,gBAAYJ,OAAOE,CAAP,EAAU,CAAV,CAAZ,IAA4BF,OAAOE,CAAP,EAAU,CAAV,CAA5B;AACD;;AAED,SAAOC,mBAAmBC,WAA1B;AACD,CAlDD","file":"natsort.js","sourcesContent":["module.exports = function natsort (inputArr) {\n // discuss at: http://locutus.io/php/natsort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // example 1: var $array1 = {a:\"img12.png\", b:\"img10.png\", c:\"img2.png\", d:\"img1.png\"}\n // example 1: natsort($array1)\n // example 1: var $result = $array1\n // returns 1: {d: 'img1.png', c: 'img2.png', b: 'img10.png', a: 'img12.png'}\n\n var strnatcmp = require('../strings/strnatcmp')\n\n var valArr = []\n var k\n var i\n var sortByReference = false\n var populateArr = {}\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n // Get key and value arrays\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n valArr.push([k, inputArr[k]])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n valArr.sort(function (a, b) {\n return strnatcmp(a[1], b[1])\n })\n\n // Repopulate the old array\n for (i = 0; i < valArr.length; i++) {\n populateArr[valArr[i][0]] = valArr[i][1]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/next.js b/node_modules/locutus/php/array/next.js
deleted file mode 100644
index b959f6c..0000000
--- a/node_modules/locutus/php/array/next.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-module.exports = function next(arr) {
- // discuss at: http://locutus.io/php/next/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: var $transport = ['foot', 'bike', 'car', 'plane']
- // example 1: next($transport)
- // example 1: next($transport)
- // returns 1: 'car'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
-
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- }
- var arrpos = pointers.indexOf(arr);
- var cursor = pointers[arrpos + 1];
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- var ct = 0;
- for (var k in arr) {
- if (ct === cursor + 1) {
- pointers[arrpos + 1] += 1;
- return arr[k];
- }
- ct++;
- }
- // End
- return false;
- }
- if (arr.length === 0 || cursor === arr.length - 1) {
- return false;
- }
- pointers[arrpos + 1] += 1;
- return arr[pointers[arrpos + 1]];
-};
-//# sourceMappingURL=next.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/next.js.map b/node_modules/locutus/php/array/next.js.map
deleted file mode 100644
index eac5609..0000000
--- a/node_modules/locutus/php/array/next.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/next.js"],"names":["module","exports","next","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","push","arrpos","cursor","Object","prototype","toString","call","ct","k"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,QAAb,GAAwBF,SAASC,GAAT,CAAaC,QAAb,IAAyB,EAAjD;AACA,MAAIA,WAAWF,SAASC,GAAT,CAAaC,QAA5B;;AAEA,MAAIC,UAAU,SAAVA,OAAU,CAAUC,KAAV,EAAiB;AAC7B,SAAK,IAAIC,IAAI,CAAR,EAAWC,SAAS,KAAKA,MAA9B,EAAsCD,IAAIC,MAA1C,EAAkDD,GAAlD,EAAuD;AACrD,UAAI,KAAKA,CAAL,MAAYD,KAAhB,EAAuB;AACrB,eAAOC,CAAP;AACD;AACF;AACD,WAAO,CAAC,CAAR;AACD,GAPD;;AASA,MAAI,CAACH,SAASC,OAAd,EAAuB;AACrBD,aAASC,OAAT,GAAmBA,OAAnB;AACD;AACD,MAAID,SAASC,OAAT,CAAiBP,GAAjB,MAA0B,CAAC,CAA/B,EAAkC;AAChCM,aAASK,IAAT,CAAcX,GAAd,EAAmB,CAAnB;AACD;AACD,MAAIY,SAASN,SAASC,OAAT,CAAiBP,GAAjB,CAAb;AACA,MAAIa,SAASP,SAASM,SAAS,CAAlB,CAAb;AACA,MAAIE,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BjB,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5D,QAAIkB,KAAK,CAAT;AACA,SAAK,IAAIC,CAAT,IAAcnB,GAAd,EAAmB;AACjB,UAAIkB,OAAOL,SAAS,CAApB,EAAuB;AACrBP,iBAASM,SAAS,CAAlB,KAAwB,CAAxB;AACA,eAAOZ,IAAImB,CAAJ,CAAP;AACD;AACDD;AACD;AACD;AACA,WAAO,KAAP;AACD;AACD,MAAIlB,IAAIU,MAAJ,KAAe,CAAf,IAAoBG,WAAYb,IAAIU,MAAJ,GAAa,CAAjD,EAAqD;AACnD,WAAO,KAAP;AACD;AACDJ,WAASM,SAAS,CAAlB,KAAwB,CAAxB;AACA,SAAOZ,IAAIM,SAASM,SAAS,CAAlB,CAAJ,CAAP;AACD,CAlDD","file":"next.js","sourcesContent":["module.exports = function next (arr) {\n // discuss at: http://locutus.io/php/next/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: var $transport = ['foot', 'bike', 'car', 'plane']\n // example 1: next($transport)\n // example 1: next($transport)\n // returns 1: 'car'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n }\n var arrpos = pointers.indexOf(arr)\n var cursor = pointers[arrpos + 1]\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n var ct = 0\n for (var k in arr) {\n if (ct === cursor + 1) {\n pointers[arrpos + 1] += 1\n return arr[k]\n }\n ct++\n }\n // End\n return false\n }\n if (arr.length === 0 || cursor === (arr.length - 1)) {\n return false\n }\n pointers[arrpos + 1] += 1\n return arr[pointers[arrpos + 1]]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/pos.js b/node_modules/locutus/php/array/pos.js
deleted file mode 100644
index 424fd35..0000000
--- a/node_modules/locutus/php/array/pos.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function pos(arr) {
- // discuss at: http://locutus.io/php/pos/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: var $transport = ['foot', 'bike', 'car', 'plane']
- // example 1: pos($transport)
- // returns 1: 'foot'
-
- var current = require('../array/current');
- return current(arr);
-};
-//# sourceMappingURL=pos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/pos.js.map b/node_modules/locutus/php/array/pos.js.map
deleted file mode 100644
index e0851b2..0000000
--- a/node_modules/locutus/php/array/pos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/pos.js"],"names":["module","exports","pos","arr","current","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,kBAAR,CAAd;AACA,SAAOD,QAAQD,GAAR,CAAP;AACD,CAVD","file":"pos.js","sourcesContent":["module.exports = function pos (arr) {\n // discuss at: http://locutus.io/php/pos/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: var $transport = ['foot', 'bike', 'car', 'plane']\n // example 1: pos($transport)\n // returns 1: 'foot'\n\n var current = require('../array/current')\n return current(arr)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/prev.js b/node_modules/locutus/php/array/prev.js
deleted file mode 100644
index 88f5511..0000000
--- a/node_modules/locutus/php/array/prev.js
+++ /dev/null
@@ -1,52 +0,0 @@
-'use strict';
-
-module.exports = function prev(arr) {
- // discuss at: http://locutus.io/php/prev/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: var $transport = ['foot', 'bike', 'car', 'plane']
- // example 1: prev($transport)
- // returns 1: false
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
-
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
- var arrpos = pointers.indexOf(arr);
- var cursor = pointers[arrpos + 1];
- if (pointers.indexOf(arr) === -1 || cursor === 0) {
- return false;
- }
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- var ct = 0;
- for (var k in arr) {
- if (ct === cursor - 1) {
- pointers[arrpos + 1] -= 1;
- return arr[k];
- }
- ct++;
- }
- // Shouldn't reach here
- }
- if (arr.length === 0) {
- return false;
- }
- pointers[arrpos + 1] -= 1;
- return arr[pointers[arrpos + 1]];
-};
-//# sourceMappingURL=prev.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/prev.js.map b/node_modules/locutus/php/array/prev.js.map
deleted file mode 100644
index 7aac714..0000000
--- a/node_modules/locutus/php/array/prev.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/prev.js"],"names":["module","exports","prev","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","arrpos","cursor","Object","prototype","toString","call","ct","k"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,QAAb,GAAwBF,SAASC,GAAT,CAAaC,QAAb,IAAyB,EAAjD;AACA,MAAIA,WAAWF,SAASC,GAAT,CAAaC,QAA5B;;AAEA,MAAIC,UAAU,SAAVA,OAAU,CAAUC,KAAV,EAAiB;AAC7B,SAAK,IAAIC,IAAI,CAAR,EAAWC,SAAS,KAAKA,MAA9B,EAAsCD,IAAIC,MAA1C,EAAkDD,GAAlD,EAAuD;AACrD,UAAI,KAAKA,CAAL,MAAYD,KAAhB,EAAuB;AACrB,eAAOC,CAAP;AACD;AACF;AACD,WAAO,CAAC,CAAR;AACD,GAPD;;AASA,MAAI,CAACH,SAASC,OAAd,EAAuB;AACrBD,aAASC,OAAT,GAAmBA,OAAnB;AACD;AACD,MAAII,SAASL,SAASC,OAAT,CAAiBP,GAAjB,CAAb;AACA,MAAIY,SAASN,SAASK,SAAS,CAAlB,CAAb;AACA,MAAIL,SAASC,OAAT,CAAiBP,GAAjB,MAA0B,CAAC,CAA3B,IAAgCY,WAAW,CAA/C,EAAkD;AAChD,WAAO,KAAP;AACD;AACD,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BhB,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5D,QAAIiB,KAAK,CAAT;AACA,SAAK,IAAIC,CAAT,IAAclB,GAAd,EAAmB;AACjB,UAAIiB,OAAOL,SAAS,CAApB,EAAuB;AACrBN,iBAASK,SAAS,CAAlB,KAAwB,CAAxB;AACA,eAAOX,IAAIkB,CAAJ,CAAP;AACD;AACDD;AACD;AACD;AACD;AACD,MAAIjB,IAAIU,MAAJ,KAAe,CAAnB,EAAsB;AACpB,WAAO,KAAP;AACD;AACDJ,WAASK,SAAS,CAAlB,KAAwB,CAAxB;AACA,SAAOX,IAAIM,SAASK,SAAS,CAAlB,CAAJ,CAAP;AACD,CAhDD","file":"prev.js","sourcesContent":["module.exports = function prev (arr) {\n // discuss at: http://locutus.io/php/prev/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: var $transport = ['foot', 'bike', 'car', 'plane']\n // example 1: prev($transport)\n // returns 1: false\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n var arrpos = pointers.indexOf(arr)\n var cursor = pointers[arrpos + 1]\n if (pointers.indexOf(arr) === -1 || cursor === 0) {\n return false\n }\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n var ct = 0\n for (var k in arr) {\n if (ct === cursor - 1) {\n pointers[arrpos + 1] -= 1\n return arr[k]\n }\n ct++\n }\n // Shouldn't reach here\n }\n if (arr.length === 0) {\n return false\n }\n pointers[arrpos + 1] -= 1\n return arr[pointers[arrpos + 1]]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/range.js b/node_modules/locutus/php/array/range.js
deleted file mode 100644
index 0bb67a6..0000000
--- a/node_modules/locutus/php/array/range.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"use strict";
-
-module.exports = function range(low, high, step) {
- // discuss at: http://locutus.io/php/range/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // example 1: range ( 0, 12 )
- // returns 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
- // example 2: range( 0, 100, 10 )
- // returns 2: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
- // example 3: range( 'a', 'i' )
- // returns 3: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
- // example 4: range( 'c', 'a' )
- // returns 4: ['c', 'b', 'a']
-
- var matrix = [];
- var iVal;
- var endval;
- var plus;
- var walker = step || 1;
- var chars = false;
-
- if (!isNaN(low) && !isNaN(high)) {
- iVal = low;
- endval = high;
- } else if (isNaN(low) && isNaN(high)) {
- chars = true;
- iVal = low.charCodeAt(0);
- endval = high.charCodeAt(0);
- } else {
- iVal = isNaN(low) ? 0 : low;
- endval = isNaN(high) ? 0 : high;
- }
-
- plus = !(iVal > endval);
- if (plus) {
- while (iVal <= endval) {
- matrix.push(chars ? String.fromCharCode(iVal) : iVal);
- iVal += walker;
- }
- } else {
- while (iVal >= endval) {
- matrix.push(chars ? String.fromCharCode(iVal) : iVal);
- iVal -= walker;
- }
- }
-
- return matrix;
-};
-//# sourceMappingURL=range.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/range.js.map b/node_modules/locutus/php/array/range.js.map
deleted file mode 100644
index c106bc5..0000000
--- a/node_modules/locutus/php/array/range.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/range.js"],"names":["module","exports","range","low","high","step","matrix","iVal","endval","plus","walker","chars","isNaN","charCodeAt","push","String","fromCharCode"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,IAArB,EAA2BC,IAA3B,EAAiC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,IAAJ;AACA,MAAIC,SAASL,QAAQ,CAArB;AACA,MAAIM,QAAQ,KAAZ;;AAEA,MAAI,CAACC,MAAMT,GAAN,CAAD,IAAe,CAACS,MAAMR,IAAN,CAApB,EAAiC;AAC/BG,WAAOJ,GAAP;AACAK,aAASJ,IAAT;AACD,GAHD,MAGO,IAAIQ,MAAMT,GAAN,KAAcS,MAAMR,IAAN,CAAlB,EAA+B;AACpCO,YAAQ,IAAR;AACAJ,WAAOJ,IAAIU,UAAJ,CAAe,CAAf,CAAP;AACAL,aAASJ,KAAKS,UAAL,CAAgB,CAAhB,CAAT;AACD,GAJM,MAIA;AACLN,WAAQK,MAAMT,GAAN,IAAa,CAAb,GAAiBA,GAAzB;AACAK,aAAUI,MAAMR,IAAN,IAAc,CAAd,GAAkBA,IAA5B;AACD;;AAEDK,SAAO,EAAEF,OAAOC,MAAT,CAAP;AACA,MAAIC,IAAJ,EAAU;AACR,WAAOF,QAAQC,MAAf,EAAuB;AACrBF,aAAOQ,IAAP,CAAcH,KAAD,GAAUI,OAAOC,YAAP,CAAoBT,IAApB,CAAV,GAAsCA,IAAnD;AACAA,cAAQG,MAAR;AACD;AACF,GALD,MAKO;AACL,WAAOH,QAAQC,MAAf,EAAuB;AACrBF,aAAOQ,IAAP,CAAcH,KAAD,GAAUI,OAAOC,YAAP,CAAoBT,IAApB,CAAV,GAAsCA,IAAnD;AACAA,cAAQG,MAAR;AACD;AACF;;AAED,SAAOJ,MAAP;AACD,CA7CD","file":"range.js","sourcesContent":["module.exports = function range (low, high, step) {\n // discuss at: http://locutus.io/php/range/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // example 1: range ( 0, 12 )\n // returns 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n // example 2: range( 0, 100, 10 )\n // returns 2: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n // example 3: range( 'a', 'i' )\n // returns 3: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']\n // example 4: range( 'c', 'a' )\n // returns 4: ['c', 'b', 'a']\n\n var matrix = []\n var iVal\n var endval\n var plus\n var walker = step || 1\n var chars = false\n\n if (!isNaN(low) && !isNaN(high)) {\n iVal = low\n endval = high\n } else if (isNaN(low) && isNaN(high)) {\n chars = true\n iVal = low.charCodeAt(0)\n endval = high.charCodeAt(0)\n } else {\n iVal = (isNaN(low) ? 0 : low)\n endval = (isNaN(high) ? 0 : high)\n }\n\n plus = !(iVal > endval)\n if (plus) {\n while (iVal <= endval) {\n matrix.push(((chars) ? String.fromCharCode(iVal) : iVal))\n iVal += walker\n }\n } else {\n while (iVal >= endval) {\n matrix.push(((chars) ? String.fromCharCode(iVal) : iVal))\n iVal -= walker\n }\n }\n\n return matrix\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/reset.js b/node_modules/locutus/php/array/reset.js
deleted file mode 100644
index dd3ec3f..0000000
--- a/node_modules/locutus/php/array/reset.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-module.exports = function reset(arr) {
- // discuss at: http://locutus.io/php/reset/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Legaev Andrey
- // revised by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store the array pointer
- // example 1: reset({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})
- // returns 1: 'Kevin'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.pointers = $locutus.php.pointers || [];
- var pointers = $locutus.php.pointers;
-
- var indexOf = function indexOf(value) {
- for (var i = 0, length = this.length; i < length; i++) {
- if (this[i] === value) {
- return i;
- }
- }
- return -1;
- };
-
- if (!pointers.indexOf) {
- pointers.indexOf = indexOf;
- }
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- }
- var arrpos = pointers.indexOf(arr);
- if (Object.prototype.toString.call(arr) !== '[object Array]') {
- for (var k in arr) {
- if (pointers.indexOf(arr) === -1) {
- pointers.push(arr, 0);
- } else {
- pointers[arrpos + 1] = 0;
- }
- return arr[k];
- }
- // Empty
- return false;
- }
- if (arr.length === 0) {
- return false;
- }
- pointers[arrpos + 1] = 0;
- return arr[pointers[arrpos + 1]];
-};
-//# sourceMappingURL=reset.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/reset.js.map b/node_modules/locutus/php/array/reset.js.map
deleted file mode 100644
index 2919d4f..0000000
--- a/node_modules/locutus/php/array/reset.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/reset.js"],"names":["module","exports","reset","arr","$global","window","global","$locutus","php","pointers","indexOf","value","i","length","push","arrpos","Object","prototype","toString","call","k"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,QAAb,GAAwBF,SAASC,GAAT,CAAaC,QAAb,IAAyB,EAAjD;AACA,MAAIA,WAAWF,SAASC,GAAT,CAAaC,QAA5B;;AAEA,MAAIC,UAAU,SAAVA,OAAU,CAAUC,KAAV,EAAiB;AAC7B,SAAK,IAAIC,IAAI,CAAR,EAAWC,SAAS,KAAKA,MAA9B,EAAsCD,IAAIC,MAA1C,EAAkDD,GAAlD,EAAuD;AACrD,UAAI,KAAKA,CAAL,MAAYD,KAAhB,EAAuB;AACrB,eAAOC,CAAP;AACD;AACF;AACD,WAAO,CAAC,CAAR;AACD,GAPD;;AASA,MAAI,CAACH,SAASC,OAAd,EAAuB;AACrBD,aAASC,OAAT,GAAmBA,OAAnB;AACD;AACD,MAAID,SAASC,OAAT,CAAiBP,GAAjB,MAA0B,CAAC,CAA/B,EAAkC;AAChCM,aAASK,IAAT,CAAcX,GAAd,EAAmB,CAAnB;AACD;AACD,MAAIY,SAASN,SAASC,OAAT,CAAiBP,GAAjB,CAAb;AACA,MAAIa,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BhB,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5D,SAAK,IAAIiB,CAAT,IAAcjB,GAAd,EAAmB;AACjB,UAAIM,SAASC,OAAT,CAAiBP,GAAjB,MAA0B,CAAC,CAA/B,EAAkC;AAChCM,iBAASK,IAAT,CAAcX,GAAd,EAAmB,CAAnB;AACD,OAFD,MAEO;AACLM,iBAASM,SAAS,CAAlB,IAAuB,CAAvB;AACD;AACD,aAAOZ,IAAIiB,CAAJ,CAAP;AACD;AACD;AACA,WAAO,KAAP;AACD;AACD,MAAIjB,IAAIU,MAAJ,KAAe,CAAnB,EAAsB;AACpB,WAAO,KAAP;AACD;AACDJ,WAASM,SAAS,CAAlB,IAAuB,CAAvB;AACA,SAAOZ,IAAIM,SAASM,SAAS,CAAlB,CAAJ,CAAP;AACD,CAjDD","file":"reset.js","sourcesContent":["module.exports = function reset (arr) {\n // discuss at: http://locutus.io/php/reset/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Legaev Andrey\n // revised by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store the array pointer\n // example 1: reset({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})\n // returns 1: 'Kevin'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.pointers = $locutus.php.pointers || []\n var pointers = $locutus.php.pointers\n\n var indexOf = function (value) {\n for (var i = 0, length = this.length; i < length; i++) {\n if (this[i] === value) {\n return i\n }\n }\n return -1\n }\n\n if (!pointers.indexOf) {\n pointers.indexOf = indexOf\n }\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n }\n var arrpos = pointers.indexOf(arr)\n if (Object.prototype.toString.call(arr) !== '[object Array]') {\n for (var k in arr) {\n if (pointers.indexOf(arr) === -1) {\n pointers.push(arr, 0)\n } else {\n pointers[arrpos + 1] = 0\n }\n return arr[k]\n }\n // Empty\n return false\n }\n if (arr.length === 0) {\n return false\n }\n pointers[arrpos + 1] = 0\n return arr[pointers[arrpos + 1]]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/rsort.js b/node_modules/locutus/php/array/rsort.js
deleted file mode 100644
index 44f9235..0000000
--- a/node_modules/locutus/php/array/rsort.js
+++ /dev/null
@@ -1,113 +0,0 @@
-'use strict';
-
-module.exports = function rsort(inputArr, sortFlags) {
- // discuss at: http://locutus.io/php/rsort/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: SORT_STRING (as well as natsort and natcasesort) might also be
- // note 1: integrated into all of these functions by adapting the code at
- // note 1: http://sourcefrog.net/projects/natsort/natcompare.js
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: Since JS objects' keys are always strings, and (the
- // note 1: default) SORT_REGULAR flag distinguishes by key type,
- // note 1: if the content is a numeric string, we treat the
- // note 1: "original type" as numeric.
- // example 1: var $arr = ['Kevin', 'van', 'Zonneveld']
- // example 1: rsort($arr)
- // example 1: var $result = $arr
- // returns 1: ['van', 'Zonneveld', 'Kevin']
- // example 2: ini_set('locutus.sortByReference', true)
- // example 2: var $fruits = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 2: rsort($fruits)
- // example 2: var $result = $fruits
- // returns 2: {0: 'orange', 1: 'lemon', 2: 'banana', 3: 'apple'}
- // test: skip-1
-
- var i18nlgd = require('../i18n/i18n_loc_get_default');
- var strnatcmp = require('../strings/strnatcmp');
-
- var sorter;
- var i;
- var k;
- var sortByReference = false;
- var populateArr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- switch (sortFlags) {
- case 'SORT_STRING':
- // compare items as strings
- sorter = function sorter(a, b) {
- return strnatcmp(b, a);
- };
- break;
- case 'SORT_LOCALE_STRING':
- // compare items as strings, based on the current locale
- // (set with i18n_loc_set_default() as of PHP6)
- var loc = i18nlgd();
- sorter = $locutus.locales[loc].sorting;
- break;
- case 'SORT_NUMERIC':
- // compare items numerically
- sorter = function sorter(a, b) {
- return b - a;
- };
- break;
- case 'SORT_REGULAR':
- default:
- // compare items normally (don't change types)
- sorter = function sorter(b, a) {
- var aFloat = parseFloat(a);
- var bFloat = parseFloat(b);
- var aNumeric = aFloat + '' === a;
- var bNumeric = bFloat + '' === b;
- if (aNumeric && bNumeric) {
- return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0;
- } else if (aNumeric && !bNumeric) {
- return 1;
- } else if (!aNumeric && bNumeric) {
- return -1;
- }
- return a > b ? 1 : a < b ? -1 : 0;
- };
- break;
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
- var valArr = [];
-
- for (k in inputArr) {
- // Get key and value arrays
- if (inputArr.hasOwnProperty(k)) {
- valArr.push(inputArr[k]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
-
- valArr.sort(sorter);
-
- for (i = 0; i < valArr.length; i++) {
- // Repopulate the old array
- populateArr[i] = valArr[i];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=rsort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/rsort.js.map b/node_modules/locutus/php/array/rsort.js.map
deleted file mode 100644
index bea83ef..0000000
--- a/node_modules/locutus/php/array/rsort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/rsort.js"],"names":["module","exports","rsort","inputArr","sortFlags","i18nlgd","require","strnatcmp","sorter","i","k","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","iniVal","undefined","valArr","hasOwnProperty","push","sort","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,SAA1B,EAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,8BAAR,CAAd;AACA,MAAIC,YAAYD,QAAQ,sBAAR,CAAhB;;AAEA,MAAIE,MAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAA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,SAAS,CAAC,OAAOtB,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFuB,SAA1F,KAAwG,IAArH;AACAlB,oBAAkBiB,WAAW,IAA7B;AACAhB,gBAAcD,kBAAkBR,QAAlB,GAA6BS,WAA3C;AACA,MAAIkB,SAAS,EAAb;;AAEA,OAAKpB,CAAL,IAAUP,QAAV,EAAoB;AAClB;AACA,QAAIA,SAAS4B,cAAT,CAAwBrB,CAAxB,CAAJ,EAAgC;AAC9BoB,aAAOE,IAAP,CAAY7B,SAASO,CAAT,CAAZ;AACA,UAAIC,eAAJ,EAAqB;AACnB,eAAOR,SAASO,CAAT,CAAP;AACD;AACF;AACF;;AAEDoB,SAAOG,IAAP,CAAYzB,MAAZ;;AAEA,OAAKC,IAAI,CAAT,EAAYA,IAAIqB,OAAOI,MAAvB,EAA+BzB,GAA/B,EAAoC;AAClC;AACAG,gBAAYH,CAAZ,IAAiBqB,OAAOrB,CAAP,CAAjB;AACD;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CA7GD","file":"rsort.js","sourcesContent":["module.exports = function rsort (inputArr, sortFlags) {\n // discuss at: http://locutus.io/php/rsort/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: SORT_STRING (as well as natsort and natcasesort) might also be\n // note 1: integrated into all of these functions by adapting the code at\n // note 1: http://sourcefrog.net/projects/natsort/natcompare.js\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: Since JS objects' keys are always strings, and (the\n // note 1: default) SORT_REGULAR flag distinguishes by key type,\n // note 1: if the content is a numeric string, we treat the\n // note 1: \"original type\" as numeric.\n // example 1: var $arr = ['Kevin', 'van', 'Zonneveld']\n // example 1: rsort($arr)\n // example 1: var $result = $arr\n // returns 1: ['van', 'Zonneveld', 'Kevin']\n // example 2: ini_set('locutus.sortByReference', true)\n // example 2: var $fruits = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 2: rsort($fruits)\n // example 2: var $result = $fruits\n // returns 2: {0: 'orange', 1: 'lemon', 2: 'banana', 3: 'apple'}\n // test: skip-1\n\n var i18nlgd = require('../i18n/i18n_loc_get_default')\n var strnatcmp = require('../strings/strnatcmp')\n\n var sorter\n var i\n var k\n var sortByReference = false\n var populateArr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n switch (sortFlags) {\n case 'SORT_STRING':\n // compare items as strings\n sorter = function (a, b) {\n return strnatcmp(b, a)\n }\n break\n case 'SORT_LOCALE_STRING':\n // compare items as strings, based on the current locale\n // (set with i18n_loc_set_default() as of PHP6)\n var loc = i18nlgd()\n sorter = $locutus.locales[loc].sorting\n break\n case 'SORT_NUMERIC':\n // compare items numerically\n sorter = function (a, b) {\n return (b - a)\n }\n break\n case 'SORT_REGULAR':\n default:\n // compare items normally (don't change types)\n sorter = function (b, a) {\n var aFloat = parseFloat(a)\n var bFloat = parseFloat(b)\n var aNumeric = aFloat + '' === a\n var bNumeric = bFloat + '' === b\n if (aNumeric && bNumeric) {\n return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n } else if (aNumeric && !bNumeric) {\n return 1\n } else if (!aNumeric && bNumeric) {\n return -1\n }\n return a > b ? 1 : a < b ? -1 : 0\n }\n break\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n var valArr = []\n\n for (k in inputArr) {\n // Get key and value arrays\n if (inputArr.hasOwnProperty(k)) {\n valArr.push(inputArr[k])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n\n valArr.sort(sorter)\n\n for (i = 0; i < valArr.length; i++) {\n // Repopulate the old array\n populateArr[i] = valArr[i]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/shuffle.js b/node_modules/locutus/php/array/shuffle.js
deleted file mode 100644
index 0443c5e..0000000
--- a/node_modules/locutus/php/array/shuffle.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-module.exports = function shuffle(inputArr) {
- // discuss at: http://locutus.io/php/shuffle/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $data = {5:'a', 2:'3', 3:'c', 4:5, 'q':5}
- // example 1: ini_set('locutus.sortByReference', true)
- // example 1: shuffle($data)
- // example 1: var $result = $data.q
- // returns 1: 5
-
- var valArr = [];
- var k = '';
- var i = 0;
- var sortByReference = false;
- var populateArr = [];
-
- for (k in inputArr) {
- // Get key and value arrays
- if (inputArr.hasOwnProperty(k)) {
- valArr.push(inputArr[k]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
- valArr.sort(function () {
- return 0.5 - Math.random();
- });
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- for (i = 0; i < valArr.length; i++) {
- // Repopulate the old array
- populateArr[i] = valArr[i];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=shuffle.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/shuffle.js.map b/node_modules/locutus/php/array/shuffle.js.map
deleted file mode 100644
index bbdaa2e..0000000
--- a/node_modules/locutus/php/array/shuffle.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/shuffle.js"],"names":["module","exports","shuffle","inputArr","valArr","k","i","sortByReference","populateArr","hasOwnProperty","push","sort","Math","random","iniVal","require","undefined","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,OAAKH,CAAL,IAAUF,QAAV,EAAoB;AAClB;AACA,QAAIA,SAASM,cAAT,CAAwBJ,CAAxB,CAAJ,EAAgC;AAC9BD,aAAOM,IAAP,CAAYP,SAASE,CAAT,CAAZ;AACA,UAAIE,eAAJ,EAAqB;AACnB,eAAOJ,SAASE,CAAT,CAAP;AACD;AACF;AACF;AACDD,SAAOO,IAAP,CAAY,YAAY;AACtB,WAAO,MAAMC,KAAKC,MAAL,EAAb;AACD,GAFD;;AAIA,MAAIC,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAArH;AACAT,oBAAkBO,WAAW,IAA7B;AACAN,gBAAcD,kBAAkBJ,QAAlB,GAA6BK,WAA3C;;AAEA,OAAKF,IAAI,CAAT,EAAYA,IAAIF,OAAOa,MAAvB,EAA+BX,GAA/B,EAAoC;AAClC;AACAE,gBAAYF,CAAZ,IAAiBF,OAAOE,CAAP,CAAjB;AACD;;AAED,SAAOC,mBAAmBC,WAA1B;AACD,CAzCD","file":"shuffle.js","sourcesContent":["module.exports = function shuffle (inputArr) {\n // discuss at: http://locutus.io/php/shuffle/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $data = {5:'a', 2:'3', 3:'c', 4:5, 'q':5}\n // example 1: ini_set('locutus.sortByReference', true)\n // example 1: shuffle($data)\n // example 1: var $result = $data.q\n // returns 1: 5\n\n var valArr = []\n var k = ''\n var i = 0\n var sortByReference = false\n var populateArr = []\n\n for (k in inputArr) {\n // Get key and value arrays\n if (inputArr.hasOwnProperty(k)) {\n valArr.push(inputArr[k])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n valArr.sort(function () {\n return 0.5 - Math.random()\n })\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n for (i = 0; i < valArr.length; i++) {\n // Repopulate the old array\n populateArr[i] = valArr[i]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/sizeof.js b/node_modules/locutus/php/array/sizeof.js
deleted file mode 100644
index 2c54e9c..0000000
--- a/node_modules/locutus/php/array/sizeof.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function sizeof(mixedVar, mode) {
- // discuss at: http://locutus.io/php/sizeof/
- // original by: Philip Peterson
- // example 1: sizeof([[0,0],[0,-4]], 'COUNT_RECURSIVE')
- // returns 1: 6
- // example 2: sizeof({'one' : [1,2,3,4,5]}, 'COUNT_RECURSIVE')
- // returns 2: 6
-
- var count = require('../array/count');
-
- return count(mixedVar, mode);
-};
-//# sourceMappingURL=sizeof.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/sizeof.js.map b/node_modules/locutus/php/array/sizeof.js.map
deleted file mode 100644
index d27516f..0000000
--- a/node_modules/locutus/php/array/sizeof.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/sizeof.js"],"names":["module","exports","sizeof","mixedVar","mode","count","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,IAA3B,EAAiC;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,QAAQC,QAAQ,gBAAR,CAAZ;;AAEA,SAAOD,MAAMF,QAAN,EAAgBC,IAAhB,CAAP;AACD,CAXD","file":"sizeof.js","sourcesContent":["module.exports = function sizeof (mixedVar, mode) {\n // discuss at: http://locutus.io/php/sizeof/\n // original by: Philip Peterson\n // example 1: sizeof([[0,0],[0,-4]], 'COUNT_RECURSIVE')\n // returns 1: 6\n // example 2: sizeof({'one' : [1,2,3,4,5]}, 'COUNT_RECURSIVE')\n // returns 2: 6\n\n var count = require('../array/count')\n\n return count(mixedVar, mode)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/sort.js b/node_modules/locutus/php/array/sort.js
deleted file mode 100644
index 4e09464..0000000
--- a/node_modules/locutus/php/array/sort.js
+++ /dev/null
@@ -1,116 +0,0 @@
-'use strict';
-
-module.exports = function sort(inputArr, sortFlags) {
- // discuss at: http://locutus.io/php/sort/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: SORT_STRING (as well as natsort and natcasesort) might also be
- // note 1: integrated into all of these functions by adapting the code at
- // note 1: http://sourcefrog.net/projects/natsort/natcompare.js
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // note 1: Since JS objects' keys are always strings, and (the
- // note 1: default) SORT_REGULAR flag distinguishes by key type,
- // note 1: if the content is a numeric string, we treat the
- // note 1: "original type" as numeric.
- // example 1: var $arr = ['Kevin', 'van', 'Zonneveld']
- // example 1: sort($arr)
- // example 1: var $result = $arr
- // returns 1: ['Kevin', 'Zonneveld', 'van']
- // example 2: ini_set('locutus.sortByReference', true)
- // example 2: var $fruits = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 2: sort($fruits)
- // example 2: var $result = $fruits
- // returns 2: {0: 'apple', 1: 'banana', 2: 'lemon', 3: 'orange'}
- // test: skip-1
-
- var i18nlgd = require('../i18n/i18n_loc_get_default');
-
- var sorter;
- var i;
- var k;
- var sortByReference = false;
- var populateArr = {};
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- switch (sortFlags) {
- case 'SORT_STRING':
- // compare items as strings
- // leave sorter undefined, so built-in comparison is used
- break;
- case 'SORT_LOCALE_STRING':
- // compare items as strings, based on the current locale
- // (set with i18n_loc_set_default() as of PHP6)
- var loc = $locutus.php.locales[i18nlgd()];
-
- if (loc && loc.sorting) {
- // if sorting exists on locale object, use it
- // otherwise let sorter be undefined
- // to fallback to built-in behavior
- sorter = loc.sorting;
- }
- break;
- case 'SORT_NUMERIC':
- // compare items numerically
- sorter = function sorter(a, b) {
- return a - b;
- };
- break;
- case 'SORT_REGULAR':
- default:
- sorter = function sorter(a, b) {
- var aFloat = parseFloat(a);
- var bFloat = parseFloat(b);
- var aNumeric = aFloat + '' === a;
- var bNumeric = bFloat + '' === b;
-
- if (aNumeric && bNumeric) {
- return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0;
- } else if (aNumeric && !bNumeric) {
- return 1;
- } else if (!aNumeric && bNumeric) {
- return -1;
- }
-
- return a > b ? 1 : a < b ? -1 : 0;
- };
- break;
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- var valArr = [];
- for (k in inputArr) {
- // Get key and value arrays
- if (inputArr.hasOwnProperty(k)) {
- valArr.push(inputArr[k]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
-
- valArr.sort(sorter);
-
- for (i = 0; i < valArr.length; i++) {
- // Repopulate the old array
- populateArr[i] = valArr[i];
- }
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=sort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/sort.js.map b/node_modules/locutus/php/array/sort.js.map
deleted file mode 100644
index 9ac03bc..0000000
--- a/node_modules/locutus/php/array/sort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/sort.js"],"names":["module","exports","sort","inputArr","sortFlags","i18nlgd","require","sorter","i","k","sortByReference","populateArr","$global","window","global","$locutus","php","locales","loc","sorting","a","b","aFloat","parseFloat","bFloat","aNumeric","bNumeric","iniVal","undefined","valArr","hasOwnProperty","push","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,QAAf,EAAyBC,SAAzB,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,8BAAR,CAAd;;AAEA,MAAIC,MAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,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D;AAgBA;AAzCJ;;AA4CA,MAAIM,SAAS,CAAC,OAAOrB,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFsB,SAA1F,KAAwG,IAArH;AACAlB,oBAAkBiB,WAAW,IAA7B;AACAhB,gBAAcD,kBAAkBP,QAAlB,GAA6BQ,WAA3C;;AAEA,MAAIkB,SAAS,EAAb;AACA,OAAKpB,CAAL,IAAUN,QAAV,EAAoB;AAClB;AACA,QAAIA,SAAS2B,cAAT,CAAwBrB,CAAxB,CAAJ,EAAgC;AAC9BoB,aAAOE,IAAP,CAAY5B,SAASM,CAAT,CAAZ;AACA,UAAIC,eAAJ,EAAqB;AACnB,eAAOP,SAASM,CAAT,CAAP;AACD;AACF;AACF;;AAEDoB,SAAO3B,IAAP,CAAYK,MAAZ;;AAEA,OAAKC,IAAI,CAAT,EAAYA,IAAIqB,OAAOG,MAAvB,EAA+BxB,GAA/B,EAAoC;AAClC;AACAG,gBAAYH,CAAZ,IAAiBqB,OAAOrB,CAAP,CAAjB;AACD;AACD,SAAOE,mBAAmBC,WAA1B;AACD,CAhHD","file":"sort.js","sourcesContent":["module.exports = function sort (inputArr, sortFlags) {\n // discuss at: http://locutus.io/php/sort/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: SORT_STRING (as well as natsort and natcasesort) might also be\n // note 1: integrated into all of these functions by adapting the code at\n // note 1: http://sourcefrog.net/projects/natsort/natcompare.js\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // note 1: Since JS objects' keys are always strings, and (the\n // note 1: default) SORT_REGULAR flag distinguishes by key type,\n // note 1: if the content is a numeric string, we treat the\n // note 1: \"original type\" as numeric.\n // example 1: var $arr = ['Kevin', 'van', 'Zonneveld']\n // example 1: sort($arr)\n // example 1: var $result = $arr\n // returns 1: ['Kevin', 'Zonneveld', 'van']\n // example 2: ini_set('locutus.sortByReference', true)\n // example 2: var $fruits = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 2: sort($fruits)\n // example 2: var $result = $fruits\n // returns 2: {0: 'apple', 1: 'banana', 2: 'lemon', 3: 'orange'}\n // test: skip-1\n\n var i18nlgd = require('../i18n/i18n_loc_get_default')\n\n var sorter\n var i\n var k\n var sortByReference = false\n var populateArr = {}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n switch (sortFlags) {\n case 'SORT_STRING':\n // compare items as strings\n // leave sorter undefined, so built-in comparison is used\n break\n case 'SORT_LOCALE_STRING':\n // compare items as strings, based on the current locale\n // (set with i18n_loc_set_default() as of PHP6)\n var loc = $locutus.php.locales[i18nlgd()]\n\n if (loc && loc.sorting) {\n // if sorting exists on locale object, use it\n // otherwise let sorter be undefined\n // to fallback to built-in behavior\n sorter = loc.sorting\n }\n break\n case 'SORT_NUMERIC':\n // compare items numerically\n sorter = function (a, b) {\n return (a - b)\n }\n break\n case 'SORT_REGULAR':\n default:\n sorter = function (a, b) {\n var aFloat = parseFloat(a)\n var bFloat = parseFloat(b)\n var aNumeric = aFloat + '' === a\n var bNumeric = bFloat + '' === b\n\n if (aNumeric && bNumeric) {\n return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n } else if (aNumeric && !bNumeric) {\n return 1\n } else if (!aNumeric && bNumeric) {\n return -1\n }\n\n return a > b ? 1 : a < b ? -1 : 0\n }\n break\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n var valArr = []\n for (k in inputArr) {\n // Get key and value arrays\n if (inputArr.hasOwnProperty(k)) {\n valArr.push(inputArr[k])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n\n valArr.sort(sorter)\n\n for (i = 0; i < valArr.length; i++) {\n // Repopulate the old array\n populateArr[i] = valArr[i]\n }\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/uasort.js b/node_modules/locutus/php/array/uasort.js
deleted file mode 100644
index c3a1c34..0000000
--- a/node_modules/locutus/php/array/uasort.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-module.exports = function uasort(inputArr, sorter) {
- // discuss at: http://locutus.io/php/uasort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // example 1: var $sorter = function (a, b) { if (a > b) {return 1;}if (a < b) {return -1;} return 0;}
- // example 1: var $fruits = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 1: uasort($fruits, $sorter)
- // example 1: var $result = $fruits
- // returns 1: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}
-
- var valArr = [];
- var k = '';
- var i = 0;
- var sortByReference = false;
- var populateArr = {};
-
- if (typeof sorter === 'string') {
- sorter = this[sorter];
- } else if (Object.prototype.toString.call(sorter) === '[object Array]') {
- sorter = this[sorter[0]][sorter[1]];
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- for (k in inputArr) {
- // Get key and value arrays
- if (inputArr.hasOwnProperty(k)) {
- valArr.push([k, inputArr[k]]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
- valArr.sort(function (a, b) {
- return sorter(a[1], b[1]);
- });
-
- for (i = 0; i < valArr.length; i++) {
- // Repopulate the old array
- populateArr[valArr[i][0]] = valArr[i][1];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=uasort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/uasort.js.map b/node_modules/locutus/php/array/uasort.js.map
deleted file mode 100644
index 7cddba7..0000000
--- a/node_modules/locutus/php/array/uasort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/uasort.js"],"names":["module","exports","uasort","inputArr","sorter","valArr","k","i","sortByReference","populateArr","Object","prototype","toString","call","iniVal","require","undefined","hasOwnProperty","push","sort","a","b","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,MAA3B,EAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAI,OAAOL,MAAP,KAAkB,QAAtB,EAAgC;AAC9BA,aAAS,KAAKA,MAAL,CAAT;AACD,GAFD,MAEO,IAAIM,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BT,MAA/B,MAA2C,gBAA/C,EAAiE;AACtEA,aAAS,KAAKA,OAAO,CAAP,CAAL,EAAgBA,OAAO,CAAP,CAAhB,CAAT;AACD;;AAED,MAAIU,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAArH;AACAR,oBAAkBM,WAAW,IAA7B;AACAL,gBAAcD,kBAAkBL,QAAlB,GAA6BM,WAA3C;;AAEA,OAAKH,CAAL,IAAUH,QAAV,EAAoB;AAClB;AACA,QAAIA,SAASc,cAAT,CAAwBX,CAAxB,CAAJ,EAAgC;AAC9BD,aAAOa,IAAP,CAAY,CAACZ,CAAD,EAAIH,SAASG,CAAT,CAAJ,CAAZ;AACA,UAAIE,eAAJ,EAAqB;AACnB,eAAOL,SAASG,CAAT,CAAP;AACD;AACF;AACF;AACDD,SAAOc,IAAP,CAAY,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAC1B,WAAOjB,OAAOgB,EAAE,CAAF,CAAP,EAAaC,EAAE,CAAF,CAAb,CAAP;AACD,GAFD;;AAIA,OAAKd,IAAI,CAAT,EAAYA,IAAIF,OAAOiB,MAAvB,EAA+Bf,GAA/B,EAAoC;AAClC;AACAE,gBAAYJ,OAAOE,CAAP,EAAU,CAAV,CAAZ,IAA4BF,OAAOE,CAAP,EAAU,CAAV,CAA5B;AACD;;AAED,SAAOC,mBAAmBC,WAA1B;AACD,CAvDD","file":"uasort.js","sourcesContent":["module.exports = function uasort (inputArr, sorter) {\n // discuss at: http://locutus.io/php/uasort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // example 1: var $sorter = function (a, b) { if (a > b) {return 1;}if (a < b) {return -1;} return 0;}\n // example 1: var $fruits = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 1: uasort($fruits, $sorter)\n // example 1: var $result = $fruits\n // returns 1: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}\n\n var valArr = []\n var k = ''\n var i = 0\n var sortByReference = false\n var populateArr = {}\n\n if (typeof sorter === 'string') {\n sorter = this[sorter]\n } else if (Object.prototype.toString.call(sorter) === '[object Array]') {\n sorter = this[sorter[0]][sorter[1]]\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n for (k in inputArr) {\n // Get key and value arrays\n if (inputArr.hasOwnProperty(k)) {\n valArr.push([k, inputArr[k]])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n valArr.sort(function (a, b) {\n return sorter(a[1], b[1])\n })\n\n for (i = 0; i < valArr.length; i++) {\n // Repopulate the old array\n populateArr[valArr[i][0]] = valArr[i][1]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/uksort.js b/node_modules/locutus/php/array/uksort.js
deleted file mode 100644
index 6288fb2..0000000
--- a/node_modules/locutus/php/array/uksort.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-
-module.exports = function uksort(inputArr, sorter) {
- // discuss at: http://locutus.io/php/uksort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: The examples are correct, this is a new way
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}
- // example 1: uksort($data, function (key1, key2){ return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)); })
- // example 1: var $result = $data
- // returns 1: {a: 'orange', b: 'banana', c: 'apple', d: 'lemon'}
-
- var tmpArr = {};
- var keys = [];
- var i = 0;
- var k = '';
- var sortByReference = false;
- var populateArr = {};
-
- if (typeof sorter === 'string') {
- sorter = this.window[sorter];
- }
-
- // Make a list of key names
- for (k in inputArr) {
- if (inputArr.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
-
- // Sort key names
- try {
- if (sorter) {
- keys.sort(sorter);
- } else {
- keys.sort();
- }
- } catch (e) {
- return false;
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- // Rebuild array with sorted key names
- for (i = 0; i < keys.length; i++) {
- k = keys[i];
- tmpArr[k] = inputArr[k];
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- for (i in tmpArr) {
- if (tmpArr.hasOwnProperty(i)) {
- populateArr[i] = tmpArr[i];
- }
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=uksort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/uksort.js.map b/node_modules/locutus/php/array/uksort.js.map
deleted file mode 100644
index cf139d8..0000000
--- a/node_modules/locutus/php/array/uksort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/uksort.js"],"names":["module","exports","uksort","inputArr","sorter","tmpArr","keys","i","k","sortByReference","populateArr","window","hasOwnProperty","push","sort","e","iniVal","require","undefined","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,MAA3B,EAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAI,OAAON,MAAP,KAAkB,QAAtB,EAAgC;AAC9BA,aAAS,KAAKO,MAAL,CAAYP,MAAZ,CAAT;AACD;;AAED;AACA,OAAKI,CAAL,IAAUL,QAAV,EAAoB;AAClB,QAAIA,SAASS,cAAT,CAAwBJ,CAAxB,CAAJ,EAAgC;AAC9BF,WAAKO,IAAL,CAAUL,CAAV;AACD;AACF;;AAED;AACA,MAAI;AACF,QAAIJ,MAAJ,EAAY;AACVE,WAAKQ,IAAL,CAAUV,MAAV;AACD,KAFD,MAEO;AACLE,WAAKQ,IAAL;AACD;AACF,GAND,CAME,OAAOC,CAAP,EAAU;AACV,WAAO,KAAP;AACD;;AAED,MAAIC,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAArH;AACAT,oBAAkBO,WAAW,IAA7B;AACAN,gBAAcD,kBAAkBN,QAAlB,GAA6BO,WAA3C;;AAEA;AACA,OAAKH,IAAI,CAAT,EAAYA,IAAID,KAAKa,MAArB,EAA6BZ,GAA7B,EAAkC;AAChCC,QAAIF,KAAKC,CAAL,CAAJ;AACAF,WAAOG,CAAP,IAAYL,SAASK,CAAT,CAAZ;AACA,QAAIC,eAAJ,EAAqB;AACnB,aAAON,SAASK,CAAT,CAAP;AACD;AACF;AACD,OAAKD,CAAL,IAAUF,MAAV,EAAkB;AAChB,QAAIA,OAAOO,cAAP,CAAsBL,CAAtB,CAAJ,EAA8B;AAC5BG,kBAAYH,CAAZ,IAAiBF,OAAOE,CAAP,CAAjB;AACD;AACF;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CAnED","file":"uksort.js","sourcesContent":["module.exports = function uksort (inputArr, sorter) {\n // discuss at: http://locutus.io/php/uksort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: The examples are correct, this is a new way\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n // example 1: uksort($data, function (key1, key2){ return (key1 === key2 ? 0 : (key1 > key2 ? 1 : -1)); })\n // example 1: var $result = $data\n // returns 1: {a: 'orange', b: 'banana', c: 'apple', d: 'lemon'}\n\n var tmpArr = {}\n var keys = []\n var i = 0\n var k = ''\n var sortByReference = false\n var populateArr = {}\n\n if (typeof sorter === 'string') {\n sorter = this.window[sorter]\n }\n\n // Make a list of key names\n for (k in inputArr) {\n if (inputArr.hasOwnProperty(k)) {\n keys.push(k)\n }\n }\n\n // Sort key names\n try {\n if (sorter) {\n keys.sort(sorter)\n } else {\n keys.sort()\n }\n } catch (e) {\n return false\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n // Rebuild array with sorted key names\n for (i = 0; i < keys.length; i++) {\n k = keys[i]\n tmpArr[k] = inputArr[k]\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n for (i in tmpArr) {\n if (tmpArr.hasOwnProperty(i)) {\n populateArr[i] = tmpArr[i]\n }\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/array/usort.js b/node_modules/locutus/php/array/usort.js
deleted file mode 100644
index d9666f6..0000000
--- a/node_modules/locutus/php/array/usort.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-module.exports = function usort(inputArr, sorter) {
- // discuss at: http://locutus.io/php/usort/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: This function deviates from PHP in returning a copy of the array instead
- // note 1: of acting by reference and returning true; this was necessary because
- // note 1: IE does not allow deleting and re-adding of properties without caching
- // note 1: of property position; you can set the ini of "locutus.sortByReference" to true to
- // note 1: get the PHP behavior, but use this only if you are in an environment
- // note 1: such as Firefox extensions where for-in iteration order is fixed and true
- // note 1: property deletion is supported. Note that we intend to implement the PHP
- // note 1: behavior by default if IE ever does allow it; only gives shallow copy since
- // note 1: is by reference in PHP anyways
- // example 1: var $stuff = {d: '3', a: '1', b: '11', c: '4'}
- // example 1: usort($stuff, function (a, b) { return (a - b) })
- // example 1: var $result = $stuff
- // returns 1: {0: '1', 1: '3', 2: '4', 3: '11'}
-
- var valArr = [];
- var k = '';
- var i = 0;
- var sortByReference = false;
- var populateArr = {};
-
- if (typeof sorter === 'string') {
- sorter = this[sorter];
- } else if (Object.prototype.toString.call(sorter) === '[object Array]') {
- sorter = this[sorter[0]][sorter[1]];
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on';
- sortByReference = iniVal === 'on';
- populateArr = sortByReference ? inputArr : populateArr;
-
- for (k in inputArr) {
- // Get key and value arrays
- if (inputArr.hasOwnProperty(k)) {
- valArr.push(inputArr[k]);
- if (sortByReference) {
- delete inputArr[k];
- }
- }
- }
- try {
- valArr.sort(sorter);
- } catch (e) {
- return false;
- }
- for (i = 0; i < valArr.length; i++) {
- // Repopulate the old array
- populateArr[i] = valArr[i];
- }
-
- return sortByReference || populateArr;
-};
-//# sourceMappingURL=usort.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/array/usort.js.map b/node_modules/locutus/php/array/usort.js.map
deleted file mode 100644
index 3513c4f..0000000
--- a/node_modules/locutus/php/array/usort.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/array/usort.js"],"names":["module","exports","usort","inputArr","sorter","valArr","k","i","sortByReference","populateArr","Object","prototype","toString","call","iniVal","require","undefined","hasOwnProperty","push","sort","e","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,MAA1B,EAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAI,OAAOL,MAAP,KAAkB,QAAtB,EAAgC;AAC9BA,aAAS,KAAKA,MAAL,CAAT;AACD,GAFD,MAEO,IAAIM,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BT,MAA/B,MAA2C,gBAA/C,EAAiE;AACtEA,aAAS,KAAKA,OAAO,CAAP,CAAL,EAAgBA,OAAO,CAAP,CAAhB,CAAT;AACD;;AAED,MAAIU,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAArH;AACAR,oBAAkBM,WAAW,IAA7B;AACAL,gBAAcD,kBAAkBL,QAAlB,GAA6BM,WAA3C;;AAEA,OAAKH,CAAL,IAAUH,QAAV,EAAoB;AAClB;AACA,QAAIA,SAASc,cAAT,CAAwBX,CAAxB,CAAJ,EAAgC;AAC9BD,aAAOa,IAAP,CAAYf,SAASG,CAAT,CAAZ;AACA,UAAIE,eAAJ,EAAqB;AACnB,eAAOL,SAASG,CAAT,CAAP;AACD;AACF;AACF;AACD,MAAI;AACFD,WAAOc,IAAP,CAAYf,MAAZ;AACD,GAFD,CAEE,OAAOgB,CAAP,EAAU;AACV,WAAO,KAAP;AACD;AACD,OAAKb,IAAI,CAAT,EAAYA,IAAIF,OAAOgB,MAAvB,EAA+Bd,GAA/B,EAAoC;AAClC;AACAE,gBAAYF,CAAZ,IAAiBF,OAAOE,CAAP,CAAjB;AACD;;AAED,SAAOC,mBAAmBC,WAA1B;AACD,CAtDD","file":"usort.js","sourcesContent":["module.exports = function usort (inputArr, sorter) {\n // discuss at: http://locutus.io/php/usort/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: This function deviates from PHP in returning a copy of the array instead\n // note 1: of acting by reference and returning true; this was necessary because\n // note 1: IE does not allow deleting and re-adding of properties without caching\n // note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n // note 1: get the PHP behavior, but use this only if you are in an environment\n // note 1: such as Firefox extensions where for-in iteration order is fixed and true\n // note 1: property deletion is supported. Note that we intend to implement the PHP\n // note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n // note 1: is by reference in PHP anyways\n // example 1: var $stuff = {d: '3', a: '1', b: '11', c: '4'}\n // example 1: usort($stuff, function (a, b) { return (a - b) })\n // example 1: var $result = $stuff\n // returns 1: {0: '1', 1: '3', 2: '4', 3: '11'}\n\n var valArr = []\n var k = ''\n var i = 0\n var sortByReference = false\n var populateArr = {}\n\n if (typeof sorter === 'string') {\n sorter = this[sorter]\n } else if (Object.prototype.toString.call(sorter) === '[object Array]') {\n sorter = this[sorter[0]][sorter[1]]\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n for (k in inputArr) {\n // Get key and value arrays\n if (inputArr.hasOwnProperty(k)) {\n valArr.push(inputArr[k])\n if (sortByReference) {\n delete inputArr[k]\n }\n }\n }\n try {\n valArr.sort(sorter)\n } catch (e) {\n return false\n }\n for (i = 0; i < valArr.length; i++) {\n // Repopulate the old array\n populateArr[i] = valArr[i]\n }\n\n return sortByReference || populateArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcadd.js b/node_modules/locutus/php/bc/bcadd.js
deleted file mode 100644
index 8c6a017..0000000
--- a/node_modules/locutus/php/bc/bcadd.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-module.exports = function bcadd(leftOperand, rightOperand, scale) {
- // discuss at: http://locutus.io/php/bcadd/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bcadd('1', '2')
- // returns 1: '3'
- // example 2: bcadd('-1', '5', 4)
- // returns 2: '4.0000'
- // example 3: bcadd('1928372132132819737213', '8728932001983192837219398127471', 2)
- // returns 3: '8728932003911564969352217864684.00'
-
- var bc = require('../_helpers/_bc');
- var libbcmath = bc();
-
- var first, second, result;
-
- if (typeof scale === 'undefined') {
- scale = libbcmath.scale;
- }
- scale = scale < 0 ? 0 : scale;
-
- // create objects
- first = libbcmath.bc_init_num();
- second = libbcmath.bc_init_num();
- result = libbcmath.bc_init_num();
-
- first = libbcmath.php_str2num(leftOperand.toString());
- second = libbcmath.php_str2num(rightOperand.toString());
-
- result = libbcmath.bc_add(first, second, scale);
-
- if (result.n_scale > scale) {
- result.n_scale = scale;
- }
-
- return result.toString();
-};
-//# sourceMappingURL=bcadd.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcadd.js.map b/node_modules/locutus/php/bc/bcadd.js.map
deleted file mode 100644
index 5e6b5ec..0000000
--- a/node_modules/locutus/php/bc/bcadd.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bcadd.js"],"names":["module","exports","bcadd","leftOperand","rightOperand","scale","bc","require","libbcmath","first","second","result","bc_init_num","php_str2num","toString","bc_add","n_scale"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,WAAhB,EAA6BC,YAA7B,EAA2CC,KAA3C,EAAkD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAKC,QAAQ,iBAAR,CAAT;AACA,MAAIC,YAAYF,IAAhB;;AAEA,MAAIG,KAAJ,EAAWC,MAAX,EAAmBC,MAAnB;;AAEA,MAAI,OAAON,KAAP,KAAiB,WAArB,EAAkC;AAChCA,YAAQG,UAAUH,KAAlB;AACD;AACDA,UAAUA,QAAQ,CAAT,GAAc,CAAd,GAAkBA,KAA3B;;AAEA;AACAI,UAAQD,UAAUI,WAAV,EAAR;AACAF,WAASF,UAAUI,WAAV,EAAT;AACAD,WAASH,UAAUI,WAAV,EAAT;;AAEAH,UAAQD,UAAUK,WAAV,CAAsBV,YAAYW,QAAZ,EAAtB,CAAR;AACAJ,WAASF,UAAUK,WAAV,CAAsBT,aAAaU,QAAb,EAAtB,CAAT;;AAEAH,WAASH,UAAUO,MAAV,CAAiBN,KAAjB,EAAwBC,MAAxB,EAAgCL,KAAhC,CAAT;;AAEA,MAAIM,OAAOK,OAAP,GAAiBX,KAArB,EAA4B;AAC1BM,WAAOK,OAAP,GAAiBX,KAAjB;AACD;;AAED,SAAOM,OAAOG,QAAP,EAAP;AACD,CAnCD","file":"bcadd.js","sourcesContent":["module.exports = function bcadd (leftOperand, rightOperand, scale) {\n // discuss at: http://locutus.io/php/bcadd/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bcadd('1', '2')\n // returns 1: '3'\n // example 2: bcadd('-1', '5', 4)\n // returns 2: '4.0000'\n // example 3: bcadd('1928372132132819737213', '8728932001983192837219398127471', 2)\n // returns 3: '8728932003911564969352217864684.00'\n\n var bc = require('../_helpers/_bc')\n var libbcmath = bc()\n\n var first, second, result\n\n if (typeof scale === 'undefined') {\n scale = libbcmath.scale\n }\n scale = ((scale < 0) ? 0 : scale)\n\n // create objects\n first = libbcmath.bc_init_num()\n second = libbcmath.bc_init_num()\n result = libbcmath.bc_init_num()\n\n first = libbcmath.php_str2num(leftOperand.toString())\n second = libbcmath.php_str2num(rightOperand.toString())\n\n result = libbcmath.bc_add(first, second, scale)\n\n if (result.n_scale > scale) {\n result.n_scale = scale\n }\n\n return result.toString()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bccomp.js b/node_modules/locutus/php/bc/bccomp.js
deleted file mode 100644
index bf1d07b..0000000
--- a/node_modules/locutus/php/bc/bccomp.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function bccomp(leftOperand, rightOperand, scale) {
- // discuss at: http://locutus.io/php/bccomp/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bccomp('-1', '5', 4)
- // returns 1: -1
- // example 2: bccomp('1928372132132819737213', '8728932001983192837219398127471')
- // returns 2: -1
- // example 3: bccomp('1.00000000000000000001', '1', 2)
- // returns 3: 0
- // example 4: bccomp('97321', '2321')
- // returns 4: 1
-
- var bc = require('../_helpers/_bc');
- var libbcmath = bc();
-
- // bc_num
- var first, second;
- if (typeof scale === 'undefined') {
- scale = libbcmath.scale;
- }
- scale = scale < 0 ? 0 : scale;
-
- first = libbcmath.bc_init_num();
- second = libbcmath.bc_init_num();
-
- // note bc_ not php_str2num
- first = libbcmath.bc_str2num(leftOperand.toString(), scale);
- // note bc_ not php_str2num
- second = libbcmath.bc_str2num(rightOperand.toString(), scale);
- return libbcmath.bc_compare(first, second, scale);
-};
-//# sourceMappingURL=bccomp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bccomp.js.map b/node_modules/locutus/php/bc/bccomp.js.map
deleted file mode 100644
index 985c106..0000000
--- a/node_modules/locutus/php/bc/bccomp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bccomp.js"],"names":["module","exports","bccomp","leftOperand","rightOperand","scale","bc","require","libbcmath","first","second","bc_init_num","bc_str2num","toString","bc_compare"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,WAAjB,EAA8BC,YAA9B,EAA4CC,KAA5C,EAAmD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAKC,QAAQ,iBAAR,CAAT;AACA,MAAIC,YAAYF,IAAhB;;AAEA;AACA,MAAIG,KAAJ,EAAWC,MAAX;AACA,MAAI,OAAOL,KAAP,KAAiB,WAArB,EAAkC;AAChCA,YAAQG,UAAUH,KAAlB;AACD;AACDA,UAAUA,QAAQ,CAAT,GAAc,CAAd,GAAkBA,KAA3B;;AAEAI,UAAQD,UAAUG,WAAV,EAAR;AACAD,WAASF,UAAUG,WAAV,EAAT;;AAEA;AACAF,UAAQD,UAAUI,UAAV,CAAqBT,YAAYU,QAAZ,EAArB,EAA6CR,KAA7C,CAAR;AACA;AACAK,WAASF,UAAUI,UAAV,CAAqBR,aAAaS,QAAb,EAArB,EAA8CR,KAA9C,CAAT;AACA,SAAOG,UAAUM,UAAV,CAAqBL,KAArB,EAA4BC,MAA5B,EAAoCL,KAApC,CAAP;AACD,CA9BD","file":"bccomp.js","sourcesContent":["module.exports = function bccomp (leftOperand, rightOperand, scale) {\n // discuss at: http://locutus.io/php/bccomp/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bccomp('-1', '5', 4)\n // returns 1: -1\n // example 2: bccomp('1928372132132819737213', '8728932001983192837219398127471')\n // returns 2: -1\n // example 3: bccomp('1.00000000000000000001', '1', 2)\n // returns 3: 0\n // example 4: bccomp('97321', '2321')\n // returns 4: 1\n\n var bc = require('../_helpers/_bc')\n var libbcmath = bc()\n\n // bc_num\n var first, second\n if (typeof scale === 'undefined') {\n scale = libbcmath.scale\n }\n scale = ((scale < 0) ? 0 : scale)\n\n first = libbcmath.bc_init_num()\n second = libbcmath.bc_init_num()\n\n // note bc_ not php_str2num\n first = libbcmath.bc_str2num(leftOperand.toString(), scale)\n // note bc_ not php_str2num\n second = libbcmath.bc_str2num(rightOperand.toString(), scale)\n return libbcmath.bc_compare(first, second, scale)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcdiv.js b/node_modules/locutus/php/bc/bcdiv.js
deleted file mode 100644
index 1cbcd79..0000000
--- a/node_modules/locutus/php/bc/bcdiv.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-module.exports = function bcdiv(leftOperand, rightOperand, scale) {
- // discuss at: http://locutus.io/php/bcdiv/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bcdiv('1', '2')
- // returns 1: '0'
- // example 2: bcdiv('1', '2', 2)
- // returns 2: '0.50'
- // example 3: bcdiv('-1', '5', 4)
- // returns 3: '-0.2000'
- // example 4: bcdiv('8728932001983192837219398127471', '1928372132132819737213', 2)
- // returns 4: '4526580661.75'
-
- var _bc = require('../_helpers/_bc');
- var libbcmath = _bc();
-
- var first, second, result;
-
- if (typeof scale === 'undefined') {
- scale = libbcmath.scale;
- }
- scale = scale < 0 ? 0 : scale;
-
- // create objects
- first = libbcmath.bc_init_num();
- second = libbcmath.bc_init_num();
- result = libbcmath.bc_init_num();
-
- first = libbcmath.php_str2num(leftOperand.toString());
- second = libbcmath.php_str2num(rightOperand.toString());
-
- result = libbcmath.bc_divide(first, second, scale);
- if (result === -1) {
- // error
- throw new Error(11, '(BC) Division by zero');
- }
- if (result.n_scale > scale) {
- result.n_scale = scale;
- }
-
- return result.toString();
-};
-//# sourceMappingURL=bcdiv.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcdiv.js.map b/node_modules/locutus/php/bc/bcdiv.js.map
deleted file mode 100644
index 10f0db4..0000000
--- a/node_modules/locutus/php/bc/bcdiv.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bcdiv.js"],"names":["module","exports","bcdiv","leftOperand","rightOperand","scale","_bc","require","libbcmath","first","second","result","bc_init_num","php_str2num","toString","bc_divide","Error","n_scale"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,WAAhB,EAA6BC,YAA7B,EAA2CC,KAA3C,EAAkD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAMC,QAAQ,iBAAR,CAAV;AACA,MAAIC,YAAYF,KAAhB;;AAEA,MAAIG,KAAJ,EAAWC,MAAX,EAAmBC,MAAnB;;AAEA,MAAI,OAAON,KAAP,KAAiB,WAArB,EAAkC;AAChCA,YAAQG,UAAUH,KAAlB;AACD;AACDA,UAAUA,QAAQ,CAAT,GAAc,CAAd,GAAkBA,KAA3B;;AAEA;AACAI,UAAQD,UAAUI,WAAV,EAAR;AACAF,WAASF,UAAUI,WAAV,EAAT;AACAD,WAASH,UAAUI,WAAV,EAAT;;AAEAH,UAAQD,UAAUK,WAAV,CAAsBV,YAAYW,QAAZ,EAAtB,CAAR;AACAJ,WAASF,UAAUK,WAAV,CAAsBT,aAAaU,QAAb,EAAtB,CAAT;;AAEAH,WAASH,UAAUO,SAAV,CAAoBN,KAApB,EAA2BC,MAA3B,EAAmCL,KAAnC,CAAT;AACA,MAAIM,WAAW,CAAC,CAAhB,EAAmB;AACjB;AACA,UAAM,IAAIK,KAAJ,CAAU,EAAV,EAAc,uBAAd,CAAN;AACD;AACD,MAAIL,OAAOM,OAAP,GAAiBZ,KAArB,EAA4B;AAC1BM,WAAOM,OAAP,GAAiBZ,KAAjB;AACD;;AAED,SAAOM,OAAOG,QAAP,EAAP;AACD,CAxCD","file":"bcdiv.js","sourcesContent":["module.exports = function bcdiv (leftOperand, rightOperand, scale) {\n // discuss at: http://locutus.io/php/bcdiv/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bcdiv('1', '2')\n // returns 1: '0'\n // example 2: bcdiv('1', '2', 2)\n // returns 2: '0.50'\n // example 3: bcdiv('-1', '5', 4)\n // returns 3: '-0.2000'\n // example 4: bcdiv('8728932001983192837219398127471', '1928372132132819737213', 2)\n // returns 4: '4526580661.75'\n\n var _bc = require('../_helpers/_bc')\n var libbcmath = _bc()\n\n var first, second, result\n\n if (typeof scale === 'undefined') {\n scale = libbcmath.scale\n }\n scale = ((scale < 0) ? 0 : scale)\n\n // create objects\n first = libbcmath.bc_init_num()\n second = libbcmath.bc_init_num()\n result = libbcmath.bc_init_num()\n\n first = libbcmath.php_str2num(leftOperand.toString())\n second = libbcmath.php_str2num(rightOperand.toString())\n\n result = libbcmath.bc_divide(first, second, scale)\n if (result === -1) {\n // error\n throw new Error(11, '(BC) Division by zero')\n }\n if (result.n_scale > scale) {\n result.n_scale = scale\n }\n\n return result.toString()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcmul.js b/node_modules/locutus/php/bc/bcmul.js
deleted file mode 100644
index 27f27e8..0000000
--- a/node_modules/locutus/php/bc/bcmul.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-module.exports = function bcmul(leftOperand, rightOperand, scale) {
- // discuss at: http://locutus.io/php/bcmul/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bcmul('1', '2')
- // returns 1: '2'
- // example 2: bcmul('-3', '5')
- // returns 2: '-15'
- // example 3: bcmul('1234567890', '9876543210')
- // returns 3: '12193263111263526900'
- // example 4: bcmul('2.5', '1.5', 2)
- // returns 4: '3.75'
-
- var _bc = require('../_helpers/_bc');
- var libbcmath = _bc();
-
- var first, second, result;
-
- if (typeof scale === 'undefined') {
- scale = libbcmath.scale;
- }
- scale = scale < 0 ? 0 : scale;
-
- // create objects
- first = libbcmath.bc_init_num();
- second = libbcmath.bc_init_num();
- result = libbcmath.bc_init_num();
-
- first = libbcmath.php_str2num(leftOperand.toString());
- second = libbcmath.php_str2num(rightOperand.toString());
-
- result = libbcmath.bc_multiply(first, second, scale);
-
- if (result.n_scale > scale) {
- result.n_scale = scale;
- }
- return result.toString();
-};
-//# sourceMappingURL=bcmul.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcmul.js.map b/node_modules/locutus/php/bc/bcmul.js.map
deleted file mode 100644
index 3a574f3..0000000
--- a/node_modules/locutus/php/bc/bcmul.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bcmul.js"],"names":["module","exports","bcmul","leftOperand","rightOperand","scale","_bc","require","libbcmath","first","second","result","bc_init_num","php_str2num","toString","bc_multiply","n_scale"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,WAAhB,EAA6BC,YAA7B,EAA2CC,KAA3C,EAAkD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAMC,QAAQ,iBAAR,CAAV;AACA,MAAIC,YAAYF,KAAhB;;AAEA,MAAIG,KAAJ,EAAWC,MAAX,EAAmBC,MAAnB;;AAEA,MAAI,OAAON,KAAP,KAAiB,WAArB,EAAkC;AAChCA,YAAQG,UAAUH,KAAlB;AACD;AACDA,UAAUA,QAAQ,CAAT,GAAc,CAAd,GAAkBA,KAA3B;;AAEA;AACAI,UAAQD,UAAUI,WAAV,EAAR;AACAF,WAASF,UAAUI,WAAV,EAAT;AACAD,WAASH,UAAUI,WAAV,EAAT;;AAEAH,UAAQD,UAAUK,WAAV,CAAsBV,YAAYW,QAAZ,EAAtB,CAAR;AACAJ,WAASF,UAAUK,WAAV,CAAsBT,aAAaU,QAAb,EAAtB,CAAT;;AAEAH,WAASH,UAAUO,WAAV,CAAsBN,KAAtB,EAA6BC,MAA7B,EAAqCL,KAArC,CAAT;;AAEA,MAAIM,OAAOK,OAAP,GAAiBX,KAArB,EAA4B;AAC1BM,WAAOK,OAAP,GAAiBX,KAAjB;AACD;AACD,SAAOM,OAAOG,QAAP,EAAP;AACD,CApCD","file":"bcmul.js","sourcesContent":["module.exports = function bcmul (leftOperand, rightOperand, scale) {\n // discuss at: http://locutus.io/php/bcmul/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bcmul('1', '2')\n // returns 1: '2'\n // example 2: bcmul('-3', '5')\n // returns 2: '-15'\n // example 3: bcmul('1234567890', '9876543210')\n // returns 3: '12193263111263526900'\n // example 4: bcmul('2.5', '1.5', 2)\n // returns 4: '3.75'\n\n var _bc = require('../_helpers/_bc')\n var libbcmath = _bc()\n\n var first, second, result\n\n if (typeof scale === 'undefined') {\n scale = libbcmath.scale\n }\n scale = ((scale < 0) ? 0 : scale)\n\n // create objects\n first = libbcmath.bc_init_num()\n second = libbcmath.bc_init_num()\n result = libbcmath.bc_init_num()\n\n first = libbcmath.php_str2num(leftOperand.toString())\n second = libbcmath.php_str2num(rightOperand.toString())\n\n result = libbcmath.bc_multiply(first, second, scale)\n\n if (result.n_scale > scale) {\n result.n_scale = scale\n }\n return result.toString()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcround.js b/node_modules/locutus/php/bc/bcround.js
deleted file mode 100644
index bdcc7cf..0000000
--- a/node_modules/locutus/php/bc/bcround.js
+++ /dev/null
@@ -1,56 +0,0 @@
-'use strict';
-
-module.exports = function bcround(val, precision) {
- // discuss at: http://locutus.io/php/bcround/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bcround(1, 2)
- // returns 1: '1.00'
-
- var _bc = require('../_helpers/_bc');
- var libbcmath = _bc();
-
- var temp, result, digit;
- var rightOperand;
-
- // create number
- temp = libbcmath.bc_init_num();
- temp = libbcmath.php_str2num(val.toString());
-
- // check if any rounding needs
- if (precision >= temp.n_scale) {
- // nothing to round, just add the zeros.
- while (temp.n_scale < precision) {
- temp.n_value[temp.n_len + temp.n_scale] = 0;
- temp.n_scale++;
- }
- return temp.toString();
- }
-
- // get the digit we are checking (1 after the precision)
- // loop through digits after the precision marker
- digit = temp.n_value[temp.n_len + precision];
-
- rightOperand = libbcmath.bc_init_num();
- rightOperand = libbcmath.bc_new_num(1, precision);
-
- if (digit >= 5) {
- // round away from zero by adding 1 (or -1) at the "precision"..
- // ie 1.44999 @ 3dp = (1.44999 + 0.001).toString().substr(0,5)
- rightOperand.n_value[rightOperand.n_len + rightOperand.n_scale - 1] = 1;
- if (temp.n_sign === libbcmath.MINUS) {
- // round down
- rightOperand.n_sign = libbcmath.MINUS;
- }
- result = libbcmath.bc_add(temp, rightOperand, precision);
- } else {
- // leave-as-is.. just truncate it.
- result = temp;
- }
-
- if (result.n_scale > precision) {
- result.n_scale = precision;
- }
-
- return result.toString();
-};
-//# sourceMappingURL=bcround.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcround.js.map b/node_modules/locutus/php/bc/bcround.js.map
deleted file mode 100644
index d358bcf..0000000
--- a/node_modules/locutus/php/bc/bcround.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bcround.js"],"names":["module","exports","bcround","val","precision","_bc","require","libbcmath","temp","result","digit","rightOperand","bc_init_num","php_str2num","toString","n_scale","n_value","n_len","bc_new_num","n_sign","MINUS","bc_add"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuBC,SAAvB,EAAkC;AACjD;AACA;AACA;AACA;;AAEA,MAAIC,MAAMC,QAAQ,iBAAR,CAAV;AACA,MAAIC,YAAYF,KAAhB;;AAEA,MAAIG,IAAJ,EAAUC,MAAV,EAAkBC,KAAlB;AACA,MAAIC,YAAJ;;AAEA;AACAH,SAAOD,UAAUK,WAAV,EAAP;AACAJ,SAAOD,UAAUM,WAAV,CAAsBV,IAAIW,QAAJ,EAAtB,CAAP;;AAEA;AACA,MAAIV,aAAaI,KAAKO,OAAtB,EAA+B;AAC7B;AACA,WAAOP,KAAKO,OAAL,GAAeX,SAAtB,EAAiC;AAC/BI,WAAKQ,OAAL,CAAaR,KAAKS,KAAL,GAAaT,KAAKO,OAA/B,IAA0C,CAA1C;AACAP,WAAKO,OAAL;AACD;AACD,WAAOP,KAAKM,QAAL,EAAP;AACD;;AAED;AACA;AACAJ,UAAQF,KAAKQ,OAAL,CAAaR,KAAKS,KAAL,GAAab,SAA1B,CAAR;;AAEAO,iBAAeJ,UAAUK,WAAV,EAAf;AACAD,iBAAeJ,UAAUW,UAAV,CAAqB,CAArB,EAAwBd,SAAxB,CAAf;;AAEA,MAAIM,SAAS,CAAb,EAAgB;AACd;AACA;AACAC,iBAAaK,OAAb,CAAqBL,aAAaM,KAAb,GAAqBN,aAAaI,OAAlC,GAA4C,CAAjE,IAAsE,CAAtE;AACA,QAAIP,KAAKW,MAAL,KAAgBZ,UAAUa,KAA9B,EAAqC;AACnC;AACAT,mBAAaQ,MAAb,GAAsBZ,UAAUa,KAAhC;AACD;AACDX,aAASF,UAAUc,MAAV,CAAiBb,IAAjB,EAAuBG,YAAvB,EAAqCP,SAArC,CAAT;AACD,GATD,MASO;AACL;AACAK,aAASD,IAAT;AACD;;AAED,MAAIC,OAAOM,OAAP,GAAiBX,SAArB,EAAgC;AAC9BK,WAAOM,OAAP,GAAiBX,SAAjB;AACD;;AAED,SAAOK,OAAOK,QAAP,EAAP;AACD,CApDD","file":"bcround.js","sourcesContent":["module.exports = function bcround (val, precision) {\n // discuss at: http://locutus.io/php/bcround/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bcround(1, 2)\n // returns 1: '1.00'\n\n var _bc = require('../_helpers/_bc')\n var libbcmath = _bc()\n\n var temp, result, digit\n var rightOperand\n\n // create number\n temp = libbcmath.bc_init_num()\n temp = libbcmath.php_str2num(val.toString())\n\n // check if any rounding needs\n if (precision >= temp.n_scale) {\n // nothing to round, just add the zeros.\n while (temp.n_scale < precision) {\n temp.n_value[temp.n_len + temp.n_scale] = 0\n temp.n_scale++\n }\n return temp.toString()\n }\n\n // get the digit we are checking (1 after the precision)\n // loop through digits after the precision marker\n digit = temp.n_value[temp.n_len + precision]\n\n rightOperand = libbcmath.bc_init_num()\n rightOperand = libbcmath.bc_new_num(1, precision)\n\n if (digit >= 5) {\n // round away from zero by adding 1 (or -1) at the \"precision\"..\n // ie 1.44999 @ 3dp = (1.44999 + 0.001).toString().substr(0,5)\n rightOperand.n_value[rightOperand.n_len + rightOperand.n_scale - 1] = 1\n if (temp.n_sign === libbcmath.MINUS) {\n // round down\n rightOperand.n_sign = libbcmath.MINUS\n }\n result = libbcmath.bc_add(temp, rightOperand, precision)\n } else {\n // leave-as-is.. just truncate it.\n result = temp\n }\n\n if (result.n_scale > precision) {\n result.n_scale = precision\n }\n\n return result.toString()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcscale.js b/node_modules/locutus/php/bc/bcscale.js
deleted file mode 100644
index c2b3e55..0000000
--- a/node_modules/locutus/php/bc/bcscale.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-module.exports = function bcscale(scale) {
- // discuss at: http://locutus.io/php/bcscale/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bcscale(1)
- // returns 1: true
-
- var _bc = require('../_helpers/_bc');
- var libbcmath = _bc();
-
- scale = parseInt(scale, 10);
- if (isNaN(scale)) {
- return false;
- }
- if (scale < 0) {
- return false;
- }
- libbcmath.scale = scale;
-
- return true;
-};
-//# sourceMappingURL=bcscale.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcscale.js.map b/node_modules/locutus/php/bc/bcscale.js.map
deleted file mode 100644
index 7b2e80d..0000000
--- a/node_modules/locutus/php/bc/bcscale.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bcscale.js"],"names":["module","exports","bcscale","scale","_bc","require","libbcmath","parseInt","isNaN"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,KAAlB,EAAyB;AACxC;AACA;AACA;AACA;;AAEA,MAAIC,MAAMC,QAAQ,iBAAR,CAAV;AACA,MAAIC,YAAYF,KAAhB;;AAEAD,UAAQI,SAASJ,KAAT,EAAgB,EAAhB,CAAR;AACA,MAAIK,MAAML,KAAN,CAAJ,EAAkB;AAChB,WAAO,KAAP;AACD;AACD,MAAIA,QAAQ,CAAZ,EAAe;AACb,WAAO,KAAP;AACD;AACDG,YAAUH,KAAV,GAAkBA,KAAlB;;AAEA,SAAO,IAAP;AACD,CAnBD","file":"bcscale.js","sourcesContent":["module.exports = function bcscale (scale) {\n // discuss at: http://locutus.io/php/bcscale/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bcscale(1)\n // returns 1: true\n\n var _bc = require('../_helpers/_bc')\n var libbcmath = _bc()\n\n scale = parseInt(scale, 10)\n if (isNaN(scale)) {\n return false\n }\n if (scale < 0) {\n return false\n }\n libbcmath.scale = scale\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcsub.js b/node_modules/locutus/php/bc/bcsub.js
deleted file mode 100644
index c4c1f50..0000000
--- a/node_modules/locutus/php/bc/bcsub.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-module.exports = function bcsub(leftOperand, rightOperand, scale) {
- // discuss at: http://locutus.io/php/bcsub/
- // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
- // example 1: bcsub('1', '2')
- // returns 1: '-1'
- // example 2: bcsub('-1', '5', 4)
- // returns 2: '-6.0000'
- // example 3: bcsub('8728932001983192837219398127471', '1928372132132819737213', 2)
- // returns 3: '8728932000054820705086578390258.00'
-
- var _bc = require('../_helpers/_bc');
- var libbcmath = _bc();
-
- var first, second, result;
-
- if (typeof scale === 'undefined') {
- scale = libbcmath.scale;
- }
- scale = scale < 0 ? 0 : scale;
-
- // create objects
- first = libbcmath.bc_init_num();
- second = libbcmath.bc_init_num();
- result = libbcmath.bc_init_num();
-
- first = libbcmath.php_str2num(leftOperand.toString());
- second = libbcmath.php_str2num(rightOperand.toString());
-
- result = libbcmath.bc_sub(first, second, scale);
-
- if (result.n_scale > scale) {
- result.n_scale = scale;
- }
-
- return result.toString();
-};
-//# sourceMappingURL=bcsub.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/bcsub.js.map b/node_modules/locutus/php/bc/bcsub.js.map
deleted file mode 100644
index 58040f9..0000000
--- a/node_modules/locutus/php/bc/bcsub.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/bcsub.js"],"names":["module","exports","bcsub","leftOperand","rightOperand","scale","_bc","require","libbcmath","first","second","result","bc_init_num","php_str2num","toString","bc_sub","n_scale"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,WAAhB,EAA6BC,YAA7B,EAA2CC,KAA3C,EAAkD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAMC,QAAQ,iBAAR,CAAV;AACA,MAAIC,YAAYF,KAAhB;;AAEA,MAAIG,KAAJ,EAAWC,MAAX,EAAmBC,MAAnB;;AAEA,MAAI,OAAON,KAAP,KAAiB,WAArB,EAAkC;AAChCA,YAAQG,UAAUH,KAAlB;AACD;AACDA,UAAUA,QAAQ,CAAT,GAAc,CAAd,GAAkBA,KAA3B;;AAEA;AACAI,UAAQD,UAAUI,WAAV,EAAR;AACAF,WAASF,UAAUI,WAAV,EAAT;AACAD,WAASH,UAAUI,WAAV,EAAT;;AAEAH,UAAQD,UAAUK,WAAV,CAAsBV,YAAYW,QAAZ,EAAtB,CAAR;AACAJ,WAASF,UAAUK,WAAV,CAAsBT,aAAaU,QAAb,EAAtB,CAAT;;AAEAH,WAASH,UAAUO,MAAV,CAAiBN,KAAjB,EAAwBC,MAAxB,EAAgCL,KAAhC,CAAT;;AAEA,MAAIM,OAAOK,OAAP,GAAiBX,KAArB,EAA4B;AAC1BM,WAAOK,OAAP,GAAiBX,KAAjB;AACD;;AAED,SAAOM,OAAOG,QAAP,EAAP;AACD,CAnCD","file":"bcsub.js","sourcesContent":["module.exports = function bcsub (leftOperand, rightOperand, scale) {\n // discuss at: http://locutus.io/php/bcsub/\n // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)\n // example 1: bcsub('1', '2')\n // returns 1: '-1'\n // example 2: bcsub('-1', '5', 4)\n // returns 2: '-6.0000'\n // example 3: bcsub('8728932001983192837219398127471', '1928372132132819737213', 2)\n // returns 3: '8728932000054820705086578390258.00'\n\n var _bc = require('../_helpers/_bc')\n var libbcmath = _bc()\n\n var first, second, result\n\n if (typeof scale === 'undefined') {\n scale = libbcmath.scale\n }\n scale = ((scale < 0) ? 0 : scale)\n\n // create objects\n first = libbcmath.bc_init_num()\n second = libbcmath.bc_init_num()\n result = libbcmath.bc_init_num()\n\n first = libbcmath.php_str2num(leftOperand.toString())\n second = libbcmath.php_str2num(rightOperand.toString())\n\n result = libbcmath.bc_sub(first, second, scale)\n\n if (result.n_scale > scale) {\n result.n_scale = scale\n }\n\n return result.toString()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/index.js b/node_modules/locutus/php/bc/index.js
deleted file mode 100644
index 477a720..0000000
--- a/node_modules/locutus/php/bc/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports['bcadd'] = require('./bcadd');
-module.exports['bccomp'] = require('./bccomp');
-module.exports['bcdiv'] = require('./bcdiv');
-module.exports['bcmul'] = require('./bcmul');
-module.exports['bcround'] = require('./bcround');
-module.exports['bcscale'] = require('./bcscale');
-module.exports['bcsub'] = require('./bcsub');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/bc/index.js.map b/node_modules/locutus/php/bc/index.js.map
deleted file mode 100644
index 0be3879..0000000
--- a/node_modules/locutus/php/bc/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/bc/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B","file":"index.js","sourcesContent":["module.exports['bcadd'] = require('./bcadd')\nmodule.exports['bccomp'] = require('./bccomp')\nmodule.exports['bcdiv'] = require('./bcdiv')\nmodule.exports['bcmul'] = require('./bcmul')\nmodule.exports['bcround'] = require('./bcround')\nmodule.exports['bcscale'] = require('./bcscale')\nmodule.exports['bcsub'] = require('./bcsub')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_alnum.js b/node_modules/locutus/php/ctype/ctype_alnum.js
deleted file mode 100644
index a0e57bb..0000000
--- a/node_modules/locutus/php/ctype/ctype_alnum.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function ctype_alnum(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_alnum/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_alnum('AbC12')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
-
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.an) !== -1;
-};
-//# sourceMappingURL=ctype_alnum.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_alnum.js.map b/node_modules/locutus/php/ctype/ctype_alnum.js.map
deleted file mode 100644
index 9d87420..0000000
--- a/node_modules/locutus/php/ctype/ctype_alnum.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_alnum.js"],"names":["module","exports","ctype_alnum","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","an"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_alnum.js","sourcesContent":["module.exports = function ctype_alnum (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_alnum/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_alnum('AbC12')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.an) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_alpha.js b/node_modules/locutus/php/ctype/ctype_alpha.js
deleted file mode 100644
index 3fe9464..0000000
--- a/node_modules/locutus/php/ctype/ctype_alpha.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function ctype_alpha(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_alpha/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_alpha('Az')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.al) !== -1;
-};
-//# sourceMappingURL=ctype_alpha.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_alpha.js.map b/node_modules/locutus/php/ctype/ctype_alpha.js.map
deleted file mode 100644
index 00e1cca..0000000
--- a/node_modules/locutus/php/ctype/ctype_alpha.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_alpha.js"],"names":["module","exports","ctype_alpha","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","al"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_alpha.js","sourcesContent":["module.exports = function ctype_alpha (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_alpha/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_alpha('Az')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.al) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_cntrl.js b/node_modules/locutus/php/ctype/ctype_cntrl.js
deleted file mode 100644
index 2e1a6e4..0000000
--- a/node_modules/locutus/php/ctype/ctype_cntrl.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function ctype_cntrl(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_cntrl/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_cntrl('\u0020')
- // returns 1: false
- // example 2: ctype_cntrl('\u001F')
- // returns 2: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.ct) !== -1;
-};
-//# sourceMappingURL=ctype_cntrl.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_cntrl.js.map b/node_modules/locutus/php/ctype/ctype_cntrl.js.map
deleted file mode 100644
index 0636eb6..0000000
--- a/node_modules/locutus/php/ctype/ctype_cntrl.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_cntrl.js"],"names":["module","exports","ctype_cntrl","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","ct"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CArBD","file":"ctype_cntrl.js","sourcesContent":["module.exports = function ctype_cntrl (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_cntrl/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_cntrl('\\u0020')\n // returns 1: false\n // example 2: ctype_cntrl('\\u001F')\n // returns 2: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.ct) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_digit.js b/node_modules/locutus/php/ctype/ctype_digit.js
deleted file mode 100644
index 1176619..0000000
--- a/node_modules/locutus/php/ctype/ctype_digit.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function ctype_digit(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_digit/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_digit('150')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.dg) !== -1;
-};
-//# sourceMappingURL=ctype_digit.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_digit.js.map b/node_modules/locutus/php/ctype/ctype_digit.js.map
deleted file mode 100644
index 3216ecf..0000000
--- a/node_modules/locutus/php/ctype/ctype_digit.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_digit.js"],"names":["module","exports","ctype_digit","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","dg"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_digit.js","sourcesContent":["module.exports = function ctype_digit (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_digit/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_digit('150')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.dg) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_graph.js b/node_modules/locutus/php/ctype/ctype_graph.js
deleted file mode 100644
index 8c2b18c..0000000
--- a/node_modules/locutus/php/ctype/ctype_graph.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function ctype_graph(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_graph/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_graph('!%')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
-
- if (typeof text !== 'string') {
- return false;
- }
-
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.gr) !== -1;
-};
-//# sourceMappingURL=ctype_graph.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_graph.js.map b/node_modules/locutus/php/ctype/ctype_graph.js.map
deleted file mode 100644
index 40a802b..0000000
--- a/node_modules/locutus/php/ctype/ctype_graph.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_graph.js"],"names":["module","exports","ctype_graph","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","gr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CArBD","file":"ctype_graph.js","sourcesContent":["module.exports = function ctype_graph (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_graph/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_graph('!%')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n\n if (typeof text !== 'string') {\n return false\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.gr) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_lower.js b/node_modules/locutus/php/ctype/ctype_lower.js
deleted file mode 100644
index 68d6e69..0000000
--- a/node_modules/locutus/php/ctype/ctype_lower.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function ctype_lower(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_lower/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_lower('abc')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
-
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.lw) !== -1;
-};
-//# sourceMappingURL=ctype_lower.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_lower.js.map b/node_modules/locutus/php/ctype/ctype_lower.js.map
deleted file mode 100644
index acfd8ff..0000000
--- a/node_modules/locutus/php/ctype/ctype_lower.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_lower.js"],"names":["module","exports","ctype_lower","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","lw"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_lower.js","sourcesContent":["module.exports = function ctype_lower (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_lower/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_lower('abc')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.lw) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_print.js b/node_modules/locutus/php/ctype/ctype_print.js
deleted file mode 100644
index bb6e217..0000000
--- a/node_modules/locutus/php/ctype/ctype_print.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function ctype_print(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_print/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_print('AbC!#12')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pr) !== -1;
-};
-//# sourceMappingURL=ctype_print.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_print.js.map b/node_modules/locutus/php/ctype/ctype_print.js.map
deleted file mode 100644
index e5997bd..0000000
--- a/node_modules/locutus/php/ctype/ctype_print.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_print.js"],"names":["module","exports","ctype_print","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","pr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_print.js","sourcesContent":["module.exports = function ctype_print (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_print/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_print('AbC!#12')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pr) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_punct.js b/node_modules/locutus/php/ctype/ctype_punct.js
deleted file mode 100644
index bff5d24..0000000
--- a/node_modules/locutus/php/ctype/ctype_punct.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function ctype_punct(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_punct/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_punct('!?')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pu) !== -1;
-};
-//# sourceMappingURL=ctype_punct.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_punct.js.map b/node_modules/locutus/php/ctype/ctype_punct.js.map
deleted file mode 100644
index e91d57d..0000000
--- a/node_modules/locutus/php/ctype/ctype_punct.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_punct.js"],"names":["module","exports","ctype_punct","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","pu"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_punct.js","sourcesContent":["module.exports = function ctype_punct (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_punct/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_punct('!?')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pu) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_space.js b/node_modules/locutus/php/ctype/ctype_space.js
deleted file mode 100644
index 1141db9..0000000
--- a/node_modules/locutus/php/ctype/ctype_space.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function ctype_space(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_space/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_space('\t\n')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.sp) !== -1;
-};
-//# sourceMappingURL=ctype_space.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_space.js.map b/node_modules/locutus/php/ctype/ctype_space.js.map
deleted file mode 100644
index ba02a4a..0000000
--- a/node_modules/locutus/php/ctype/ctype_space.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_space.js"],"names":["module","exports","ctype_space","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","sp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_space.js","sourcesContent":["module.exports = function ctype_space (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_space/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_space('\\t\\n')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.sp) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_upper.js b/node_modules/locutus/php/ctype/ctype_upper.js
deleted file mode 100644
index cea0477..0000000
--- a/node_modules/locutus/php/ctype/ctype_upper.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function ctype_upper(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_upper/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_upper('AZ')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
-
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.up) !== -1;
-};
-//# sourceMappingURL=ctype_upper.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_upper.js.map b/node_modules/locutus/php/ctype/ctype_upper.js.map
deleted file mode 100644
index 011066b..0000000
--- a/node_modules/locutus/php/ctype/ctype_upper.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_upper.js"],"names":["module","exports","ctype_upper","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","up"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_upper.js","sourcesContent":["module.exports = function ctype_upper (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_upper/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_upper('AZ')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.up) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_xdigit.js b/node_modules/locutus/php/ctype/ctype_xdigit.js
deleted file mode 100644
index 74dfc44..0000000
--- a/node_modules/locutus/php/ctype/ctype_xdigit.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function ctype_xdigit(text) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ctype_xdigit/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: ctype_xdigit('01dF')
- // returns 1: true
-
- var setlocale = require('../strings/setlocale');
-
- if (typeof text !== 'string') {
- return false;
- }
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var p = $locutus.php;
-
- return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.xd) !== -1;
-};
-//# sourceMappingURL=ctype_xdigit.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/ctype_xdigit.js.map b/node_modules/locutus/php/ctype/ctype_xdigit.js.map
deleted file mode 100644
index e1c05dd..0000000
--- a/node_modules/locutus/php/ctype/ctype_xdigit.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/ctype_xdigit.js"],"names":["module","exports","ctype_xdigit","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","xd"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,IAAvB,EAA6B;AAAE;AAC9C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACA,MAAIC,IAAID,SAASE,GAAjB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_xdigit.js","sourcesContent":["module.exports = function ctype_xdigit (text) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ctype_xdigit/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: ctype_xdigit('01dF')\n // returns 1: true\n\n var setlocale = require('../strings/setlocale')\n\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.xd) !== -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/index.js b/node_modules/locutus/php/ctype/index.js
deleted file mode 100644
index 965471d..0000000
--- a/node_modules/locutus/php/ctype/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports['ctype_alnum'] = require('./ctype_alnum');
-module.exports['ctype_alpha'] = require('./ctype_alpha');
-module.exports['ctype_cntrl'] = require('./ctype_cntrl');
-module.exports['ctype_digit'] = require('./ctype_digit');
-module.exports['ctype_graph'] = require('./ctype_graph');
-module.exports['ctype_lower'] = require('./ctype_lower');
-module.exports['ctype_print'] = require('./ctype_print');
-module.exports['ctype_punct'] = require('./ctype_punct');
-module.exports['ctype_space'] = require('./ctype_space');
-module.exports['ctype_upper'] = require('./ctype_upper');
-module.exports['ctype_xdigit'] = require('./ctype_xdigit');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/ctype/index.js.map b/node_modules/locutus/php/ctype/index.js.map
deleted file mode 100644
index c6a5629..0000000
--- a/node_modules/locutus/php/ctype/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/ctype/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC","file":"index.js","sourcesContent":["module.exports['ctype_alnum'] = require('./ctype_alnum')\nmodule.exports['ctype_alpha'] = require('./ctype_alpha')\nmodule.exports['ctype_cntrl'] = require('./ctype_cntrl')\nmodule.exports['ctype_digit'] = require('./ctype_digit')\nmodule.exports['ctype_graph'] = require('./ctype_graph')\nmodule.exports['ctype_lower'] = require('./ctype_lower')\nmodule.exports['ctype_print'] = require('./ctype_print')\nmodule.exports['ctype_punct'] = require('./ctype_punct')\nmodule.exports['ctype_space'] = require('./ctype_space')\nmodule.exports['ctype_upper'] = require('./ctype_upper')\nmodule.exports['ctype_xdigit'] = require('./ctype_xdigit')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/checkdate.js b/node_modules/locutus/php/datetime/checkdate.js
deleted file mode 100644
index 6e30179..0000000
--- a/node_modules/locutus/php/datetime/checkdate.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-
-module.exports = function checkdate(m, d, y) {
- // discuss at: http://locutus.io/php/checkdate/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Pyerre
- // improved by: Theriault (https://github.com/Theriault)
- // example 1: checkdate(12, 31, 2000)
- // returns 1: true
- // example 2: checkdate(2, 29, 2001)
- // returns 2: false
- // example 3: checkdate(3, 31, 2008)
- // returns 3: true
- // example 4: checkdate(1, 390, 2000)
- // returns 4: false
-
- return m > 0 && m < 13 && y > 0 && y < 32768 && d > 0 && d <= new Date(y, m, 0).getDate();
-};
-//# sourceMappingURL=checkdate.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/checkdate.js.map b/node_modules/locutus/php/datetime/checkdate.js.map
deleted file mode 100644
index e1aab81..0000000
--- a/node_modules/locutus/php/datetime/checkdate.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/checkdate.js"],"names":["module","exports","checkdate","m","d","y","Date","getDate"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,CAApB,EAAuBC,CAAvB,EAA0BC,CAA1B,EAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOF,IAAI,CAAJ,IAASA,IAAI,EAAb,IAAmBE,IAAI,CAAvB,IAA4BA,IAAI,KAAhC,IAAyCD,IAAI,CAA7C,IAAkDA,KAAM,IAAIE,IAAJ,CAASD,CAAT,EAAYF,CAAZ,EAAe,CAAf,CAAD,CAC3DI,OAD2D,EAA9D;AAED,CAhBD","file":"checkdate.js","sourcesContent":["module.exports = function checkdate (m, d, y) {\n // discuss at: http://locutus.io/php/checkdate/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Pyerre\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: checkdate(12, 31, 2000)\n // returns 1: true\n // example 2: checkdate(2, 29, 2001)\n // returns 2: false\n // example 3: checkdate(3, 31, 2008)\n // returns 3: true\n // example 4: checkdate(1, 390, 2000)\n // returns 4: false\n\n return m > 0 && m < 13 && y > 0 && y < 32768 && d > 0 && d <= (new Date(y, m, 0))\n .getDate()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/date.js b/node_modules/locutus/php/datetime/date.js
deleted file mode 100644
index 39d6db1..0000000
--- a/node_modules/locutus/php/datetime/date.js
+++ /dev/null
@@ -1,318 +0,0 @@
-'use strict';
-
-module.exports = function date(format, timestamp) {
- // discuss at: http://locutus.io/php/date/
- // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
- // original by: gettimeofday
- // parts by: Peter-Paul Koch (http://www.quirksmode.org/js/beat.html)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: MeEtc (http://yass.meetcweb.com)
- // improved by: Brad Touesnard
- // improved by: Tim Wiel
- // improved by: Bryan Elliott
- // improved by: David Randall
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Thomas Beaucourt (http://www.webapp.fr)
- // improved by: JT
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // improved by: Theriault (https://github.com/Theriault)
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: majak
- // input by: Alex
- // input by: Martin
- // input by: Alex Wilson
- // input by: Haravikk
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: majak
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: omid (http://locutus.io/php/380:380#comment_137122)
- // bugfixed by: Chris (http://www.devotis.nl/)
- // note 1: Uses global: locutus to store the default timezone
- // note 1: Although the function potentially allows timezone info
- // note 1: (see notes), it currently does not set
- // note 1: per a timezone specified by date_default_timezone_set(). Implementers might use
- // note 1: $locutus.currentTimezoneOffset and
- // note 1: $locutus.currentTimezoneDST set by that function
- // note 1: in order to adjust the dates in this function
- // note 1: (or our other date functions!) accordingly
- // example 1: date('H:m:s \\m \\i\\s \\m\\o\\n\\t\\h', 1062402400)
- // returns 1: '07:09:40 m is month'
- // example 2: date('F j, Y, g:i a', 1062462400)
- // returns 2: 'September 2, 2003, 12:26 am'
- // example 3: date('Y W o', 1062462400)
- // returns 3: '2003 36 2003'
- // example 4: var $x = date('Y m d', (new Date()).getTime() / 1000)
- // example 4: $x = $x + ''
- // example 4: var $result = $x.length // 2009 01 09
- // returns 4: 10
- // example 5: date('W', 1104534000)
- // returns 5: '52'
- // example 6: date('B t', 1104534000)
- // returns 6: '999 31'
- // example 7: date('W U', 1293750000.82); // 2010-12-31
- // returns 7: '52 1293750000'
- // example 8: date('W', 1293836400); // 2011-01-01
- // returns 8: '52'
- // example 9: date('W Y-m-d', 1293974054); // 2011-01-02
- // returns 9: '52 2011-01-02'
- // test: skip-1 skip-2 skip-5
-
- var jsdate, f;
- // Keep this here (works, but for code commented-out below for file size reasons)
- // var tal= [];
- var txtWords = ['Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
- // trailing backslash -> (dropped)
- // a backslash followed by any character (including backslash) -> the character
- // empty string -> empty string
- var formatChr = /\\?(.?)/gi;
- var formatChrCb = function formatChrCb(t, s) {
- return f[t] ? f[t]() : s;
- };
- var _pad = function _pad(n, c) {
- n = String(n);
- while (n.length < c) {
- n = '0' + n;
- }
- return n;
- };
- f = {
- // Day
- d: function d() {
- // Day of month w/leading 0; 01..31
- return _pad(f.j(), 2);
- },
- D: function D() {
- // Shorthand day name; Mon...Sun
- return f.l().slice(0, 3);
- },
- j: function j() {
- // Day of month; 1..31
- return jsdate.getDate();
- },
- l: function l() {
- // Full day name; Monday...Sunday
- return txtWords[f.w()] + 'day';
- },
- N: function N() {
- // ISO-8601 day of week; 1[Mon]..7[Sun]
- return f.w() || 7;
- },
- S: function S() {
- // Ordinal suffix for day of month; st, nd, rd, th
- var j = f.j();
- var i = j % 10;
- if (i <= 3 && parseInt(j % 100 / 10, 10) === 1) {
- i = 0;
- }
- return ['st', 'nd', 'rd'][i - 1] || 'th';
- },
- w: function w() {
- // Day of week; 0[Sun]..6[Sat]
- return jsdate.getDay();
- },
- z: function z() {
- // Day of year; 0..365
- var a = new Date(f.Y(), f.n() - 1, f.j());
- var b = new Date(f.Y(), 0, 1);
- return Math.round((a - b) / 864e5);
- },
-
- // Week
- W: function W() {
- // ISO-8601 week number
- var a = new Date(f.Y(), f.n() - 1, f.j() - f.N() + 3);
- var b = new Date(a.getFullYear(), 0, 4);
- return _pad(1 + Math.round((a - b) / 864e5 / 7), 2);
- },
-
- // Month
- F: function F() {
- // Full month name; January...December
- return txtWords[6 + f.n()];
- },
- m: function m() {
- // Month w/leading 0; 01...12
- return _pad(f.n(), 2);
- },
- M: function M() {
- // Shorthand month name; Jan...Dec
- return f.F().slice(0, 3);
- },
- n: function n() {
- // Month; 1...12
- return jsdate.getMonth() + 1;
- },
- t: function t() {
- // Days in month; 28...31
- return new Date(f.Y(), f.n(), 0).getDate();
- },
-
- // Year
- L: function L() {
- // Is leap year?; 0 or 1
- var j = f.Y();
- return j % 4 === 0 & j % 100 !== 0 | j % 400 === 0;
- },
- o: function o() {
- // ISO-8601 year
- var n = f.n();
- var W = f.W();
- var Y = f.Y();
- return Y + (n === 12 && W < 9 ? 1 : n === 1 && W > 9 ? -1 : 0);
- },
- Y: function Y() {
- // Full year; e.g. 1980...2010
- return jsdate.getFullYear();
- },
- y: function y() {
- // Last two digits of year; 00...99
- return f.Y().toString().slice(-2);
- },
-
- // Time
- a: function a() {
- // am or pm
- return jsdate.getHours() > 11 ? 'pm' : 'am';
- },
- A: function A() {
- // AM or PM
- return f.a().toUpperCase();
- },
- B: function B() {
- // Swatch Internet time; 000..999
- var H = jsdate.getUTCHours() * 36e2;
- // Hours
- var i = jsdate.getUTCMinutes() * 60;
- // Minutes
- // Seconds
- var s = jsdate.getUTCSeconds();
- return _pad(Math.floor((H + i + s + 36e2) / 86.4) % 1e3, 3);
- },
- g: function g() {
- // 12-Hours; 1..12
- return f.G() % 12 || 12;
- },
- G: function G() {
- // 24-Hours; 0..23
- return jsdate.getHours();
- },
- h: function h() {
- // 12-Hours w/leading 0; 01..12
- return _pad(f.g(), 2);
- },
- H: function H() {
- // 24-Hours w/leading 0; 00..23
- return _pad(f.G(), 2);
- },
- i: function i() {
- // Minutes w/leading 0; 00..59
- return _pad(jsdate.getMinutes(), 2);
- },
- s: function s() {
- // Seconds w/leading 0; 00..59
- return _pad(jsdate.getSeconds(), 2);
- },
- u: function u() {
- // Microseconds; 000000-999000
- return _pad(jsdate.getMilliseconds() * 1000, 6);
- },
-
- // Timezone
- e: function e() {
- // Timezone identifier; e.g. Atlantic/Azores, ...
- // The following works, but requires inclusion of the very large
- // timezone_abbreviations_list() function.
- /* return that.date_default_timezone_get();
- */
- var msg = 'Not supported (see source code of date() for timezone on how to add support)';
- throw new Error(msg);
- },
- I: function I() {
- // DST observed?; 0 or 1
- // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.
- // If they are not equal, then DST is observed.
- var a = new Date(f.Y(), 0);
- // Jan 1
- var c = Date.UTC(f.Y(), 0);
- // Jan 1 UTC
- var b = new Date(f.Y(), 6);
- // Jul 1
- // Jul 1 UTC
- var d = Date.UTC(f.Y(), 6);
- return a - c !== b - d ? 1 : 0;
- },
- O: function O() {
- // Difference to GMT in hour format; e.g. +0200
- var tzo = jsdate.getTimezoneOffset();
- var a = Math.abs(tzo);
- return (tzo > 0 ? '-' : '+') + _pad(Math.floor(a / 60) * 100 + a % 60, 4);
- },
- P: function P() {
- // Difference to GMT w/colon; e.g. +02:00
- var O = f.O();
- return O.substr(0, 3) + ':' + O.substr(3, 2);
- },
- T: function T() {
- // The following works, but requires inclusion of the very
- // large timezone_abbreviations_list() function.
- /* var abbr, i, os, _default;
- if (!tal.length) {
- tal = that.timezone_abbreviations_list();
- }
- if ($locutus && $locutus.default_timezone) {
- _default = $locutus.default_timezone;
- for (abbr in tal) {
- for (i = 0; i < tal[abbr].length; i++) {
- if (tal[abbr][i].timezone_id === _default) {
- return abbr.toUpperCase();
- }
- }
- }
- }
- for (abbr in tal) {
- for (i = 0; i < tal[abbr].length; i++) {
- os = -jsdate.getTimezoneOffset() * 60;
- if (tal[abbr][i].offset === os) {
- return abbr.toUpperCase();
- }
- }
- }
- */
- return 'UTC';
- },
- Z: function Z() {
- // Timezone offset in seconds (-43200...50400)
- return -jsdate.getTimezoneOffset() * 60;
- },
-
- // Full Date/Time
- c: function c() {
- // ISO-8601 date.
- return 'Y-m-d\\TH:i:sP'.replace(formatChr, formatChrCb);
- },
- r: function r() {
- // RFC 2822
- return 'D, d M Y H:i:s O'.replace(formatChr, formatChrCb);
- },
- U: function U() {
- // Seconds since UNIX epoch
- return jsdate / 1000 | 0;
- }
- };
-
- var _date = function _date(format, timestamp) {
- jsdate = timestamp === undefined ? new Date() // Not provided
- : timestamp instanceof Date ? new Date(timestamp) // JS Date()
- : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
- ;
- return format.replace(formatChr, formatChrCb);
- };
-
- return _date(format, timestamp);
-};
-//# sourceMappingURL=date.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/date.js.map b/node_modules/locutus/php/datetime/date.js.map
deleted file mode 100644
index 0d37bad..0000000
--- a/node_modules/locutus/php/datetime/date.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/date.js"],"names":["module","exports","date","format","timestamp","jsdate","f","txtWords","formatChr","formatChrCb","t","s","_pad","n","c","String","length","d","j","D","l","slice","getDate","w","N","S","i","parseInt","getDay","z","a","Date","Y","b","Math","round","W","getFullYear","F","m","M","getMonth","L","o","y","toString","getHours","A","toUpperCase","B","H","getUTCHours","getUTCMinutes","getUTCSeconds","floor","g","G","h","getMinutes","getSeconds","u","getMilliseconds","e","msg","Error","I","UTC","O","tzo","getTimezoneOffset","abs","P","substr","T","Z","replace","r","U","_date","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,MAAf,EAAuBC,SAAvB,EAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAJ,EAAYC,CAAZ;AACA;AACA;AACA,MAAIC,WAAW,CACb,KADa,EACN,KADM,EACC,MADD,EACS,QADT,EACmB,OADnB,EAC4B,KAD5B,EACmC,OADnC,EAEb,SAFa,EAEF,UAFE,EAEU,OAFV,EAEmB,OAFnB,EAE4B,KAF5B,EAEmC,MAFnC,EAGb,MAHa,EAGL,QAHK,EAGK,WAHL,EAGkB,SAHlB,EAG6B,UAH7B,EAGyC,UAHzC,CAAf;AAKA;AACA;AACA;AACA,MAAIC,YAAY,WAAhB;AACA,MAAIC,cAAc,SAAdA,WAAc,CAAUC,CAAV,EAAaC,CAAb,EAAgB;AAChC,WAAOL,EAAEI,CAAF,IAAOJ,EAAEI,CAAF,GAAP,GAAgBC,CAAvB;AACD,GAFD;AAGA,MAAIC,OAAO,SAAPA,IAAO,CAAUC,CAAV,EAAaC,CAAb,EAAgB;AACzBD,QAAIE,OAAOF,CAAP,CAAJ;AACA,WAAOA,EAAEG,MAAF,GAAWF,CAAlB,EAAqB;AACnBD,UAAI,MAAMA,CAAV;AACD;AACD,WAAOA,CAAP;AACD,GAND;AAOAP,MAAI;AACF;AACAW,OAAG,aAAY;AACb;AACA,aAAO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EAAEK,MAAF,CAAS,CAAT,EAAY,CAAZ,IAAiB,GAAjB,GAAuBL,EAAEK,MAAF,CAAS,CAAT,EAAY,CAAZ,CAA/B;AACD,KAtLC;AAuLFC,OAAG,aAAY;AACb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,aAAO,KAAP;AACD,KAlNC;AAmNFC,OAAG,aAAY;AACb;AACA,aAAO,CAACrE,OAAOgE,iBAAP,EAAD,GAA8B,EAArC;AACD,KAtNC;;AAwNF;AACAvD,OAAG,aAAY;AACb;AACA,aAAO,iBAAiB6D,OAAjB,CAAyBnE,SAAzB,EAAoCC,WAApC,CAAP;AACD,KA5NC;AA6NFmE,OAAG,aAAY;AACb;AACA,aAAO,mBAAmBD,OAAnB,CAA2BnE,SAA3B,EAAsCC,WAAtC,CAAP;AACD,KAhOC;AAiOFoE,OAAG,aAAY;AACb;AACA,aAAOxE,SAAS,IAAT,GAAgB,CAAvB;AACD;AApOC,GAAJ;;AAuOA,MAAIyE,QAAQ,SAARA,KAAQ,CAAU3E,MAAV,EAAkBC,SAAlB,EAA6B;AACvCC,aAAUD,cAAc2E,SAAd,GAA0B,IAAIhD,IAAJ,EAA1B,CAAqC;AAArC,MACL3B,qBAAqB2B,IAAtB,GAA8B,IAAIA,IAAJ,CAAS3B,SAAT,CAA9B,CAAkD;AAAlD,MACA,IAAI2B,IAAJ,CAAS3B,YAAY,IAArB,CAFJ,CAE+B;AAF/B;AAIA,WAAOD,OAAOwE,OAAP,CAAenE,SAAf,EAA0BC,WAA1B,CAAP;AACD,GAND;;AAQA,SAAOqE,MAAM3E,MAAN,EAAcC,SAAd,CAAP;AACD,CApUD","file":"date.js","sourcesContent":["module.exports = function date (format, timestamp) {\n // discuss at: http://locutus.io/php/date/\n // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)\n // original by: gettimeofday\n // parts by: Peter-Paul Koch (http://www.quirksmode.org/js/beat.html)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: MeEtc (http://yass.meetcweb.com)\n // improved by: Brad Touesnard\n // improved by: Tim Wiel\n // improved by: Bryan Elliott\n // improved by: David Randall\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Thomas Beaucourt (http://www.webapp.fr)\n // improved by: JT\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // improved by: Theriault (https://github.com/Theriault)\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: majak\n // input by: Alex\n // input by: Martin\n // input by: Alex Wilson\n // input by: Haravikk\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: majak\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: omid (http://locutus.io/php/380:380#comment_137122)\n // bugfixed by: Chris (http://www.devotis.nl/)\n // note 1: Uses global: locutus to store the default timezone\n // note 1: Although the function potentially allows timezone info\n // note 1: (see notes), it currently does not set\n // note 1: per a timezone specified by date_default_timezone_set(). Implementers might use\n // note 1: $locutus.currentTimezoneOffset and\n // note 1: $locutus.currentTimezoneDST set by that function\n // note 1: in order to adjust the dates in this function\n // note 1: (or our other date functions!) accordingly\n // example 1: date('H:m:s \\\\m \\\\i\\\\s \\\\m\\\\o\\\\n\\\\t\\\\h', 1062402400)\n // returns 1: '07:09:40 m is month'\n // example 2: date('F j, Y, g:i a', 1062462400)\n // returns 2: 'September 2, 2003, 12:26 am'\n // example 3: date('Y W o', 1062462400)\n // returns 3: '2003 36 2003'\n // example 4: var $x = date('Y m d', (new Date()).getTime() / 1000)\n // example 4: $x = $x + ''\n // example 4: var $result = $x.length // 2009 01 09\n // returns 4: 10\n // example 5: date('W', 1104534000)\n // returns 5: '52'\n // example 6: date('B t', 1104534000)\n // returns 6: '999 31'\n // example 7: date('W U', 1293750000.82); // 2010-12-31\n // returns 7: '52 1293750000'\n // example 8: date('W', 1293836400); // 2011-01-01\n // returns 8: '52'\n // example 9: date('W Y-m-d', 1293974054); // 2011-01-02\n // returns 9: '52 2011-01-02'\n // test: skip-1 skip-2 skip-5\n\n var jsdate, f\n // Keep this here (works, but for code commented-out below for file size reasons)\n // var tal= [];\n var txtWords = [\n 'Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur',\n 'January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December'\n ]\n // trailing backslash -> (dropped)\n // a backslash followed by any character (including backslash) -> the character\n // empty string -> empty string\n var formatChr = /\\\\?(.?)/gi\n var formatChrCb = function (t, s) {\n return f[t] ? f[t]() : s\n }\n var _pad = function (n, c) {\n n = String(n)\n while (n.length < c) {\n n = '0' + n\n }\n return n\n }\n f = {\n // Day\n d: function () {\n // Day of month w/leading 0; 01..31\n return _pad(f.j(), 2)\n },\n D: function () {\n // Shorthand day name; Mon...Sun\n return f.l()\n .slice(0, 3)\n },\n j: function () {\n // Day of month; 1..31\n return jsdate.getDate()\n },\n l: function () {\n // Full day name; Monday...Sunday\n return txtWords[f.w()] + 'day'\n },\n N: function () {\n // ISO-8601 day of week; 1[Mon]..7[Sun]\n return f.w() || 7\n },\n S: function () {\n // Ordinal suffix for day of month; st, nd, rd, th\n var j = f.j()\n var i = j % 10\n if (i <= 3 && parseInt((j % 100) / 10, 10) === 1) {\n i = 0\n }\n return ['st', 'nd', 'rd'][i - 1] || 'th'\n },\n w: function () {\n // Day of week; 0[Sun]..6[Sat]\n return jsdate.getDay()\n },\n z: function () {\n // Day of year; 0..365\n var a = new Date(f.Y(), f.n() - 1, f.j())\n var b = new Date(f.Y(), 0, 1)\n return Math.round((a - b) / 864e5)\n },\n\n // Week\n W: function () {\n // ISO-8601 week number\n var a = new Date(f.Y(), f.n() - 1, f.j() - f.N() + 3)\n var b = new Date(a.getFullYear(), 0, 4)\n return _pad(1 + Math.round((a - b) / 864e5 / 7), 2)\n },\n\n // Month\n F: function () {\n // Full month name; January...December\n return txtWords[6 + f.n()]\n },\n m: function () {\n // Month w/leading 0; 01...12\n return _pad(f.n(), 2)\n },\n M: function () {\n // Shorthand month name; Jan...Dec\n return f.F()\n .slice(0, 3)\n },\n n: function () {\n // Month; 1...12\n return jsdate.getMonth() + 1\n },\n t: function () {\n // Days in month; 28...31\n return (new Date(f.Y(), f.n(), 0))\n .getDate()\n },\n\n // Year\n L: function () {\n // Is leap year?; 0 or 1\n var j = f.Y()\n return j % 4 === 0 & j % 100 !== 0 | j % 400 === 0\n },\n o: function () {\n // ISO-8601 year\n var n = f.n()\n var W = f.W()\n var Y = f.Y()\n return Y + (n === 12 && W < 9 ? 1 : n === 1 && W > 9 ? -1 : 0)\n },\n Y: function () {\n // Full year; e.g. 1980...2010\n return jsdate.getFullYear()\n },\n y: function () {\n // Last two digits of year; 00...99\n return f.Y()\n .toString()\n .slice(-2)\n },\n\n // Time\n a: function () {\n // am or pm\n return jsdate.getHours() > 11 ? 'pm' : 'am'\n },\n A: function () {\n // AM or PM\n return f.a()\n .toUpperCase()\n },\n B: function () {\n // Swatch Internet time; 000..999\n var H = jsdate.getUTCHours() * 36e2\n // Hours\n var i = jsdate.getUTCMinutes() * 60\n // Minutes\n // Seconds\n var s = jsdate.getUTCSeconds()\n return _pad(Math.floor((H + i + s + 36e2) / 86.4) % 1e3, 3)\n },\n g: function () {\n // 12-Hours; 1..12\n return f.G() % 12 || 12\n },\n G: function () {\n // 24-Hours; 0..23\n return jsdate.getHours()\n },\n h: function () {\n // 12-Hours w/leading 0; 01..12\n return _pad(f.g(), 2)\n },\n H: function () {\n // 24-Hours w/leading 0; 00..23\n return _pad(f.G(), 2)\n },\n i: function () {\n // Minutes w/leading 0; 00..59\n return _pad(jsdate.getMinutes(), 2)\n },\n s: function () {\n // Seconds w/leading 0; 00..59\n return _pad(jsdate.getSeconds(), 2)\n },\n u: function () {\n // Microseconds; 000000-999000\n return _pad(jsdate.getMilliseconds() * 1000, 6)\n },\n\n // Timezone\n e: function () {\n // Timezone identifier; e.g. Atlantic/Azores, ...\n // The following works, but requires inclusion of the very large\n // timezone_abbreviations_list() function.\n /* return that.date_default_timezone_get();\n */\n var msg = 'Not supported (see source code of date() for timezone on how to add support)'\n throw new Error(msg)\n },\n I: function () {\n // DST observed?; 0 or 1\n // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.\n // If they are not equal, then DST is observed.\n var a = new Date(f.Y(), 0)\n // Jan 1\n var c = Date.UTC(f.Y(), 0)\n // Jan 1 UTC\n var b = new Date(f.Y(), 6)\n // Jul 1\n // Jul 1 UTC\n var d = Date.UTC(f.Y(), 6)\n return ((a - c) !== (b - d)) ? 1 : 0\n },\n O: function () {\n // Difference to GMT in hour format; e.g. +0200\n var tzo = jsdate.getTimezoneOffset()\n var a = Math.abs(tzo)\n return (tzo > 0 ? '-' : '+') + _pad(Math.floor(a / 60) * 100 + a % 60, 4)\n },\n P: function () {\n // Difference to GMT w/colon; e.g. +02:00\n var O = f.O()\n return (O.substr(0, 3) + ':' + O.substr(3, 2))\n },\n T: function () {\n // The following works, but requires inclusion of the very\n // large timezone_abbreviations_list() function.\n /* var abbr, i, os, _default;\n if (!tal.length) {\n tal = that.timezone_abbreviations_list();\n }\n if ($locutus && $locutus.default_timezone) {\n _default = $locutus.default_timezone;\n for (abbr in tal) {\n for (i = 0; i < tal[abbr].length; i++) {\n if (tal[abbr][i].timezone_id === _default) {\n return abbr.toUpperCase();\n }\n }\n }\n }\n for (abbr in tal) {\n for (i = 0; i < tal[abbr].length; i++) {\n os = -jsdate.getTimezoneOffset() * 60;\n if (tal[abbr][i].offset === os) {\n return abbr.toUpperCase();\n }\n }\n }\n */\n return 'UTC'\n },\n Z: function () {\n // Timezone offset in seconds (-43200...50400)\n return -jsdate.getTimezoneOffset() * 60\n },\n\n // Full Date/Time\n c: function () {\n // ISO-8601 date.\n return 'Y-m-d\\\\TH:i:sP'.replace(formatChr, formatChrCb)\n },\n r: function () {\n // RFC 2822\n return 'D, d M Y H:i:s O'.replace(formatChr, formatChrCb)\n },\n U: function () {\n // Seconds since UNIX epoch\n return jsdate / 1000 | 0\n }\n }\n\n var _date = function (format, timestamp) {\n jsdate = (timestamp === undefined ? new Date() // Not provided\n : (timestamp instanceof Date) ? new Date(timestamp) // JS Date()\n : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)\n )\n return format.replace(formatChr, formatChrCb)\n }\n\n return _date(format, timestamp)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/date_parse.js b/node_modules/locutus/php/datetime/date_parse.js
deleted file mode 100644
index 20df2bf..0000000
--- a/node_modules/locutus/php/datetime/date_parse.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = function date_parse(date) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/date_parse/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: date_parse('2006-12-12 10:00:00')
- // returns 1: {year : 2006, month: 12, day: 12, hour: 10, minute: 0, second: 0, fraction: 0, is_localtime: false}
-
- var strtotime = require('../datetime/strtotime');
- var ts;
-
- try {
- ts = strtotime(date);
- } catch (e) {
- ts = false;
- }
-
- if (!ts) {
- return false;
- }
-
- var dt = new Date(ts * 1000);
-
- var retObj = {};
-
- retObj.year = dt.getFullYear();
- retObj.month = dt.getMonth() + 1;
- retObj.day = dt.getDate();
- retObj.hour = dt.getHours();
- retObj.minute = dt.getMinutes();
- retObj.second = dt.getSeconds();
- retObj.fraction = parseFloat('0.' + dt.getMilliseconds());
- retObj.is_localtime = dt.getTimezoneOffset() !== 0;
-
- return retObj;
-};
-//# sourceMappingURL=date_parse.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/date_parse.js.map b/node_modules/locutus/php/datetime/date_parse.js.map
deleted file mode 100644
index bf66a26..0000000
--- a/node_modules/locutus/php/datetime/date_parse.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/date_parse.js"],"names":["module","exports","date_parse","date","strtotime","require","ts","e","dt","Date","retObj","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","second","getSeconds","fraction","parseFloat","getMilliseconds","is_localtime","getTimezoneOffset"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,IAArB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,uBAAR,CAAhB;AACA,MAAIC,EAAJ;;AAEA,MAAI;AACFA,SAAKF,UAAUD,IAAV,CAAL;AACD,GAFD,CAEE,OAAOI,CAAP,EAAU;AACVD,SAAK,KAAL;AACD;;AAED,MAAI,CAACA,EAAL,EAAS;AACP,WAAO,KAAP;AACD;;AAED,MAAIE,KAAK,IAAIC,IAAJ,CAASH,KAAK,IAAd,CAAT;;AAEA,MAAII,SAAS,EAAb;;AAEAA,SAAOC,IAAP,GAAcH,GAAGI,WAAH,EAAd;AACAF,SAAOG,KAAP,GAAeL,GAAGM,QAAH,KAAgB,CAA/B;AACAJ,SAAOK,GAAP,GAAaP,GAAGQ,OAAH,EAAb;AACAN,SAAOO,IAAP,GAAcT,GAAGU,QAAH,EAAd;AACAR,SAAOS,MAAP,GAAgBX,GAAGY,UAAH,EAAhB;AACAV,SAAOW,MAAP,GAAgBb,GAAGc,UAAH,EAAhB;AACAZ,SAAOa,QAAP,GAAkBC,WAAW,OAAOhB,GAAGiB,eAAH,EAAlB,CAAlB;AACAf,SAAOgB,YAAP,GAAsBlB,GAAGmB,iBAAH,OAA2B,CAAjD;;AAEA,SAAOjB,MAAP;AACD,CAjCD","file":"date_parse.js","sourcesContent":["module.exports = function date_parse (date) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/date_parse/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: date_parse('2006-12-12 10:00:00')\n // returns 1: {year : 2006, month: 12, day: 12, hour: 10, minute: 0, second: 0, fraction: 0, is_localtime: false}\n\n var strtotime = require('../datetime/strtotime')\n var ts\n\n try {\n ts = strtotime(date)\n } catch (e) {\n ts = false\n }\n\n if (!ts) {\n return false\n }\n\n var dt = new Date(ts * 1000)\n\n var retObj = {}\n\n retObj.year = dt.getFullYear()\n retObj.month = dt.getMonth() + 1\n retObj.day = dt.getDate()\n retObj.hour = dt.getHours()\n retObj.minute = dt.getMinutes()\n retObj.second = dt.getSeconds()\n retObj.fraction = parseFloat('0.' + dt.getMilliseconds())\n retObj.is_localtime = dt.getTimezoneOffset() !== 0\n\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/getdate.js b/node_modules/locutus/php/datetime/getdate.js
deleted file mode 100644
index 92ac110..0000000
--- a/node_modules/locutus/php/datetime/getdate.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-module.exports = function getdate(timestamp) {
- // discuss at: http://locutus.io/php/getdate/
- // original by: Paulo Freitas
- // input by: Alex
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: getdate(1055901520)
- // returns 1: {'seconds': 40, 'minutes': 58, 'hours': 1, 'mday': 18, 'wday': 3, 'mon': 6, 'year': 2003, 'yday': 168, 'weekday': 'Wednesday', 'month': 'June', '0': 1055901520}
-
- var _w = ['Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur'];
- var _m = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
- var d = typeof timestamp === 'undefined' ? new Date() : timestamp instanceof Date ? new Date(timestamp) // Not provided
- : new Date(timestamp * 1000) // Javascript Date() // UNIX timestamp (auto-convert to int)
- ;
- var w = d.getDay();
- var m = d.getMonth();
- var y = d.getFullYear();
- var r = {};
-
- r.seconds = d.getSeconds();
- r.minutes = d.getMinutes();
- r.hours = d.getHours();
- r.mday = d.getDate();
- r.wday = w;
- r.mon = m + 1;
- r.year = y;
- r.yday = Math.floor((d - new Date(y, 0, 1)) / 86400000);
- r.weekday = _w[w] + 'day';
- r.month = _m[m];
- r['0'] = parseInt(d.getTime() / 1000, 10);
-
- return r;
-};
-//# sourceMappingURL=getdate.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/getdate.js.map b/node_modules/locutus/php/datetime/getdate.js.map
deleted file mode 100644
index 390aad8..0000000
--- a/node_modules/locutus/php/datetime/getdate.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/getdate.js"],"names":["module","exports","getdate","timestamp","_w","_m","d","Date","w","getDay","m","getMonth","y","getFullYear","r","seconds","getSeconds","minutes","getMinutes","hours","getHours","mday","getDate","wday","mon","year","yday","Math","floor","weekday","month","parseInt","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,SAAlB,EAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAK,CACP,KADO,EAEP,KAFO,EAGP,MAHO,EAIP,QAJO,EAKP,OALO,EAMP,KANO,EAOP,OAPO,CAAT;AASA,MAAIC,KAAK,CACP,SADO,EAEP,UAFO,EAGP,OAHO,EAIP,OAJO,EAKP,KALO,EAMP,MANO,EAOP,MAPO,EAQP,QARO,EASP,WATO,EAUP,SAVO,EAWP,UAXO,EAYP,UAZO,CAAT;AAcA,MAAIC,IAAM,OAAOH,SAAP,KAAqB,WAAtB,GAAqC,IAAII,IAAJ,EAArC,GACJJ,qBAAqBI,IAAtB,GAA8B,IAAIA,IAAJ,CAASJ,SAAT,CAA9B,CAAmD;AAAnD,IACA,IAAII,IAAJ,CAASJ,YAAY,IAArB,CAFA,CAE2B;AAF/B;AAIA,MAAIK,IAAIF,EAAEG,MAAF,EAAR;AACA,MAAIC,IAAIJ,EAAEK,QAAF,EAAR;AACA,MAAIC,IAAIN,EAAEO,WAAF,EAAR;AACA,MAAIC,IAAI,EAAR;;AAEAA,IAAEC,OAAF,GAAYT,EAAEU,UAAF,EAAZ;AACAF,IAAEG,OAAF,GAAYX,EAAEY,UAAF,EAAZ;AACAJ,IAAEK,KAAF,GAAUb,EAAEc,QAAF,EAAV;AACAN,IAAEO,IAAF,GAASf,EAAEgB,OAAF,EAAT;AACAR,IAAES,IAAF,GAASf,CAAT;AACAM,IAAEU,GAAF,GAAQd,IAAI,CAAZ;AACAI,IAAEW,IAAF,GAASb,CAAT;AACAE,IAAEY,IAAF,GAASC,KAAKC,KAAL,CAAW,CAACtB,IAAK,IAAIC,IAAJ,CAASK,CAAT,EAAY,CAAZ,EAAe,CAAf,CAAN,IAA4B,QAAvC,CAAT;AACAE,IAAEe,OAAF,GAAYzB,GAAGI,CAAH,IAAQ,KAApB;AACAM,IAAEgB,KAAF,GAAUzB,GAAGK,CAAH,CAAV;AACAI,IAAE,GAAF,IAASiB,SAASzB,EAAE0B,OAAF,KAAc,IAAvB,EAA6B,EAA7B,CAAT;;AAEA,SAAOlB,CAAP;AACD,CArDD","file":"getdate.js","sourcesContent":["module.exports = function getdate (timestamp) {\n // discuss at: http://locutus.io/php/getdate/\n // original by: Paulo Freitas\n // input by: Alex\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: getdate(1055901520)\n // returns 1: {'seconds': 40, 'minutes': 58, 'hours': 1, 'mday': 18, 'wday': 3, 'mon': 6, 'year': 2003, 'yday': 168, 'weekday': 'Wednesday', 'month': 'June', '0': 1055901520}\n\n var _w = [\n 'Sun',\n 'Mon',\n 'Tues',\n 'Wednes',\n 'Thurs',\n 'Fri',\n 'Satur'\n ]\n var _m = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ]\n var d = ((typeof timestamp === 'undefined') ? new Date()\n : (timestamp instanceof Date) ? new Date(timestamp) // Not provided\n : new Date(timestamp * 1000) // Javascript Date() // UNIX timestamp (auto-convert to int)\n )\n var w = d.getDay()\n var m = d.getMonth()\n var y = d.getFullYear()\n var r = {}\n\n r.seconds = d.getSeconds()\n r.minutes = d.getMinutes()\n r.hours = d.getHours()\n r.mday = d.getDate()\n r.wday = w\n r.mon = m + 1\n r.year = y\n r.yday = Math.floor((d - (new Date(y, 0, 1))) / 86400000)\n r.weekday = _w[w] + 'day'\n r.month = _m[m]\n r['0'] = parseInt(d.getTime() / 1000, 10)\n\n return r\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gettimeofday.js b/node_modules/locutus/php/datetime/gettimeofday.js
deleted file mode 100644
index 5f55999..0000000
--- a/node_modules/locutus/php/datetime/gettimeofday.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"use strict";
-
-module.exports = function gettimeofday(returnFloat) {
- // discuss at: http://locutus.io/php/gettimeofday/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: Josh Fraser (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/)
- // parts by: Breaking Par Consulting Inc (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7)
- // revised by: Theriault (https://github.com/Theriault)
- // example 1: var $obj = gettimeofday()
- // example 1: var $result = ('sec' in $obj && 'usec' in $obj && 'minuteswest' in $obj &&80, 'dsttime' in $obj)
- // returns 1: true
- // example 2: var $timeStamp = gettimeofday(true)
- // example 2: var $result = $timeStamp > 1000000000 && $timeStamp < 2000000000
- // returns 2: true
-
- var t = new Date();
- var y = 0;
-
- if (returnFloat) {
- return t.getTime() / 1000;
- }
-
- // Store current year.
- y = t.getFullYear();
- return {
- sec: t.getUTCSeconds(),
- usec: t.getUTCMilliseconds() * 1000,
- minuteswest: t.getTimezoneOffset(),
- // Compare Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC to see if DST is observed.
- dsttime: 0 + (new Date(y, 0) - Date.UTC(y, 0) !== new Date(y, 6) - Date.UTC(y, 6))
- };
-};
-//# sourceMappingURL=gettimeofday.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gettimeofday.js.map b/node_modules/locutus/php/datetime/gettimeofday.js.map
deleted file mode 100644
index 32db2dd..0000000
--- a/node_modules/locutus/php/datetime/gettimeofday.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/gettimeofday.js"],"names":["module","exports","gettimeofday","returnFloat","t","Date","y","getTime","getFullYear","sec","getUTCSeconds","usec","getUTCMilliseconds","minuteswest","getTimezoneOffset","dsttime","UTC"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,WAAvB,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,IAAIC,IAAJ,EAAR;AACA,MAAIC,IAAI,CAAR;;AAEA,MAAIH,WAAJ,EAAiB;AACf,WAAOC,EAAEG,OAAF,KAAc,IAArB;AACD;;AAED;AACAD,MAAIF,EAAEI,WAAF,EAAJ;AACA,SAAO;AACLC,SAAKL,EAAEM,aAAF,EADA;AAELC,UAAMP,EAAEQ,kBAAF,KAAyB,IAF1B;AAGLC,iBAAaT,EAAEU,iBAAF,EAHR;AAIL;AACAC,aAAS,KAAO,IAAIV,IAAJ,CAASC,CAAT,EAAY,CAAZ,CAAD,GAAmBD,KAAKW,GAAL,CAASV,CAAT,EAAY,CAAZ,CAApB,KAA0C,IAAID,IAAJ,CAASC,CAAT,EAAY,CAAZ,CAAD,GAAmBD,KAAKW,GAAL,CAASV,CAAT,EAAY,CAAZ,CAAjE;AALJ,GAAP;AAOD,CA7BD","file":"gettimeofday.js","sourcesContent":["module.exports = function gettimeofday (returnFloat) {\n // discuss at: http://locutus.io/php/gettimeofday/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: Josh Fraser (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/)\n // parts by: Breaking Par Consulting Inc (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7)\n // revised by: Theriault (https://github.com/Theriault)\n // example 1: var $obj = gettimeofday()\n // example 1: var $result = ('sec' in $obj && 'usec' in $obj && 'minuteswest' in $obj &&80, 'dsttime' in $obj)\n // returns 1: true\n // example 2: var $timeStamp = gettimeofday(true)\n // example 2: var $result = $timeStamp > 1000000000 && $timeStamp < 2000000000\n // returns 2: true\n\n var t = new Date()\n var y = 0\n\n if (returnFloat) {\n return t.getTime() / 1000\n }\n\n // Store current year.\n y = t.getFullYear()\n return {\n sec: t.getUTCSeconds(),\n usec: t.getUTCMilliseconds() * 1000,\n minuteswest: t.getTimezoneOffset(),\n // Compare Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC to see if DST is observed.\n dsttime: 0 + (((new Date(y, 0)) - Date.UTC(y, 0)) !== ((new Date(y, 6)) - Date.UTC(y, 6)))\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gmdate.js b/node_modules/locutus/php/datetime/gmdate.js
deleted file mode 100644
index 5910ac2..0000000
--- a/node_modules/locutus/php/datetime/gmdate.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = function gmdate(format, timestamp) {
- // discuss at: http://locutus.io/php/gmdate/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: Alex
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: gmdate('H:m:s \\m \\i\\s \\m\\o\\n\\t\\h', 1062402400); // Return will depend on your timezone
- // returns 1: '07:09:40 m is month'
-
- var date = require('../datetime/date');
-
- var dt = typeof timestamp === 'undefined' ? new Date() // Not provided
- : timestamp instanceof Date ? new Date(timestamp) // Javascript Date()
- : new Date(timestamp * 1000); // UNIX timestamp (auto-convert to int)
-
- timestamp = Date.parse(dt.toUTCString().slice(0, -4)) / 1000;
-
- return date(format, timestamp);
-};
-//# sourceMappingURL=gmdate.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gmdate.js.map b/node_modules/locutus/php/datetime/gmdate.js.map
deleted file mode 100644
index 825ddc1..0000000
--- a/node_modules/locutus/php/datetime/gmdate.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/gmdate.js"],"names":["module","exports","gmdate","format","timestamp","date","require","dt","Date","parse","toUTCString","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyBC,SAAzB,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,QAAQ,kBAAR,CAAX;;AAEA,MAAIC,KAAK,OAAOH,SAAP,KAAqB,WAArB,GAAmC,IAAII,IAAJ,EAAnC,CAA8C;AAA9C,IACLJ,qBAAqBI,IAArB,GAA4B,IAAIA,IAAJ,CAASJ,SAAT,CAA5B,CAAgD;AAAhD,IACA,IAAII,IAAJ,CAASJ,YAAY,IAArB,CAFJ,CAVmD,CAYpB;;AAE/BA,cAAYI,KAAKC,KAAL,CAAWF,GAAGG,WAAH,GAAiBC,KAAjB,CAAuB,CAAvB,EAA0B,CAAC,CAA3B,CAAX,IAA4C,IAAxD;;AAEA,SAAON,KAAKF,MAAL,EAAaC,SAAb,CAAP;AACD,CAjBD","file":"gmdate.js","sourcesContent":["module.exports = function gmdate (format, timestamp) {\n // discuss at: http://locutus.io/php/gmdate/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: Alex\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: gmdate('H:m:s \\\\m \\\\i\\\\s \\\\m\\\\o\\\\n\\\\t\\\\h', 1062402400); // Return will depend on your timezone\n // returns 1: '07:09:40 m is month'\n\n var date = require('../datetime/date')\n\n var dt = typeof timestamp === 'undefined' ? new Date() // Not provided\n : timestamp instanceof Date ? new Date(timestamp) // Javascript Date()\n : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)\n\n timestamp = Date.parse(dt.toUTCString().slice(0, -4)) / 1000\n\n return date(format, timestamp)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gmmktime.js b/node_modules/locutus/php/datetime/gmmktime.js
deleted file mode 100644
index 12bdd96..0000000
--- a/node_modules/locutus/php/datetime/gmmktime.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-module.exports = function gmmktime() {
- // discuss at: http://locutus.io/php/gmmktime/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: mktime
- // example 1: gmmktime(14, 10, 2, 2, 1, 2008)
- // returns 1: 1201875002
- // example 2: gmmktime(0, 0, -1, 1, 1, 1970)
- // returns 2: -1
-
- var d = new Date();
- var r = arguments;
- var i = 0;
- var e = ['Hours', 'Minutes', 'Seconds', 'Month', 'Date', 'FullYear'];
-
- for (i = 0; i < e.length; i++) {
- if (typeof r[i] === 'undefined') {
- r[i] = d['getUTC' + e[i]]();
- // +1 to fix JS months.
- r[i] += i === 3;
- } else {
- r[i] = parseInt(r[i], 10);
- if (isNaN(r[i])) {
- return false;
- }
- }
- }
-
- // Map years 0-69 to 2000-2069 and years 70-100 to 1970-2000.
- r[5] += r[5] >= 0 ? r[5] <= 69 ? 2e3 : r[5] <= 100 ? 1900 : 0 : 0;
-
- // Set year, month (-1 to fix JS months), and date.
- // !This must come before the call to setHours!
- d.setUTCFullYear(r[5], r[3] - 1, r[4]);
-
- // Set hours, minutes, and seconds.
- d.setUTCHours(r[0], r[1], r[2]);
-
- var time = d.getTime();
-
- // Divide milliseconds by 1000 to return seconds and drop decimal.
- // Add 1 second if negative or it'll be off from PHP by 1 second.
- return (time / 1e3 >> 0) - (time < 0);
-};
-//# sourceMappingURL=gmmktime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gmmktime.js.map b/node_modules/locutus/php/datetime/gmmktime.js.map
deleted file mode 100644
index 720add9..0000000
--- a/node_modules/locutus/php/datetime/gmmktime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/gmmktime.js"],"names":["module","exports","gmmktime","d","Date","r","arguments","i","e","length","parseInt","isNaN","setUTCFullYear","setUTCHours","time","getTime"],"mappings":";;AAAAA,OAAO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Content":["module.exports = function gmmktime () {\n // discuss at: http://locutus.io/php/gmmktime/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: mktime\n // example 1: gmmktime(14, 10, 2, 2, 1, 2008)\n // returns 1: 1201875002\n // example 2: gmmktime(0, 0, -1, 1, 1, 1970)\n // returns 2: -1\n\n var d = new Date()\n var r = arguments\n var i = 0\n var e = ['Hours', 'Minutes', 'Seconds', 'Month', 'Date', 'FullYear']\n\n for (i = 0; i < e.length; i++) {\n if (typeof r[i] === 'undefined') {\n r[i] = d['getUTC' + e[i]]()\n // +1 to fix JS months.\n r[i] += (i === 3)\n } else {\n r[i] = parseInt(r[i], 10)\n if (isNaN(r[i])) {\n return false\n }\n }\n }\n\n // Map years 0-69 to 2000-2069 and years 70-100 to 1970-2000.\n r[5] += (r[5] >= 0 ? (r[5] <= 69 ? 2e3 : (r[5] <= 100 ? 1900 : 0)) : 0)\n\n // Set year, month (-1 to fix JS months), and date.\n // !This must come before the call to setHours!\n d.setUTCFullYear(r[5], r[3] - 1, r[4])\n\n // Set hours, minutes, and seconds.\n d.setUTCHours(r[0], r[1], r[2])\n\n var time = d.getTime()\n\n // Divide milliseconds by 1000 to return seconds and drop decimal.\n // Add 1 second if negative or it'll be off from PHP by 1 second.\n return (time / 1e3 >> 0) - (time < 0)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gmstrftime.js b/node_modules/locutus/php/datetime/gmstrftime.js
deleted file mode 100644
index 7953981..0000000
--- a/node_modules/locutus/php/datetime/gmstrftime.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-module.exports = function gmstrftime(format, timestamp) {
- // discuss at: http://locutus.io/php/gmstrftime/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: Alex
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: gmstrftime("%A", 1062462400)
- // returns 1: 'Tuesday'
-
- var strftime = require('../datetime/strftime');
-
- var _date = typeof timestamp === 'undefined' ? new Date() : timestamp instanceof Date ? new Date(timestamp) : new Date(timestamp * 1000);
-
- timestamp = Date.parse(_date.toUTCString().slice(0, -4)) / 1000;
-
- return strftime(format, timestamp);
-};
-//# sourceMappingURL=gmstrftime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/gmstrftime.js.map b/node_modules/locutus/php/datetime/gmstrftime.js.map
deleted file mode 100644
index e852aff..0000000
--- a/node_modules/locutus/php/datetime/gmstrftime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/gmstrftime.js"],"names":["module","exports","gmstrftime","format","timestamp","strftime","require","_date","Date","parse","toUTCString","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,MAArB,EAA6BC,SAA7B,EAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,sBAAR,CAAf;;AAEA,MAAIC,QAAS,OAAOH,SAAP,KAAqB,WAAtB,GACR,IAAII,IAAJ,EADQ,GAEPJ,qBAAqBI,IAAtB,GACE,IAAIA,IAAJ,CAASJ,SAAT,CADF,GAEE,IAAII,IAAJ,CAASJ,YAAY,IAArB,CAJN;;AAMAA,cAAYI,KAAKC,KAAL,CAAWF,MAAMG,WAAN,GAAoBC,KAApB,CAA0B,CAA1B,EAA6B,CAAC,CAA9B,CAAX,IAA+C,IAA3D;;AAEA,SAAON,SAASF,MAAT,EAAiBC,SAAjB,CAAP;AACD,CAnBD","file":"gmstrftime.js","sourcesContent":["module.exports = function gmstrftime (format, timestamp) {\n // discuss at: http://locutus.io/php/gmstrftime/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: Alex\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: gmstrftime(\"%A\", 1062462400)\n // returns 1: 'Tuesday'\n\n var strftime = require('../datetime/strftime')\n\n var _date = (typeof timestamp === 'undefined')\n ? new Date()\n : (timestamp instanceof Date)\n ? new Date(timestamp)\n : new Date(timestamp * 1000)\n\n timestamp = Date.parse(_date.toUTCString().slice(0, -4)) / 1000\n\n return strftime(format, timestamp)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/idate.js b/node_modules/locutus/php/datetime/idate.js
deleted file mode 100644
index 438e2c0..0000000
--- a/node_modules/locutus/php/datetime/idate.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-
-module.exports = function idate(format, timestamp) {
- // discuss at: http://locutus.io/php/idate/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: date
- // original by: gettimeofday
- // input by: Alex
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // example 1: idate('y', 1255633200)
- // returns 1: 9
-
- if (format === undefined) {
- throw new Error('idate() expects at least 1 parameter, 0 given');
- }
- if (!format.length || format.length > 1) {
- throw new Error('idate format is one char');
- }
-
- // @todo: Need to allow date_default_timezone_set() (check for $locutus.default_timezone and use)
- var _date = typeof timestamp === 'undefined' ? new Date() : timestamp instanceof Date ? new Date(timestamp) : new Date(timestamp * 1000);
- var a;
-
- switch (format) {
- case 'B':
- return Math.floor((_date.getUTCHours() * 36e2 + _date.getUTCMinutes() * 60 + _date.getUTCSeconds() + 36e2) / 86.4) % 1e3;
- case 'd':
- return _date.getDate();
- case 'h':
- return _date.getHours() % 12 || 12;
- case 'H':
- return _date.getHours();
- case 'i':
- return _date.getMinutes();
- case 'I':
- // capital 'i'
- // Logic original by getimeofday().
- // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.
- // If they are not equal, then DST is observed.
- a = _date.getFullYear();
- return 0 + (new Date(a, 0) - Date.UTC(a, 0) !== new Date(a, 6) - Date.UTC(a, 6));
- case 'L':
- a = _date.getFullYear();
- return !(a & 3) && (a % 1e2 || !(a % 4e2)) ? 1 : 0;
- case 'm':
- return _date.getMonth() + 1;
- case 's':
- return _date.getSeconds();
- case 't':
- return new Date(_date.getFullYear(), _date.getMonth() + 1, 0).getDate();
- case 'U':
- return Math.round(_date.getTime() / 1000);
- case 'w':
- return _date.getDay();
- case 'W':
- a = new Date(_date.getFullYear(), _date.getMonth(), _date.getDate() - (_date.getDay() || 7) + 3);
- return 1 + Math.round((a - new Date(a.getFullYear(), 0, 4)) / 864e5 / 7);
- case 'y':
- return parseInt((_date.getFullYear() + '').slice(2), 10); // This function returns an integer, unlike _date()
- case 'Y':
- return _date.getFullYear();
- case 'z':
- return Math.floor((_date - new Date(_date.getFullYear(), 0, 1)) / 864e5);
- case 'Z':
- return -_date.getTimezoneOffset() * 60;
- default:
- throw new Error('Unrecognized _date format token');
- }
-};
-//# sourceMappingURL=idate.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/idate.js.map b/node_modules/locutus/php/datetime/idate.js.map
deleted file mode 100644
index 2ffdefc..0000000
--- a/node_modules/locutus/php/datetime/idate.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/idate.js"],"names":["module","exports","idate","format","timestamp","undefined","Error","length","_date","Date","a","Math","floor","getUTCHours","getUTCMinutes","getUTCSeconds","getDate","getHours","getMinutes","getFullYear","UTC","getMonth","getSeconds","round","getTime","getDay","parseInt","slice","getTimezoneOffset"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,MAAhB,EAAwBC,SAAxB,EAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAID,WAAWE,SAAf,EAA0B;AACxB,UAAM,IAAIC,KAAJ,CAAU,+CAAV,CAAN;AACD;AACD,MAAI,CAACH,OAAOI,MAAR,IAAkBJ,OAAOI,MAAP,GAAgB,CAAtC,EAAyC;AACvC,UAAM,IAAID,KAAJ,CAAU,0BAAV,CAAN;AACD;;AAED;AACA,MAAIE,QAAS,OAAOJ,SAAP,KAAqB,WAAtB,GACR,IAAIK,IAAJ,EADQ,GAEPL,qBAAqBK,IAAtB,GACE,IAAIA,IAAJ,CAASL,SA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KAAKY,KAAL,CAAWf,MAAMgB,OAAN,KAAkB,IAA7B,CAAP;AACF,SAAK,GAAL;AACE,aAAOhB,MAAMiB,MAAN,EAAP;AACF,SAAK,GAAL;AACEf,UAAI,IAAID,IAAJ,CACFD,MAAMW,WAAN,EADE,EAEFX,MAAMa,QAAN,EAFE,EAGFb,MAAMQ,OAAN,MAAmBR,MAAMiB,MAAN,MAAkB,CAArC,IAA0C,CAHxC,CAAJ;AAKA,aAAO,IAAId,KAAKY,KAAL,CAAW,CAACb,IAAK,IAAID,IAAJ,CAASC,EAAES,WAAF,EAAT,EAA0B,CAA1B,EAA6B,CAA7B,CAAN,IAA0C,KAA1C,GAAkD,CAA7D,CAAX;AACF,SAAK,GAAL;AACE,aAAOO,SAAS,CAAClB,MAAMW,WAAN,KAAsB,EAAvB,EACfQ,KADe,CACT,CADS,CAAT,EACI,EADJ,CAAP,CA5CJ,CA6CmB;AACjB,SAAK,GAAL;AACE,aAAOnB,MAAMW,WAAN,EAAP;AACF,SAAK,GAAL;AACE,aAAOR,KAAKC,KAAL,CAAW,CAACJ,QAAQ,IAAIC,IAAJ,CAASD,MAAMW,WAAN,EAAT,EAA8B,CAA9B,EAAiC,CAAjC,CAAT,IAAgD,KAA3D,CAAP;AACF,SAAK,GAAL;AACE,aAAO,CAACX,MAAMoB,iBAAN,EAAD,GAA6B,EAApC;AACF;AACE,YAAM,IAAItB,KAAJ,CAAU,iCAAV,CAAN;AArDJ;AAuDD,CAjFD","file":"idate.js","sourcesContent":["module.exports = function idate (format, timestamp) {\n // discuss at: http://locutus.io/php/idate/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: date\n // original by: gettimeofday\n // input by: Alex\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: idate('y', 1255633200)\n // returns 1: 9\n\n if (format === undefined) {\n throw new Error('idate() expects at least 1 parameter, 0 given')\n }\n if (!format.length || format.length > 1) {\n throw new Error('idate format is one char')\n }\n\n // @todo: Need to allow date_default_timezone_set() (check for $locutus.default_timezone and use)\n var _date = (typeof timestamp === 'undefined')\n ? new Date()\n : (timestamp instanceof Date)\n ? new Date(timestamp)\n : new Date(timestamp * 1000)\n var a\n\n switch (format) {\n case 'B':\n return Math.floor((\n (_date.getUTCHours() * 36e2) +\n (_date.getUTCMinutes() * 60) +\n _date.getUTCSeconds() + 36e2\n ) / 86.4) % 1e3\n case 'd':\n return _date.getDate()\n case 'h':\n return _date.getHours() % 12 || 12\n case 'H':\n return _date.getHours()\n case 'i':\n return _date.getMinutes()\n case 'I':\n // capital 'i'\n // Logic original by getimeofday().\n // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.\n // If they are not equal, then DST is observed.\n a = _date.getFullYear()\n return 0 + (((new Date(a, 0)) - Date.UTC(a, 0)) !== ((new Date(a, 6)) - Date.UTC(a, 6)))\n case 'L':\n a = _date.getFullYear()\n return (!(a & 3) && (a % 1e2 || !(a % 4e2))) ? 1 : 0\n case 'm':\n return _date.getMonth() + 1\n case 's':\n return _date.getSeconds()\n case 't':\n return (new Date(_date.getFullYear(), _date.getMonth() + 1, 0))\n .getDate()\n case 'U':\n return Math.round(_date.getTime() / 1000)\n case 'w':\n return _date.getDay()\n case 'W':\n a = new Date(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate() - (_date.getDay() || 7) + 3\n )\n return 1 + Math.round((a - (new Date(a.getFullYear(), 0, 4))) / 864e5 / 7)\n case 'y':\n return parseInt((_date.getFullYear() + '')\n .slice(2), 10) // This function returns an integer, unlike _date()\n case 'Y':\n return _date.getFullYear()\n case 'z':\n return Math.floor((_date - new Date(_date.getFullYear(), 0, 1)) / 864e5)\n case 'Z':\n return -_date.getTimezoneOffset() * 60\n default:\n throw new Error('Unrecognized _date format token')\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/index.js b/node_modules/locutus/php/datetime/index.js
deleted file mode 100644
index e54b112..0000000
--- a/node_modules/locutus/php/datetime/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports['checkdate'] = require('./checkdate');
-module.exports['date'] = require('./date');
-module.exports['date_parse'] = require('./date_parse');
-module.exports['getdate'] = require('./getdate');
-module.exports['gettimeofday'] = require('./gettimeofday');
-module.exports['gmdate'] = require('./gmdate');
-module.exports['gmmktime'] = require('./gmmktime');
-module.exports['gmstrftime'] = require('./gmstrftime');
-module.exports['idate'] = require('./idate');
-module.exports['microtime'] = require('./microtime');
-module.exports['mktime'] = require('./mktime');
-module.exports['strftime'] = require('./strftime');
-module.exports['strptime'] = require('./strptime');
-module.exports['strtotime'] = require('./strtotime');
-module.exports['time'] = require('./time');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/index.js.map b/node_modules/locutus/php/datetime/index.js.map
deleted file mode 100644
index b3f69d5..0000000
--- a/node_modules/locutus/php/datetime/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB","file":"index.js","sourcesContent":["module.exports['checkdate'] = require('./checkdate')\nmodule.exports['date'] = require('./date')\nmodule.exports['date_parse'] = require('./date_parse')\nmodule.exports['getdate'] = require('./getdate')\nmodule.exports['gettimeofday'] = require('./gettimeofday')\nmodule.exports['gmdate'] = require('./gmdate')\nmodule.exports['gmmktime'] = require('./gmmktime')\nmodule.exports['gmstrftime'] = require('./gmstrftime')\nmodule.exports['idate'] = require('./idate')\nmodule.exports['microtime'] = require('./microtime')\nmodule.exports['mktime'] = require('./mktime')\nmodule.exports['strftime'] = require('./strftime')\nmodule.exports['strptime'] = require('./strptime')\nmodule.exports['strtotime'] = require('./strtotime')\nmodule.exports['time'] = require('./time')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/microtime.js b/node_modules/locutus/php/datetime/microtime.js
deleted file mode 100644
index e43c92b..0000000
--- a/node_modules/locutus/php/datetime/microtime.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-module.exports = function microtime(getAsFloat) {
- // discuss at: http://locutus.io/php/microtime/
- // original by: Paulo Freitas
- // improved by: Dumitru Uzun (http://duzun.me)
- // example 1: var $timeStamp = microtime(true)
- // example 1: $timeStamp > 1000000000 && $timeStamp < 2000000000
- // returns 1: true
- // example 2: /^0\.[0-9]{1,6} [0-9]{10,10}$/.test(microtime())
- // returns 2: true
-
- var s;
- var now;
- if (typeof performance !== 'undefined' && performance.now) {
- now = (performance.now() + performance.timing.navigationStart) / 1e3;
- if (getAsFloat) {
- return now;
- }
-
- // Math.round(now)
- s = now | 0;
-
- return Math.round((now - s) * 1e6) / 1e6 + ' ' + s;
- } else {
- now = (Date.now ? Date.now() : new Date().getTime()) / 1e3;
- if (getAsFloat) {
- return now;
- }
-
- // Math.round(now)
- s = now | 0;
-
- return Math.round((now - s) * 1e3) / 1e3 + ' ' + s;
- }
-};
-//# sourceMappingURL=microtime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/microtime.js.map b/node_modules/locutus/php/datetime/microtime.js.map
deleted file mode 100644
index 94ee8ce..0000000
--- a/node_modules/locutus/php/datetime/microtime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/microtime.js"],"names":["module","exports","microtime","getAsFloat","s","now","performance","timing","navigationStart","Math","round","Date","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,UAApB,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,CAAJ;AACA,MAAIC,GAAJ;AACA,MAAI,OAAOC,WAAP,KAAuB,WAAvB,IAAsCA,YAAYD,GAAtD,EAA2D;AACzDA,UAAM,CAACC,YAAYD,GAAZ,KAAoBC,YAAYC,MAAZ,CAAmBC,eAAxC,IAA2D,GAAjE;AACA,QAAIL,UAAJ,EAAgB;AACd,aAAOE,GAAP;AACD;;AAED;AACAD,QAAIC,MAAM,CAAV;;AAEA,WAAQI,KAAKC,KAAL,CAAW,CAACL,MAAMD,CAAP,IAAY,GAAvB,IAA8B,GAA/B,GAAsC,GAAtC,GAA4CA,CAAnD;AACD,GAVD,MAUO;AACLC,UAAM,CAACM,KAAKN,GAAL,GAAWM,KAAKN,GAAL,EAAX,GAAwB,IAAIM,IAAJ,GAAWC,OAAX,EAAzB,IAAiD,GAAvD;AACA,QAAIT,UAAJ,EAAgB;AACd,aAAOE,GAAP;AACD;;AAED;AACAD,QAAIC,MAAM,CAAV;;AAEA,WAAQI,KAAKC,KAAL,CAAW,CAACL,MAAMD,CAAP,IAAY,GAAvB,IAA8B,GAA/B,GAAsC,GAAtC,GAA4CA,CAAnD;AACD;AACF,CAjCD","file":"microtime.js","sourcesContent":["module.exports = function microtime (getAsFloat) {\n // discuss at: http://locutus.io/php/microtime/\n // original by: Paulo Freitas\n // improved by: Dumitru Uzun (http://duzun.me)\n // example 1: var $timeStamp = microtime(true)\n // example 1: $timeStamp > 1000000000 && $timeStamp < 2000000000\n // returns 1: true\n // example 2: /^0\\.[0-9]{1,6} [0-9]{10,10}$/.test(microtime())\n // returns 2: true\n\n var s\n var now\n if (typeof performance !== 'undefined' && performance.now) {\n now = (performance.now() + performance.timing.navigationStart) / 1e3\n if (getAsFloat) {\n return now\n }\n\n // Math.round(now)\n s = now | 0\n\n return (Math.round((now - s) * 1e6) / 1e6) + ' ' + s\n } else {\n now = (Date.now ? Date.now() : new Date().getTime()) / 1e3\n if (getAsFloat) {\n return now\n }\n\n // Math.round(now)\n s = now | 0\n\n return (Math.round((now - s) * 1e3) / 1e3) + ' ' + s\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/mktime.js b/node_modules/locutus/php/datetime/mktime.js
deleted file mode 100644
index bf25357..0000000
--- a/node_modules/locutus/php/datetime/mktime.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-module.exports = function mktime() {
- // discuss at: http://locutus.io/php/mktime/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: baris ozdil
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: FGFEmperor
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: gabriel paderni
- // input by: Yannoo
- // input by: jakes
- // input by: 3D-GRAF
- // input by: Chris
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Marc Palau
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // revised by: Theriault (https://github.com/Theriault)
- // note 1: The return values of the following examples are
- // note 1: received only if your system's timezone is UTC.
- // example 1: mktime(14, 10, 2, 2, 1, 2008)
- // returns 1: 1201875002
- // example 2: mktime(0, 0, 0, 0, 1, 2008)
- // returns 2: 1196467200
- // example 3: var $make = mktime()
- // example 3: var $td = new Date()
- // example 3: var $real = Math.floor($td.getTime() / 1000)
- // example 3: var $diff = ($real - $make)
- // example 3: $diff < 5
- // returns 3: true
- // example 4: mktime(0, 0, 0, 13, 1, 1997)
- // returns 4: 883612800
- // example 5: mktime(0, 0, 0, 1, 1, 1998)
- // returns 5: 883612800
- // example 6: mktime(0, 0, 0, 1, 1, 98)
- // returns 6: 883612800
- // example 7: mktime(23, 59, 59, 13, 0, 2010)
- // returns 7: 1293839999
- // example 8: mktime(0, 0, -1, 1, 1, 1970)
- // returns 8: -1
-
- var d = new Date();
- var r = arguments;
- var i = 0;
- var e = ['Hours', 'Minutes', 'Seconds', 'Month', 'Date', 'FullYear'];
-
- for (i = 0; i < e.length; i++) {
- if (typeof r[i] === 'undefined') {
- r[i] = d['get' + e[i]]();
- // +1 to fix JS months.
- r[i] += i === 3;
- } else {
- r[i] = parseInt(r[i], 10);
- if (isNaN(r[i])) {
- return false;
- }
- }
- }
-
- // Map years 0-69 to 2000-2069 and years 70-100 to 1970-2000.
- r[5] += r[5] >= 0 ? r[5] <= 69 ? 2e3 : r[5] <= 100 ? 1900 : 0 : 0;
-
- // Set year, month (-1 to fix JS months), and date.
- // !This must come before the call to setHours!
- d.setFullYear(r[5], r[3] - 1, r[4]);
-
- // Set hours, minutes, and seconds.
- d.setHours(r[0], r[1], r[2]);
-
- var time = d.getTime();
-
- // Divide milliseconds by 1000 to return seconds and drop decimal.
- // Add 1 second if negative or it'll be off from PHP by 1 second.
- return (time / 1e3 >> 0) - (time < 0);
-};
-//# sourceMappingURL=mktime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/mktime.js.map b/node_modules/locutus/php/datetime/mktime.js.map
deleted file mode 100644
index 7310be6..0000000
--- a/node_modules/locutus/php/datetime/mktime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/mktime.js"],"names":["module","exports","mktime","d","Date","r","arguments","i","e","length","parseInt","isNaN","setFullYear","setHours","time","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,GAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,IAAIC,IAAJ,EAAR;AACA,MAAIC,IAAIC,SAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAC,OAAD,EAAU,SAAV,EAAqB,SAArB,EAAgC,OAAhC,EAAyC,MAAzC,EAAiD,UAAjD,CAAR;;AAEA,OAAKD,IAAI,CAAT,EAAYA,IAAIC,EAAEC,MAAlB,EAA0BF,GAA1B,EAA+B;AAC7B,QAAI,OAAOF,EAAEE,CAAF,CAAP,KAAgB,WAApB,EAAiC;AAC/BF,QAAEE,CAAF,IAAOJ,EAAE,QAAQK,EAAED,CAAF,CAAV,GAAP;AACA;AACAF,QAAEE,CAAF,KAASA,MAAM,CAAf;AACD,KAJD,MAIO;AACLF,QAAEE,CAAF,IAAOG,SAASL,EAAEE,CAAF,CAAT,EAAe,EAAf,CAAP;AACA,UAAII,MAAMN,EAAEE,CAAF,CAAN,CAAJ,EAAiB;AACf,eAAO,KAAP;AACD;AACF;AACF;;AAED;AACAF,IAAE,CAAF,KAASA,EAAE,CAAF,KAAQ,CAAR,GAAaA,EAAE,CAAF,KAAQ,EAAR,GAAa,GAAb,GAAoBA,EAAE,CAAF,KAAQ,GAAR,GAAc,IAAd,GAAqB,CAAtD,GAA4D,CAArE;;AAEA;AACA;AACAF,IAAES,WAAF,CAAcP,EAAE,CAAF,CAAd,EAAoBA,EAAE,CAAF,IAAO,CAA3B,EAA8BA,EAAE,CAAF,CAA9B;;AAEA;AACAF,IAAEU,QAAF,CAAWR,EAAE,CAAF,CAAX,EAAiBA,EAAE,CAAF,CAAjB,EAAuBA,EAAE,CAAF,CAAvB;;AAEA,MAAIS,OAAOX,EAAEY,OAAF,EAAX;;AAEA;AACA;AACA,SAAO,CAACD,OAAO,GAAP,IAAc,CAAf,KAAqBA,OAAO,CAA5B,CAAP;AACD,CAzED","file":"mktime.js","sourcesContent":["module.exports = function mktime () {\n // discuss at: http://locutus.io/php/mktime/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: baris ozdil\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: FGFEmperor\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: gabriel paderni\n // input by: Yannoo\n // input by: jakes\n // input by: 3D-GRAF\n // input by: Chris\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Marc Palau\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // revised by: Theriault (https://github.com/Theriault)\n // note 1: The return values of the following examples are\n // note 1: received only if your system's timezone is UTC.\n // example 1: mktime(14, 10, 2, 2, 1, 2008)\n // returns 1: 1201875002\n // example 2: mktime(0, 0, 0, 0, 1, 2008)\n // returns 2: 1196467200\n // example 3: var $make = mktime()\n // example 3: var $td = new Date()\n // example 3: var $real = Math.floor($td.getTime() / 1000)\n // example 3: var $diff = ($real - $make)\n // example 3: $diff < 5\n // returns 3: true\n // example 4: mktime(0, 0, 0, 13, 1, 1997)\n // returns 4: 883612800\n // example 5: mktime(0, 0, 0, 1, 1, 1998)\n // returns 5: 883612800\n // example 6: mktime(0, 0, 0, 1, 1, 98)\n // returns 6: 883612800\n // example 7: mktime(23, 59, 59, 13, 0, 2010)\n // returns 7: 1293839999\n // example 8: mktime(0, 0, -1, 1, 1, 1970)\n // returns 8: -1\n\n var d = new Date()\n var r = arguments\n var i = 0\n var e = ['Hours', 'Minutes', 'Seconds', 'Month', 'Date', 'FullYear']\n\n for (i = 0; i < e.length; i++) {\n if (typeof r[i] === 'undefined') {\n r[i] = d['get' + e[i]]()\n // +1 to fix JS months.\n r[i] += (i === 3)\n } else {\n r[i] = parseInt(r[i], 10)\n if (isNaN(r[i])) {\n return false\n }\n }\n }\n\n // Map years 0-69 to 2000-2069 and years 70-100 to 1970-2000.\n r[5] += (r[5] >= 0 ? (r[5] <= 69 ? 2e3 : (r[5] <= 100 ? 1900 : 0)) : 0)\n\n // Set year, month (-1 to fix JS months), and date.\n // !This must come before the call to setHours!\n d.setFullYear(r[5], r[3] - 1, r[4])\n\n // Set hours, minutes, and seconds.\n d.setHours(r[0], r[1], r[2])\n\n var time = d.getTime()\n\n // Divide milliseconds by 1000 to return seconds and drop decimal.\n // Add 1 second if negative or it'll be off from PHP by 1 second.\n return (time / 1e3 >> 0) - (time < 0)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/strftime.js b/node_modules/locutus/php/datetime/strftime.js
deleted file mode 100644
index 2099071..0000000
--- a/node_modules/locutus/php/datetime/strftime.js
+++ /dev/null
@@ -1,198 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function strftime(fmt, timestamp) {
- // discuss at: http://locutus.io/php/strftime/
- // original by: Blues (http://tech.bluesmoon.info/)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // input by: Alex
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Uses global: locutus to store locale info
- // example 1: strftime("%A", 1062462400); // Return value will depend on date and locale
- // returns 1: 'Tuesday'
-
- var setlocale = require('../strings/setlocale');
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
-
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var _xPad = function _xPad(x, pad, r) {
- if (typeof r === 'undefined') {
- r = 10;
- }
- for (; parseInt(x, 10) < r && r > 1; r /= 10) {
- x = pad.toString() + x;
- }
- return x.toString();
- };
-
- var locale = $locutus.php.localeCategories.LC_TIME;
- var lcTime = $locutus.php.locales[locale].LC_TIME;
-
- var _formats = {
- a: function a(d) {
- return lcTime.a[d.getDay()];
- },
- A: function A(d) {
- return lcTime.A[d.getDay()];
- },
- b: function b(d) {
- return lcTime.b[d.getMonth()];
- },
- B: function B(d) {
- return lcTime.B[d.getMonth()];
- },
- C: function C(d) {
- return _xPad(parseInt(d.getFullYear() / 100, 10), 0);
- },
- d: ['getDate', '0'],
- e: ['getDate', ' '],
- g: function g(d) {
- return _xPad(parseInt(this.G(d) / 100, 10), 0);
- },
- G: function G(d) {
- var y = d.getFullYear();
- var V = parseInt(_formats.V(d), 10);
- var W = parseInt(_formats.W(d), 10);
-
- if (W > V) {
- y++;
- } else if (W === 0 && V >= 52) {
- y--;
- }
-
- return y;
- },
- H: ['getHours', '0'],
- I: function I(d) {
- var I = d.getHours() % 12;
- return _xPad(I === 0 ? 12 : I, 0);
- },
- j: function j(d) {
- var ms = d - new Date('' + d.getFullYear() + '/1/1 GMT');
- // Line differs from Yahoo implementation which would be
- // equivalent to replacing it here with:
- ms += d.getTimezoneOffset() * 60000;
- var doy = parseInt(ms / 60000 / 60 / 24, 10) + 1;
- return _xPad(doy, 0, 100);
- },
- k: ['getHours', '0'],
- // not in PHP, but implemented here (as in Yahoo)
- l: function l(d) {
- var l = d.getHours() % 12;
- return _xPad(l === 0 ? 12 : l, ' ');
- },
- m: function m(d) {
- return _xPad(d.getMonth() + 1, 0);
- },
- M: ['getMinutes', '0'],
- p: function p(d) {
- return lcTime.p[d.getHours() >= 12 ? 1 : 0];
- },
- P: function P(d) {
- return lcTime.P[d.getHours() >= 12 ? 1 : 0];
- },
- s: function s(d) {
- // Yahoo uses return parseInt(d.getTime()/1000, 10);
- return Date.parse(d) / 1000;
- },
- S: ['getSeconds', '0'],
- u: function u(d) {
- var dow = d.getDay();
- return dow === 0 ? 7 : dow;
- },
- U: function U(d) {
- var doy = parseInt(_formats.j(d), 10);
- var rdow = 6 - d.getDay();
- var woy = parseInt((doy + rdow) / 7, 10);
- return _xPad(woy, 0);
- },
- V: function V(d) {
- var woy = parseInt(_formats.W(d), 10);
- var dow11 = new Date('' + d.getFullYear() + '/1/1').getDay();
- // First week is 01 and not 00 as in the case of %U and %W,
- // so we add 1 to the final result except if day 1 of the year
- // is a Monday (then %W returns 01).
- // We also need to subtract 1 if the day 1 of the year is
- // Friday-Sunday, so the resulting equation becomes:
- var idow = woy + (dow11 > 4 || dow11 <= 1 ? 0 : 1);
- if (idow === 53 && new Date('' + d.getFullYear() + '/12/31').getDay() < 4) {
- idow = 1;
- } else if (idow === 0) {
- idow = _formats.V(new Date('' + (d.getFullYear() - 1) + '/12/31'));
- }
- return _xPad(idow, 0);
- },
- w: 'getDay',
- W: function W(d) {
- var doy = parseInt(_formats.j(d), 10);
- var rdow = 7 - _formats.u(d);
- var woy = parseInt((doy + rdow) / 7, 10);
- return _xPad(woy, 0, 10);
- },
- y: function y(d) {
- return _xPad(d.getFullYear() % 100, 0);
- },
- Y: 'getFullYear',
- z: function z(d) {
- var o = d.getTimezoneOffset();
- var H = _xPad(parseInt(Math.abs(o / 60), 10), 0);
- var M = _xPad(o % 60, 0);
- return (o > 0 ? '-' : '+') + H + M;
- },
- Z: function Z(d) {
- return d.toString().replace(/^.*\(([^)]+)\)$/, '$1');
- },
- '%': function _(d) {
- return '%';
- }
- };
-
- var _date = typeof timestamp === 'undefined' ? new Date() : timestamp instanceof Date ? new Date(timestamp) : new Date(timestamp * 1000);
-
- var _aggregates = {
- c: 'locale',
- D: '%m/%d/%y',
- F: '%y-%m-%d',
- h: '%b',
- n: '\n',
- r: 'locale',
- R: '%H:%M',
- t: '\t',
- T: '%H:%M:%S',
- x: 'locale',
- X: 'locale'
- };
-
- // First replace aggregates (run in a loop because an agg may be made up of other aggs)
- while (fmt.match(/%[cDFhnrRtTxX]/)) {
- fmt = fmt.replace(/%([cDFhnrRtTxX])/g, function (m0, m1) {
- var f = _aggregates[m1];
- return f === 'locale' ? lcTime[m1] : f;
- });
- }
-
- // Now replace formats - we need a closure so that the date object gets passed through
- var str = fmt.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g, function (m0, m1) {
- var f = _formats[m1];
- if (typeof f === 'string') {
- return _date[f]();
- } else if (typeof f === 'function') {
- return f(_date);
- } else if ((typeof f === 'undefined' ? 'undefined' : _typeof(f)) === 'object' && typeof f[0] === 'string') {
- return _xPad(_date[f[0]](), f[1]);
- } else {
- // Shouldn't reach here
- return m1;
- }
- });
-
- return str;
-};
-//# sourceMappingURL=strftime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/strftime.js.map b/node_modules/locutus/php/datetime/strftime.js.map
deleted file mode 100644
index b0f8d0f..0000000
--- a/node_modules/locutus/php/datetime/strftime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/strftime.js"],"names":["module","exports","strftime","fmt","timestamp","setlocale","require","$global","window","global","$locutus","_xPad","x","pad","r","parseInt","toString","locale","php","localeCategories","LC_TIME","lcTime","locales","_formats","a","d","getDay","A","b","getMonth","B","C","getFullYear","e","g","G","y","V","W","H","I","getHours","j","ms","Date","getTimezoneOffset","doy","k","l","m","M","p","P","s","parse","S","u","dow","U","rdow","woy","dow11","idow","w","Y","z","o","Math","abs","Z","replace","_date","_aggregates","c","D","F","h","n","R","t","T","X","match","m0","m1","f","str"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,GAAnB,EAAwBC,SAAxB,EAAmC;AAClD;AACA;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Ib,YAAYY,EAAZ,CAAR;AACA,aAAQC,MAAM,QAAN,GAAiBhE,OAAO+D,EAAP,CAAjB,GAA8BC,CAAtC;AACD,KAHK,CAAN;AAID;;AAED;AACA,MAAIC,MAAMnF,IAAImE,OAAJ,CAAY,sCAAZ,EAAoD,UAAUa,EAAV,EAAcC,EAAd,EAAkB;AAC9E,QAAIC,IAAI9D,SAAS6D,EAAT,CAAR;AACA,QAAI,OAAOC,CAAP,KAAa,QAAjB,EAA2B;AACzB,aAAOd,MAAMc,CAAN,GAAP;AACD,KAFD,MAEO,IAAI,OAAOA,CAAP,KAAa,UAAjB,EAA6B;AAClC,aAAOA,EAAEd,KAAF,CAAP;AACD,KAFM,MAEA,IAAI,QAAOc,CAAP,yCAAOA,CAAP,OAAa,QAAb,IAAyB,OAAOA,EAAE,CAAF,CAAP,KAAgB,QAA7C,EAAuD;AAC5D,aAAO1E,MAAM4D,MAAMc,EAAE,CAAF,CAAN,GAAN,EAAqBA,EAAE,CAAF,CAArB,CAAP;AACD,KAFM,MAEA;AACL;AACA,aAAOD,EAAP;AACD;AACF,GAZS,CAAV;;AAcA,SAAOE,GAAP;AACD,CApMD","file":"strftime.js","sourcesContent":["module.exports = function strftime (fmt, timestamp) {\n // discuss at: http://locutus.io/php/strftime/\n // original by: Blues (http://tech.bluesmoon.info/)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // input by: Alex\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Uses global: locutus to store locale info\n // example 1: strftime(\"%A\", 1062462400); // Return value will depend on date and locale\n // returns 1: 'Tuesday'\n\n var setlocale = require('../strings/setlocale')\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var _xPad = function (x, pad, r) {\n if (typeof r === 'undefined') {\n r = 10\n }\n for (; parseInt(x, 10) < r && r > 1; r /= 10) {\n x = pad.toString() + x\n }\n return x.toString()\n }\n\n var locale = $locutus.php.localeCategories.LC_TIME\n var lcTime = $locutus.php.locales[locale].LC_TIME\n\n var _formats = {\n a: function (d) {\n return lcTime.a[d.getDay()]\n },\n A: function (d) {\n return lcTime.A[d.getDay()]\n },\n b: function (d) {\n return lcTime.b[d.getMonth()]\n },\n B: function (d) {\n return lcTime.B[d.getMonth()]\n },\n C: function (d) {\n return _xPad(parseInt(d.getFullYear() / 100, 10), 0)\n },\n d: ['getDate', '0'],\n e: ['getDate', ' '],\n g: function (d) {\n return _xPad(parseInt(this.G(d) / 100, 10), 0)\n },\n G: function (d) {\n var y = d.getFullYear()\n var V = parseInt(_formats.V(d), 10)\n var W = parseInt(_formats.W(d), 10)\n\n if (W > V) {\n y++\n } else if (W === 0 && V >= 52) {\n y--\n }\n\n return y\n },\n H: ['getHours', '0'],\n I: function (d) {\n var I = d.getHours() % 12\n return _xPad(I === 0 ? 12 : I, 0)\n },\n j: function (d) {\n var ms = d - new Date('' + d.getFullYear() + '/1/1 GMT')\n // Line differs from Yahoo implementation which would be\n // equivalent to replacing it here with:\n ms += d.getTimezoneOffset() * 60000\n var doy = parseInt(ms / 60000 / 60 / 24, 10) + 1\n return _xPad(doy, 0, 100)\n },\n k: ['getHours', '0'],\n // not in PHP, but implemented here (as in Yahoo)\n l: function (d) {\n var l = d.getHours() % 12\n return _xPad(l === 0 ? 12 : l, ' ')\n },\n m: function (d) {\n return _xPad(d.getMonth() + 1, 0)\n },\n M: ['getMinutes', '0'],\n p: function (d) {\n return lcTime.p[d.getHours() >= 12 ? 1 : 0]\n },\n P: function (d) {\n return lcTime.P[d.getHours() >= 12 ? 1 : 0]\n },\n s: function (d) {\n // Yahoo uses return parseInt(d.getTime()/1000, 10);\n return Date.parse(d) / 1000\n },\n S: ['getSeconds', '0'],\n u: function (d) {\n var dow = d.getDay()\n return ((dow === 0) ? 7 : dow)\n },\n U: function (d) {\n var doy = parseInt(_formats.j(d), 10)\n var rdow = 6 - d.getDay()\n var woy = parseInt((doy + rdow) / 7, 10)\n return _xPad(woy, 0)\n },\n V: function (d) {\n var woy = parseInt(_formats.W(d), 10)\n var dow11 = (new Date('' + d.getFullYear() + '/1/1')).getDay()\n // First week is 01 and not 00 as in the case of %U and %W,\n // so we add 1 to the final result except if day 1 of the year\n // is a Monday (then %W returns 01).\n // We also need to subtract 1 if the day 1 of the year is\n // Friday-Sunday, so the resulting equation becomes:\n var idow = woy + (dow11 > 4 || dow11 <= 1 ? 0 : 1)\n if (idow === 53 && (new Date('' + d.getFullYear() + '/12/31')).getDay() < 4) {\n idow = 1\n } else if (idow === 0) {\n idow = _formats.V(new Date('' + (d.getFullYear() - 1) + '/12/31'))\n }\n return _xPad(idow, 0)\n },\n w: 'getDay',\n W: function (d) {\n var doy = parseInt(_formats.j(d), 10)\n var rdow = 7 - _formats.u(d)\n var woy = parseInt((doy + rdow) / 7, 10)\n return _xPad(woy, 0, 10)\n },\n y: function (d) {\n return _xPad(d.getFullYear() % 100, 0)\n },\n Y: 'getFullYear',\n z: function (d) {\n var o = d.getTimezoneOffset()\n var H = _xPad(parseInt(Math.abs(o / 60), 10), 0)\n var M = _xPad(o % 60, 0)\n return (o > 0 ? '-' : '+') + H + M\n },\n Z: function (d) {\n return d.toString().replace(/^.*\\(([^)]+)\\)$/, '$1')\n },\n '%': function (d) {\n return '%'\n }\n }\n\n var _date = (typeof timestamp === 'undefined')\n ? new Date()\n : (timestamp instanceof Date)\n ? new Date(timestamp)\n : new Date(timestamp * 1000)\n\n var _aggregates = {\n c: 'locale',\n D: '%m/%d/%y',\n F: '%y-%m-%d',\n h: '%b',\n n: '\\n',\n r: 'locale',\n R: '%H:%M',\n t: '\\t',\n T: '%H:%M:%S',\n x: 'locale',\n X: 'locale'\n }\n\n // First replace aggregates (run in a loop because an agg may be made up of other aggs)\n while (fmt.match(/%[cDFhnrRtTxX]/)) {\n fmt = fmt.replace(/%([cDFhnrRtTxX])/g, function (m0, m1) {\n var f = _aggregates[m1]\n return (f === 'locale' ? lcTime[m1] : f)\n })\n }\n\n // Now replace formats - we need a closure so that the date object gets passed through\n var str = fmt.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g, function (m0, m1) {\n var f = _formats[m1]\n if (typeof f === 'string') {\n return _date[f]()\n } else if (typeof f === 'function') {\n return f(_date)\n } else if (typeof f === 'object' && typeof f[0] === 'string') {\n return _xPad(_date[f[0]](), f[1])\n } else {\n // Shouldn't reach here\n return m1\n }\n })\n\n return str\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/strptime.js b/node_modules/locutus/php/datetime/strptime.js
deleted file mode 100644
index c8f4979..0000000
--- a/node_modules/locutus/php/datetime/strptime.js
+++ /dev/null
@@ -1,361 +0,0 @@
-'use strict';
-
-module.exports = function strptime(dateStr, format) {
- // discuss at: http://locutus.io/php/strptime/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: strftime
- // example 1: strptime('20091112222135', '%Y%m%d%H%M%S') // Return value will depend on date and locale
- // returns 1: {tm_sec: 35, tm_min: 21, tm_hour: 22, tm_mday: 12, tm_mon: 10, tm_year: 109, tm_wday: 4, tm_yday: 315, unparsed: ''}
- // example 2: strptime('2009extra', '%Y')
- // returns 2: {tm_sec:0, tm_min:0, tm_hour:0, tm_mday:0, tm_mon:0, tm_year:109, tm_wday:3, tm_yday: -1, unparsed: 'extra'}
-
- var setlocale = require('../strings/setlocale');
- var arrayMap = require('../array/array_map');
-
- var retObj = {
- tm_sec: 0,
- tm_min: 0,
- tm_hour: 0,
- tm_mday: 0,
- tm_mon: 0,
- tm_year: 0,
- tm_wday: 0,
- tm_yday: 0,
- unparsed: ''
- };
- var i = 0;
- var j = 0;
- var amPmOffset = 0;
- var prevHour = false;
- var _reset = function _reset(dateObj, realMday) {
- // realMday is to allow for a value of 0 in return results (but without
- // messing up the Date() object)
- var jan1;
- var o = retObj;
- var d = dateObj;
- o.tm_sec = d.getUTCSeconds();
- o.tm_min = d.getUTCMinutes();
- o.tm_hour = d.getUTCHours();
- o.tm_mday = realMday === 0 ? realMday : d.getUTCDate();
- o.tm_mon = d.getUTCMonth();
- o.tm_year = d.getUTCFullYear() - 1900;
- o.tm_wday = realMday === 0 ? d.getUTCDay() > 0 ? d.getUTCDay() - 1 : 6 : d.getUTCDay();
- jan1 = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
- o.tm_yday = Math.ceil((d - jan1) / (1000 * 60 * 60 * 24));
- };
- var _date = function _date() {
- var o = retObj;
- // We set date to at least 1 to ensure year or month doesn't go backwards
- return _reset(new Date(Date.UTC(o.tm_year + 1900, o.tm_mon, o.tm_mday || 1, o.tm_hour, o.tm_min, o.tm_sec)), o.tm_mday);
- };
-
- var _NWS = /\S/;
- var _WS = /\s/;
-
- var _aggregates = {
- c: 'locale',
- D: '%m/%d/%y',
- F: '%y-%m-%d',
- r: 'locale',
- R: '%H:%M',
- T: '%H:%M:%S',
- x: 'locale',
- X: 'locale'
- };
-
- /* Fix: Locale alternatives are supported though not documented in PHP; see http://linux.die.net/man/3/strptime
- Ec
- EC
- Ex
- EX
- Ey
- EY
- Od or Oe
- OH
- OI
- Om
- OM
- OS
- OU
- Ow
- OW
- Oy
- */
- var _pregQuote = function _pregQuote(str) {
- return (str + '').replace(/([\\.+*?[^\]$(){}=!<>|:])/g, '\\$1');
- };
-
- // ensure setup of localization variables takes place
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- var locale = $locutus.php.localeCategories.LC_TIME;
- var lcTime = $locutus.php.locales[locale].LC_TIME;
-
- // First replace aggregates (run in a loop because an agg may be made up of other aggs)
- while (format.match(/%[cDFhnrRtTxX]/)) {
- format = format.replace(/%([cDFhnrRtTxX])/g, function (m0, m1) {
- var f = _aggregates[m1];
- return f === 'locale' ? lcTime[m1] : f;
- });
- }
-
- var _addNext = function _addNext(j, regex, cb) {
- if (typeof regex === 'string') {
- regex = new RegExp('^' + regex, 'i');
- }
- var check = dateStr.slice(j);
- var match = regex.exec(check);
- // Even if the callback returns null after assigning to the
- // return object, the object won't be saved anyways
- var testNull = match ? cb.apply(null, match) : null;
- if (testNull === null) {
- throw new Error('No match in string');
- }
- return j + match[0].length;
- };
-
- var _addLocalized = function _addLocalized(j, formatChar, category) {
- // Could make each parenthesized instead and pass index to callback:
- return _addNext(j, arrayMap(_pregQuote, lcTime[formatChar]).join('|'), function (m) {
- var match = lcTime[formatChar].search(new RegExp('^' + _pregQuote(m) + '$', 'i'));
- if (match) {
- retObj[category] = match[0];
- }
- });
- };
-
- // BEGIN PROCESSING CHARACTERS
- for (i = 0, j = 0; i < format.length; i++) {
- if (format.charAt(i) === '%') {
- var literalPos = ['%', 'n', 't'].indexOf(format.charAt(i + 1));
- if (literalPos !== -1) {
- if (['%', '\n', '\t'].indexOf(dateStr.charAt(j)) === literalPos) {
- // a matched literal
- ++i;
- // skip beyond
- ++j;
- continue;
- }
- // Format indicated a percent literal, but not actually present
- return false;
- }
- var formatChar = format.charAt(i + 1);
- try {
- switch (formatChar) {
- case 'a':
- case 'A':
- // Sunday-Saturday
- // Changes nothing else
- j = _addLocalized(j, formatChar, 'tm_wday');
- break;
- case 'h':
- case 'b':
- // Jan-Dec
- j = _addLocalized(j, 'b', 'tm_mon');
- // Also changes wday, yday
- _date();
- break;
- case 'B':
- // January-December
- j = _addLocalized(j, formatChar, 'tm_mon');
- // Also changes wday, yday
- _date();
- break;
- case 'C':
- // 0+; century (19 for 20th)
- // PHP docs say two-digit, but accepts one-digit (two-digit max):
- j = _addNext(j, /^\d?\d/, function (d) {
- var year = (parseInt(d, 10) - 19) * 100;
- retObj.tm_year = year;
- _date();
- if (!retObj.tm_yday) {
- retObj.tm_yday = -1;
- }
- // Also changes wday; and sets yday to -1 (always?)
- });
- break;
- case 'd':
- case 'e':
- // 1-31 day
- j = _addNext(j, formatChar === 'd' ? /^(0[1-9]|[1-2]\d|3[0-1])/ : /^([1-2]\d|3[0-1]|[1-9])/, function (d) {
- var dayMonth = parseInt(d, 10);
- retObj.tm_mday = dayMonth;
- // Also changes w_day, y_day
- _date();
- });
- break;
- case 'g':
- // No apparent effect; 2-digit year (see 'V')
- break;
- case 'G':
- // No apparent effect; 4-digit year (see 'V')'
- break;
- case 'H':
- // 00-23 hours
- j = _addNext(j, /^([0-1]\d|2[0-3])/, function (d) {
- var hour = parseInt(d, 10);
- retObj.tm_hour = hour;
- // Changes nothing else
- });
- break;
- case 'l':
- case 'I':
- // 01-12 hours
- j = _addNext(j, formatChar === 'l' ? /^([1-9]|1[0-2])/ : /^(0[1-9]|1[0-2])/, function (d) {
- var hour = parseInt(d, 10) - 1 + amPmOffset;
- retObj.tm_hour = hour;
- // Used for coordinating with am-pm
- prevHour = true;
- // Changes nothing else, but affected by prior 'p/P'
- });
- break;
- case 'j':
- // 001-366 day of year
- j = _addNext(j, /^(00[1-9]|0[1-9]\d|[1-2]\d\d|3[0-6][0-6])/, function (d) {
- var dayYear = parseInt(d, 10) - 1;
- retObj.tm_yday = dayYear;
- // Changes nothing else
- // (oddly, since if original by a given year, could calculate other fields)
- });
- break;
- case 'm':
- // 01-12 month
- j = _addNext(j, /^(0[1-9]|1[0-2])/, function (d) {
- var month = parseInt(d, 10) - 1;
- retObj.tm_mon = month;
- // Also sets wday and yday
- _date();
- });
- break;
- case 'M':
- // 00-59 minutes
- j = _addNext(j, /^[0-5]\d/, function (d) {
- var minute = parseInt(d, 10);
- retObj.tm_min = minute;
- // Changes nothing else
- });
- break;
- case 'P':
- // Seems not to work; AM-PM
- // Could make fall-through instead since supposed to be a synonym despite PHP docs
- return false;
- case 'p':
- // am-pm
- j = _addNext(j, /^(am|pm)/i, function (d) {
- // No effect on 'H' since already 24 hours but
- // works before or after setting of l/I hour
- amPmOffset = /a/.test(d) ? 0 : 12;
- if (prevHour) {
- retObj.tm_hour += amPmOffset;
- }
- });
- break;
- case 's':
- // Unix timestamp (in seconds)
- j = _addNext(j, /^\d+/, function (d) {
- var timestamp = parseInt(d, 10);
- var date = new Date(Date.UTC(timestamp * 1000));
- _reset(date);
- // Affects all fields, but can't be negative (and initial + not allowed)
- });
- break;
- case 'S':
- // 00-59 seconds
- j = _addNext(j, /^[0-5]\d/, // strptime also accepts 60-61 for some reason
-
- function (d) {
- var second = parseInt(d, 10);
- retObj.tm_sec = second;
- // Changes nothing else
- });
- break;
- case 'u':
- case 'w':
- // 0 (Sunday)-6(Saturday)
- j = _addNext(j, /^\d/, function (d) {
- retObj.tm_wday = d - (formatChar === 'u');
- // Changes nothing else apparently
- });
- break;
- case 'U':
- case 'V':
- case 'W':
- // Apparently ignored (week of year, from 1st Monday)
- break;
- case 'y':
- // 69 (or higher) for 1969+, 68 (or lower) for 2068-
- // PHP docs say two-digit, but accepts one-digit (two-digit max):
- j = _addNext(j, /^\d?\d/, function (d) {
- d = parseInt(d, 10);
- var year = d >= 69 ? d : d + 100;
- retObj.tm_year = year;
- _date();
- if (!retObj.tm_yday) {
- retObj.tm_yday = -1;
- }
- // Also changes wday; and sets yday to -1 (always?)
- });
- break;
- case 'Y':
- // 2010 (4-digit year)
- // PHP docs say four-digit, but accepts one-digit (four-digit max):
- j = _addNext(j, /^\d{1,4}/, function (d) {
- var year = parseInt(d, 10) - 1900;
- retObj.tm_year = year;
- _date();
- if (!retObj.tm_yday) {
- retObj.tm_yday = -1;
- }
- // Also changes wday; and sets yday to -1 (always?)
- });
- break;
- case 'z':
- // Timezone; on my system, strftime gives -0800,
- // but strptime seems not to alter hour setting
- break;
- case 'Z':
- // Timezone; on my system, strftime gives PST, but strptime treats text as unparsed
- break;
- default:
- throw new Error('Unrecognized formatting character in strptime()');
- }
- } catch (e) {
- if (e === 'No match in string') {
- // Allow us to exit
- // There was supposed to be a matching format but there wasn't
- return false;
- }
- // Calculate skipping beyond initial percent too
- }
- ++i;
- } else if (format.charAt(i) !== dateStr.charAt(j)) {
- // If extra whitespace at beginning or end of either, or between formats, no problem
- // (just a problem when between % and format specifier)
-
- // If the string has white-space, it is ok to ignore
- if (dateStr.charAt(j).search(_WS) !== -1) {
- j++;
- // Let the next iteration try again with the same format character
- i--;
- } else if (format.charAt(i).search(_NWS) !== -1) {
- // Any extra formatting characters besides white-space causes
- // problems (do check after WS though, as may just be WS in string before next character)
- return false;
- }
- // Extra WS in format
- // Adjust strings when encounter non-matching whitespace, so they align in future checks above
- // Will check on next iteration (against same (non-WS) string character)
- } else {
- j++;
- }
- }
-
- // POST-PROCESSING
- // Will also get extra whitespace; empty string if none
- retObj.unparsed = dateStr.slice(j);
- return retObj;
-};
-//# sourceMappingURL=strptime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/strptime.js.map b/node_modules/locutus/php/datetime/strptime.js.map
deleted file mode 100644
index 843cd89..0000000
--- a/node_modules/locutus/php/datetime/strptime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/strptime.js"],"names":["module","exports","strptime","dateStr","format","setlocale","require","arrayMap","retObj","tm_sec","tm_min","tm_hour","tm_mday","tm_mon","tm_year","tm_wday","tm_yday","unparsed","i","j","amPmOffset","prevHour","_reset","dateObj","realMday","jan1","o","d","getUTCSeconds","getUTCMinutes","getUTCHours","getUTCDate","getUTCMonth","getUTCFullYear","getUTCDay","Date","UTC","Math","ceil","_date","_NWS","_WS","_aggregates","c","D","F","r","R","T","x","X","_pregQuote","str","replace","$global","window","global","$locutus","locale","php","localeCategories","LC_TIME","lcTime","locales","match","m0","m1","f","_addNext","regex","cb","RegExp","check","slice","exec","testNull","apply","Error","length","_addLocalized","formatChar","category","join","m","search","charAt","literalPos","indexOf","year","parseInt","dayMonth","hour","dayYear","month","minute","test","timestamp","date","second","e"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,OAAnB,EAA4BC,MAA5B,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CA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AAf,CAAzB,EAA4C;AACjD;AACA;;AAEA;AACA,UAAIhB,QAAQkF,MAAR,CAAelE,CAAf,EAAkBiE,MAAlB,CAAyB3C,GAAzB,MAAkC,CAAC,CAAvC,EAA0C;AACxCtB;AACA;AACAD;AACD,OAJD,MAIO,IAAId,OAAOiF,MAAP,CAAcnE,CAAd,EAAiBkE,MAAjB,CAAwB5C,IAAxB,MAAkC,CAAC,CAAvC,EAA0C;AAC/C;AACA;AACA,eAAO,KAAP;AACD;AACD;AACA;AACA;AACD,KAjBM,MAiBA;AACLrB;AACD;AACF;;AAED;AACA;AACAX,SAAOS,QAAP,GAAkBd,QAAQsE,KAAR,CAActD,CAAd,CAAlB;AACA,SAAOX,MAAP;AACD,CA3XD","file":"strptime.js","sourcesContent":["module.exports = function strptime (dateStr, format) {\n // discuss at: http://locutus.io/php/strptime/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: strftime\n // example 1: strptime('20091112222135', '%Y%m%d%H%M%S') // Return value will depend on date and locale\n // returns 1: {tm_sec: 35, tm_min: 21, tm_hour: 22, tm_mday: 12, tm_mon: 10, tm_year: 109, tm_wday: 4, tm_yday: 315, unparsed: ''}\n // example 2: strptime('2009extra', '%Y')\n // returns 2: {tm_sec:0, tm_min:0, tm_hour:0, tm_mday:0, tm_mon:0, tm_year:109, tm_wday:3, tm_yday: -1, unparsed: 'extra'}\n\n var setlocale = require('../strings/setlocale')\n var arrayMap = require('../array/array_map')\n\n var retObj = {\n tm_sec: 0,\n tm_min: 0,\n tm_hour: 0,\n tm_mday: 0,\n tm_mon: 0,\n tm_year: 0,\n tm_wday: 0,\n tm_yday: 0,\n unparsed: ''\n }\n var i = 0\n var j = 0\n var amPmOffset = 0\n var prevHour = false\n var _reset = function (dateObj, realMday) {\n // realMday is to allow for a value of 0 in return results (but without\n // messing up the Date() object)\n var jan1\n var o = retObj\n var d = dateObj\n o.tm_sec = d.getUTCSeconds()\n o.tm_min = d.getUTCMinutes()\n o.tm_hour = d.getUTCHours()\n o.tm_mday = realMday === 0 ? realMday : d.getUTCDate()\n o.tm_mon = d.getUTCMonth()\n o.tm_year = d.getUTCFullYear() - 1900\n o.tm_wday = realMday === 0 ? (d.getUTCDay() > 0 ? d.getUTCDay() - 1 : 6) : d.getUTCDay()\n jan1 = new Date(Date.UTC(d.getUTCFullYear(), 0, 1))\n o.tm_yday = Math.ceil((d - jan1) / (1000 * 60 * 60 * 24))\n }\n var _date = function () {\n var o = retObj\n // We set date to at least 1 to ensure year or month doesn't go backwards\n return _reset(new Date(Date.UTC(\n o.tm_year + 1900,\n o.tm_mon,\n o.tm_mday || 1,\n o.tm_hour,\n o.tm_min,\n o.tm_sec\n )),\n o.tm_mday)\n }\n\n var _NWS = /\\S/\n var _WS = /\\s/\n\n var _aggregates = {\n c: 'locale',\n D: '%m/%d/%y',\n F: '%y-%m-%d',\n r: 'locale',\n R: '%H:%M',\n T: '%H:%M:%S',\n x: 'locale',\n X: 'locale'\n }\n\n /* Fix: Locale alternatives are supported though not documented in PHP; see http://linux.die.net/man/3/strptime\n Ec\n EC\n Ex\n EX\n Ey\n EY\n Od or Oe\n OH\n OI\n Om\n OM\n OS\n OU\n Ow\n OW\n Oy\n */\n var _pregQuote = function (str) {\n return (str + '').replace(/([\\\\.+*?[^\\]$(){}=!<>|:])/g, '\\\\$1')\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n var locale = $locutus.php.localeCategories.LC_TIME\n var lcTime = $locutus.php.locales[locale].LC_TIME\n\n // First replace aggregates (run in a loop because an agg may be made up of other aggs)\n while (format.match(/%[cDFhnrRtTxX]/)) {\n format = format.replace(/%([cDFhnrRtTxX])/g, function (m0, m1) {\n var f = _aggregates[m1]\n return (f === 'locale' ? lcTime[m1] : f)\n })\n }\n\n var _addNext = function (j, regex, cb) {\n if (typeof regex === 'string') {\n regex = new RegExp('^' + regex, 'i')\n }\n var check = dateStr.slice(j)\n var match = regex.exec(check)\n // Even if the callback returns null after assigning to the\n // return object, the object won't be saved anyways\n var testNull = match ? cb.apply(null, match) : null\n if (testNull === null) {\n throw new Error('No match in string')\n }\n return j + match[0].length\n }\n\n var _addLocalized = function (j, formatChar, category) {\n // Could make each parenthesized instead and pass index to callback:\n return _addNext(j, arrayMap(_pregQuote, lcTime[formatChar]).join('|'),\n function (m) {\n var match = lcTime[formatChar].search(new RegExp('^' + _pregQuote(m) + '$', 'i'))\n if (match) {\n retObj[category] = match[0]\n }\n })\n }\n\n // BEGIN PROCESSING CHARACTERS\n for (i = 0, j = 0; i < format.length; i++) {\n if (format.charAt(i) === '%') {\n var literalPos = ['%', 'n', 't'].indexOf(format.charAt(i + 1))\n if (literalPos !== -1) {\n if (['%', '\\n', '\\t'].indexOf(dateStr.charAt(j)) === literalPos) {\n // a matched literal\n ++i\n // skip beyond\n ++j\n continue\n }\n // Format indicated a percent literal, but not actually present\n return false\n }\n var formatChar = format.charAt(i + 1)\n try {\n switch (formatChar) {\n case 'a':\n case 'A':\n // Sunday-Saturday\n // Changes nothing else\n j = _addLocalized(j, formatChar, 'tm_wday')\n break\n case 'h':\n case 'b':\n // Jan-Dec\n j = _addLocalized(j, 'b', 'tm_mon')\n // Also changes wday, yday\n _date()\n break\n case 'B':\n // January-December\n j = _addLocalized(j, formatChar, 'tm_mon')\n // Also changes wday, yday\n _date()\n break\n case 'C':\n // 0+; century (19 for 20th)\n // PHP docs say two-digit, but accepts one-digit (two-digit max):\n j = _addNext(j, /^\\d?\\d/,\n\n function (d) {\n var year = (parseInt(d, 10) - 19) * 100\n retObj.tm_year = year\n _date()\n if (!retObj.tm_yday) {\n retObj.tm_yday = -1\n }\n // Also changes wday; and sets yday to -1 (always?)\n })\n break\n case 'd':\n case 'e':\n // 1-31 day\n j = _addNext(j, formatChar === 'd'\n ? /^(0[1-9]|[1-2]\\d|3[0-1])/\n : /^([1-2]\\d|3[0-1]|[1-9])/,\n function (d) {\n var dayMonth = parseInt(d, 10)\n retObj.tm_mday = dayMonth\n // Also changes w_day, y_day\n _date()\n })\n break\n case 'g':\n // No apparent effect; 2-digit year (see 'V')\n break\n case 'G':\n // No apparent effect; 4-digit year (see 'V')'\n break\n case 'H':\n // 00-23 hours\n j = _addNext(j, /^([0-1]\\d|2[0-3])/, function (d) {\n var hour = parseInt(d, 10)\n retObj.tm_hour = hour\n // Changes nothing else\n })\n break\n case 'l':\n case 'I':\n // 01-12 hours\n j = _addNext(j, formatChar === 'l'\n ? /^([1-9]|1[0-2])/\n : /^(0[1-9]|1[0-2])/,\n function (d) {\n var hour = parseInt(d, 10) - 1 + amPmOffset\n retObj.tm_hour = hour\n // Used for coordinating with am-pm\n prevHour = true\n // Changes nothing else, but affected by prior 'p/P'\n })\n break\n case 'j':\n // 001-366 day of year\n j = _addNext(j, /^(00[1-9]|0[1-9]\\d|[1-2]\\d\\d|3[0-6][0-6])/, function (d) {\n var dayYear = parseInt(d, 10) - 1\n retObj.tm_yday = dayYear\n // Changes nothing else\n // (oddly, since if original by a given year, could calculate other fields)\n })\n break\n case 'm':\n // 01-12 month\n j = _addNext(j, /^(0[1-9]|1[0-2])/, function (d) {\n var month = parseInt(d, 10) - 1\n retObj.tm_mon = month\n // Also sets wday and yday\n _date()\n })\n break\n case 'M':\n // 00-59 minutes\n j = _addNext(j, /^[0-5]\\d/, function (d) {\n var minute = parseInt(d, 10)\n retObj.tm_min = minute\n // Changes nothing else\n })\n break\n case 'P':\n // Seems not to work; AM-PM\n // Could make fall-through instead since supposed to be a synonym despite PHP docs\n return false\n case 'p':\n // am-pm\n j = _addNext(j, /^(am|pm)/i, function (d) {\n // No effect on 'H' since already 24 hours but\n // works before or after setting of l/I hour\n amPmOffset = (/a/)\n .test(d) ? 0 : 12\n if (prevHour) {\n retObj.tm_hour += amPmOffset\n }\n })\n break\n case 's':\n // Unix timestamp (in seconds)\n j = _addNext(j, /^\\d+/, function (d) {\n var timestamp = parseInt(d, 10)\n var date = new Date(Date.UTC(timestamp * 1000))\n _reset(date)\n // Affects all fields, but can't be negative (and initial + not allowed)\n })\n break\n case 'S':\n // 00-59 seconds\n j = _addNext(j, /^[0-5]\\d/, // strptime also accepts 60-61 for some reason\n\n function (d) {\n var second = parseInt(d, 10)\n retObj.tm_sec = second\n // Changes nothing else\n })\n break\n case 'u':\n case 'w':\n // 0 (Sunday)-6(Saturday)\n j = _addNext(j, /^\\d/, function (d) {\n retObj.tm_wday = d - (formatChar === 'u')\n // Changes nothing else apparently\n })\n break\n case 'U':\n case 'V':\n case 'W':\n // Apparently ignored (week of year, from 1st Monday)\n break\n case 'y':\n // 69 (or higher) for 1969+, 68 (or lower) for 2068-\n // PHP docs say two-digit, but accepts one-digit (two-digit max):\n j = _addNext(j, /^\\d?\\d/,\n\n function (d) {\n d = parseInt(d, 10)\n var year = d >= 69 ? d : d + 100\n retObj.tm_year = year\n _date()\n if (!retObj.tm_yday) {\n retObj.tm_yday = -1\n }\n // Also changes wday; and sets yday to -1 (always?)\n })\n break\n case 'Y':\n // 2010 (4-digit year)\n // PHP docs say four-digit, but accepts one-digit (four-digit max):\n j = _addNext(j, /^\\d{1,4}/,\n\n function (d) {\n var year = (parseInt(d, 10)) - 1900\n retObj.tm_year = year\n _date()\n if (!retObj.tm_yday) {\n retObj.tm_yday = -1\n }\n // Also changes wday; and sets yday to -1 (always?)\n })\n break\n case 'z':\n // Timezone; on my system, strftime gives -0800,\n // but strptime seems not to alter hour setting\n break\n case 'Z':\n // Timezone; on my system, strftime gives PST, but strptime treats text as unparsed\n break\n default:\n throw new Error('Unrecognized formatting character in strptime()')\n }\n } catch (e) {\n if (e === 'No match in string') {\n // Allow us to exit\n // There was supposed to be a matching format but there wasn't\n return false\n }\n // Calculate skipping beyond initial percent too\n }\n ++i\n } else if (format.charAt(i) !== dateStr.charAt(j)) {\n // If extra whitespace at beginning or end of either, or between formats, no problem\n // (just a problem when between % and format specifier)\n\n // If the string has white-space, it is ok to ignore\n if (dateStr.charAt(j).search(_WS) !== -1) {\n j++\n // Let the next iteration try again with the same format character\n i--\n } else if (format.charAt(i).search(_NWS) !== -1) {\n // Any extra formatting characters besides white-space causes\n // problems (do check after WS though, as may just be WS in string before next character)\n return false\n }\n // Extra WS in format\n // Adjust strings when encounter non-matching whitespace, so they align in future checks above\n // Will check on next iteration (against same (non-WS) string character)\n } else {\n j++\n }\n }\n\n // POST-PROCESSING\n // Will also get extra whitespace; empty string if none\n retObj.unparsed = dateStr.slice(j)\n return retObj\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/strtotime.js b/node_modules/locutus/php/datetime/strtotime.js
deleted file mode 100644
index b14a093..0000000
--- a/node_modules/locutus/php/datetime/strtotime.js
+++ /dev/null
@@ -1,273 +0,0 @@
-'use strict';
-
-module.exports = function strtotime(text, now) {
- // discuss at: http://locutus.io/php/strtotime/
- // original by: Caio Ariede (http://caioariede.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Caio Ariede (http://caioariede.com)
- // improved by: A. Matías Quezada (http://amatiasq.com)
- // improved by: preuter
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Mirko Faber
- // input by: David
- // bugfixed by: Wagner B. Soares
- // bugfixed by: Artur Tchernychev
- // bugfixed by: Stephan Bösch-Plepelits (http://github.com/plepe)
- // note 1: Examples all have a fixed timestamp to prevent
- // note 1: tests to fail because of variable time(zones)
- // example 1: strtotime('+1 day', 1129633200)
- // returns 1: 1129719600
- // example 2: strtotime('+1 week 2 days 4 hours 2 seconds', 1129633200)
- // returns 2: 1130425202
- // example 3: strtotime('last month', 1129633200)
- // returns 3: 1127041200
- // example 4: strtotime('2009-05-04 08:30:00 GMT')
- // returns 4: 1241425800
- // example 5: strtotime('2009-05-04 08:30:00+00')
- // returns 5: 1241425800
- // example 6: strtotime('2009-05-04 08:30:00+02:00')
- // returns 6: 1241418600
- // example 7: strtotime('2009-05-04T08:30:00Z')
- // returns 7: 1241425800
-
- var parsed;
- var match;
- var today;
- var year;
- var date;
- var days;
- var ranges;
- var len;
- var times;
- var regex;
- var i;
- var fail = false;
-
- if (!text) {
- return fail;
- }
-
- // Unecessary spaces
- text = text.replace(/^\s+|\s+$/g, '').replace(/\s{2,}/g, ' ').replace(/[\t\r\n]/g, '').toLowerCase();
-
- // in contrast to php, js Date.parse function interprets:
- // dates given as yyyy-mm-dd as in timezone: UTC,
- // dates with "." or "-" as MDY instead of DMY
- // dates with two-digit years differently
- // etc...etc...
- // ...therefore we manually parse lots of common date formats
- var pattern = new RegExp(['^(\\d{1,4})', '([\\-\\.\\/:])', '(\\d{1,2})', '([\\-\\.\\/:])', '(\\d{1,4})', '(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?', '(?:\\s([A-Z]+)?)?$'].join(''));
- match = text.match(pattern);
-
- if (match && match[2] === match[4]) {
- if (match[1] > 1901) {
- switch (match[2]) {
- case '-':
- // YYYY-M-D
- if (match[3] > 12 || match[5] > 31) {
- return fail;
- }
-
- return new Date(match[1], parseInt(match[3], 10) - 1, match[5], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '.':
- // YYYY.M.D is not parsed by strtotime()
- return fail;
- case '/':
- // YYYY/M/D
- if (match[3] > 12 || match[5] > 31) {
- return fail;
- }
-
- return new Date(match[1], parseInt(match[3], 10) - 1, match[5], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- }
- } else if (match[5] > 1901) {
- switch (match[2]) {
- case '-':
- // D-M-YYYY
- if (match[3] > 12 || match[1] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[3], 10) - 1, match[1], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '.':
- // D.M.YYYY
- if (match[3] > 12 || match[1] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[3], 10) - 1, match[1], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '/':
- // M/D/YYYY
- if (match[1] > 12 || match[3] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[1], 10) - 1, match[3], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- }
- } else {
- switch (match[2]) {
- case '-':
- // YY-M-D
- if (match[3] > 12 || match[5] > 31 || match[1] < 70 && match[1] > 38) {
- return fail;
- }
-
- year = match[1] >= 0 && match[1] <= 38 ? +match[1] + 2000 : match[1];
- return new Date(year, parseInt(match[3], 10) - 1, match[5], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '.':
- // D.M.YY or H.MM.SS
- if (match[5] >= 70) {
- // D.M.YY
- if (match[3] > 12 || match[1] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[3], 10) - 1, match[1], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- }
- if (match[5] < 60 && !match[6]) {
- // H.MM.SS
- if (match[1] > 23 || match[3] > 59) {
- return fail;
- }
-
- today = new Date();
- return new Date(today.getFullYear(), today.getMonth(), today.getDate(), match[1] || 0, match[3] || 0, match[5] || 0, match[9] || 0) / 1000;
- }
-
- // invalid format, cannot be parsed
- return fail;
- case '/':
- // M/D/YY
- if (match[1] > 12 || match[3] > 31 || match[5] < 70 && match[5] > 38) {
- return fail;
- }
-
- year = match[5] >= 0 && match[5] <= 38 ? +match[5] + 2000 : match[5];
- return new Date(year, parseInt(match[1], 10) - 1, match[3], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case ':':
- // HH:MM:SS
- if (match[1] > 23 || match[3] > 59 || match[5] > 59) {
- return fail;
- }
-
- today = new Date();
- return new Date(today.getFullYear(), today.getMonth(), today.getDate(), match[1] || 0, match[3] || 0, match[5] || 0) / 1000;
- }
- }
- }
-
- // other formats and "now" should be parsed by Date.parse()
- if (text === 'now') {
- return now === null || isNaN(now) ? new Date().getTime() / 1000 | 0 : now | 0;
- }
- if (!isNaN(parsed = Date.parse(text))) {
- return parsed / 1000 | 0;
- }
- // Browsers !== Chrome have problems parsing ISO 8601 date strings, as they do
- // not accept lower case characters, space, or shortened time zones.
- // Therefore, fix these problems and try again.
- // Examples:
- // 2015-04-15 20:33:59+02
- // 2015-04-15 20:33:59z
- // 2015-04-15t20:33:59+02:00
- pattern = new RegExp(['^([0-9]{4}-[0-9]{2}-[0-9]{2})', '[ t]', '([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)', '([\\+-][0-9]{2}(:[0-9]{2})?|z)'].join(''));
- match = text.match(pattern);
- if (match) {
- // @todo: time zone information
- if (match[4] === 'z') {
- match[4] = 'Z';
- } else if (match[4].match(/^([+-][0-9]{2})$/)) {
- match[4] = match[4] + ':00';
- }
-
- if (!isNaN(parsed = Date.parse(match[1] + 'T' + match[2] + match[4]))) {
- return parsed / 1000 | 0;
- }
- }
-
- date = now ? new Date(now * 1000) : new Date();
- days = {
- 'sun': 0,
- 'mon': 1,
- 'tue': 2,
- 'wed': 3,
- 'thu': 4,
- 'fri': 5,
- 'sat': 6
- };
- ranges = {
- 'yea': 'FullYear',
- 'mon': 'Month',
- 'day': 'Date',
- 'hou': 'Hours',
- 'min': 'Minutes',
- 'sec': 'Seconds'
- };
-
- function lastNext(type, range, modifier) {
- var diff;
- var day = days[range];
-
- if (typeof day !== 'undefined') {
- diff = day - date.getDay();
-
- if (diff === 0) {
- diff = 7 * modifier;
- } else if (diff > 0 && type === 'last') {
- diff -= 7;
- } else if (diff < 0 && type === 'next') {
- diff += 7;
- }
-
- date.setDate(date.getDate() + diff);
- }
- }
-
- function process(val) {
- // @todo: Reconcile this with regex using \s, taking into account
- // browser issues with split and regexes
- var splt = val.split(' ');
- var type = splt[0];
- var range = splt[1].substring(0, 3);
- var typeIsNumber = /\d+/.test(type);
- var ago = splt[2] === 'ago';
- var num = (type === 'last' ? -1 : 1) * (ago ? -1 : 1);
-
- if (typeIsNumber) {
- num *= parseInt(type, 10);
- }
-
- if (ranges.hasOwnProperty(range) && !splt[1].match(/^mon(day|\.)?$/i)) {
- return date['set' + ranges[range]](date['get' + ranges[range]]() + num);
- }
-
- if (range === 'wee') {
- return date.setDate(date.getDate() + num * 7);
- }
-
- if (type === 'next' || type === 'last') {
- lastNext(type, range, num);
- } else if (!typeIsNumber) {
- return false;
- }
-
- return true;
- }
-
- times = '(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec' + '|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?' + '|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)';
- regex = '([+-]?\\d+\\s' + times + '|' + '(last|next)\\s' + times + ')(\\sago)?';
-
- match = text.match(new RegExp(regex, 'gi'));
- if (!match) {
- return fail;
- }
-
- for (i = 0, len = match.length; i < len; i++) {
- if (!process(match[i])) {
- return fail;
- }
- }
-
- return date.getTime() / 1000;
-};
-//# sourceMappingURL=strtotime.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/strtotime.js.map b/node_modules/locutus/php/datetime/strtotime.js.map
deleted file mode 100644
index 51b62a2..0000000
--- a/node_modules/locutus/php/datetime/strtotime.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/strtotime.js"],"names":["module","exports","strtotime","text","now","parsed","match","today","year","date","days","ranges","len","times","regex","i","fail","replace","toLowerCase","pattern","RegExp","join","Date","parseInt","getFullYear","getMonth","getDate","isNaN","getTime","parse","lastNext","type","range","modifier","diff","day","getDay","setDate","process","val","splt","split","substring","typeIsNumber","test","ago","num","hasOwnProperty","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,IAApB,EAA0BC,GAA1B,EAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAJ;AACA,MAAIC,KAAJ;AACA,MAAIC,KAAJ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A2D,YAAnE;;AAEAP,UAAQH,KAAKG,KAAL,CAAW,IAAIc,MAAJ,CAAWN,KAAX,EAAkB,IAAlB,CAAX,CAAR;AACA,MAAI,CAACR,KAAL,EAAY;AACV,WAAOU,IAAP;AACD;;AAED,OAAKD,IAAI,CAAJ,EAAOH,MAAMN,MAAM0C,MAAxB,EAAgCjC,IAAIH,GAApC,EAAyCG,GAAzC,EAA8C;AAC5C,QAAI,CAACuB,QAAQhC,MAAMS,CAAN,CAAR,CAAL,EAAwB;AACtB,aAAOC,IAAP;AACD;AACF;;AAED,SAAQP,KAAKmB,OAAL,KAAiB,IAAzB;AACD,CA3SD","file":"strtotime.js","sourcesContent":["module.exports = function strtotime (text, now) {\n // discuss at: http://locutus.io/php/strtotime/\n // original by: Caio Ariede (http://caioariede.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Caio Ariede (http://caioariede.com)\n // improved by: A. Matías Quezada (http://amatiasq.com)\n // improved by: preuter\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Mirko Faber\n // input by: David\n // bugfixed by: Wagner B. Soares\n // bugfixed by: Artur Tchernychev\n // bugfixed by: Stephan Bösch-Plepelits (http://github.com/plepe)\n // note 1: Examples all have a fixed timestamp to prevent\n // note 1: tests to fail because of variable time(zones)\n // example 1: strtotime('+1 day', 1129633200)\n // returns 1: 1129719600\n // example 2: strtotime('+1 week 2 days 4 hours 2 seconds', 1129633200)\n // returns 2: 1130425202\n // example 3: strtotime('last month', 1129633200)\n // returns 3: 1127041200\n // example 4: strtotime('2009-05-04 08:30:00 GMT')\n // returns 4: 1241425800\n // example 5: strtotime('2009-05-04 08:30:00+00')\n // returns 5: 1241425800\n // example 6: strtotime('2009-05-04 08:30:00+02:00')\n // returns 6: 1241418600\n // example 7: strtotime('2009-05-04T08:30:00Z')\n // returns 7: 1241425800\n\n var parsed\n var match\n var today\n var year\n var date\n var days\n var ranges\n var len\n var times\n var regex\n var i\n var fail = false\n\n if (!text) {\n return fail\n }\n\n // Unecessary spaces\n text = text.replace(/^\\s+|\\s+$/g, '')\n .replace(/\\s{2,}/g, ' ')\n .replace(/[\\t\\r\\n]/g, '')\n .toLowerCase()\n\n // in contrast to php, js Date.parse function interprets:\n // dates given as yyyy-mm-dd as in timezone: UTC,\n // dates with \".\" or \"-\" as MDY instead of DMY\n // dates with two-digit years differently\n // etc...etc...\n // ...therefore we manually parse lots of common date formats\n var pattern = new RegExp([\n '^(\\\\d{1,4})',\n '([\\\\-\\\\.\\\\/:])',\n '(\\\\d{1,2})',\n '([\\\\-\\\\.\\\\/:])',\n '(\\\\d{1,4})',\n '(?:\\\\s(\\\\d{1,2}):(\\\\d{2})?:?(\\\\d{2})?)?',\n '(?:\\\\s([A-Z]+)?)?$'\n ].join(''))\n match = text.match(pattern)\n\n if (match && match[2] === match[4]) {\n if (match[1] > 1901) {\n switch (match[2]) {\n case '-':\n // YYYY-M-D\n if (match[3] > 12 || match[5] > 31) {\n return fail\n }\n\n return new Date(match[1], parseInt(match[3], 10) - 1, match[5],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n case '.':\n // YYYY.M.D is not parsed by strtotime()\n return fail\n case '/':\n // YYYY/M/D\n if (match[3] > 12 || match[5] > 31) {\n return fail\n }\n\n return new Date(match[1], parseInt(match[3], 10) - 1, match[5],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n }\n } else if (match[5] > 1901) {\n switch (match[2]) {\n case '-':\n // D-M-YYYY\n if (match[3] > 12 || match[1] > 31) {\n return fail\n }\n\n return new Date(match[5], parseInt(match[3], 10) - 1, match[1],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n case '.':\n // D.M.YYYY\n if (match[3] > 12 || match[1] > 31) {\n return fail\n }\n\n return new Date(match[5], parseInt(match[3], 10) - 1, match[1],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n case '/':\n // M/D/YYYY\n if (match[1] > 12 || match[3] > 31) {\n return fail\n }\n\n return new Date(match[5], parseInt(match[1], 10) - 1, match[3],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n }\n } else {\n switch (match[2]) {\n case '-':\n // YY-M-D\n if (match[3] > 12 || match[5] > 31 || (match[1] < 70 && match[1] > 38)) {\n return fail\n }\n\n year = match[1] >= 0 && match[1] <= 38 ? +match[1] + 2000 : match[1]\n return new Date(year, parseInt(match[3], 10) - 1, match[5],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n case '.':\n // D.M.YY or H.MM.SS\n if (match[5] >= 70) {\n // D.M.YY\n if (match[3] > 12 || match[1] > 31) {\n return fail\n }\n\n return new Date(match[5], parseInt(match[3], 10) - 1, match[1],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n }\n if (match[5] < 60 && !match[6]) {\n // H.MM.SS\n if (match[1] > 23 || match[3] > 59) {\n return fail\n }\n\n today = new Date()\n return new Date(today.getFullYear(), today.getMonth(), today.getDate(),\n match[1] || 0, match[3] || 0, match[5] || 0, match[9] || 0) / 1000\n }\n\n // invalid format, cannot be parsed\n return fail\n case '/':\n // M/D/YY\n if (match[1] > 12 || match[3] > 31 || (match[5] < 70 && match[5] > 38)) {\n return fail\n }\n\n year = match[5] >= 0 && match[5] <= 38 ? +match[5] + 2000 : match[5]\n return new Date(year, parseInt(match[1], 10) - 1, match[3],\n match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000\n case ':':\n // HH:MM:SS\n if (match[1] > 23 || match[3] > 59 || match[5] > 59) {\n return fail\n }\n\n today = new Date()\n return new Date(today.getFullYear(), today.getMonth(), today.getDate(),\n match[1] || 0, match[3] || 0, match[5] || 0) / 1000\n }\n }\n }\n\n // other formats and \"now\" should be parsed by Date.parse()\n if (text === 'now') {\n return now === null || isNaN(now)\n ? new Date().getTime() / 1000 | 0\n : now | 0\n }\n if (!isNaN(parsed = Date.parse(text))) {\n return parsed / 1000 | 0\n }\n // Browsers !== Chrome have problems parsing ISO 8601 date strings, as they do\n // not accept lower case characters, space, or shortened time zones.\n // Therefore, fix these problems and try again.\n // Examples:\n // 2015-04-15 20:33:59+02\n // 2015-04-15 20:33:59z\n // 2015-04-15t20:33:59+02:00\n pattern = new RegExp([\n '^([0-9]{4}-[0-9]{2}-[0-9]{2})',\n '[ t]',\n '([0-9]{2}:[0-9]{2}:[0-9]{2}(\\\\.[0-9]+)?)',\n '([\\\\+-][0-9]{2}(:[0-9]{2})?|z)'\n ].join(''))\n match = text.match(pattern)\n if (match) {\n // @todo: time zone information\n if (match[4] === 'z') {\n match[4] = 'Z'\n } else if (match[4].match(/^([+-][0-9]{2})$/)) {\n match[4] = match[4] + ':00'\n }\n\n if (!isNaN(parsed = Date.parse(match[1] + 'T' + match[2] + match[4]))) {\n return parsed / 1000 | 0\n }\n }\n\n date = now ? new Date(now * 1000) : new Date()\n days = {\n 'sun': 0,\n 'mon': 1,\n 'tue': 2,\n 'wed': 3,\n 'thu': 4,\n 'fri': 5,\n 'sat': 6\n }\n ranges = {\n 'yea': 'FullYear',\n 'mon': 'Month',\n 'day': 'Date',\n 'hou': 'Hours',\n 'min': 'Minutes',\n 'sec': 'Seconds'\n }\n\n function lastNext (type, range, modifier) {\n var diff\n var day = days[range]\n\n if (typeof day !== 'undefined') {\n diff = day - date.getDay()\n\n if (diff === 0) {\n diff = 7 * modifier\n } else if (diff > 0 && type === 'last') {\n diff -= 7\n } else if (diff < 0 && type === 'next') {\n diff += 7\n }\n\n date.setDate(date.getDate() + diff)\n }\n }\n\n function process (val) {\n // @todo: Reconcile this with regex using \\s, taking into account\n // browser issues with split and regexes\n var splt = val.split(' ')\n var type = splt[0]\n var range = splt[1].substring(0, 3)\n var typeIsNumber = /\\d+/.test(type)\n var ago = splt[2] === 'ago'\n var num = (type === 'last' ? -1 : 1) * (ago ? -1 : 1)\n\n if (typeIsNumber) {\n num *= parseInt(type, 10)\n }\n\n if (ranges.hasOwnProperty(range) && !splt[1].match(/^mon(day|\\.)?$/i)) {\n return date['set' + ranges[range]](date['get' + ranges[range]]() + num)\n }\n\n if (range === 'wee') {\n return date.setDate(date.getDate() + (num * 7))\n }\n\n if (type === 'next' || type === 'last') {\n lastNext(type, range, num)\n } else if (!typeIsNumber) {\n return false\n }\n\n return true\n }\n\n times = '(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec' +\n '|sunday|sun\\\\.?|monday|mon\\\\.?|tuesday|tue\\\\.?|wednesday|wed\\\\.?' +\n '|thursday|thu\\\\.?|friday|fri\\\\.?|saturday|sat\\\\.?)'\n regex = '([+-]?\\\\d+\\\\s' + times + '|' + '(last|next)\\\\s' + times + ')(\\\\sago)?'\n\n match = text.match(new RegExp(regex, 'gi'))\n if (!match) {\n return fail\n }\n\n for (i = 0, len = match.length; i < len; i++) {\n if (!process(match[i])) {\n return fail\n }\n }\n\n return (date.getTime() / 1000)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/time.js b/node_modules/locutus/php/datetime/time.js
deleted file mode 100644
index 0c53101..0000000
--- a/node_modules/locutus/php/datetime/time.js
+++ /dev/null
@@ -1,15 +0,0 @@
-"use strict";
-
-module.exports = function time() {
- // discuss at: http://locutus.io/php/time/
- // original by: GeekFG (http://geekfg.blogspot.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: metjay
- // improved by: HKM
- // example 1: var $timeStamp = time()
- // example 1: var $result = $timeStamp > 1000000000 && $timeStamp < 2000000000
- // returns 1: true
-
- return Math.floor(new Date().getTime() / 1000);
-};
-//# sourceMappingURL=time.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/datetime/time.js.map b/node_modules/locutus/php/datetime/time.js.map
deleted file mode 100644
index f9c3a7f..0000000
--- a/node_modules/locutus/php/datetime/time.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/datetime/time.js"],"names":["module","exports","time","Math","floor","Date","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,GAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKC,KAAL,CAAW,IAAIC,IAAJ,GAAWC,OAAX,KAAuB,IAAlC,CAAP;AACD,CAXD","file":"time.js","sourcesContent":["module.exports = function time () {\n // discuss at: http://locutus.io/php/time/\n // original by: GeekFG (http://geekfg.blogspot.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: metjay\n // improved by: HKM\n // example 1: var $timeStamp = time()\n // example 1: var $result = $timeStamp > 1000000000 && $timeStamp < 2000000000\n // returns 1: true\n\n return Math.floor(new Date().getTime() / 1000)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/exec/escapeshellarg.js b/node_modules/locutus/php/exec/escapeshellarg.js
deleted file mode 100644
index 3672042..0000000
--- a/node_modules/locutus/php/exec/escapeshellarg.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function escapeshellarg(arg) {
- // discuss at: http://locutus.io/php/escapeshellarg/
- // original by: Felix Geisendoerfer (http://www.debuggable.com/felix)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: escapeshellarg("kevin's birthday")
- // returns 1: "'kevin\\'s birthday'"
-
- var ret = '';
-
- ret = arg.replace(/[^\\]'/g, function (m, i, s) {
- return m.slice(0, 1) + '\\\'';
- });
-
- return "'" + ret + "'";
-};
-//# sourceMappingURL=escapeshellarg.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/exec/escapeshellarg.js.map b/node_modules/locutus/php/exec/escapeshellarg.js.map
deleted file mode 100644
index e325970..0000000
--- a/node_modules/locutus/php/exec/escapeshellarg.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/exec/escapeshellarg.js"],"names":["module","exports","escapeshellarg","arg","ret","replace","m","i","s","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,GAAzB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;;AAEAA,QAAMD,IAAIE,OAAJ,CAAY,SAAZ,EAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmB;AAC9C,WAAOF,EAAEG,KAAF,CAAQ,CAAR,EAAW,CAAX,IAAgB,MAAvB;AACD,GAFK,CAAN;;AAIA,SAAO,MAAML,GAAN,GAAY,GAAnB;AACD,CAdD","file":"escapeshellarg.js","sourcesContent":["module.exports = function escapeshellarg (arg) {\n // discuss at: http://locutus.io/php/escapeshellarg/\n // original by: Felix Geisendoerfer (http://www.debuggable.com/felix)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: escapeshellarg(\"kevin's birthday\")\n // returns 1: \"'kevin\\\\'s birthday'\"\n\n var ret = ''\n\n ret = arg.replace(/[^\\\\]'/g, function (m, i, s) {\n return m.slice(0, 1) + '\\\\\\''\n })\n\n return \"'\" + ret + \"'\"\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/exec/index.js b/node_modules/locutus/php/exec/index.js
deleted file mode 100644
index 8552453..0000000
--- a/node_modules/locutus/php/exec/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['escapeshellarg'] = require('./escapeshellarg');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/exec/index.js.map b/node_modules/locutus/php/exec/index.js.map
deleted file mode 100644
index 7c69073..0000000
--- a/node_modules/locutus/php/exec/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/exec/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC","file":"index.js","sourcesContent":["module.exports['escapeshellarg'] = require('./escapeshellarg')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/basename.js b/node_modules/locutus/php/filesystem/basename.js
deleted file mode 100644
index 0286673..0000000
--- a/node_modules/locutus/php/filesystem/basename.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function basename(path, suffix) {
- // discuss at: http://locutus.io/php/basename/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Ash Searle (http://hexmen.com/blog/)
- // improved by: Lincoln Ramsay
- // improved by: djmix
- // improved by: Dmitry Gorelenkov
- // example 1: basename('/www/site/home.htm', '.htm')
- // returns 1: 'home'
- // example 2: basename('ecra.php?p=1')
- // returns 2: 'ecra.php?p=1'
- // example 3: basename('/some/path/')
- // returns 3: 'path'
- // example 4: basename('/some/path_ext.ext/','.ext')
- // returns 4: 'path_ext'
-
- var b = path;
- var lastChar = b.charAt(b.length - 1);
-
- if (lastChar === '/' || lastChar === '\\') {
- b = b.slice(0, -1);
- }
-
- b = b.replace(/^.*[/\\]/g, '');
-
- if (typeof suffix === 'string' && b.substr(b.length - suffix.length) === suffix) {
- b = b.substr(0, b.length - suffix.length);
- }
-
- return b;
-};
-//# sourceMappingURL=basename.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/basename.js.map b/node_modules/locutus/php/filesystem/basename.js.map
deleted file mode 100644
index e426d39..0000000
--- a/node_modules/locutus/php/filesystem/basename.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/filesystem/basename.js"],"names":["module","exports","basename","path","suffix","b","lastChar","charAt","length","slice","replace","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,IAAnB,EAAyBC,MAAzB,EAAiC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAIF,IAAR;AACA,MAAIG,WAAWD,EAAEE,MAAF,CAASF,EAAEG,MAAF,GAAW,CAApB,CAAf;;AAEA,MAAIF,aAAa,GAAb,IAAoBA,aAAa,IAArC,EAA2C;AACzCD,QAAIA,EAAEI,KAAF,CAAQ,CAAR,EAAW,CAAC,CAAZ,CAAJ;AACD;;AAEDJ,MAAIA,EAAEK,OAAF,CAAU,WAAV,EAAuB,EAAvB,CAAJ;;AAEA,MAAI,OAAON,MAAP,KAAkB,QAAlB,IAA8BC,EAAEM,MAAF,CAASN,EAAEG,MAAF,GAAWJ,OAAOI,MAA3B,MAAuCJ,MAAzE,EAAiF;AAC/EC,QAAIA,EAAEM,MAAF,CAAS,CAAT,EAAYN,EAAEG,MAAF,GAAWJ,OAAOI,MAA9B,CAAJ;AACD;;AAED,SAAOH,CAAP;AACD,CA9BD","file":"basename.js","sourcesContent":["module.exports = function basename (path, suffix) {\n // discuss at: http://locutus.io/php/basename/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Ash Searle (http://hexmen.com/blog/)\n // improved by: Lincoln Ramsay\n // improved by: djmix\n // improved by: Dmitry Gorelenkov\n // example 1: basename('/www/site/home.htm', '.htm')\n // returns 1: 'home'\n // example 2: basename('ecra.php?p=1')\n // returns 2: 'ecra.php?p=1'\n // example 3: basename('/some/path/')\n // returns 3: 'path'\n // example 4: basename('/some/path_ext.ext/','.ext')\n // returns 4: 'path_ext'\n\n var b = path\n var lastChar = b.charAt(b.length - 1)\n\n if (lastChar === '/' || lastChar === '\\\\') {\n b = b.slice(0, -1)\n }\n\n b = b.replace(/^.*[/\\\\]/g, '')\n\n if (typeof suffix === 'string' && b.substr(b.length - suffix.length) === suffix) {\n b = b.substr(0, b.length - suffix.length)\n }\n\n return b\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/dirname.js b/node_modules/locutus/php/filesystem/dirname.js
deleted file mode 100644
index 9d9c7b0..0000000
--- a/node_modules/locutus/php/filesystem/dirname.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function dirname(path) {
- // discuss at: http://locutus.io/php/dirname/
- // original by: Ozh
- // improved by: XoraX (http://www.xorax.info)
- // example 1: dirname('/etc/passwd')
- // returns 1: '/etc'
- // example 2: dirname('c:/Temp/x')
- // returns 2: 'c:/Temp'
- // example 3: dirname('/dir/test/')
- // returns 3: '/dir'
-
- return path.replace(/\\/g, '/').replace(/\/[^/]*\/?$/, '');
-};
-//# sourceMappingURL=dirname.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/dirname.js.map b/node_modules/locutus/php/filesystem/dirname.js.map
deleted file mode 100644
index d700a0a..0000000
--- a/node_modules/locutus/php/filesystem/dirname.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/filesystem/dirname.js"],"names":["module","exports","dirname","path","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,IAAlB,EAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOA,KAAKC,OAAL,CAAa,KAAb,EAAoB,GAApB,EACJA,OADI,CACI,aADJ,EACmB,EADnB,CAAP;AAED,CAbD","file":"dirname.js","sourcesContent":["module.exports = function dirname (path) {\n // discuss at: http://locutus.io/php/dirname/\n // original by: Ozh\n // improved by: XoraX (http://www.xorax.info)\n // example 1: dirname('/etc/passwd')\n // returns 1: '/etc'\n // example 2: dirname('c:/Temp/x')\n // returns 2: 'c:/Temp'\n // example 3: dirname('/dir/test/')\n // returns 3: '/dir'\n\n return path.replace(/\\\\/g, '/')\n .replace(/\\/[^/]*\\/?$/, '')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/file_get_contents.js b/node_modules/locutus/php/filesystem/file_get_contents.js
deleted file mode 100644
index 8b861e8..0000000
--- a/node_modules/locutus/php/filesystem/file_get_contents.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function file_get_contents(url, flags, context, offset, maxLen) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/file_get_contents/
- // original by: Legaev Andrey
- // input by: Jani Hartikainen
- // input by: Raphael (Ao) RUDLER
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // reimplemented by: Kevin van Zonneveld (http://kvz.io)
- // note 1: This used to work in the browser via blocking ajax
- // note 1: requests in 1.3.2 and earlier
- // note 1: but then people started using that for real app,
- // note 1: so we deprecated this behavior,
- // note 1: so this function is now Node-only
- // example 1: var $buf = file_get_contents('test/never-change.txt')
- // example 1: var $result = $buf.indexOf('hash') !== -1
- // returns 1: true
-
- var fs = require('fs');
-
- return fs.readFileSync(url, 'utf-8');
-};
-//# sourceMappingURL=file_get_contents.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/file_get_contents.js.map b/node_modules/locutus/php/filesystem/file_get_contents.js.map
deleted file mode 100644
index fe29d36..0000000
--- a/node_modules/locutus/php/filesystem/file_get_contents.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/filesystem/file_get_contents.js"],"names":["module","exports","file_get_contents","url","flags","context","offset","maxLen","fs","require","readFileSync"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,iBAAT,CAA4BC,GAA5B,EAAiCC,KAAjC,EAAwCC,OAAxC,EAAiDC,MAAjD,EAAyDC,MAAzD,EAAiE;AAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAKC,QAAQ,IAAR,CAAT;;AAEA,SAAOD,GAAGE,YAAH,CAAgBP,GAAhB,EAAqB,OAArB,CAAP;AACD,CArBD","file":"file_get_contents.js","sourcesContent":["module.exports = function file_get_contents (url, flags, context, offset, maxLen) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/file_get_contents/\n // original by: Legaev Andrey\n // input by: Jani Hartikainen\n // input by: Raphael (Ao) RUDLER\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // reimplemented by: Kevin van Zonneveld (http://kvz.io)\n // note 1: This used to work in the browser via blocking ajax\n // note 1: requests in 1.3.2 and earlier\n // note 1: but then people started using that for real app,\n // note 1: so we deprecated this behavior,\n // note 1: so this function is now Node-only\n // example 1: var $buf = file_get_contents('test/never-change.txt')\n // example 1: var $result = $buf.indexOf('hash') !== -1\n // returns 1: true\n\n var fs = require('fs')\n\n return fs.readFileSync(url, 'utf-8')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/index.js b/node_modules/locutus/php/filesystem/index.js
deleted file mode 100644
index 02bb422..0000000
--- a/node_modules/locutus/php/filesystem/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports['basename'] = require('./basename');
-module.exports['dirname'] = require('./dirname');
-module.exports['file_get_contents'] = require('./file_get_contents');
-module.exports['pathinfo'] = require('./pathinfo');
-module.exports['realpath'] = require('./realpath');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/index.js.map b/node_modules/locutus/php/filesystem/index.js.map
deleted file mode 100644
index aa46186..0000000
--- a/node_modules/locutus/php/filesystem/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/filesystem/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,mBAAf,IAAsCC,QAAQ,qBAAR,CAAtC;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B","file":"index.js","sourcesContent":["module.exports['basename'] = require('./basename')\nmodule.exports['dirname'] = require('./dirname')\nmodule.exports['file_get_contents'] = require('./file_get_contents')\nmodule.exports['pathinfo'] = require('./pathinfo')\nmodule.exports['realpath'] = require('./realpath')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/pathinfo.js b/node_modules/locutus/php/filesystem/pathinfo.js
deleted file mode 100644
index 2184891..0000000
--- a/node_modules/locutus/php/filesystem/pathinfo.js
+++ /dev/null
@@ -1,146 +0,0 @@
-'use strict';
-
-module.exports = function pathinfo(path, options) {
- // discuss at: http://locutus.io/php/pathinfo/
- // original by: Nate
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Dmitry Gorelenkov
- // input by: Timo
- // note 1: Inspired by actual PHP source: php5-5.2.6/ext/standard/string.c line #1559
- // note 1: The way the bitwise arguments are handled allows for greater flexibility
- // note 1: & compatability. We might even standardize this
- // note 1: code and use a similar approach for
- // note 1: other bitwise PHP functions
- // note 1: Locutus tries very hard to stay away from a core.js
- // note 1: file with global dependencies, because we like
- // note 1: that you can just take a couple of functions and be on your way.
- // note 1: But by way we implemented this function,
- // note 1: if you want you can still declare the PATHINFO_*
- // note 1: yourself, and then you can use:
- // note 1: pathinfo('/www/index.html', PATHINFO_BASENAME | PATHINFO_EXTENSION);
- // note 1: which makes it fully compliant with PHP syntax.
- // example 1: pathinfo('/www/htdocs/index.html', 1)
- // returns 1: '/www/htdocs'
- // example 2: pathinfo('/www/htdocs/index.html', 'PATHINFO_BASENAME')
- // returns 2: 'index.html'
- // example 3: pathinfo('/www/htdocs/index.html', 'PATHINFO_EXTENSION')
- // returns 3: 'html'
- // example 4: pathinfo('/www/htdocs/index.html', 'PATHINFO_FILENAME')
- // returns 4: 'index'
- // example 5: pathinfo('/www/htdocs/index.html', 2 | 4)
- // returns 5: {basename: 'index.html', extension: 'html'}
- // example 6: pathinfo('/www/htdocs/index.html', 'PATHINFO_ALL')
- // returns 6: {dirname: '/www/htdocs', basename: 'index.html', extension: 'html', filename: 'index'}
- // example 7: pathinfo('/www/htdocs/index.html')
- // returns 7: {dirname: '/www/htdocs', basename: 'index.html', extension: 'html', filename: 'index'}
-
- var basename = require('../filesystem/basename');
- var opt = '';
- var realOpt = '';
- var optName = '';
- var optTemp = 0;
- var tmpArr = {};
- var cnt = 0;
- var i = 0;
- var haveBasename = false;
- var haveExtension = false;
- var haveFilename = false;
-
- // Input defaulting & sanitation
- if (!path) {
- return false;
- }
- if (!options) {
- options = 'PATHINFO_ALL';
- }
-
- // Initialize binary arguments. Both the string & integer (constant) input is
- // allowed
- var OPTS = {
- 'PATHINFO_DIRNAME': 1,
- 'PATHINFO_BASENAME': 2,
- 'PATHINFO_EXTENSION': 4,
- 'PATHINFO_FILENAME': 8,
- 'PATHINFO_ALL': 0
- };
- // PATHINFO_ALL sums up all previously defined PATHINFOs (could just pre-calculate)
- for (optName in OPTS) {
- if (OPTS.hasOwnProperty(optName)) {
- OPTS.PATHINFO_ALL = OPTS.PATHINFO_ALL | OPTS[optName];
- }
- }
- if (typeof options !== 'number') {
- // Allow for a single string or an array of string flags
- options = [].concat(options);
- for (i = 0; i < options.length; i++) {
- // Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
- if (OPTS[options[i]]) {
- optTemp = optTemp | OPTS[options[i]];
- }
- }
- options = optTemp;
- }
-
- // Internal Functions
- var _getExt = function _getExt(path) {
- var str = path + '';
- var dotP = str.lastIndexOf('.') + 1;
- return !dotP ? false : dotP !== str.length ? str.substr(dotP) : '';
- };
-
- // Gather path infos
- if (options & OPTS.PATHINFO_DIRNAME) {
- var dirName = path.replace(/\\/g, '/').replace(/\/[^/]*\/?$/, ''); // dirname
- tmpArr.dirname = dirName === path ? '.' : dirName;
- }
-
- if (options & OPTS.PATHINFO_BASENAME) {
- if (haveBasename === false) {
- haveBasename = basename(path);
- }
- tmpArr.basename = haveBasename;
- }
-
- if (options & OPTS.PATHINFO_EXTENSION) {
- if (haveBasename === false) {
- haveBasename = basename(path);
- }
- if (haveExtension === false) {
- haveExtension = _getExt(haveBasename);
- }
- if (haveExtension !== false) {
- tmpArr.extension = haveExtension;
- }
- }
-
- if (options & OPTS.PATHINFO_FILENAME) {
- if (haveBasename === false) {
- haveBasename = basename(path);
- }
- if (haveExtension === false) {
- haveExtension = _getExt(haveBasename);
- }
- if (haveFilename === false) {
- haveFilename = haveBasename.slice(0, haveBasename.length - (haveExtension ? haveExtension.length + 1 : haveExtension === false ? 0 : 1));
- }
-
- tmpArr.filename = haveFilename;
- }
-
- // If array contains only 1 element: return string
- cnt = 0;
- for (opt in tmpArr) {
- if (tmpArr.hasOwnProperty(opt)) {
- cnt++;
- realOpt = opt;
- }
- }
- if (cnt === 1) {
- return tmpArr[realOpt];
- }
-
- // Return full-blown array
- return tmpArr;
-};
-//# sourceMappingURL=pathinfo.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/pathinfo.js.map b/node_modules/locutus/php/filesystem/pathinfo.js.map
deleted file mode 100644
index d0ece8f..0000000
--- a/node_modules/locutus/php/filesystem/pathinfo.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/filesystem/pathinfo.js"],"names":["module","exports","pathinfo","path","options","basename","require","opt","realOpt","optName","optTemp","tmpArr","cnt","i","haveBasename","haveExtension","haveFilename","OPTS","hasOwnProperty","PATHINFO_ALL","concat","length","_getExt","str","dotP","lastIndexOf","substr","PATHINFO_DIRNAME","dirName","replace","dirname","PATHINFO_BASENAME","PATHINFO_EXTENSION","extension","PATHINFO_FILENAME","slice","filename"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,IAAnB,EAAyBC,OAAzB,EAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,wBAAR,CAAf;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,UAAU,EAAd;AACA,MAAIC,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,CAAsBX,GAAtB,CAAJ,EAAgC;AAC9BK;AACAJ,gBAAUD,GAAV;AACD;AACF;AACD,MAAIK,QAAQ,CAAZ,EAAe;AACb,WAAOD,OAAOH,OAAP,CAAP;AACD;;AAED;AACA,SAAOG,MAAP;AACD,CAtJD","file":"pathinfo.js","sourcesContent":["module.exports = function pathinfo (path, options) {\n // discuss at: http://locutus.io/php/pathinfo/\n // original by: Nate\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Dmitry Gorelenkov\n // input by: Timo\n // note 1: Inspired by actual PHP source: php5-5.2.6/ext/standard/string.c line #1559\n // note 1: The way the bitwise arguments are handled allows for greater flexibility\n // note 1: & compatability. We might even standardize this\n // note 1: code and use a similar approach for\n // note 1: other bitwise PHP functions\n // note 1: Locutus tries very hard to stay away from a core.js\n // note 1: file with global dependencies, because we like\n // note 1: that you can just take a couple of functions and be on your way.\n // note 1: But by way we implemented this function,\n // note 1: if you want you can still declare the PATHINFO_*\n // note 1: yourself, and then you can use:\n // note 1: pathinfo('/www/index.html', PATHINFO_BASENAME | PATHINFO_EXTENSION);\n // note 1: which makes it fully compliant with PHP syntax.\n // example 1: pathinfo('/www/htdocs/index.html', 1)\n // returns 1: '/www/htdocs'\n // example 2: pathinfo('/www/htdocs/index.html', 'PATHINFO_BASENAME')\n // returns 2: 'index.html'\n // example 3: pathinfo('/www/htdocs/index.html', 'PATHINFO_EXTENSION')\n // returns 3: 'html'\n // example 4: pathinfo('/www/htdocs/index.html', 'PATHINFO_FILENAME')\n // returns 4: 'index'\n // example 5: pathinfo('/www/htdocs/index.html', 2 | 4)\n // returns 5: {basename: 'index.html', extension: 'html'}\n // example 6: pathinfo('/www/htdocs/index.html', 'PATHINFO_ALL')\n // returns 6: {dirname: '/www/htdocs', basename: 'index.html', extension: 'html', filename: 'index'}\n // example 7: pathinfo('/www/htdocs/index.html')\n // returns 7: {dirname: '/www/htdocs', basename: 'index.html', extension: 'html', filename: 'index'}\n\n var basename = require('../filesystem/basename')\n var opt = ''\n var realOpt = ''\n var optName = ''\n var optTemp = 0\n var tmpArr = {}\n var cnt = 0\n var i = 0\n var haveBasename = false\n var haveExtension = false\n var haveFilename = false\n\n // Input defaulting & sanitation\n if (!path) {\n return false\n }\n if (!options) {\n options = 'PATHINFO_ALL'\n }\n\n // Initialize binary arguments. Both the string & integer (constant) input is\n // allowed\n var OPTS = {\n 'PATHINFO_DIRNAME': 1,\n 'PATHINFO_BASENAME': 2,\n 'PATHINFO_EXTENSION': 4,\n 'PATHINFO_FILENAME': 8,\n 'PATHINFO_ALL': 0\n }\n // PATHINFO_ALL sums up all previously defined PATHINFOs (could just pre-calculate)\n for (optName in OPTS) {\n if (OPTS.hasOwnProperty(optName)) {\n OPTS.PATHINFO_ALL = OPTS.PATHINFO_ALL | OPTS[optName]\n }\n }\n if (typeof options !== 'number') {\n // Allow for a single string or an array of string flags\n options = [].concat(options)\n for (i = 0; i < options.length; i++) {\n // Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4\n if (OPTS[options[i]]) {\n optTemp = optTemp | OPTS[options[i]]\n }\n }\n options = optTemp\n }\n\n // Internal Functions\n var _getExt = function (path) {\n var str = path + ''\n var dotP = str.lastIndexOf('.') + 1\n return !dotP ? false : dotP !== str.length ? str.substr(dotP) : ''\n }\n\n // Gather path infos\n if (options & OPTS.PATHINFO_DIRNAME) {\n var dirName = path\n .replace(/\\\\/g, '/')\n .replace(/\\/[^/]*\\/?$/, '') // dirname\n tmpArr.dirname = dirName === path ? '.' : dirName\n }\n\n if (options & OPTS.PATHINFO_BASENAME) {\n if (haveBasename === false) {\n haveBasename = basename(path)\n }\n tmpArr.basename = haveBasename\n }\n\n if (options & OPTS.PATHINFO_EXTENSION) {\n if (haveBasename === false) {\n haveBasename = basename(path)\n }\n if (haveExtension === false) {\n haveExtension = _getExt(haveBasename)\n }\n if (haveExtension !== false) {\n tmpArr.extension = haveExtension\n }\n }\n\n if (options & OPTS.PATHINFO_FILENAME) {\n if (haveBasename === false) {\n haveBasename = basename(path)\n }\n if (haveExtension === false) {\n haveExtension = _getExt(haveBasename)\n }\n if (haveFilename === false) {\n haveFilename = haveBasename.slice(0, haveBasename.length - (haveExtension\n ? haveExtension.length + 1\n : haveExtension === false\n ? 0\n : 1\n )\n )\n }\n\n tmpArr.filename = haveFilename\n }\n\n // If array contains only 1 element: return string\n cnt = 0\n for (opt in tmpArr) {\n if (tmpArr.hasOwnProperty(opt)) {\n cnt++\n realOpt = opt\n }\n }\n if (cnt === 1) {\n return tmpArr[realOpt]\n }\n\n // Return full-blown array\n return tmpArr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/realpath.js b/node_modules/locutus/php/filesystem/realpath.js
deleted file mode 100644
index f5b5515..0000000
--- a/node_modules/locutus/php/filesystem/realpath.js
+++ /dev/null
@@ -1,60 +0,0 @@
-'use strict';
-
-module.exports = function realpath(path) {
- // discuss at: http://locutus.io/php/realpath/
- // original by: mk.keck
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // note 1: Returned path is an url like e.g. 'http://yourhost.tld/path/'
- // example 1: realpath('some/dir/.././_supporters/pj_test_supportfile_1.htm')
- // returns 1: 'some/_supporters/pj_test_supportfile_1.htm'
-
- if (typeof window === 'undefined') {
- var nodePath = require('path');
- return nodePath.normalize(path);
- }
-
- var p = 0;
- var arr = []; // Save the root, if not given
- var r = this.window.location.href; // Avoid input failures
-
- // Check if there's a port in path (like 'http://')
- path = (path + '').replace('\\', '/');
- if (path.indexOf('://') !== -1) {
- p = 1;
- }
-
- // Ok, there's not a port in path, so let's take the root
- if (!p) {
- path = r.substring(0, r.lastIndexOf('/') + 1) + path;
- }
-
- // Explode the given path into it's parts
- arr = path.split('/'); // The path is an array now
- path = []; // Foreach part make a check
- for (var k in arr) {
- // This is'nt really interesting
- if (arr[k] === '.') {
- continue;
- }
- // This reduces the realpath
- if (arr[k] === '..') {
- /* But only if there more than 3 parts in the path-array.
- * The first three parts are for the uri */
- if (path.length > 3) {
- path.pop();
- }
- } else {
- // This adds parts to the realpath
- // But only if the part is not empty or the uri
- // (the first three parts ar needed) was not
- // saved
- if (path.length < 2 || arr[k] !== '') {
- path.push(arr[k]);
- }
- }
- }
-
- // Returns the absloute path as a string
- return path.join('/');
-};
-//# sourceMappingURL=realpath.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/filesystem/realpath.js.map b/node_modules/locutus/php/filesystem/realpath.js.map
deleted file mode 100644
index 4e5046e..0000000
--- a/node_modules/locutus/php/filesystem/realpath.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/filesystem/realpath.js"],"names":["module","exports","realpath","path","window","nodePath","require","normalize","p","arr","r","location","href","replace","indexOf","substring","lastIndexOf","split","k","length","pop","push","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,IAAnB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjC,QAAIC,WAAWC,QAAQ,MAAR,CAAf;AACA,WAAOD,SAASE,SAAT,CAAmBJ,IAAnB,CAAP;AACD;;AAED,MAAIK,IAAI,CAAR;AACA,MAAIC,MAAM,EAAV,CAdwC,CAc3B;AACb,MAAIC,IAAI,KAAKN,MAAL,CAAYO,QAAZ,CAAqBC,IAA7B,CAfwC,CAeN;;AAElC;AACAT,SAAO,CAACA,OAAO,EAAR,EAAYU,OAAZ,CAAoB,IAApB,EAA0B,GAA1B,CAAP;AACA,MAAIV,KAAKW,OAAL,CAAa,KAAb,MAAwB,CAAC,CAA7B,EAAgC;AAC9BN,QAAI,CAAJ;AACD;;AAED;AACA,MAAI,CAACA,CAAL,EAAQ;AACNL,WAAOO,EAAEK,SAAF,CAAY,CAAZ,EAAeL,EAAEM,WAAF,CAAc,GAAd,IAAqB,CAApC,IAAyCb,IAAhD;AACD;;AAED;AACAM,QAAMN,KAAKc,KAAL,CAAW,GAAX,CAAN,CA7BwC,CA6BlB;AACtBd,SAAO,EAAP,CA9BwC,CA8B9B;AACV,OAAK,IAAIe,CAAT,IAAcT,GAAd,EAAmB;AAAE;AACnB,QAAIA,IAAIS,CAAJ,MAAW,GAAf,EAAoB;AAClB;AACD;AACD;AACA,QAAIT,IAAIS,CAAJ,MAAW,IAAf,EAAqB;AACnB;;AAEA,UAAIf,KAAKgB,MAAL,GAAc,CAAlB,EAAqB;AACnBhB,aAAKiB,GAAL;AACD;AACF,KAND,MAMO;AACL;AACA;AACA;AACA;AACA,UAAKjB,KAAKgB,MAAL,GAAc,CAAf,IAAsBV,IAAIS,CAAJ,MAAW,EAArC,EAA0C;AACxCf,aAAKkB,IAAL,CAAUZ,IAAIS,CAAJ,CAAV;AACD;AACF;AACF;;AAED;AACA,SAAOf,KAAKmB,IAAL,CAAU,GAAV,CAAP;AACD,CAvDD","file":"realpath.js","sourcesContent":["module.exports = function realpath (path) {\n // discuss at: http://locutus.io/php/realpath/\n // original by: mk.keck\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // note 1: Returned path is an url like e.g. 'http://yourhost.tld/path/'\n // example 1: realpath('some/dir/.././_supporters/pj_test_supportfile_1.htm')\n // returns 1: 'some/_supporters/pj_test_supportfile_1.htm'\n\n if (typeof window === 'undefined') {\n var nodePath = require('path')\n return nodePath.normalize(path)\n }\n\n var p = 0\n var arr = [] // Save the root, if not given\n var r = this.window.location.href // Avoid input failures\n\n // Check if there's a port in path (like 'http://')\n path = (path + '').replace('\\\\', '/')\n if (path.indexOf('://') !== -1) {\n p = 1\n }\n\n // Ok, there's not a port in path, so let's take the root\n if (!p) {\n path = r.substring(0, r.lastIndexOf('/') + 1) + path\n }\n\n // Explode the given path into it's parts\n arr = path.split('/') // The path is an array now\n path = [] // Foreach part make a check\n for (var k in arr) { // This is'nt really interesting\n if (arr[k] === '.') {\n continue\n }\n // This reduces the realpath\n if (arr[k] === '..') {\n /* But only if there more than 3 parts in the path-array.\n * The first three parts are for the uri */\n if (path.length > 3) {\n path.pop()\n }\n } else {\n // This adds parts to the realpath\n // But only if the part is not empty or the uri\n // (the first three parts ar needed) was not\n // saved\n if ((path.length < 2) || (arr[k] !== '')) {\n path.push(arr[k])\n }\n }\n }\n\n // Returns the absloute path as a string\n return path.join('/')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/call_user_func.js b/node_modules/locutus/php/funchand/call_user_func.js
deleted file mode 100644
index 841ec42..0000000
--- a/node_modules/locutus/php/funchand/call_user_func.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = function call_user_func(cb, parameters) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/call_user_func/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Diplom@t (http://difane.com/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Depends on call_user_func_array which in turn depends on the `cb` that is passed,
- // note 1: this function can use `eval`.
- // note 1: The `eval` input is however checked to only allow valid function names,
- // note 1: So it should not be unsafer than uses without eval (seeing as you can)
- // note 1: already pass any function to be executed here.
- // example 1: call_user_func('isNaN', 'a')
- // returns 1: true
-
- var callUserFuncArray = require('../funchand/call_user_func_array');
- parameters = Array.prototype.slice.call(arguments, 1);
- return callUserFuncArray(cb, parameters);
-};
-//# sourceMappingURL=call_user_func.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/call_user_func.js.map b/node_modules/locutus/php/funchand/call_user_func.js.map
deleted file mode 100644
index c1876cb..0000000
--- a/node_modules/locutus/php/funchand/call_user_func.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/funchand/call_user_func.js"],"names":["module","exports","call_user_func","cb","parameters","callUserFuncArray","require","Array","prototype","slice","call","arguments"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,EAAzB,EAA6BC,UAA7B,EAAyC;AAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,oBAAoBC,QAAQ,kCAAR,CAAxB;AACAF,eAAaG,MAAMC,SAAN,CAAgBC,KAAhB,CAAsBC,IAAtB,CAA2BC,SAA3B,EAAsC,CAAtC,CAAb;AACA,SAAON,kBAAkBF,EAAlB,EAAsBC,UAAtB,CAAP;AACD,CAhBD","file":"call_user_func.js","sourcesContent":["module.exports = function call_user_func (cb, parameters) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/call_user_func/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Diplom@t (http://difane.com/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Depends on call_user_func_array which in turn depends on the `cb` that is passed,\n // note 1: this function can use `eval`.\n // note 1: The `eval` input is however checked to only allow valid function names,\n // note 1: So it should not be unsafer than uses without eval (seeing as you can)\n // note 1: already pass any function to be executed here.\n // example 1: call_user_func('isNaN', 'a')\n // returns 1: true\n\n var callUserFuncArray = require('../funchand/call_user_func_array')\n parameters = Array.prototype.slice.call(arguments, 1)\n return callUserFuncArray(cb, parameters)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/call_user_func_array.js b/node_modules/locutus/php/funchand/call_user_func_array.js
deleted file mode 100644
index 91c79b7..0000000
--- a/node_modules/locutus/php/funchand/call_user_func_array.js
+++ /dev/null
@@ -1,63 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function call_user_func_array(cb, parameters) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/call_user_func_array/
- // original by: Thiago Mata (http://thiagomata.blog.com)
- // revised by: Jon Hohle
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Diplom@t (http://difane.com/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Depending on the `cb` that is passed,
- // note 1: this function can use `eval` and/or `new Function`.
- // note 1: The `eval` input is however checked to only allow valid function names,
- // note 1: So it should not be unsafer than uses without eval (seeing as you can)
- // note 1: already pass any function to be executed here.
- // example 1: call_user_func_array('isNaN', ['a'])
- // returns 1: true
- // example 2: call_user_func_array('isNaN', [1])
- // returns 2: false
-
- var $global = typeof window !== 'undefined' ? window : global;
- var func;
- var scope = null;
-
- var validJSFunctionNamePattern = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
-
- if (typeof cb === 'string') {
- if (typeof $global[cb] === 'function') {
- func = $global[cb];
- } else if (cb.match(validJSFunctionNamePattern)) {
- func = new Function(null, 'return ' + cb)(); // eslint-disable-line no-new-func
- }
- } else if (Object.prototype.toString.call(cb) === '[object Array]') {
- if (typeof cb[0] === 'string') {
- if (cb[0].match(validJSFunctionNamePattern)) {
- func = eval(cb[0] + "['" + cb[1] + "']"); // eslint-disable-line no-eval
- }
- } else {
- func = cb[0][cb[1]];
- }
-
- if (typeof cb[0] === 'string') {
- if (typeof $global[cb[0]] === 'function') {
- scope = $global[cb[0]];
- } else if (cb[0].match(validJSFunctionNamePattern)) {
- scope = eval(cb[0]); // eslint-disable-line no-eval
- }
- } else if (_typeof(cb[0]) === 'object') {
- scope = cb[0];
- }
- } else if (typeof cb === 'function') {
- func = cb;
- }
-
- if (typeof func !== 'function') {
- throw new Error(func + ' is not a valid function');
- }
-
- return func.apply(scope, parameters);
-};
-//# sourceMappingURL=call_user_func_array.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/call_user_func_array.js.map b/node_modules/locutus/php/funchand/call_user_func_array.js.map
deleted file mode 100644
index fd5125e..0000000
--- a/node_modules/locutus/php/funchand/call_user_func_array.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/funchand/call_user_func_array.js"],"names":["module","exports","call_user_func_array","cb","parameters","$global","window","global","func","scope","validJSFunction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QJ,QAAQF,GAAG,CAAH,CAAR,CAAR;AACD,OAFD,MAEO,IAAIA,GAAG,CAAH,EAAMQ,KAAN,CAAYD,0BAAZ,CAAJ,EAA6C;AAClDD,gBAAQQ,KAAKd,GAAG,CAAH,CAAL,CAAR,CADkD,CAC9B;AACrB;AACF,KAND,MAMO,IAAI,QAAOA,GAAG,CAAH,CAAP,MAAiB,QAArB,EAA+B;AACpCM,cAAQN,GAAG,CAAH,CAAR;AACD;AACF,GAlBM,MAkBA,IAAI,OAAOA,EAAP,KAAc,UAAlB,EAA8B;AACnCK,WAAOL,EAAP;AACD;;AAED,MAAI,OAAOK,IAAP,KAAgB,UAApB,EAAgC;AAC9B,UAAM,IAAIU,KAAJ,CAAUV,OAAO,0BAAjB,CAAN;AACD;;AAED,SAAOA,KAAKW,KAAL,CAAWV,KAAX,EAAkBL,UAAlB,CAAP;AACD,CAxDD","file":"call_user_func_array.js","sourcesContent":["module.exports = function call_user_func_array (cb, parameters) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/call_user_func_array/\n // original by: Thiago Mata (http://thiagomata.blog.com)\n // revised by: Jon Hohle\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Diplom@t (http://difane.com/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Depending on the `cb` that is passed,\n // note 1: this function can use `eval` and/or `new Function`.\n // note 1: The `eval` input is however checked to only allow valid function names,\n // note 1: So it should not be unsafer than uses without eval (seeing as you can)\n // note 1: already pass any function to be executed here.\n // example 1: call_user_func_array('isNaN', ['a'])\n // returns 1: true\n // example 2: call_user_func_array('isNaN', [1])\n // returns 2: false\n\n var $global = (typeof window !== 'undefined' ? window : global)\n var func\n var scope = null\n\n var validJSFunctionNamePattern = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/\n\n if (typeof cb === 'string') {\n if (typeof $global[cb] === 'function') {\n func = $global[cb]\n } else if (cb.match(validJSFunctionNamePattern)) {\n func = (new Function(null, 'return ' + cb)()) // eslint-disable-line no-new-func\n }\n } else if (Object.prototype.toString.call(cb) === '[object Array]') {\n if (typeof cb[0] === 'string') {\n if (cb[0].match(validJSFunctionNamePattern)) {\n func = eval(cb[0] + \"['\" + cb[1] + \"']\") // eslint-disable-line no-eval\n }\n } else {\n func = cb[0][cb[1]]\n }\n\n if (typeof cb[0] === 'string') {\n if (typeof $global[cb[0]] === 'function') {\n scope = $global[cb[0]]\n } else if (cb[0].match(validJSFunctionNamePattern)) {\n scope = eval(cb[0]) // eslint-disable-line no-eval\n }\n } else if (typeof cb[0] === 'object') {\n scope = cb[0]\n }\n } else if (typeof cb === 'function') {\n func = cb\n }\n\n if (typeof func !== 'function') {\n throw new Error(func + ' is not a valid function')\n }\n\n return func.apply(scope, parameters)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/create_function.js b/node_modules/locutus/php/funchand/create_function.js
deleted file mode 100644
index 1d75b5d..0000000
--- a/node_modules/locutus/php/funchand/create_function.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function create_function(args, code) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/create_function/
- // original by: Johnny Mast (http://www.phpvrouwen.nl)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $f = create_function('a, b', 'return (a + b)')
- // example 1: $f(1, 2)
- // returns 1: 3
-
- try {
- return Function.apply(null, args.split(',').concat(code));
- } catch (e) {
- return false;
- }
-};
-//# sourceMappingURL=create_function.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/create_function.js.map b/node_modules/locutus/php/funchand/create_function.js.map
deleted file mode 100644
index 0b447a5..0000000
--- a/node_modules/locutus/php/funchand/create_function.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/funchand/create_function.js"],"names":["module","exports","create_function","args","code","Function","apply","split","concat","e"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,IAA1B,EAAgCC,IAAhC,EAAsC;AAAE;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI;AACF,WAAOC,SAASC,KAAT,CAAe,IAAf,EAAqBH,KAAKI,KAAL,CAAW,GAAX,EAAgBC,MAAhB,CAAuBJ,IAAvB,CAArB,CAAP;AACD,GAFD,CAEE,OAAOK,CAAP,EAAU;AACV,WAAO,KAAP;AACD;AACF,CAbD","file":"create_function.js","sourcesContent":["module.exports = function create_function (args, code) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/create_function/\n // original by: Johnny Mast (http://www.phpvrouwen.nl)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $f = create_function('a, b', 'return (a + b)')\n // example 1: $f(1, 2)\n // returns 1: 3\n\n try {\n return Function.apply(null, args.split(',').concat(code))\n } catch (e) {\n return false\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/function_exists.js b/node_modules/locutus/php/funchand/function_exists.js
deleted file mode 100644
index 5c8aa99..0000000
--- a/node_modules/locutus/php/funchand/function_exists.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-module.exports = function function_exists(funcName) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/function_exists/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Steve Clay
- // improved by: Legaev Andrey
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: function_exists('isFinite')
- // returns 1: true
- // test: skip-1
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- if (typeof funcName === 'string') {
- funcName = $global[funcName];
- }
-
- return typeof funcName === 'function';
-};
-//# sourceMappingURL=function_exists.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/function_exists.js.map b/node_modules/locutus/php/funchand/function_exists.js.map
deleted file mode 100644
index 097d186..0000000
--- a/node_modules/locutus/php/funchand/function_exists.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/funchand/function_exists.js"],"names":["module","exports","function_exists","funcName","$global","window","global"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,QAA1B,EAAoC;AAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAEA,MAAI,OAAOH,QAAP,KAAoB,QAAxB,EAAkC;AAChCA,eAAWC,QAAQD,QAAR,CAAX;AACD;;AAED,SAAO,OAAOA,QAAP,KAAoB,UAA3B;AACD,CAjBD","file":"function_exists.js","sourcesContent":["module.exports = function function_exists (funcName) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/function_exists/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Steve Clay\n // improved by: Legaev Andrey\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: function_exists('isFinite')\n // returns 1: true\n // test: skip-1\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n if (typeof funcName === 'string') {\n funcName = $global[funcName]\n }\n\n return typeof funcName === 'function'\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/get_defined_functions.js b/node_modules/locutus/php/funchand/get_defined_functions.js
deleted file mode 100644
index 1945d6b..0000000
--- a/node_modules/locutus/php/funchand/get_defined_functions.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function get_defined_functions() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/get_defined_functions/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Test case 1: If get_defined_functions can find
- // note 1: itself in the defined functions, it worked :)
- // example 1: function test_in_array (array, p_val) {for(var i = 0, l = array.length; i < l; i++) {if (array[i] === p_val) return true} return false}
- // example 1: var $funcs = get_defined_functions()
- // example 1: var $found = test_in_array($funcs, 'get_defined_functions')
- // example 1: var $result = $found
- // returns 1: true
- // test: skip-1
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- var i = '';
- var arr = [];
- var already = {};
-
- for (i in $global) {
- try {
- if (typeof $global[i] === 'function') {
- if (!already[i]) {
- already[i] = 1;
- arr.push(i);
- }
- } else if (_typeof($global[i]) === 'object') {
- for (var j in $global[i]) {
- if (typeof $global[j] === 'function' && $global[j] && !already[j]) {
- already[j] = 1;
- arr.push(j);
- }
- }
- }
- } catch (e) {
- // Some objects in Firefox throw exceptions when their
- // properties are accessed (e.g., sessionStorage)
- }
- }
-
- return arr;
-};
-//# sourceMappingURL=get_defined_functions.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/get_defined_functions.js.map b/node_modules/locutus/php/funchand/get_defined_functions.js.map
deleted file mode 100644
index a79d768..0000000
--- a/node_modules/locutus/php/funchand/get_defined_functions.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/funchand/get_defined_functions.js"],"names":["module","exports","get_defined_functions","$global","window","global","$locutus","php","i","arr","already","push","j","e"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,qBAAT,GAAkC;AAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,MAAIC,IAAI,EAAR;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,UAAU,EAAd;;AAEA,OAAKF,CAAL,IAAUL,OAAV,EAAmB;AACjB,QAAI;AACF,UAAI,OAAOA,QAAQK,CAAR,CAAP,KAAsB,UAA1B,EAAsC;AACpC,YAAI,CAACE,QAAQF,CAAR,CAAL,EAAiB;AACfE,kBAAQF,CAAR,IAAa,CAAb;AACAC,cAAIE,IAAJ,CAASH,CAAT;AACD;AACF,OALD,MAKO,IAAI,QAAOL,QAAQK,CAAR,CAAP,MAAsB,QAA1B,EAAoC;AACzC,aAAK,IAAII,CAAT,IAAcT,QAAQK,CAAR,CAAd,EAA0B;AACxB,cAAI,OAAOL,QAAQS,CAAR,CAAP,KAAsB,UAAtB,IAAoCT,QAAQS,CAAR,CAApC,IAAkD,CAACF,QAAQE,CAAR,CAAvD,EAAmE;AACjEF,oBAAQE,CAAR,IAAa,CAAb;AACAH,gBAAIE,IAAJ,CAASC,CAAT;AACD;AACF;AACF;AACF,KAdD,CAcE,OAAOC,CAAP,EAAU;AACV;AACA;AACD;AACF;;AAED,SAAOJ,GAAP;AACD,CA5CD","file":"get_defined_functions.js","sourcesContent":["module.exports = function get_defined_functions () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/get_defined_functions/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Test case 1: If get_defined_functions can find\n // note 1: itself in the defined functions, it worked :)\n // example 1: function test_in_array (array, p_val) {for(var i = 0, l = array.length; i < l; i++) {if (array[i] === p_val) return true} return false}\n // example 1: var $funcs = get_defined_functions()\n // example 1: var $found = test_in_array($funcs, 'get_defined_functions')\n // example 1: var $result = $found\n // returns 1: true\n // test: skip-1\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n var i = ''\n var arr = []\n var already = {}\n\n for (i in $global) {\n try {\n if (typeof $global[i] === 'function') {\n if (!already[i]) {\n already[i] = 1\n arr.push(i)\n }\n } else if (typeof $global[i] === 'object') {\n for (var j in $global[i]) {\n if (typeof $global[j] === 'function' && $global[j] && !already[j]) {\n already[j] = 1\n arr.push(j)\n }\n }\n }\n } catch (e) {\n // Some objects in Firefox throw exceptions when their\n // properties are accessed (e.g., sessionStorage)\n }\n }\n\n return arr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/index.js b/node_modules/locutus/php/funchand/index.js
deleted file mode 100644
index ffc1495..0000000
--- a/node_modules/locutus/php/funchand/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports['call_user_func'] = require('./call_user_func');
-module.exports['call_user_func_array'] = require('./call_user_func_array');
-module.exports['create_function'] = require('./create_function');
-module.exports['function_exists'] = require('./function_exists');
-module.exports['get_defined_functions'] = require('./get_defined_functions');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/funchand/index.js.map b/node_modules/locutus/php/funchand/index.js.map
deleted file mode 100644
index e7c5372..0000000
--- a/node_modules/locutus/php/funchand/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/funchand/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,sBAAf,IAAyCC,QAAQ,wBAAR,CAAzC;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC;AACAF,OAAOC,OAAP,CAAe,uBAAf,IAA0CC,QAAQ,yBAAR,CAA1C","file":"index.js","sourcesContent":["module.exports['call_user_func'] = require('./call_user_func')\nmodule.exports['call_user_func_array'] = require('./call_user_func_array')\nmodule.exports['create_function'] = require('./create_function')\nmodule.exports['function_exists'] = require('./function_exists')\nmodule.exports['get_defined_functions'] = require('./get_defined_functions')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/i18n/i18n_loc_get_default.js b/node_modules/locutus/php/i18n/i18n_loc_get_default.js
deleted file mode 100644
index 430d000..0000000
--- a/node_modules/locutus/php/i18n/i18n_loc_get_default.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function i18n_loc_get_default() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/i18n_loc_get_default/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Renamed in PHP6 from locale_get_default(). Not listed yet at php.net.
- // note 1: List of locales at <http://demo.icu-project.org/icu-bin/locexp>
- // note 1: To be usable with sort() if it is passed the `SORT_LOCALE_STRING`
- // note 1: sorting flag: http://php.net/manual/en/function.sort.php
- // example 1: i18n_loc_get_default()
- // returns 1: 'en_US_POSIX'
- // example 2: i18n_loc_set_default('pt_PT')
- // example 2: i18n_loc_get_default()
- // returns 2: 'pt_PT'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- return $locutus.php.locale_default || 'en_US_POSIX';
-};
-//# sourceMappingURL=i18n_loc_get_default.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/i18n/i18n_loc_get_default.js.map b/node_modules/locutus/php/i18n/i18n_loc_get_default.js.map
deleted file mode 100644
index c796206..0000000
--- a/node_modules/locutus/php/i18n/i18n_loc_get_default.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/i18n/i18n_loc_get_default.js"],"names":["module","exports","i18n_loc_get_default","$global","window","global","$locutus","php","locales","locale_default"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,oBAAT,GAAiC;AAAE;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,OAAb,GAAuBF,SAASC,GAAT,CAAaC,OAAb,IAAwB,EAA/C;;AAEA,SAAOF,SAASC,GAAT,CAAaE,cAAb,IAA+B,aAAtC;AACD,CApBD","file":"i18n_loc_get_default.js","sourcesContent":["module.exports = function i18n_loc_get_default () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/i18n_loc_get_default/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Renamed in PHP6 from locale_get_default(). Not listed yet at php.net.\n // note 1: List of locales at <http://demo.icu-project.org/icu-bin/locexp>\n // note 1: To be usable with sort() if it is passed the `SORT_LOCALE_STRING`\n // note 1: sorting flag: http://php.net/manual/en/function.sort.php\n // example 1: i18n_loc_get_default()\n // returns 1: 'en_US_POSIX'\n // example 2: i18n_loc_set_default('pt_PT')\n // example 2: i18n_loc_get_default()\n // returns 2: 'pt_PT'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n return $locutus.php.locale_default || 'en_US_POSIX'\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/i18n/i18n_loc_set_default.js b/node_modules/locutus/php/i18n/i18n_loc_set_default.js
deleted file mode 100644
index a8568fa..0000000
--- a/node_modules/locutus/php/i18n/i18n_loc_set_default.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = function i18n_loc_set_default(name) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/i18n_loc_set_default/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Renamed in PHP6 from locale_set_default(). Not listed yet at php.net
- // note 1: List of locales at http://demo.icu-project.org/icu-bin/locexp (use for implementing other locales here)
- // note 1: To be usable with sort() if it is passed the SORT_LOCALE_STRING sorting flag: http://php.net/manual/en/function.sort.php
- // example 1: i18n_loc_set_default('pt_PT')
- // returns 1: true
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.locales = $locutus.php.locales || {};
-
- $locutus.php.locales.en_US_POSIX = {
- sorting: function sorting(str1, str2) {
- // @todo: This one taken from strcmp, but need for other locales;
- // we don't use localeCompare since its locale is not settable
- return str1 === str2 ? 0 : str1 > str2 ? 1 : -1;
- }
- };
-
- $locutus.php.locale_default = name;
- return true;
-};
-//# sourceMappingURL=i18n_loc_set_default.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/i18n/i18n_loc_set_default.js.map b/node_modules/locutus/php/i18n/i18n_loc_set_default.js.map
deleted file mode 100644
index 178b31b..0000000
--- a/node_modules/locutus/php/i18n/i18n_loc_set_default.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/i18n/i18n_loc_set_default.js"],"names":["module","exports","i18n_loc_set_default","name","$global","window","global","$locutus","php","locales","en_US_POSIX","sorting","str1","str2","locale_default"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,oBAAT,CAA+BC,IAA/B,EAAqC;AAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,OAAb,GAAuBF,SAASC,GAAT,CAAaC,OAAb,IAAwB,EAA/C;;AAEAF,WAASC,GAAT,CAAaC,OAAb,CAAqBC,WAArB,GAAmC;AACjCC,aAAS,iBAAUC,IAAV,EAAgBC,IAAhB,EAAsB;AAC7B;AACA;AACA,aAAQD,SAASC,IAAV,GAAkB,CAAlB,GAAwBD,OAAOC,IAAR,GAAgB,CAAhB,GAAoB,CAAC,CAAnD;AACD;AALgC,GAAnC;;AAQAN,WAASC,GAAT,CAAaM,cAAb,GAA8BX,IAA9B;AACA,SAAO,IAAP;AACD,CAzBD","file":"i18n_loc_set_default.js","sourcesContent":["module.exports = function i18n_loc_set_default (name) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/i18n_loc_set_default/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Renamed in PHP6 from locale_set_default(). Not listed yet at php.net\n // note 1: List of locales at http://demo.icu-project.org/icu-bin/locexp (use for implementing other locales here)\n // note 1: To be usable with sort() if it is passed the SORT_LOCALE_STRING sorting flag: http://php.net/manual/en/function.sort.php\n // example 1: i18n_loc_set_default('pt_PT')\n // returns 1: true\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.locales = $locutus.php.locales || {}\n\n $locutus.php.locales.en_US_POSIX = {\n sorting: function (str1, str2) {\n // @todo: This one taken from strcmp, but need for other locales;\n // we don't use localeCompare since its locale is not settable\n return (str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1)\n }\n }\n\n $locutus.php.locale_default = name\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/i18n/index.js b/node_modules/locutus/php/i18n/index.js
deleted file mode 100644
index c28a150..0000000
--- a/node_modules/locutus/php/i18n/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['i18n_loc_get_default'] = require('./i18n_loc_get_default');
-module.exports['i18n_loc_set_default'] = require('./i18n_loc_set_default');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/i18n/index.js.map b/node_modules/locutus/php/i18n/index.js.map
deleted file mode 100644
index ad05268..0000000
--- a/node_modules/locutus/php/i18n/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/i18n/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,sBAAf,IAAyCC,QAAQ,wBAAR,CAAzC;AACAF,OAAOC,OAAP,CAAe,sBAAf,IAAyCC,QAAQ,wBAAR,CAAzC","file":"index.js","sourcesContent":["module.exports['i18n_loc_get_default'] = require('./i18n_loc_get_default')\nmodule.exports['i18n_loc_set_default'] = require('./i18n_loc_set_default')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/index.js b/node_modules/locutus/php/index.js
deleted file mode 100644
index 9547369..0000000
--- a/node_modules/locutus/php/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-module.exports['array'] = require('./array');
-module.exports['bc'] = require('./bc');
-module.exports['ctype'] = require('./ctype');
-module.exports['datetime'] = require('./datetime');
-module.exports['exec'] = require('./exec');
-module.exports['filesystem'] = require('./filesystem');
-module.exports['funchand'] = require('./funchand');
-module.exports['i18n'] = require('./i18n');
-module.exports['info'] = require('./info');
-module.exports['json'] = require('./json');
-module.exports['math'] = require('./math');
-module.exports['misc'] = require('./misc');
-module.exports['net-gopher'] = require('./net-gopher');
-module.exports['network'] = require('./network');
-module.exports['pcre'] = require('./pcre');
-module.exports['strings'] = require('./strings');
-module.exports['url'] = require('./url');
-module.exports['var'] = require('./var');
-module.exports['xdiff'] = require('./xdiff');
-module.exports['xml'] = require('./xml');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/index.js.map b/node_modules/locutus/php/index.js.map
deleted file mode 100644
index 1720137..0000000
--- a/node_modules/locutus/php/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/php/index.js"],"names":["module","exports","require"],"mappings":";;AA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('./array')\nmodule.exports['bc'] = require('./bc')\nmodule.exports['ctype'] = require('./ctype')\nmodule.exports['datetime'] = require('./datetime')\nmodule.exports['exec'] = require('./exec')\nmodule.exports['filesystem'] = require('./filesystem')\nmodule.exports['funchand'] = require('./funchand')\nmodule.exports['i18n'] = require('./i18n')\nmodule.exports['info'] = require('./info')\nmodule.exports['json'] = require('./json')\nmodule.exports['math'] = require('./math')\nmodule.exports['misc'] = require('./misc')\nmodule.exports['net-gopher'] = require('./net-gopher')\nmodule.exports['network'] = require('./network')\nmodule.exports['pcre'] = require('./pcre')\nmodule.exports['strings'] = require('./strings')\nmodule.exports['url'] = require('./url')\nmodule.exports['var'] = require('./var')\nmodule.exports['xdiff'] = require('./xdiff')\nmodule.exports['xml'] = require('./xml')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/assert_options.js b/node_modules/locutus/php/info/assert_options.js
deleted file mode 100644
index 76aacdc..0000000
--- a/node_modules/locutus/php/info/assert_options.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-module.exports = function assert_options(what, value) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/assert_options/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: assert_options('ASSERT_CALLBACK')
- // returns 1: null
-
- var iniKey, defaultVal;
- switch (what) {
- case 'ASSERT_ACTIVE':
- iniKey = 'assert.active';
- defaultVal = 1;
- break;
- case 'ASSERT_WARNING':
- iniKey = 'assert.warning';
- defaultVal = 1;
- var msg = 'We have not yet implemented warnings for us to throw ';
- msg += 'in JavaScript (assert_options())';
- throw new Error(msg);
- case 'ASSERT_BAIL':
- iniKey = 'assert.bail';
- defaultVal = 0;
- break;
- case 'ASSERT_QUIET_EVAL':
- iniKey = 'assert.quiet_eval';
- defaultVal = 0;
- break;
- case 'ASSERT_CALLBACK':
- iniKey = 'assert.callback';
- defaultVal = null;
- break;
- default:
- throw new Error('Improper type for assert_options()');
- }
-
- // I presume this is to be the most recent value, instead of the default value
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')(iniKey) : undefined) || defaultVal;
-
- return iniVal;
-};
-//# sourceMappingURL=assert_options.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/assert_options.js.map b/node_modules/locutus/php/info/assert_options.js.map
deleted file mode 100644
index d72f948..0000000
--- a/node_modules/locutus/php/info/assert_options.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/assert_options.js"],"names":["module","exports","assert_options","what","value","iniKey","defaultVal","msg","Error","iniVal","require","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,IAAzB,EAA+BC,KAA/B,EAAsC;AAAE;AACvD;AACA;AACA;AACA;;AAEA,MAAIC,MAAJ,EAAYC,UAAZ;AACA,UAAQH,IAAR;AACE,SAAK,eAAL;AACEE,eAAS,eAAT;AACAC,mBAAa,CAAb;AACA;AACF,SAAK,gBAAL;AACED,eAAS,gBAAT;AACAC,mBAAa,CAAb;AACA,UAAIC,MAAM,uDAAV;AACAA,aAAO,kCAAP;AACA,YAAM,IAAIC,KAAJ,CAAUD,GAAV,CAAN;AACF,SAAK,aAAL;AACEF,eAAS,aAAT;AACAC,mBAAa,CAAb;AACA;AACF,SAAK,mBAAL;AACED,eAAS,mBAAT;AACAC,mBAAa,CAAb;AACA;AACF,SAAK,iBAAL;AACED,eAAS,iBAAT;AACAC,mBAAa,IAAb;AACA;AACF;AACE,YAAM,IAAIE,KAAJ,CAAU,oCAAV,CAAN;AAxBJ;;AA2BA;AACA,MAAIC,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2BL,MAA3B,CAAjC,GAAsEM,SAAvE,KAAqFL,UAAlG;;AAEA,SAAOG,MAAP;AACD,CAtCD","file":"assert_options.js","sourcesContent":["module.exports = function assert_options (what, value) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/assert_options/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: assert_options('ASSERT_CALLBACK')\n // returns 1: null\n\n var iniKey, defaultVal\n switch (what) {\n case 'ASSERT_ACTIVE':\n iniKey = 'assert.active'\n defaultVal = 1\n break\n case 'ASSERT_WARNING':\n iniKey = 'assert.warning'\n defaultVal = 1\n var msg = 'We have not yet implemented warnings for us to throw '\n msg += 'in JavaScript (assert_options())'\n throw new Error(msg)\n case 'ASSERT_BAIL':\n iniKey = 'assert.bail'\n defaultVal = 0\n break\n case 'ASSERT_QUIET_EVAL':\n iniKey = 'assert.quiet_eval'\n defaultVal = 0\n break\n case 'ASSERT_CALLBACK':\n iniKey = 'assert.callback'\n defaultVal = null\n break\n default:\n throw new Error('Improper type for assert_options()')\n }\n\n // I presume this is to be the most recent value, instead of the default value\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')(iniKey) : undefined) || defaultVal\n\n return iniVal\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/getenv.js b/node_modules/locutus/php/info/getenv.js
deleted file mode 100644
index 8193e95..0000000
--- a/node_modules/locutus/php/info/getenv.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function getenv(varname) {
- // discuss at: http://locutus.io/php/getenv/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: getenv('LC_ALL')
- // returns 1: false
-
- if (typeof process !== 'undefined' || !process.env || !process.env[varname]) {
- return false;
- }
-
- return process.env[varname];
-};
-//# sourceMappingURL=getenv.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/getenv.js.map b/node_modules/locutus/php/info/getenv.js.map
deleted file mode 100644
index 5c877d3..0000000
--- a/node_modules/locutus/php/info/getenv.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/getenv.js"],"names":["module","exports","getenv","varname","process","env"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,OAAjB,EAA0B;AACzC;AACA;AACA;AACA;;AAEA,MAAI,OAAOC,OAAP,KAAmB,WAAnB,IAAkC,CAACA,QAAQC,GAA3C,IAAkD,CAACD,QAAQC,GAAR,CAAYF,OAAZ,CAAvD,EAA6E;AAC3E,WAAO,KAAP;AACD;;AAED,SAAOC,QAAQC,GAAR,CAAYF,OAAZ,CAAP;AACD,CAXD","file":"getenv.js","sourcesContent":["module.exports = function getenv (varname) {\n // discuss at: http://locutus.io/php/getenv/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: getenv('LC_ALL')\n // returns 1: false\n\n if (typeof process !== 'undefined' || !process.env || !process.env[varname]) {\n return false\n }\n\n return process.env[varname]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/index.js b/node_modules/locutus/php/info/index.js
deleted file mode 100644
index bad9c52..0000000
--- a/node_modules/locutus/php/info/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports['assert_options'] = require('./assert_options');
-module.exports['getenv'] = require('./getenv');
-module.exports['ini_get'] = require('./ini_get');
-module.exports['ini_set'] = require('./ini_set');
-module.exports['set_time_limit'] = require('./set_time_limit');
-module.exports['version_compare'] = require('./version_compare');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/index.js.map b/node_modules/locutus/php/info/index.js.map
deleted file mode 100644
index 31858db..0000000
--- a/node_modules/locutus/php/info/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC","file":"index.js","sourcesContent":["module.exports['assert_options'] = require('./assert_options')\nmodule.exports['getenv'] = require('./getenv')\nmodule.exports['ini_get'] = require('./ini_get')\nmodule.exports['ini_set'] = require('./ini_set')\nmodule.exports['set_time_limit'] = require('./set_time_limit')\nmodule.exports['version_compare'] = require('./version_compare')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/ini_get.js b/node_modules/locutus/php/info/ini_get.js
deleted file mode 100644
index 4a4f052..0000000
--- a/node_modules/locutus/php/info/ini_get.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-module.exports = function ini_get(varname) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ini_get/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: The ini values must be set by ini_set or manually within an ini file
- // example 1: ini_set('date.timezone', 'Asia/Hong_Kong')
- // example 1: ini_get('date.timezone')
- // returns 1: 'Asia/Hong_Kong'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.ini = $locutus.php.ini || {};
-
- if ($locutus.php.ini[varname] && $locutus.php.ini[varname].local_value !== undefined) {
- if ($locutus.php.ini[varname].local_value === null) {
- return '';
- }
- return $locutus.php.ini[varname].local_value;
- }
-
- return '';
-};
-//# sourceMappingURL=ini_get.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/ini_get.js.map b/node_modules/locutus/php/info/ini_get.js.map
deleted file mode 100644
index ed77eb0..0000000
--- a/node_modules/locutus/php/info/ini_get.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/ini_get.js"],"names":["module","exports","ini_get","varname","$global","window","global","$locutus","php","ini","local_value","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,OAAlB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;AACAD,WAASC,GAAT,CAAaC,GAAb,GAAmBF,SAASC,GAAT,CAAaC,GAAb,IAAoB,EAAvC;;AAEA,MAAIF,SAASC,GAAT,CAAaC,GAAb,CAAiBN,OAAjB,KAA6BI,SAASC,GAAT,CAAaC,GAAb,CAAiBN,OAAjB,EAA0BO,WAA1B,KAA0CC,SAA3E,EAAsF;AACpF,QAAIJ,SAASC,GAAT,CAAaC,GAAb,CAAiBN,OAAjB,EAA0BO,WAA1B,KAA0C,IAA9C,EAAoD;AAClD,aAAO,EAAP;AACD;AACD,WAAOH,SAASC,GAAT,CAAaC,GAAb,CAAiBN,OAAjB,EAA0BO,WAAjC;AACD;;AAED,SAAO,EAAP;AACD,CAtBD","file":"ini_get.js","sourcesContent":["module.exports = function ini_get (varname) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ini_get/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: The ini values must be set by ini_set or manually within an ini file\n // example 1: ini_set('date.timezone', 'Asia/Hong_Kong')\n // example 1: ini_get('date.timezone')\n // returns 1: 'Asia/Hong_Kong'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.ini = $locutus.php.ini || {}\n\n if ($locutus.php.ini[varname] && $locutus.php.ini[varname].local_value !== undefined) {\n if ($locutus.php.ini[varname].local_value === null) {\n return ''\n }\n return $locutus.php.ini[varname].local_value\n }\n\n return ''\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/ini_set.js b/node_modules/locutus/php/info/ini_set.js
deleted file mode 100644
index efd0ddc..0000000
--- a/node_modules/locutus/php/info/ini_set.js
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-module.exports = function ini_set(varname, newvalue) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/ini_set/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: This will not set a global_value or access level for the ini item
- // example 1: ini_set('date.timezone', 'Asia/Hong_Kong')
- // example 1: ini_set('date.timezone', 'America/Chicago')
- // returns 1: 'Asia/Hong_Kong'
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
- $locutus.php.ini = $locutus.php.ini || {};
-
- $locutus.php.ini = $locutus.php.ini || {};
- $locutus.php.ini[varname] = $locutus.php.ini[varname] || {};
-
- var oldval = $locutus.php.ini[varname].local_value;
-
- var lowerStr = (newvalue + '').toLowerCase().trim();
- if (newvalue === true || lowerStr === 'on' || lowerStr === '1') {
- newvalue = 'on';
- }
- if (newvalue === false || lowerStr === 'off' || lowerStr === '0') {
- newvalue = 'off';
- }
-
- var _setArr = function _setArr(oldval) {
- // Although these are set individually, they are all accumulated
- if (typeof oldval === 'undefined') {
- $locutus.ini[varname].local_value = [];
- }
- $locutus.ini[varname].local_value.push(newvalue);
- };
-
- switch (varname) {
- case 'extension':
- _setArr(oldval, newvalue);
- break;
- default:
- $locutus.php.ini[varname].local_value = newvalue;
- break;
- }
-
- return oldval;
-};
-//# sourceMappingURL=ini_set.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/ini_set.js.map b/node_modules/locutus/php/info/ini_set.js.map
deleted file mode 100644
index 94e452e..0000000
--- a/node_modules/locutus/php/info/ini_set.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/ini_set.js"],"names":["module","exports","ini_set","varname","newvalue","$global","window","global","$locutus","php","ini","oldval","local_value","l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AAuCb,QAAvC;AACD,GAND;;AAQA,UAAQD,OAAR;AACE,SAAK,WAAL;AACEa,cAAQL,MAAR,EAAgBP,QAAhB;AACA;AACF;AACEI,eAASC,GAAT,CAAaC,GAAb,CAAiBP,OAAjB,EAA0BS,WAA1B,GAAwCR,QAAxC;AACA;AANJ;;AASA,SAAOO,MAAP;AACD,CA7CD","file":"ini_set.js","sourcesContent":["module.exports = function ini_set (varname, newvalue) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/ini_set/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: This will not set a global_value or access level for the ini item\n // example 1: ini_set('date.timezone', 'Asia/Hong_Kong')\n // example 1: ini_set('date.timezone', 'America/Chicago')\n // returns 1: 'Asia/Hong_Kong'\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n $locutus.php.ini = $locutus.php.ini || {}\n\n $locutus.php.ini = $locutus.php.ini || {}\n $locutus.php.ini[varname] = $locutus.php.ini[varname] || {}\n\n var oldval = $locutus.php.ini[varname].local_value\n\n var lowerStr = (newvalue + '').toLowerCase().trim()\n if (newvalue === true || lowerStr === 'on' || lowerStr === '1') {\n newvalue = 'on'\n }\n if (newvalue === false || lowerStr === 'off' || lowerStr === '0') {\n newvalue = 'off'\n }\n\n var _setArr = function (oldval) {\n // Although these are set individually, they are all accumulated\n if (typeof oldval === 'undefined') {\n $locutus.ini[varname].local_value = []\n }\n $locutus.ini[varname].local_value.push(newvalue)\n }\n\n switch (varname) {\n case 'extension':\n _setArr(oldval, newvalue)\n break\n default:\n $locutus.php.ini[varname].local_value = newvalue\n break\n }\n\n return oldval\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/set_time_limit.js b/node_modules/locutus/php/info/set_time_limit.js
deleted file mode 100644
index 63422eb..0000000
--- a/node_modules/locutus/php/info/set_time_limit.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-module.exports = function set_time_limit(seconds) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/set_time_limit/
- // original by: Brett Zamir (http://brett-zamir.me)
- // test: skip-all
- // example 1: set_time_limit(4)
- // returns 1: undefined
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- setTimeout(function () {
- if (!$locutus.php.timeoutStatus) {
- $locutus.php.timeoutStatus = true;
- }
- throw new Error('Maximum execution time exceeded');
- }, seconds * 1000);
-};
-//# sourceMappingURL=set_time_limit.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/set_time_limit.js.map b/node_modules/locutus/php/info/set_time_limit.js.map
deleted file mode 100644
index 51bbf57..0000000
--- a/node_modules/locutus/php/info/set_time_limit.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/set_time_limit.js"],"names":["module","exports","set_time_limit","seconds","$global","window","global","$locutus","php","setTimeout","timeoutStatus","Error"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,OAAzB,EAAkC;AAAE;AACnD;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEAC,aAAW,YAAY;AACrB,QAAI,CAACF,SAASC,GAAT,CAAaE,aAAlB,EAAiC;AAC/BH,eAASC,GAAT,CAAaE,aAAb,GAA6B,IAA7B;AACD;AACD,UAAM,IAAIC,KAAJ,CAAU,iCAAV,CAAN;AACD,GALD,EAKGR,UAAU,IALb;AAMD,CAlBD","file":"set_time_limit.js","sourcesContent":["module.exports = function set_time_limit (seconds) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/set_time_limit/\n // original by: Brett Zamir (http://brett-zamir.me)\n // test: skip-all\n // example 1: set_time_limit(4)\n // returns 1: undefined\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n setTimeout(function () {\n if (!$locutus.php.timeoutStatus) {\n $locutus.php.timeoutStatus = true\n }\n throw new Error('Maximum execution time exceeded')\n }, seconds * 1000)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/info/version_compare.js b/node_modules/locutus/php/info/version_compare.js
deleted file mode 100644
index 7f600d8..0000000
--- a/node_modules/locutus/php/info/version_compare.js
+++ /dev/null
@@ -1,118 +0,0 @@
-'use strict';
-
-module.exports = function version_compare(v1, v2, operator) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/version_compare/
- // original by: Philippe Jausions (http://pear.php.net/user/jausions)
- // original by: Aidan Lister (http://aidanlister.com/)
- // reimplemented by: Kankrelune (http://www.webfaktory.info/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Scott Baker
- // improved by: Theriault (https://github.com/Theriault)
- // example 1: version_compare('8.2.5rc', '8.2.5a')
- // returns 1: 1
- // example 2: version_compare('8.2.50', '8.2.52', '<')
- // returns 2: true
- // example 3: version_compare('5.3.0-dev', '5.3.0')
- // returns 3: -1
- // example 4: version_compare('4.1.0.52','4.01.0.51')
- // returns 4: 1
-
- // Important: compare must be initialized at 0.
- var i;
- var x;
- var compare = 0;
-
- // vm maps textual PHP versions to negatives so they're less than 0.
- // PHP currently defines these as CASE-SENSITIVE. It is important to
- // leave these as negatives so that they can come before numerical versions
- // and as if no letters were there to begin with.
- // (1alpha is < 1 and < 1.1 but > 1dev1)
- // If a non-numerical value can't be mapped to this table, it receives
- // -7 as its value.
- var vm = {
- 'dev': -6,
- 'alpha': -5,
- 'a': -5,
- 'beta': -4,
- 'b': -4,
- 'RC': -3,
- 'rc': -3,
- '#': -2,
- 'p': 1,
- 'pl': 1
- };
-
- // This function will be called to prepare each version argument.
- // It replaces every _, -, and + with a dot.
- // It surrounds any nonsequence of numbers/dots with dots.
- // It replaces sequences of dots with a single dot.
- // version_compare('4..0', '4.0') === 0
- // Important: A string of 0 length needs to be converted into a value
- // even less than an unexisting value in vm (-7), hence [-8].
- // It's also important to not strip spaces because of this.
- // version_compare('', ' ') === 1
- var _prepVersion = function _prepVersion(v) {
- v = ('' + v).replace(/[_\-+]/g, '.');
- v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.');
- return !v.length ? [-8] : v.split('.');
- };
- // This converts a version component to a number.
- // Empty component becomes 0.
- // Non-numerical component becomes a negative number.
- // Numerical component becomes itself as an integer.
- var _numVersion = function _numVersion(v) {
- return !v ? 0 : isNaN(v) ? vm[v] || -7 : parseInt(v, 10);
- };
-
- v1 = _prepVersion(v1);
- v2 = _prepVersion(v2);
- x = Math.max(v1.length, v2.length);
- for (i = 0; i < x; i++) {
- if (v1[i] === v2[i]) {
- continue;
- }
- v1[i] = _numVersion(v1[i]);
- v2[i] = _numVersion(v2[i]);
- if (v1[i] < v2[i]) {
- compare = -1;
- break;
- } else if (v1[i] > v2[i]) {
- compare = 1;
- break;
- }
- }
- if (!operator) {
- return compare;
- }
-
- // Important: operator is CASE-SENSITIVE.
- // "No operator" seems to be treated as "<."
- // Any other values seem to make the function return null.
- switch (operator) {
- case '>':
- case 'gt':
- return compare > 0;
- case '>=':
- case 'ge':
- return compare >= 0;
- case '<=':
- case 'le':
- return compare <= 0;
- case '===':
- case '=':
- case 'eq':
- return compare === 0;
- case '<>':
- case '!==':
- case 'ne':
- return compare !== 0;
- case '':
- case '<':
- case 'lt':
- return compare < 0;
- default:
- return null;
- }
-};
-//# sourceMappingURL=version_compare.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/info/version_compare.js.map b/node_modules/locutus/php/info/version_compare.js.map
deleted file mode 100644
index 7399852..0000000
--- a/node_modules/locutus/php/info/version_compare.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/info/version_compare.js"],"names":["module","exports","version_compare","v1","v2","operator","i","x","compare","vm","_prepVersion","v","replace","length","split","_numVersion","isNaN","parseInt","Math","max"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,EAA1B,EAA8BC,EAA9B,EAAkCC,QAAlC,EAA4C;AAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,UAAU,CAAd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAIC,KAAK;AACP,WAAO,CAAC,CADD;AAEP,aAAS,CAAC,CAFH;AAGP,SAAK,CAAC,CAHC;AAIP,YAAQ,CAAC,CAJF;AAKP,SAAK,CAAC,CALC;AAMP,UAAM,CAAC,CANA;AAOP,UAAM,CAAC,CAPA;AAQP,SAAK,CAAC,CARC;AASP,SAAK,CATE;AAUP,UAAM;AAVC,GAAT;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAIC,eAAe,SAAfA,YAAe,CAAUC,CAAV,EAAa;AAC9BA,QAAI,CAAC,KAAKA,CAAN,EAASC,OAAT,CAAiB,SAAjB,EAA4B,GAA5B,CAAJ;AACAD,QAAIA,EAAEC,OAAF,CAAU,YAAV,EAAwB,MAAxB,EAAgCA,OAAhC,CAAwC,SAAxC,EAAmD,GAAnD,CAAJ;AACA,WAAQ,CAACD,EAAEE,MAAH,GAAY,CAAC,CAAC,CAAF,CAAZ,GAAmBF,EAAEG,KAAF,CAAQ,GAAR,CAA3B;AACD,GAJD;AAKA;AACA;AACA;AACA;AACA,MAAIC,cAAc,SAAdA,WAAc,CAAUJ,CAAV,EAAa;AAC7B,WAAO,CAACA,CAAD,GAAK,CAAL,GAAUK,MAAML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D","file":"version_compare.js","sourcesContent":["module.exports = function version_compare (v1, v2, operator) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/version_compare/\n // original by: Philippe Jausions (http://pear.php.net/user/jausions)\n // original by: Aidan Lister (http://aidanlister.com/)\n // reimplemented by: Kankrelune (http://www.webfaktory.info/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Scott Baker\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: version_compare('8.2.5rc', '8.2.5a')\n // returns 1: 1\n // example 2: version_compare('8.2.50', '8.2.52', '<')\n // returns 2: true\n // example 3: version_compare('5.3.0-dev', '5.3.0')\n // returns 3: -1\n // example 4: version_compare('4.1.0.52','4.01.0.51')\n // returns 4: 1\n\n // Important: compare must be initialized at 0.\n var i\n var x\n var compare = 0\n\n // vm maps textual PHP versions to negatives so they're less than 0.\n // PHP currently defines these as CASE-SENSITIVE. It is important to\n // leave these as negatives so that they can come before numerical versions\n // and as if no letters were there to begin with.\n // (1alpha is < 1 and < 1.1 but > 1dev1)\n // If a non-numerical value can't be mapped to this table, it receives\n // -7 as its value.\n var vm = {\n 'dev': -6,\n 'alpha': -5,\n 'a': -5,\n 'beta': -4,\n 'b': -4,\n 'RC': -3,\n 'rc': -3,\n '#': -2,\n 'p': 1,\n 'pl': 1\n }\n\n // This function will be called to prepare each version argument.\n // It replaces every _, -, and + with a dot.\n // It surrounds any nonsequence of numbers/dots with dots.\n // It replaces sequences of dots with a single dot.\n // version_compare('4..0', '4.0') === 0\n // Important: A string of 0 length needs to be converted into a value\n // even less than an unexisting value in vm (-7), hence [-8].\n // It's also important to not strip spaces because of this.\n // version_compare('', ' ') === 1\n var _prepVersion = function (v) {\n v = ('' + v).replace(/[_\\-+]/g, '.')\n v = v.replace(/([^.\\d]+)/g, '.$1.').replace(/\\.{2,}/g, '.')\n return (!v.length ? [-8] : v.split('.'))\n }\n // This converts a version component to a number.\n // Empty component becomes 0.\n // Non-numerical component becomes a negative number.\n // Numerical component becomes itself as an integer.\n var _numVersion = function (v) {\n return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10))\n }\n\n v1 = _prepVersion(v1)\n v2 = _prepVersion(v2)\n x = Math.max(v1.length, v2.length)\n for (i = 0; i < x; i++) {\n if (v1[i] === v2[i]) {\n continue\n }\n v1[i] = _numVersion(v1[i])\n v2[i] = _numVersion(v2[i])\n if (v1[i] < v2[i]) {\n compare = -1\n break\n } else if (v1[i] > v2[i]) {\n compare = 1\n break\n }\n }\n if (!operator) {\n return compare\n }\n\n // Important: operator is CASE-SENSITIVE.\n // \"No operator\" seems to be treated as \"<.\"\n // Any other values seem to make the function return null.\n switch (operator) {\n case '>':\n case 'gt':\n return (compare > 0)\n case '>=':\n case 'ge':\n return (compare >= 0)\n case '<=':\n case 'le':\n return (compare <= 0)\n case '===':\n case '=':\n case 'eq':\n return (compare === 0)\n case '<>':\n case '!==':\n case 'ne':\n return (compare !== 0)\n case '':\n case '<':\n case 'lt':\n return (compare < 0)\n default:\n return null\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/json/index.js b/node_modules/locutus/php/json/index.js
deleted file mode 100644
index b764546..0000000
--- a/node_modules/locutus/php/json/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports['json_decode'] = require('./json_decode');
-module.exports['json_encode'] = require('./json_encode');
-module.exports['json_last_error'] = require('./json_last_error');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/json/index.js.map b/node_modules/locutus/php/json/index.js.map
deleted file mode 100644
index ff5466c..0000000
--- a/node_modules/locutus/php/json/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/json/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC","file":"index.js","sourcesContent":["module.exports['json_decode'] = require('./json_decode')\nmodule.exports['json_encode'] = require('./json_encode')\nmodule.exports['json_last_error'] = require('./json_last_error')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/json/json_decode.js b/node_modules/locutus/php/json/json_decode.js
deleted file mode 100644
index f372089..0000000
--- a/node_modules/locutus/php/json/json_decode.js
+++ /dev/null
@@ -1,88 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function json_decode(strJson) {
- // eslint-disable-line camelcase
- // discuss at: http://phpjs.org/functions/json_decode/
- // original by: Public Domain (http://www.json.org/json2.js)
- // reimplemented by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // improved by: T.J. Leahy
- // improved by: Michael White
- // note 1: If node or the browser does not offer JSON.parse,
- // note 1: this function falls backslash
- // note 1: to its own implementation using eval, and hence should be considered unsafe
- // example 1: json_decode('[ 1 ]')
- // returns 1: [1]
-
- /*
- http://www.JSON.org/json2.js
- 2008-11-19
- Public Domain.
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
- See http://www.JSON.org/js.html
- */
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- var json = $global.JSON;
- if ((typeof json === 'undefined' ? 'undefined' : _typeof(json)) === 'object' && typeof json.parse === 'function') {
- try {
- return json.parse(strJson);
- } catch (err) {
- if (!(err instanceof SyntaxError)) {
- throw new Error('Unexpected error type in json_decode()');
- }
-
- // usable by json_last_error()
- $locutus.php.last_error_json = 4;
- return null;
- }
- }
-
- var chars = ['\0', '\xAD', '\u0600-\u0604', '\u070F', '\u17B4', '\u17B5', '\u200C-\u200F', '\u2028-\u202F', '\u2060-\u206F', '\uFEFF', '\uFFF0-\uFFFF'].join('');
- var cx = new RegExp('[' + chars + ']', 'g');
- var j;
- var text = strJson;
-
- // Parsing happens in four stages. In the first stage, we replace certain
- // Unicode characters with escape sequences. JavaScript handles many characters
- // incorrectly, either silently deleting them, or treating them as line endings.
- cx.lastIndex = 0;
- if (cx.test(text)) {
- text = text.replace(cx, function (a) {
- return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- });
- }
-
- // In the second stage, we run the text against regular expressions that look
- // for non-JSON patterns. We are especially concerned with '()' and 'new'
- // because they can cause invocation, and '=' because it can cause mutation.
- // But just to be safe, we want to reject all unexpected forms.
- // We split the second stage into 4 regexp operations in order to work around
- // crippling inefficiencies in IE's and Safari's regexp engines. First we
- // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
- // replace all simple value tokens with ']' characters. Third, we delete all
- // open brackets that follow a colon or comma or that begin the text. Finally,
- // we look to see that the remaining characters are only whitespace or ']' or
- // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-
- var m = /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''));
-
- if (m) {
- // In the third stage we use the eval function to compile the text into a
- // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
- // in JavaScript: it can begin a block or an object literal. We wrap the text
- // in parens to eliminate the ambiguity.
- j = eval('(' + text + ')'); // eslint-disable-line no-eval
- return j;
- }
-
- // usable by json_last_error()
- $locutus.php.last_error_json = 4;
- return null;
-};
-//# sourceMappingURL=json_decode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/json/json_decode.js.map b/node_modules/locutus/php/json/json_decode.js.map
deleted file mode 100644
index ded6b7d..0000000
--- a/node_modules/locutus/php/json/json_decode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/json/json_decode.js"],"names":["module","exports","json_decode","strJson","$global","window","global","$locutus","php","json","JSON","parse","err","SyntaxError","Error","last_error_json","chars","join","cx","RegExp","j","text","lastIndex","test","replace","a","charCodeAt","toString","slice","m","eval"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,OAAtB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AAQA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,MAAIC,OAAOL,QAAQM,IAAnB;AACA,MAAI,QAAOD,IAAP,yCAAOA,IAAP,OAAgB,QAAhB,IAA4B,OAAOA,KAAKE,KAAZ,KAAsB,UAAtD,EAAkE;AAChE,QAAI;AACF,aAAOF,KAAKE,KAAL,CAAWR,OAAX,CAAP;AACD,KAFD,CAEE,OAAOS,GAAP,EAAY;AACZ,UAAI,EAAEA,eAAeC,WAAjB,CAAJ,EAAmC;AACjC,cAAM,IAAIC,KAAJ,CAAU,wCAAV,CAAN;AACD;;AAED;AACAP,eAASC,GAAT,CAAaO,eAAb,GAA+B,CAA/B;AACA,aAAO,IAAP;AACD;AACF;;AAED,MAAIC,QAAQ,CACV,IADU,EAEV,MAFU,EAGV,eAHU,EAIV,QAJU,EAKV,QALU,EAMV,QANU,EAOV,eAPU,EAQV,eARU,EASV,eATU,EAUV,QAVU,EAWV,eAXU,EAYVC,IAZU,CAYL,EAZK,CAAZ;AAaA,MAAIC,KAAK,IAAIC,MAAJ,CAAW,MAAMH,KAAN,GAAc,GAAzB,EAA8B,GAA9B,CAAT;AACA,MAAII,CAAJ;AACA,MAAIC,OAAOlB,OAAX;;AAEA;AACA;AACA;AACAe,KAAGI,SAAH,GAAe,CAAf;AACA,MAAIJ,GAAGK,IAAH,CAAQF,IAAR,CAAJ,EAAmB;AACjBA,WAAOA,KAAKG,OAAL,CAAaN,EAAb,EAAiB,UAAUO,CAAV,EAAa;AACnC,aAAO,QAAQ,CAAC,SAASA,EAAEC,UAAF,CAAa,CAAb,EACtBC,QADsB,CACb,EADa,CAAV,EAEZC,KAFY,CAEN,CAAC,CAFK,CAAf;AAGD,KAJM,CAAP;AAKD;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAK,eAAD,CACLN,IADK,CACAF,KAAKG,OAAL,CAAa,oCAAb,EAAmD,GAAnD,EACLA,OADK,CACG,iEADH,EACsE,GADtE,EAELA,OAFK,CAEG,sBAFH,EAE2B,EAF3B,CADA,CAAR;;AAKA,MAAIK,CAAJ,EAAO;AACL;AACA;AACA;AACA;AACAT,QAAIU,KAAK,MAAMT,IAAN,GAAa,GAAlB,CAAJ,CALK,CAKsB;AAC3B,WAAOD,CAAP;AACD;;AAED;AACAb,WAASC,GAAT,CAAaO,eAAb,GAA+B,CAA/B;AACA,SAAO,IAAP;AACD,CAlGD","file":"json_decode.js","sourcesContent":["module.exports = function json_decode (strJson) { // eslint-disable-line camelcase\n // discuss at: http://phpjs.org/functions/json_decode/\n // original by: Public Domain (http://www.json.org/json2.js)\n // reimplemented by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: T.J. Leahy\n // improved by: Michael White\n // note 1: If node or the browser does not offer JSON.parse,\n // note 1: this function falls backslash\n // note 1: to its own implementation using eval, and hence should be considered unsafe\n // example 1: json_decode('[ 1 ]')\n // returns 1: [1]\n\n /*\n http://www.JSON.org/json2.js\n 2008-11-19\n Public Domain.\n NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n See http://www.JSON.org/js.html\n */\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n var json = $global.JSON\n if (typeof json === 'object' && typeof json.parse === 'function') {\n try {\n return json.parse(strJson)\n } catch (err) {\n if (!(err instanceof SyntaxError)) {\n throw new Error('Unexpected error type in json_decode()')\n }\n\n // usable by json_last_error()\n $locutus.php.last_error_json = 4\n return null\n }\n }\n\n var chars = [\n '\\u0000',\n '\\u00ad',\n '\\u0600-\\u0604',\n '\\u070f',\n '\\u17b4',\n '\\u17b5',\n '\\u200c-\\u200f',\n '\\u2028-\\u202f',\n '\\u2060-\\u206f',\n '\\ufeff',\n '\\ufff0-\\uffff'\n ].join('')\n var cx = new RegExp('[' + chars + ']', 'g')\n var j\n var text = strJson\n\n // Parsing happens in four stages. In the first stage, we replace certain\n // Unicode characters with escape sequences. JavaScript handles many characters\n // incorrectly, either silently deleting them, or treating them as line endings.\n cx.lastIndex = 0\n if (cx.test(text)) {\n text = text.replace(cx, function (a) {\n return '\\\\u' + ('0000' + a.charCodeAt(0)\n .toString(16))\n .slice(-4)\n })\n }\n\n // In the second stage, we run the text against regular expressions that look\n // for non-JSON patterns. We are especially concerned with '()' and 'new'\n // because they can cause invocation, and '=' because it can cause mutation.\n // But just to be safe, we want to reject all unexpected forms.\n // We split the second stage into 4 regexp operations in order to work around\n // crippling inefficiencies in IE's and Safari's regexp engines. First we\n // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we\n // replace all simple value tokens with ']' characters. Third, we delete all\n // open brackets that follow a colon or comma or that begin the text. Finally,\n // we look to see that the remaining characters are only whitespace or ']' or\n // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.\n\n var m = (/^[\\],:{}\\s]*$/)\n .test(text.replace(/\\\\(?:[\"\\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')\n .replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+-]?\\d+)?/g, ']')\n .replace(/(?:^|:|,)(?:\\s*\\[)+/g, ''))\n\n if (m) {\n // In the third stage we use the eval function to compile the text into a\n // JavaScript structure. The '{' operator is subject to a syntactic ambiguity\n // in JavaScript: it can begin a block or an object literal. We wrap the text\n // in parens to eliminate the ambiguity.\n j = eval('(' + text + ')') // eslint-disable-line no-eval\n return j\n }\n\n // usable by json_last_error()\n $locutus.php.last_error_json = 4\n return null\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/json/json_encode.js b/node_modules/locutus/php/json/json_encode.js
deleted file mode 100644
index c21ffbf..0000000
--- a/node_modules/locutus/php/json/json_encode.js
+++ /dev/null
@@ -1,166 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function json_encode(mixedVal) {
- // eslint-disable-line camelcase
- // discuss at: http://phpjs.org/functions/json_encode/
- // original by: Public Domain (http://www.json.org/json2.js)
- // reimplemented by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // improved by: Michael White
- // input by: felix
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: json_encode('Kevin')
- // returns 1: '"Kevin"'
-
- /*
- http://www.JSON.org/json2.js
- 2008-11-19
- Public Domain.
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
- See http://www.JSON.org/js.html
- */
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- var json = $global.JSON;
- var retVal;
- try {
- if ((typeof json === 'undefined' ? 'undefined' : _typeof(json)) === 'object' && typeof json.stringify === 'function') {
- // Errors will not be caught here if our own equivalent to resource
- retVal = json.stringify(mixedVal);
- if (retVal === undefined) {
- throw new SyntaxError('json_encode');
- }
- return retVal;
- }
-
- var value = mixedVal;
-
- var quote = function quote(string) {
- var escapeChars = ['\0-\x1F', '\x7F-\x9F', '\xAD', '\u0600-\u0604', '\u070F', '\u17B4', '\u17B5', '\u200C-\u200F', '\u2028-\u202F', '\u2060-\u206F', '\uFEFF', '\uFFF0-\uFFFF'].join('');
- var escapable = new RegExp('[\\"' + escapeChars + ']', 'g');
- var meta = {
- // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"': '\\"',
- '\\': '\\\\'
- };
-
- escapable.lastIndex = 0;
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' : '"' + string + '"';
- };
-
- var _str = function _str(key, holder) {
- var gap = '';
- var indent = ' ';
- // The loop counter.
- var i = 0;
- // The member key.
- var k = '';
- // The member value.
- var v = '';
- var length = 0;
- var mind = gap;
- var partial = [];
- var value = holder[key];
-
- // If the value has a toJSON method, call it to obtain a replacement value.
- if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
- // What happens next depends on the value's type.
- switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) {
- case 'string':
- return quote(value);
-
- case 'number':
- // JSON numbers must be finite. Encode non-finite numbers as null.
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
- // If the value is a boolean or null, convert it to a string. Note:
- // typeof null does not produce 'null'. The case is included here in
- // the remote chance that this gets fixed someday.
- return String(value);
-
- case 'object':
- // If the type is 'object', we might be dealing with an object or an array or
- // null.
- // Due to a specification blunder in ECMAScript, typeof null is 'object',
- // so watch out for that case.
- if (!value) {
- return 'null';
- }
-
- // Make an array to hold the partial results of stringifying this object value.
- gap += indent;
- partial = [];
-
- // Is the value an array?
- if (Object.prototype.toString.apply(value) === '[object Array]') {
- // The value is an array. Stringify every element. Use null as a placeholder
- // for non-JSON values.
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = _str(i, value) || 'null';
- }
-
- // Join all of the elements together, separated with commas, and wrap them in
- // brackets.
- v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
- // Iterate through all of the keys in the object.
- for (k in value) {
- if (Object.hasOwnProperty.call(value, k)) {
- v = _str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
-
- // Join all of the member texts together, separated with commas,
- // and wrap them in braces.
- v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- case 'undefined':
- case 'function':
- default:
- throw new SyntaxError('json_encode');
- }
- };
-
- // Make a fake root object containing our value under the key of ''.
- // Return the result of stringifying the value.
- return _str('', {
- '': value
- });
- } catch (err) {
- // @todo: ensure error handling above throws a SyntaxError in all cases where it could
- // (i.e., when the JSON global is not available and there is an error)
- if (!(err instanceof SyntaxError)) {
- throw new Error('Unexpected error type in json_encode()');
- }
- // usable by json_last_error()
- $locutus.php.last_error_json = 4;
- return null;
- }
-};
-//# sourceMappingURL=json_encode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/json/json_encode.js.map b/node_modules/locutus/php/json/json_encode.js.map
deleted file mode 100644
index db4a2a7..0000000
--- a/node_modules/locutus/php/json/json_encode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/json/json_encode.js"],"names":["module","exports","json_encode","mixedVal","$global","window","global","$locutus","php","json","JSON","retVal","stringify","undefined","SyntaxError","value","quote","string","escapeChars","join","escapable","RegExp","meta","lastIndex","test","replace","a","c","charCodeAt","toString","slice","_str","key","holder","gap","indent","i","k","v","length","mind","partial","toJSON","isFinite","String","Object","prototype","apply","hasOwnProperty","call","push","err","Error","last_error_json"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,QAAtB,EAAgC;AAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AAQA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,MAAIC,OAAOL,QAAQM,IAAnB;AACA,MAAIC,MAAJ;AACA,MAAI;AACF,QAAI,QAAOF,IAAP,yCAAOA,IAAP,OAAgB,QAAhB,IAA4B,OAAOA,KAAKG,SAAZ,KAA0B,UAA1D,EAAsE;AACpE;AACAD,eAASF,KAAKG,SAAL,CAAeT,QAAf,CAAT;AACA,UAAIQ,WAAWE,SAAf,EAA0B;AACxB,cAAM,IAAIC,WAAJ,CAAgB,aAAhB,CAAN;AACD;AACD,aAAOH,MAAP;AACD;;AAED,QAAII,QAAQZ,QAAZ;;AAEA,QAAIa,QAAQ,SAARA,KAAQ,CAAUC,MAAV,EAAkB;AAC5B,UAAIC,cAAc,CAChB,SADgB,EAEhB,WAFgB,EAGhB,MAHgB,EAIhB,eAJgB,EAKhB,QALgB,EAMhB,QANgB,EAOhB,QAPgB,EAQhB,eARgB,EAShB,eATgB,EAUhB,eAVgB,EAWhB,QAXgB,EAYhB,eAZgB,EAahBC,IAbgB,CAaX,EAbW,CAAlB;AAcA,UAAIC,YAAY,IAAIC,MAAJ,CAAW,SAASH,WAAT,GAAuB,GAAlC,EAAuC,GAAvC,CAAhB;AACA,UAAII,OAAO;AACT;AACA,cAAM,KAFG;AAGT,cAAM,KAHG;AAIT,cAAM,KAJG;AAKT,cAAM,KALG;AAMT,cAAM,KANG;AAOT,a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AwD,GAD1B,GAE9B,MAAMC,QAAQtB,IAAR,CAAa,GAAb,CAAN,GAA0B,GAF9B;AAGAe,gBAAMM,IAAN;AACA,iBAAOF,CAAP;AACF,aAAK,WAAL;AACA,aAAK,UAAL;AACA;AACE,gBAAM,IAAIxB,WAAJ,CAAgB,aAAhB,CAAN;AAlEJ;AAoED,KAxFD;;AA0FA;AACA;AACA,WAAOiB,KAAK,EAAL,EAAS;AACd,UAAIhB;AADU,KAAT,CAAP;AAGD,GA/ID,CA+IE,OAAOoC,GAAP,EAAY;AACZ;AACA;AACA,QAAI,EAAEA,eAAerC,WAAjB,CAAJ,EAAmC;AACjC,YAAM,IAAIsC,KAAJ,CAAU,wCAAV,CAAN;AACD;AACD;AACA7C,aAASC,GAAT,CAAa6C,eAAb,GAA+B,CAA/B;AACA,WAAO,IAAP;AACD;AACF,CAlLD","file":"json_encode.js","sourcesContent":["module.exports = function json_encode (mixedVal) { // eslint-disable-line camelcase\n // discuss at: http://phpjs.org/functions/json_encode/\n // original by: Public Domain (http://www.json.org/json2.js)\n // reimplemented by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: Michael White\n // input by: felix\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: json_encode('Kevin')\n // returns 1: '\"Kevin\"'\n\n /*\n http://www.JSON.org/json2.js\n 2008-11-19\n Public Domain.\n NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n See http://www.JSON.org/js.html\n */\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n var json = $global.JSON\n var retVal\n try {\n if (typeof json === 'object' && typeof json.stringify === 'function') {\n // Errors will not be caught here if our own equivalent to resource\n retVal = json.stringify(mixedVal)\n if (retVal === undefined) {\n throw new SyntaxError('json_encode')\n }\n return retVal\n }\n\n var value = mixedVal\n\n var quote = function (string) {\n var escapeChars = [\n '\\u0000-\\u001f',\n '\\u007f-\\u009f',\n '\\u00ad',\n '\\u0600-\\u0604',\n '\\u070f',\n '\\u17b4',\n '\\u17b5',\n '\\u200c-\\u200f',\n '\\u2028-\\u202f',\n '\\u2060-\\u206f',\n '\\ufeff',\n '\\ufff0-\\uffff'\n ].join('')\n var escapable = new RegExp('[\\\\\"' + escapeChars + ']', 'g')\n var meta = {\n // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\'\n }\n\n escapable.lastIndex = 0\n return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n var c = meta[a]\n return typeof c === 'string' ? c : '\\\\u' + ('0000' + a.charCodeAt(0)\n .toString(16))\n .slice(-4)\n }) + '\"' : '\"' + string + '\"'\n }\n\n var _str = function (key, holder) {\n var gap = ''\n var indent = ' '\n // The loop counter.\n var i = 0\n // The member key.\n var k = ''\n // The member value.\n var v = ''\n var length = 0\n var mind = gap\n var partial = []\n var value = holder[key]\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' && typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n }\n\n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value)\n\n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null'\n\n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n return String(value)\n\n case 'object':\n // If the type is 'object', we might be dealing with an object or an array or\n // null.\n // Due to a specification blunder in ECMAScript, typeof null is 'object',\n // so watch out for that case.\n if (!value) {\n return 'null'\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n gap += indent\n partial = []\n\n // Is the value an array?\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n length = value.length\n for (i = 0; i < length; i += 1) {\n partial[i] = _str(i, value) || 'null'\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n v = partial.length === 0 ? '[]' : gap\n ? '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']'\n : '[' + partial.join(',') + ']'\n gap = mind\n return v\n }\n\n // Iterate through all of the keys in the object.\n for (k in value) {\n if (Object.hasOwnProperty.call(value, k)) {\n v = _str(k, value)\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v)\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n v = partial.length === 0 ? '{}' : gap\n ? '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}'\n : '{' + partial.join(',') + '}'\n gap = mind\n return v\n case 'undefined':\n case 'function':\n default:\n throw new SyntaxError('json_encode')\n }\n }\n\n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return _str('', {\n '': value\n })\n } catch (err) {\n // @todo: ensure error handling above throws a SyntaxError in all cases where it could\n // (i.e., when the JSON global is not available and there is an error)\n if (!(err instanceof SyntaxError)) {\n throw new Error('Unexpected error type in json_encode()')\n }\n // usable by json_last_error()\n $locutus.php.last_error_json = 4\n return null\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/json/json_last_error.js b/node_modules/locutus/php/json/json_last_error.js
deleted file mode 100644
index a8c27d4..0000000
--- a/node_modules/locutus/php/json/json_last_error.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-module.exports = function json_last_error() {
- // eslint-disable-line camelcase
- // discuss at: http://phpjs.org/functions/json_last_error/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: json_last_error()
- // returns 1: 0
-
- // JSON_ERROR_NONE = 0
- // max depth limit to be removed per PHP comments in json.c (not possible in JS?):
- // JSON_ERROR_DEPTH = 1
- // internal use? also not documented:
- // JSON_ERROR_STATE_MISMATCH = 2
- // [\u0000-\u0008\u000B-\u000C\u000E-\u001F] if used directly within json_decode():
- // JSON_ERROR_CTRL_CHAR = 3
- // but JSON functions auto-escape these, so error not possible in JavaScript
- // JSON_ERROR_SYNTAX = 4
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- return $locutus.php && $locutus.php.last_error_json ? $locutus.php.last_error_json : 0;
-};
-//# sourceMappingURL=json_last_error.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/json/json_last_error.js.map b/node_modules/locutus/php/json/json_last_error.js.map
deleted file mode 100644
index 9a929a8..0000000
--- a/node_modules/locutus/php/json/json_last_error.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/json/json_last_error.js"],"names":["module","exports","json_last_error","$global","window","global","$locutus","php","last_error_json"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,GAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,SAAOD,SAASC,GAAT,IAAgBD,SAASC,GAAT,CAAaC,eAA7B,GAA+CF,SAASC,GAAT,CAAaC,eAA5D,GAA8E,CAArF;AACD,CAtBD","file":"json_last_error.js","sourcesContent":["module.exports = function json_last_error () { // eslint-disable-line camelcase\n // discuss at: http://phpjs.org/functions/json_last_error/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: json_last_error()\n // returns 1: 0\n\n // JSON_ERROR_NONE = 0\n // max depth limit to be removed per PHP comments in json.c (not possible in JS?):\n // JSON_ERROR_DEPTH = 1\n // internal use? also not documented:\n // JSON_ERROR_STATE_MISMATCH = 2\n // [\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F] if used directly within json_decode():\n // JSON_ERROR_CTRL_CHAR = 3\n // but JSON functions auto-escape these, so error not possible in JavaScript\n // JSON_ERROR_SYNTAX = 4\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n return $locutus.php && $locutus.php.last_error_json ? $locutus.php.last_error_json : 0\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/abs.js b/node_modules/locutus/php/math/abs.js
deleted file mode 100644
index 7be6a86..0000000
--- a/node_modules/locutus/php/math/abs.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-module.exports = function abs(mixedNumber) {
- // discuss at: http://locutus.io/php/abs/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // improved by: Karol Kowalski
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // example 1: abs(4.2)
- // returns 1: 4.2
- // example 2: abs(-4.2)
- // returns 2: 4.2
- // example 3: abs(-5)
- // returns 3: 5
- // example 4: abs('_argos')
- // returns 4: 0
-
- return Math.abs(mixedNumber) || 0;
-};
-//# sourceMappingURL=abs.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/abs.js.map b/node_modules/locutus/php/math/abs.js.map
deleted file mode 100644
index de1e476..0000000
--- a/node_modules/locutus/php/math/abs.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/abs.js"],"names":["module","exports","abs","mixedNumber","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,WAAd,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,GAAL,CAASC,WAAT,KAAyB,CAAhC;AACD,CAhBD","file":"abs.js","sourcesContent":["module.exports = function abs (mixedNumber) {\n // discuss at: http://locutus.io/php/abs/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // improved by: Karol Kowalski\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // example 1: abs(4.2)\n // returns 1: 4.2\n // example 2: abs(-4.2)\n // returns 2: 4.2\n // example 3: abs(-5)\n // returns 3: 5\n // example 4: abs('_argos')\n // returns 4: 0\n\n return Math.abs(mixedNumber) || 0\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/acos.js b/node_modules/locutus/php/math/acos.js
deleted file mode 100644
index 019a6ef..0000000
--- a/node_modules/locutus/php/math/acos.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function acos(arg) {
- // discuss at: http://locutus.io/php/acos/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // note 1: Sorry about the crippled test. Needed because precision differs accross platforms.
- // example 1: (acos(0.3) + '').substr(0, 17)
- // returns 1: "1.266103672779499"
-
- return Math.acos(arg);
-};
-//# sourceMappingURL=acos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/acos.js.map b/node_modules/locutus/php/math/acos.js.map
deleted file mode 100644
index c3ccceb..0000000
--- a/node_modules/locutus/php/math/acos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/acos.js"],"names":["module","exports","acos","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,IAAL,CAAUC,GAAV,CAAP;AACD,CARD","file":"acos.js","sourcesContent":["module.exports = function acos (arg) {\n // discuss at: http://locutus.io/php/acos/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // note 1: Sorry about the crippled test. Needed because precision differs accross platforms.\n // example 1: (acos(0.3) + '').substr(0, 17)\n // returns 1: \"1.266103672779499\"\n\n return Math.acos(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/acosh.js b/node_modules/locutus/php/math/acosh.js
deleted file mode 100644
index 42b4d04..0000000
--- a/node_modules/locutus/php/math/acosh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function acosh(arg) {
- // discuss at: http://locutus.io/php/acosh/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: acosh(8723321.4)
- // returns 1: 16.674657798418625
-
- return Math.log(arg + Math.sqrt(arg * arg - 1));
-};
-//# sourceMappingURL=acosh.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/acosh.js.map b/node_modules/locutus/php/math/acosh.js.map
deleted file mode 100644
index 0e00944..0000000
--- a/node_modules/locutus/php/math/acosh.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/acosh.js"],"names":["module","exports","acosh","arg","Math","log","sqrt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKC,GAAL,CAASF,MAAMC,KAAKE,IAAL,CAAUH,MAAMA,GAAN,GAAY,CAAtB,CAAf,CAAP;AACD,CAPD","file":"acosh.js","sourcesContent":["module.exports = function acosh (arg) {\n // discuss at: http://locutus.io/php/acosh/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: acosh(8723321.4)\n // returns 1: 16.674657798418625\n\n return Math.log(arg + Math.sqrt(arg * arg - 1))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/asin.js b/node_modules/locutus/php/math/asin.js
deleted file mode 100644
index d1f7365..0000000
--- a/node_modules/locutus/php/math/asin.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function asin(arg) {
- // discuss at: http://locutus.io/php/asin/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // note 1: Sorry about the crippled test. Needed because precision differs accross platforms.
- // example 1: (asin(0.3) + '').substr(0, 17)
- // returns 1: "0.304692654015397"
-
- return Math.asin(arg);
-};
-//# sourceMappingURL=asin.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/asin.js.map b/node_modules/locutus/php/math/asin.js.map
deleted file mode 100644
index a5037f0..0000000
--- a/node_modules/locutus/php/math/asin.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/asin.js"],"names":["module","exports","asin","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,IAAL,CAAUC,GAAV,CAAP;AACD,CARD","file":"asin.js","sourcesContent":["module.exports = function asin (arg) {\n // discuss at: http://locutus.io/php/asin/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // note 1: Sorry about the crippled test. Needed because precision differs accross platforms.\n // example 1: (asin(0.3) + '').substr(0, 17)\n // returns 1: \"0.304692654015397\"\n\n return Math.asin(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/asinh.js b/node_modules/locutus/php/math/asinh.js
deleted file mode 100644
index c919741..0000000
--- a/node_modules/locutus/php/math/asinh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function asinh(arg) {
- // discuss at: http://locutus.io/php/asinh/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: asinh(8723321.4)
- // returns 1: 16.67465779841863
-
- return Math.log(arg + Math.sqrt(arg * arg + 1));
-};
-//# sourceMappingURL=asinh.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/asinh.js.map b/node_modules/locutus/php/math/asinh.js.map
deleted file mode 100644
index dc46f91..0000000
--- a/node_modules/locutus/php/math/asinh.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/asinh.js"],"names":["module","exports","asinh","arg","Math","log","sqrt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKC,GAAL,CAASF,MAAMC,KAAKE,IAAL,CAAUH,MAAMA,GAAN,GAAY,CAAtB,CAAf,CAAP;AACD,CAPD","file":"asinh.js","sourcesContent":["module.exports = function asinh (arg) {\n // discuss at: http://locutus.io/php/asinh/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: asinh(8723321.4)\n // returns 1: 16.67465779841863\n\n return Math.log(arg + Math.sqrt(arg * arg + 1))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/atan.js b/node_modules/locutus/php/math/atan.js
deleted file mode 100644
index 79ad79c..0000000
--- a/node_modules/locutus/php/math/atan.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function atan(arg) {
- // discuss at: http://locutus.io/php/atan/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: atan(8723321.4)
- // returns 1: 1.5707962121596615
-
- return Math.atan(arg);
-};
-//# sourceMappingURL=atan.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/atan.js.map b/node_modules/locutus/php/math/atan.js.map
deleted file mode 100644
index dd66603..0000000
--- a/node_modules/locutus/php/math/atan.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/atan.js"],"names":["module","exports","atan","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,IAAL,CAAUC,GAAV,CAAP;AACD,CAPD","file":"atan.js","sourcesContent":["module.exports = function atan (arg) {\n // discuss at: http://locutus.io/php/atan/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: atan(8723321.4)\n // returns 1: 1.5707962121596615\n\n return Math.atan(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/atan2.js b/node_modules/locutus/php/math/atan2.js
deleted file mode 100644
index 3e10515..0000000
--- a/node_modules/locutus/php/math/atan2.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function atan2(y, x) {
- // discuss at: http://locutus.io/php/atan2/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: atan2(1, 1)
- // returns 1: 0.7853981633974483
-
- return Math.atan2(y, x);
-};
-//# sourceMappingURL=atan2.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/atan2.js.map b/node_modules/locutus/php/math/atan2.js.map
deleted file mode 100644
index f1afceb..0000000
--- a/node_modules/locutus/php/math/atan2.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/atan2.js"],"names":["module","exports","atan2","y","x","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmBC,CAAnB,EAAsB;AACrC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKH,KAAL,CAAWC,CAAX,EAAcC,CAAd,CAAP;AACD,CAPD","file":"atan2.js","sourcesContent":["module.exports = function atan2 (y, x) {\n // discuss at: http://locutus.io/php/atan2/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: atan2(1, 1)\n // returns 1: 0.7853981633974483\n\n return Math.atan2(y, x)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/atanh.js b/node_modules/locutus/php/math/atanh.js
deleted file mode 100644
index 1c670bb..0000000
--- a/node_modules/locutus/php/math/atanh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function atanh(arg) {
- // discuss at: http://locutus.io/php/atanh/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: atanh(0.3)
- // returns 1: 0.3095196042031118
-
- return 0.5 * Math.log((1 + arg) / (1 - arg));
-};
-//# sourceMappingURL=atanh.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/atanh.js.map b/node_modules/locutus/php/math/atanh.js.map
deleted file mode 100644
index 01c3f29..0000000
--- a/node_modules/locutus/php/math/atanh.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/atanh.js"],"names":["module","exports","atanh","arg","Math","log"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;;AAEA,SAAO,MAAMC,KAAKC,GAAL,CAAS,CAAC,IAAIF,GAAL,KAAa,IAAIA,GAAjB,CAAT,CAAb;AACD,CAPD","file":"atanh.js","sourcesContent":["module.exports = function atanh (arg) {\n // discuss at: http://locutus.io/php/atanh/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: atanh(0.3)\n // returns 1: 0.3095196042031118\n\n return 0.5 * Math.log((1 + arg) / (1 - arg))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/base_convert.js b/node_modules/locutus/php/math/base_convert.js
deleted file mode 100644
index ac2c8cc..0000000
--- a/node_modules/locutus/php/math/base_convert.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function base_convert(number, frombase, tobase) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/base_convert/
- // original by: Philippe Baumann
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: base_convert('A37334', 16, 2)
- // returns 1: '101000110111001100110100'
-
- return parseInt(number + '', frombase | 0).toString(tobase | 0);
-};
-//# sourceMappingURL=base_convert.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/base_convert.js.map b/node_modules/locutus/php/math/base_convert.js.map
deleted file mode 100644
index 0972da2..0000000
--- a/node_modules/locutus/php/math/base_convert.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/base_convert.js"],"names":["module","exports","base_convert","number","frombase","tobase","parseInt","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,QAA/B,EAAyCC,MAAzC,EAAiD;AAAE;AAClE;AACA;AACA;AACA;AACA;;AAEA,SAAOC,SAASH,SAAS,EAAlB,EAAsBC,WAAW,CAAjC,EACJG,QADI,CACKF,SAAS,CADd,CAAP;AAED,CATD","file":"base_convert.js","sourcesContent":["module.exports = function base_convert (number, frombase, tobase) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/base_convert/\n // original by: Philippe Baumann\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: base_convert('A37334', 16, 2)\n // returns 1: '101000110111001100110100'\n\n return parseInt(number + '', frombase | 0)\n .toString(tobase | 0)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/bindec.js b/node_modules/locutus/php/math/bindec.js
deleted file mode 100644
index 75c2fe2..0000000
--- a/node_modules/locutus/php/math/bindec.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function bindec(binaryString) {
- // discuss at: http://locutus.io/php/bindec/
- // original by: Philippe Baumann
- // example 1: bindec('110011')
- // returns 1: 51
- // example 2: bindec('000110011')
- // returns 2: 51
- // example 3: bindec('111')
- // returns 3: 7
-
- binaryString = (binaryString + '').replace(/[^01]/gi, '');
-
- return parseInt(binaryString, 2);
-};
-//# sourceMappingURL=bindec.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/bindec.js.map b/node_modules/locutus/php/math/bindec.js.map
deleted file mode 100644
index 3787ca3..0000000
--- a/node_modules/locutus/php/math/bindec.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/bindec.js"],"names":["module","exports","bindec","binaryString","replace","parseInt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,YAAjB,EAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,iBAAe,CAACA,eAAe,EAAhB,EAAoBC,OAApB,CAA4B,SAA5B,EAAuC,EAAvC,CAAf;;AAEA,SAAOC,SAASF,YAAT,EAAuB,CAAvB,CAAP;AACD,CAbD","file":"bindec.js","sourcesContent":["module.exports = function bindec (binaryString) {\n // discuss at: http://locutus.io/php/bindec/\n // original by: Philippe Baumann\n // example 1: bindec('110011')\n // returns 1: 51\n // example 2: bindec('000110011')\n // returns 2: 51\n // example 3: bindec('111')\n // returns 3: 7\n\n binaryString = (binaryString + '').replace(/[^01]/gi, '')\n\n return parseInt(binaryString, 2)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/ceil.js b/node_modules/locutus/php/math/ceil.js
deleted file mode 100644
index 20ea371..0000000
--- a/node_modules/locutus/php/math/ceil.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function ceil(value) {
- // discuss at: http://locutus.io/php/ceil/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: ceil(8723321.4)
- // returns 1: 8723322
-
- return Math.ceil(value);
-};
-//# sourceMappingURL=ceil.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/ceil.js.map b/node_modules/locutus/php/math/ceil.js.map
deleted file mode 100644
index be26235..0000000
--- a/node_modules/locutus/php/math/ceil.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/ceil.js"],"names":["module","exports","ceil","value","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,KAAf,EAAsB;AACrC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,IAAL,CAAUC,KAAV,CAAP;AACD,CAPD","file":"ceil.js","sourcesContent":["module.exports = function ceil (value) {\n // discuss at: http://locutus.io/php/ceil/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: ceil(8723321.4)\n // returns 1: 8723322\n\n return Math.ceil(value)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/cos.js b/node_modules/locutus/php/math/cos.js
deleted file mode 100644
index 98c3cb0..0000000
--- a/node_modules/locutus/php/math/cos.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function cos(arg) {
- // discuss at: http://locutus.io/php/cos/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: Math.ceil(cos(8723321.4) * 10000000)
- // returns 1: -1812718
-
- return Math.cos(arg);
-};
-//# sourceMappingURL=cos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/cos.js.map b/node_modules/locutus/php/math/cos.js.map
deleted file mode 100644
index 5ba219e..0000000
--- a/node_modules/locutus/php/math/cos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/cos.js"],"names":["module","exports","cos","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,GAAL,CAASC,GAAT,CAAP;AACD,CAPD","file":"cos.js","sourcesContent":["module.exports = function cos (arg) {\n // discuss at: http://locutus.io/php/cos/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: Math.ceil(cos(8723321.4) * 10000000)\n // returns 1: -1812718\n\n return Math.cos(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/cosh.js b/node_modules/locutus/php/math/cosh.js
deleted file mode 100644
index e3b1686..0000000
--- a/node_modules/locutus/php/math/cosh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function cosh(arg) {
- // discuss at: http://locutus.io/php/cosh/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: cosh(-0.18127180117607017)
- // returns 1: 1.0164747716114113
-
- return (Math.exp(arg) + Math.exp(-arg)) / 2;
-};
-//# sourceMappingURL=cosh.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/cosh.js.map b/node_modules/locutus/php/math/cosh.js.map
deleted file mode 100644
index da07d3e..0000000
--- a/node_modules/locutus/php/math/cosh.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/cosh.js"],"names":["module","exports","cosh","arg","Math","exp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;;AAEA,SAAO,CAACC,KAAKC,GAAL,CAASF,GAAT,IAAgBC,KAAKC,GAAL,CAAS,CAACF,GAAV,CAAjB,IAAmC,CAA1C;AACD,CAPD","file":"cosh.js","sourcesContent":["module.exports = function cosh (arg) {\n // discuss at: http://locutus.io/php/cosh/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: cosh(-0.18127180117607017)\n // returns 1: 1.0164747716114113\n\n return (Math.exp(arg) + Math.exp(-arg)) / 2\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/decbin.js b/node_modules/locutus/php/math/decbin.js
deleted file mode 100644
index 7cdd4a9..0000000
--- a/node_modules/locutus/php/math/decbin.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-module.exports = function decbin(number) {
- // discuss at: http://locutus.io/php/decbin/
- // original by: Enrique Gonzalez
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript
- // input by: pilus
- // input by: nord_ua
- // example 1: decbin(12)
- // returns 1: '1100'
- // example 2: decbin(26)
- // returns 2: '11010'
- // example 3: decbin('26')
- // returns 3: '11010'
-
- if (number < 0) {
- number = 0xFFFFFFFF + number + 1;
- }
- return parseInt(number, 10).toString(2);
-};
-//# sourceMappingURL=decbin.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/decbin.js.map b/node_modules/locutus/php/math/decbin.js.map
deleted file mode 100644
index 956a9e3..0000000
--- a/node_modules/locutus/php/math/decbin.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/decbin.js"],"names":["module","exports","decbin","number","parseInt","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,SAAS,CAAb,EAAgB;AACdA,aAAS,aAAaA,MAAb,GAAsB,CAA/B;AACD;AACD,SAAOC,SAASD,MAAT,EAAiB,EAAjB,EACJE,QADI,CACK,CADL,CAAP;AAED,CAnBD","file":"decbin.js","sourcesContent":["module.exports = function decbin (number) {\n // discuss at: http://locutus.io/php/decbin/\n // original by: Enrique Gonzalez\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript\n // input by: pilus\n // input by: nord_ua\n // example 1: decbin(12)\n // returns 1: '1100'\n // example 2: decbin(26)\n // returns 2: '11010'\n // example 3: decbin('26')\n // returns 3: '11010'\n\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1\n }\n return parseInt(number, 10)\n .toString(2)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/dechex.js b/node_modules/locutus/php/math/dechex.js
deleted file mode 100644
index 361d8ce..0000000
--- a/node_modules/locutus/php/math/dechex.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-module.exports = function dechex(number) {
- // discuss at: http://locutus.io/php/dechex/
- // original by: Philippe Baumann
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript
- // input by: pilus
- // example 1: dechex(10)
- // returns 1: 'a'
- // example 2: dechex(47)
- // returns 2: '2f'
- // example 3: dechex(-1415723993)
- // returns 3: 'ab9dc427'
-
- if (number < 0) {
- number = 0xFFFFFFFF + number + 1;
- }
- return parseInt(number, 10).toString(16);
-};
-//# sourceMappingURL=dechex.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/dechex.js.map b/node_modules/locutus/php/math/dechex.js.map
deleted file mode 100644
index 45c2442..0000000
--- a/node_modules/locutus/php/math/dechex.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/dechex.js"],"names":["module","exports","dechex","number","parseInt","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,SAAS,CAAb,EAAgB;AACdA,aAAS,aAAaA,MAAb,GAAsB,CAA/B;AACD;AACD,SAAOC,SAASD,MAAT,EAAiB,EAAjB,EACJE,QADI,CACK,EADL,CAAP;AAED,CAlBD","file":"dechex.js","sourcesContent":["module.exports = function dechex (number) {\n // discuss at: http://locutus.io/php/dechex/\n // original by: Philippe Baumann\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript\n // input by: pilus\n // example 1: dechex(10)\n // returns 1: 'a'\n // example 2: dechex(47)\n // returns 2: '2f'\n // example 3: dechex(-1415723993)\n // returns 3: 'ab9dc427'\n\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1\n }\n return parseInt(number, 10)\n .toString(16)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/decoct.js b/node_modules/locutus/php/math/decoct.js
deleted file mode 100644
index f808756..0000000
--- a/node_modules/locutus/php/math/decoct.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-
-module.exports = function decoct(number) {
- // discuss at: http://locutus.io/php/decoct/
- // original by: Enrique Gonzalez
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript
- // input by: pilus
- // example 1: decoct(15)
- // returns 1: '17'
- // example 2: decoct(264)
- // returns 2: '410'
-
- if (number < 0) {
- number = 0xFFFFFFFF + number + 1;
- }
- return parseInt(number, 10).toString(8);
-};
-//# sourceMappingURL=decoct.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/decoct.js.map b/node_modules/locutus/php/math/decoct.js.map
deleted file mode 100644
index 043db87..0000000
--- a/node_modules/locutus/php/math/decoct.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/decoct.js"],"names":["module","exports","decoct","number","parseInt","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,SAAS,CAAb,EAAgB;AACdA,aAAS,aAAaA,MAAb,GAAsB,CAA/B;AACD;AACD,SAAOC,SAASD,MAAT,EAAiB,EAAjB,EACJE,QADI,CACK,CADL,CAAP;AAED,CAhBD","file":"decoct.js","sourcesContent":["module.exports = function decoct (number) {\n // discuss at: http://locutus.io/php/decoct/\n // original by: Enrique Gonzalez\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript\n // input by: pilus\n // example 1: decoct(15)\n // returns 1: '17'\n // example 2: decoct(264)\n // returns 2: '410'\n\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1\n }\n return parseInt(number, 10)\n .toString(8)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/deg2rad.js b/node_modules/locutus/php/math/deg2rad.js
deleted file mode 100644
index 9237593..0000000
--- a/node_modules/locutus/php/math/deg2rad.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function deg2rad(angle) {
- // discuss at: http://locutus.io/php/deg2rad/
- // original by: Enrique Gonzalez
- // improved by: Thomas Grainger (http://graingert.co.uk)
- // example 1: deg2rad(45)
- // returns 1: 0.7853981633974483
-
- return angle * 0.017453292519943295; // (angle / 180) * Math.PI;
-};
-//# sourceMappingURL=deg2rad.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/deg2rad.js.map b/node_modules/locutus/php/math/deg2rad.js.map
deleted file mode 100644
index 1414827..0000000
--- a/node_modules/locutus/php/math/deg2rad.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/deg2rad.js"],"names":["module","exports","deg2rad","angle"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,KAAlB,EAAyB;AACxC;AACA;AACA;AACA;AACA;;AAEA,SAAOA,QAAQ,oBAAf,CAPwC,CAOJ;AACrC,CARD","file":"deg2rad.js","sourcesContent":["module.exports = function deg2rad (angle) {\n // discuss at: http://locutus.io/php/deg2rad/\n // original by: Enrique Gonzalez\n // improved by: Thomas Grainger (http://graingert.co.uk)\n // example 1: deg2rad(45)\n // returns 1: 0.7853981633974483\n\n return angle * 0.017453292519943295 // (angle / 180) * Math.PI;\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/exp.js b/node_modules/locutus/php/math/exp.js
deleted file mode 100644
index be2e5f3..0000000
--- a/node_modules/locutus/php/math/exp.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function exp(arg) {
- // discuss at: http://locutus.io/php/exp/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: exp(0.3)
- // returns 1: 1.3498588075760032
-
- return Math.exp(arg);
-};
-//# sourceMappingURL=exp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/exp.js.map b/node_modules/locutus/php/math/exp.js.map
deleted file mode 100644
index a140832..0000000
--- a/node_modules/locutus/php/math/exp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/exp.js"],"names":["module","exports","exp","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,GAAL,CAASC,GAAT,CAAP;AACD,CAPD","file":"exp.js","sourcesContent":["module.exports = function exp (arg) {\n // discuss at: http://locutus.io/php/exp/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: exp(0.3)\n // returns 1: 1.3498588075760032\n\n return Math.exp(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/expm1.js b/node_modules/locutus/php/math/expm1.js
deleted file mode 100644
index 9943362..0000000
--- a/node_modules/locutus/php/math/expm1.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-
-module.exports = function expm1(x) {
- // discuss at: http://locutus.io/php/expm1/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Robert Eisele (http://www.xarg.org/)
- // note 1: Precision 'n' can be adjusted as desired
- // example 1: expm1(1e-15)
- // returns 1: 1.0000000000000007e-15
-
- return x < 1e-5 && x > -1e-5 ? x + 0.5 * x * x : Math.exp(x) - 1;
-};
-//# sourceMappingURL=expm1.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/expm1.js.map b/node_modules/locutus/php/math/expm1.js.map
deleted file mode 100644
index 622be99..0000000
--- a/node_modules/locutus/php/math/expm1.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/expm1.js"],"names":["module","exports","expm1","x","Math","exp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,IAAI,IAAJ,IAAYA,IAAI,CAAC,IAAlB,GACHA,IAAI,MAAMA,CAAN,GAAUA,CADX,GAEHC,KAAKC,GAAL,CAASF,CAAT,IAAc,CAFlB;AAGD,CAXD","file":"expm1.js","sourcesContent":["module.exports = function expm1 (x) {\n // discuss at: http://locutus.io/php/expm1/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Robert Eisele (http://www.xarg.org/)\n // note 1: Precision 'n' can be adjusted as desired\n // example 1: expm1(1e-15)\n // returns 1: 1.0000000000000007e-15\n\n return (x < 1e-5 && x > -1e-5)\n ? x + 0.5 * x * x\n : Math.exp(x) - 1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/floor.js b/node_modules/locutus/php/math/floor.js
deleted file mode 100644
index 6d3655b..0000000
--- a/node_modules/locutus/php/math/floor.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function floor(value) {
- // discuss at: http://locutus.io/php/floor/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: floor(8723321.4)
- // returns 1: 8723321
-
- return Math.floor(value);
-};
-//# sourceMappingURL=floor.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/floor.js.map b/node_modules/locutus/php/math/floor.js.map
deleted file mode 100644
index 495bd29..0000000
--- a/node_modules/locutus/php/math/floor.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/floor.js"],"names":["module","exports","floor","value","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,KAAhB,EAAuB;AACtC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,KAAL,CAAWC,KAAX,CAAP;AACD,CAPD","file":"floor.js","sourcesContent":["module.exports = function floor (value) {\n // discuss at: http://locutus.io/php/floor/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: floor(8723321.4)\n // returns 1: 8723321\n\n return Math.floor(value)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/fmod.js b/node_modules/locutus/php/math/fmod.js
deleted file mode 100644
index a08a963..0000000
--- a/node_modules/locutus/php/math/fmod.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-module.exports = function fmod(x, y) {
- // discuss at: http://locutus.io/php/fmod/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // example 1: fmod(5.7, 1.3)
- // returns 1: 0.5
-
- var tmp;
- var tmp2;
- var p = 0;
- var pY = 0;
- var l = 0.0;
- var l2 = 0.0;
-
- tmp = x.toExponential().match(/^.\.?(.*)e(.+)$/);
- p = parseInt(tmp[2], 10) - (tmp[1] + '').length;
- tmp = y.toExponential().match(/^.\.?(.*)e(.+)$/);
- pY = parseInt(tmp[2], 10) - (tmp[1] + '').length;
-
- if (pY > p) {
- p = pY;
- }
-
- tmp2 = x % y;
-
- if (p < -100 || p > 20) {
- // toFixed will give an out of bound error so we fix it like this:
- l = Math.round(Math.log(tmp2) / Math.log(10));
- l2 = Math.pow(10, l);
-
- return (tmp2 / l2).toFixed(l - p) * l2;
- } else {
- return parseFloat(tmp2.toFixed(-p));
- }
-};
-//# sourceMappingURL=fmod.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/fmod.js.map b/node_modules/locutus/php/math/fmod.js.map
deleted file mode 100644
index 170a0b8..0000000
--- a/node_modules/locutus/php/math/fmod.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/fmod.js"],"names":["module","exports","fmod","x","y","tmp","tmp2","p","pY","l","l2","toExponential","match","parseInt","length","Math","round","log","pow","toFixed","parseFloat"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,CAAf,EAAkBC,CAAlB,EAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ;AACA,MAAIC,IAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,IAAI,GAAR;AACA,MAAIC,KAAK,GAAT;;AAEAL,QAAMF,EAAEQ,aAAF,GAAkBC,KAAlB,CAAwB,iBAAxB,CAAN;AACAL,MAAIM,SAASR,IAAI,CAAJ,CAAT,EAAiB,EAAjB,IAAuB,CAACA,IAAI,CAAJ,IAAS,EAAV,EAAcS,MAAzC;AACAT,QAAMD,EAAEO,aAAF,GAAkBC,KAAlB,CAAwB,iBAAxB,CAAN;AACAJ,OAAKK,SAASR,IAAI,CAAJ,CAAT,EAAiB,EAAjB,IAAuB,CAACA,IAAI,CAAJ,IAAS,EAAV,EAAcS,MAA1C;;AAEA,MAAIN,KAAKD,CAAT,EAAY;AACVA,QAAIC,EAAJ;AACD;;AAEDF,SAAQH,IAAIC,CAAZ;;AAEA,MAAIG,IAAI,CAAC,GAAL,IAAYA,IAAI,EAApB,EAAwB;AACtB;AACAE,QAAIM,KAAKC,KAAL,CAAWD,KAAKE,GAAL,CAASX,IAAT,IAAiBS,KAAKE,GAAL,CAAS,EAAT,CAA5B,CAAJ;AACAP,SAAKK,KAAKG,GAAL,CAAS,EAAT,EAAaT,CAAb,CAAL;;AAEA,WAAO,CAACH,OAAOI,EAAR,EAAYS,OAAZ,CAAoBV,IAAIF,CAAxB,IAA6BG,EAApC;AACD,GAND,MAMO;AACL,WAAOU,WAAWd,KAAKa,OAAL,CAAa,CAACZ,CAAd,CAAX,CAAP;AACD;AACF,CAnCD","file":"fmod.js","sourcesContent":["module.exports = function fmod (x, y) {\n // discuss at: http://locutus.io/php/fmod/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // example 1: fmod(5.7, 1.3)\n // returns 1: 0.5\n\n var tmp\n var tmp2\n var p = 0\n var pY = 0\n var l = 0.0\n var l2 = 0.0\n\n tmp = x.toExponential().match(/^.\\.?(.*)e(.+)$/)\n p = parseInt(tmp[2], 10) - (tmp[1] + '').length\n tmp = y.toExponential().match(/^.\\.?(.*)e(.+)$/)\n pY = parseInt(tmp[2], 10) - (tmp[1] + '').length\n\n if (pY > p) {\n p = pY\n }\n\n tmp2 = (x % y)\n\n if (p < -100 || p > 20) {\n // toFixed will give an out of bound error so we fix it like this:\n l = Math.round(Math.log(tmp2) / Math.log(10))\n l2 = Math.pow(10, l)\n\n return (tmp2 / l2).toFixed(l - p) * l2\n } else {\n return parseFloat(tmp2.toFixed(-p))\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/getrandmax.js b/node_modules/locutus/php/math/getrandmax.js
deleted file mode 100644
index 54d66e9..0000000
--- a/node_modules/locutus/php/math/getrandmax.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function getrandmax() {
- // discuss at: http://locutus.io/php/getrandmax/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: getrandmax()
- // returns 1: 2147483647
-
- return 2147483647;
-};
-//# sourceMappingURL=getrandmax.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/getrandmax.js.map b/node_modules/locutus/php/math/getrandmax.js.map
deleted file mode 100644
index 2e5ab88..0000000
--- a/node_modules/locutus/php/math/getrandmax.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/getrandmax.js"],"names":["module","exports","getrandmax"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,GAAuB;AACtC;AACA;AACA;AACA;;AAEA,SAAO,UAAP;AACD,CAPD","file":"getrandmax.js","sourcesContent":["module.exports = function getrandmax () {\n // discuss at: http://locutus.io/php/getrandmax/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: getrandmax()\n // returns 1: 2147483647\n\n return 2147483647\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/hexdec.js b/node_modules/locutus/php/math/hexdec.js
deleted file mode 100644
index 50026ac..0000000
--- a/node_modules/locutus/php/math/hexdec.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function hexdec(hexString) {
- // discuss at: http://locutus.io/php/hexdec/
- // original by: Philippe Baumann
- // example 1: hexdec('that')
- // returns 1: 10
- // example 2: hexdec('a0')
- // returns 2: 160
-
- hexString = (hexString + '').replace(/[^a-f0-9]/gi, '');
- return parseInt(hexString, 16);
-};
-//# sourceMappingURL=hexdec.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/hexdec.js.map b/node_modules/locutus/php/math/hexdec.js.map
deleted file mode 100644
index 8f9fa1e..0000000
--- a/node_modules/locutus/php/math/hexdec.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/hexdec.js"],"names":["module","exports","hexdec","hexString","replace","parseInt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,SAAjB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEAA,cAAY,CAACA,YAAY,EAAb,EAAiBC,OAAjB,CAAyB,aAAzB,EAAwC,EAAxC,CAAZ;AACA,SAAOC,SAASF,SAAT,EAAoB,EAApB,CAAP;AACD,CAVD","file":"hexdec.js","sourcesContent":["module.exports = function hexdec (hexString) {\n // discuss at: http://locutus.io/php/hexdec/\n // original by: Philippe Baumann\n // example 1: hexdec('that')\n // returns 1: 10\n // example 2: hexdec('a0')\n // returns 2: 160\n\n hexString = (hexString + '').replace(/[^a-f0-9]/gi, '')\n return parseInt(hexString, 16)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/hypot.js b/node_modules/locutus/php/math/hypot.js
deleted file mode 100644
index 40b9197..0000000
--- a/node_modules/locutus/php/math/hypot.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-module.exports = function hypot(x, y) {
- // discuss at: http://locutus.io/php/hypot/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // imprived by: Robert Eisele (http://www.xarg.org/)
- // example 1: hypot(3, 4)
- // returns 1: 5
- // example 2: hypot([], 'a')
- // returns 2: null
-
- x = Math.abs(x);
- y = Math.abs(y);
-
- var t = Math.min(x, y);
- x = Math.max(x, y);
- t = t / x;
-
- return x * Math.sqrt(1 + t * t) || null;
-};
-//# sourceMappingURL=hypot.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/hypot.js.map b/node_modules/locutus/php/math/hypot.js.map
deleted file mode 100644
index a5b8feb..0000000
--- a/node_modules/locutus/php/math/hypot.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/hypot.js"],"names":["module","exports","hypot","x","y","Math","abs","t","min","max","sqrt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmBC,CAAnB,EAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAD,MAAIE,KAAKC,GAAL,CAASH,CAAT,CAAJ;AACAC,MAAIC,KAAKC,GAAL,CAASF,CAAT,CAAJ;;AAEA,MAAIG,IAAIF,KAAKG,GAAL,CAASL,CAAT,EAAYC,CAAZ,CAAR;AACAD,MAAIE,KAAKI,GAAL,CAASN,CAAT,EAAYC,CAAZ,CAAJ;AACAG,MAAIA,IAAIJ,CAAR;;AAEA,SAAOA,IAAIE,KAAKK,IAAL,CAAU,IAAIH,IAAIA,CAAlB,CAAJ,IAA4B,IAAnC;AACD,CAjBD","file":"hypot.js","sourcesContent":["module.exports = function hypot (x, y) {\n // discuss at: http://locutus.io/php/hypot/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // imprived by: Robert Eisele (http://www.xarg.org/)\n // example 1: hypot(3, 4)\n // returns 1: 5\n // example 2: hypot([], 'a')\n // returns 2: null\n\n x = Math.abs(x)\n y = Math.abs(y)\n\n var t = Math.min(x, y)\n x = Math.max(x, y)\n t = t / x\n\n return x * Math.sqrt(1 + t * t) || null\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/index.js b/node_modules/locutus/php/math/index.js
deleted file mode 100644
index 05d4777..0000000
--- a/node_modules/locutus/php/math/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-module.exports['abs'] = require('./abs');
-module.exports['acos'] = require('./acos');
-module.exports['acosh'] = require('./acosh');
-module.exports['asin'] = require('./asin');
-module.exports['asinh'] = require('./asinh');
-module.exports['atan'] = require('./atan');
-module.exports['atan2'] = require('./atan2');
-module.exports['atanh'] = require('./atanh');
-module.exports['base_convert'] = require('./base_convert');
-module.exports['bindec'] = require('./bindec');
-module.exports['ceil'] = require('./ceil');
-module.exports['cos'] = require('./cos');
-module.exports['cosh'] = require('./cosh');
-module.exports['decbin'] = require('./decbin');
-module.exports['dechex'] = require('./dechex');
-module.exports['decoct'] = require('./decoct');
-module.exports['deg2rad'] = require('./deg2rad');
-module.exports['exp'] = require('./exp');
-module.exports['expm1'] = require('./expm1');
-module.exports['floor'] = require('./floor');
-module.exports['fmod'] = require('./fmod');
-module.exports['getrandmax'] = require('./getrandmax');
-module.exports['hexdec'] = require('./hexdec');
-module.exports['hypot'] = require('./hypot');
-module.exports['is_finite'] = require('./is_finite');
-module.exports['is_infinite'] = require('./is_infinite');
-module.exports['is_nan'] = require('./is_nan');
-module.exports['lcg_value'] = require('./lcg_value');
-module.exports['log'] = require('./log');
-module.exports['log10'] = require('./log10');
-module.exports['log1p'] = require('./log1p');
-module.exports['max'] = require('./max');
-module.exports['min'] = require('./min');
-module.exports['mt_getrandmax'] = require('./mt_getrandmax');
-module.exports['mt_rand'] = require('./mt_rand');
-module.exports['octdec'] = require('./octdec');
-module.exports['pi'] = require('./pi');
-module.exports['pow'] = require('./pow');
-module.exports['rad2deg'] = require('./rad2deg');
-module.exports['rand'] = require('./rand');
-module.exports['round'] = require('./round');
-module.exports['sin'] = require('./sin');
-module.exports['sinh'] = require('./sinh');
-module.exports['sqrt'] = require('./sqrt');
-module.exports['tan'] = require('./tan');
-module.exports['tanh'] = require('./tanh');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/index.js.map b/node_modules/locutus/php/math/index.js.map
deleted file mode 100644
index bfe1166..0000000
--- a/node_modules/locutus/php/math/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/index.js"],"names":["module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C,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB","file":"index.js","sourcesContent":["module.exports['abs'] = require('./abs')\nmodule.exports['acos'] = require('./acos')\nmodule.exports['acosh'] = require('./acosh')\nmodule.exports['asin'] = require('./asin')\nmodule.exports['asinh'] = require('./asinh')\nmodule.exports['atan'] = require('./atan')\nmodule.exports['atan2'] = require('./atan2')\nmodule.exports['atanh'] = require('./atanh')\nmodule.exports['base_convert'] = require('./base_convert')\nmodule.exports['bindec'] = require('./bindec')\nmodule.exports['ceil'] = require('./ceil')\nmodule.exports['cos'] = require('./cos')\nmodule.exports['cosh'] = require('./cosh')\nmodule.exports['decbin'] = require('./decbin')\nmodule.exports['dechex'] = require('./dechex')\nmodule.exports['decoct'] = require('./decoct')\nmodule.exports['deg2rad'] = require('./deg2rad')\nmodule.exports['exp'] = require('./exp')\nmodule.exports['expm1'] = require('./expm1')\nmodule.exports['floor'] = require('./floor')\nmodule.exports['fmod'] = require('./fmod')\nmodule.exports['getrandmax'] = require('./getrandmax')\nmodule.exports['hexdec'] = require('./hexdec')\nmodule.exports['hypot'] = require('./hypot')\nmodule.exports['is_finite'] = require('./is_finite')\nmodule.exports['is_infinite'] = require('./is_infinite')\nmodule.exports['is_nan'] = require('./is_nan')\nmodule.exports['lcg_value'] = require('./lcg_value')\nmodule.exports['log'] = require('./log')\nmodule.exports['log10'] = require('./log10')\nmodule.exports['log1p'] = require('./log1p')\nmodule.exports['max'] = require('./max')\nmodule.exports['min'] = require('./min')\nmodule.exports['mt_getrandmax'] = require('./mt_getrandmax')\nmodule.exports['mt_rand'] = require('./mt_rand')\nmodule.exports['octdec'] = require('./octdec')\nmodule.exports['pi'] = require('./pi')\nmodule.exports['pow'] = require('./pow')\nmodule.exports['rad2deg'] = require('./rad2deg')\nmodule.exports['rand'] = require('./rand')\nmodule.exports['round'] = require('./round')\nmodule.exports['sin'] = require('./sin')\nmodule.exports['sinh'] = require('./sinh')\nmodule.exports['sqrt'] = require('./sqrt')\nmodule.exports['tan'] = require('./tan')\nmodule.exports['tanh'] = require('./tanh')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/is_finite.js b/node_modules/locutus/php/math/is_finite.js
deleted file mode 100644
index f292be9..0000000
--- a/node_modules/locutus/php/math/is_finite.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_finite(val) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_finite/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: is_finite(Infinity)
- // returns 1: false
- // example 2: is_finite(-Infinity)
- // returns 2: false
- // example 3: is_finite(0)
- // returns 3: true
-
- var warningType = '';
-
- if (val === Infinity || val === -Infinity) {
- return false;
- }
-
- // Some warnings for maximum PHP compatibility
- if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {
- warningType = Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object';
- } else if (typeof val === 'string' && !val.match(/^[+-]?\d/)) {
- // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.
- warningType = 'string';
- }
- if (warningType) {
- var msg = 'Warning: is_finite() expects parameter 1 to be double, ' + warningType + ' given';
- throw new Error(msg);
- }
-
- return true;
-};
-//# sourceMappingURL=is_finite.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/is_finite.js.map b/node_modules/locutus/php/math/is_finite.js.map
deleted file mode 100644
index 40faf73..0000000
--- a/node_modules/locutus/php/math/is_finite.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/is_finite.js"],"names":["module","exports","is_finite","val","warningType","Infinity","Object","prototype","toString","call","match","msg","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyB;AAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAc,EAAlB;;AAEA,MAAID,QAAQE,QAAR,IAAoBF,QAAQ,CAACE,QAAjC,EAA2C;AACzC,WAAO,KAAP;AACD;;AAED;AACA,MAAI,QAAOF,GAAP,yCAAOA,GAAP,OAAe,QAAnB,EAA6B;AAC3BC,kBAAeE,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BN,GAA/B,MAAwC,gBAAxC,GAA2D,OAA3D,GAAqE,QAApF;AACD,GAFD,MAEO,IAAI,OAAOA,GAAP,KAAe,QAAf,IAA2B,CAACA,IAAIO,KAAJ,CAAU,UAAV,CAAhC,EAAuD;AAC5D;AACAN,kBAAc,QAAd;AACD;AACD,MAAIA,WAAJ,EAAiB;AACf,QAAIO,MAAM,4DAA4DP,WAA5D,GAA0E,QAApF;AACA,UAAM,IAAIQ,KAAJ,CAAUD,GAAV,CAAN;AACD;;AAED,SAAO,IAAP;AACD,CA7BD","file":"is_finite.js","sourcesContent":["module.exports = function is_finite (val) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_finite/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: is_finite(Infinity)\n // returns 1: false\n // example 2: is_finite(-Infinity)\n // returns 2: false\n // example 3: is_finite(0)\n // returns 3: true\n\n var warningType = ''\n\n if (val === Infinity || val === -Infinity) {\n return false\n }\n\n // Some warnings for maximum PHP compatibility\n if (typeof val === 'object') {\n warningType = (Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object')\n } else if (typeof val === 'string' && !val.match(/^[+-]?\\d/)) {\n // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.\n warningType = 'string'\n }\n if (warningType) {\n var msg = 'Warning: is_finite() expects parameter 1 to be double, ' + warningType + ' given'\n throw new Error(msg)\n }\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/is_infinite.js b/node_modules/locutus/php/math/is_infinite.js
deleted file mode 100644
index 1460d51..0000000
--- a/node_modules/locutus/php/math/is_infinite.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_infinite(val) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_infinite/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: is_infinite(Infinity)
- // returns 1: true
- // example 2: is_infinite(-Infinity)
- // returns 2: true
- // example 3: is_infinite(0)
- // returns 3: false
-
- var warningType = '';
-
- if (val === Infinity || val === -Infinity) {
- return true;
- }
-
- // Some warnings for maximum PHP compatibility
- if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {
- warningType = Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object';
- } else if (typeof val === 'string' && !val.match(/^[+-]?\d/)) {
- // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.
- warningType = 'string';
- }
- if (warningType) {
- var msg = 'Warning: is_infinite() expects parameter 1 to be double, ' + warningType + ' given';
- throw new Error(msg);
- }
-
- return false;
-};
-//# sourceMappingURL=is_infinite.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/is_infinite.js.map b/node_modules/locutus/php/math/is_infinite.js.map
deleted file mode 100644
index 46e6ba0..0000000
--- a/node_modules/locutus/php/math/is_infinite.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/is_infinite.js"],"names":["module","exports","is_infinite","val","warningType","Infinity","Object","prototype","toString","call","match","msg","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,GAAtB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAc,EAAlB;;AAEA,MAAID,QAAQE,QAAR,IAAoBF,QAAQ,CAACE,QAAjC,EAA2C;AACzC,WAAO,IAAP;AACD;;AAED;AACA,MAAI,QAAOF,GAAP,yCAAOA,GAAP,OAAe,QAAnB,EAA6B;AAC3BC,kBAAeE,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BN,GAA/B,MAAwC,gBAAxC,GAA2D,OAA3D,GAAqE,QAApF;AACD,GAFD,MAEO,IAAI,OAAOA,GAAP,KAAe,QAAf,IAA2B,CAACA,IAAIO,KAAJ,CAAU,UAAV,CAAhC,EAAuD;AAC5D;AACAN,kBAAc,QAAd;AACD;AACD,MAAIA,WAAJ,EAAiB;AACf,QAAIO,MAAM,8DAA8DP,WAA9D,GAA4E,QAAtF;AACA,UAAM,IAAIQ,KAAJ,CAAUD,GAAV,CAAN;AACD;;AAED,SAAO,KAAP;AACD,CA7BD","file":"is_infinite.js","sourcesContent":["module.exports = function is_infinite (val) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_infinite/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: is_infinite(Infinity)\n // returns 1: true\n // example 2: is_infinite(-Infinity)\n // returns 2: true\n // example 3: is_infinite(0)\n // returns 3: false\n\n var warningType = ''\n\n if (val === Infinity || val === -Infinity) {\n return true\n }\n\n // Some warnings for maximum PHP compatibility\n if (typeof val === 'object') {\n warningType = (Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object')\n } else if (typeof val === 'string' && !val.match(/^[+-]?\\d/)) {\n // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.\n warningType = 'string'\n }\n if (warningType) {\n var msg = 'Warning: is_infinite() expects parameter 1 to be double, ' + warningType + ' given'\n throw new Error(msg)\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/is_nan.js b/node_modules/locutus/php/math/is_nan.js
deleted file mode 100644
index 58154d1..0000000
--- a/node_modules/locutus/php/math/is_nan.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_nan(val) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_nan/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // input by: Robin
- // example 1: is_nan(NaN)
- // returns 1: true
- // example 2: is_nan(0)
- // returns 2: false
-
- var warningType = '';
-
- if (typeof val === 'number' && isNaN(val)) {
- return true;
- }
-
- // Some errors for maximum PHP compatibility
- if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {
- warningType = Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object';
- } else if (typeof val === 'string' && !val.match(/^[+-]?\d/)) {
- // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.
- warningType = 'string';
- }
- if (warningType) {
- throw new Error('Warning: is_nan() expects parameter 1 to be double, ' + warningType + ' given');
- }
-
- return false;
-};
-//# sourceMappingURL=is_nan.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/is_nan.js.map b/node_modules/locutus/php/math/is_nan.js.map
deleted file mode 100644
index c798bd0..0000000
--- a/node_modules/locutus/php/math/is_nan.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/is_nan.js"],"names":["module","exports","is_nan","val","warningType","isNaN","Object","prototype","toString","call","match","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,GAAjB,EAAsB;AAAE;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAc,EAAlB;;AAEA,MAAI,OAAOD,GAAP,KAAe,QAAf,IAA2BE,MAAMF,GAAN,CAA/B,EAA2C;AACzC,WAAO,IAAP;AACD;;AAED;AACA,MAAI,QAAOA,GAAP,yCAAOA,GAAP,OAAe,QAAnB,EAA6B;AAC3BC,kBAAeE,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BN,GAA/B,MAAwC,gBAAxC,GAA2D,OAA3D,GAAqE,QAApF;AACD,GAFD,MAEO,IAAI,OAAOA,GAAP,KAAe,QAAf,IAA2B,CAACA,IAAIO,KAAJ,CAAU,UAAV,CAAhC,EAAuD;AAC5D;AACAN,kBAAc,QAAd;AACD;AACD,MAAIA,WAAJ,EAAiB;AACf,UAAM,IAAIO,KAAJ,CAAU,yDAAyDP,WAAzD,GAAuE,QAAjF,CAAN;AACD;;AAED,SAAO,KAAP;AACD,CA3BD","file":"is_nan.js","sourcesContent":["module.exports = function is_nan (val) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_nan/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // input by: Robin\n // example 1: is_nan(NaN)\n // returns 1: true\n // example 2: is_nan(0)\n // returns 2: false\n\n var warningType = ''\n\n if (typeof val === 'number' && isNaN(val)) {\n return true\n }\n\n // Some errors for maximum PHP compatibility\n if (typeof val === 'object') {\n warningType = (Object.prototype.toString.call(val) === '[object Array]' ? 'array' : 'object')\n } else if (typeof val === 'string' && !val.match(/^[+-]?\\d/)) {\n // simulate PHP's behaviour: '-9a' doesn't give a warning, but 'a9' does.\n warningType = 'string'\n }\n if (warningType) {\n throw new Error('Warning: is_nan() expects parameter 1 to be double, ' + warningType + ' given')\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/lcg_value.js b/node_modules/locutus/php/math/lcg_value.js
deleted file mode 100644
index 17afc8c..0000000
--- a/node_modules/locutus/php/math/lcg_value.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-
-module.exports = function lcg_value() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/lcg_value/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: var $rnd = lcg_value()
- // example 1: var $result = $rnd >= 0 && $rnd <= 1
- // returns 1: true
-
- return Math.random();
-};
-//# sourceMappingURL=lcg_value.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/lcg_value.js.map b/node_modules/locutus/php/math/lcg_value.js.map
deleted file mode 100644
index 89cbf41..0000000
--- a/node_modules/locutus/php/math/lcg_value.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/lcg_value.js"],"names":["module","exports","lcg_value","Math","random"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,GAAsB;AAAE;AACvC;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKC,MAAL,EAAP;AACD,CARD","file":"lcg_value.js","sourcesContent":["module.exports = function lcg_value () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/lcg_value/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: var $rnd = lcg_value()\n // example 1: var $result = $rnd >= 0 && $rnd <= 1\n // returns 1: true\n\n return Math.random()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/log.js b/node_modules/locutus/php/math/log.js
deleted file mode 100644
index 6846759..0000000
--- a/node_modules/locutus/php/math/log.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function log(arg, base) {
- // discuss at: http://locutus.io/php/log/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: log(8723321.4, 7)
- // returns 1: 8.212871815082147
-
- return typeof base === 'undefined' ? Math.log(arg) : Math.log(arg) / Math.log(base);
-};
-//# sourceMappingURL=log.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/log.js.map b/node_modules/locutus/php/math/log.js.map
deleted file mode 100644
index 77573e8..0000000
--- a/node_modules/locutus/php/math/log.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/log.js"],"names":["module","exports","log","arg","base","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmBC,IAAnB,EAAyB;AACxC;AACA;AACA;AACA;AACA;;AAEA,SAAQ,OAAOA,IAAP,KAAgB,WAAjB,GACHC,KAAKH,GAAL,CAASC,GAAT,CADG,GAEHE,KAAKH,GAAL,CAASC,GAAT,IAAgBE,KAAKH,GAAL,CAASE,IAAT,CAFpB;AAGD,CAVD","file":"log.js","sourcesContent":["module.exports = function log (arg, base) {\n // discuss at: http://locutus.io/php/log/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: log(8723321.4, 7)\n // returns 1: 8.212871815082147\n\n return (typeof base === 'undefined')\n ? Math.log(arg)\n : Math.log(arg) / Math.log(base)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/log10.js b/node_modules/locutus/php/math/log10.js
deleted file mode 100644
index 3c36309..0000000
--- a/node_modules/locutus/php/math/log10.js
+++ /dev/null
@@ -1,16 +0,0 @@
-"use strict";
-
-module.exports = function log10(arg) {
- // discuss at: http://locutus.io/php/log10/
- // original by: Philip Peterson
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Tod Gentille
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: log10(10)
- // returns 1: 1
- // example 2: log10(1)
- // returns 2: 0
-
- return Math.log(arg) / 2.302585092994046; // Math.LN10
-};
-//# sourceMappingURL=log10.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/log10.js.map b/node_modules/locutus/php/math/log10.js.map
deleted file mode 100644
index 98e2889..0000000
--- a/node_modules/locutus/php/math/log10.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/log10.js"],"names":["module","exports","log10","arg","Math","log"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKC,GAAL,CAASF,GAAT,IAAgB,iBAAvB,CAXoC,CAWK;AAC1C,CAZD","file":"log10.js","sourcesContent":["module.exports = function log10 (arg) {\n // discuss at: http://locutus.io/php/log10/\n // original by: Philip Peterson\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Tod Gentille\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: log10(10)\n // returns 1: 1\n // example 2: log10(1)\n // returns 2: 0\n\n return Math.log(arg) / 2.302585092994046 // Math.LN10\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/log1p.js b/node_modules/locutus/php/math/log1p.js
deleted file mode 100644
index 9bcede5..0000000
--- a/node_modules/locutus/php/math/log1p.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-module.exports = function log1p(x) {
- // discuss at: http://locutus.io/php/log1p/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Robert Eisele (http://www.xarg.org/)
- // note 1: Precision 'n' can be adjusted as desired
- // example 1: log1p(1e-15)
- // returns 1: 9.999999999999995e-16
-
- var ret = 0;
- // degree of precision
- var n = 50;
-
- if (x <= -1) {
- // JavaScript style would be to return Number.NEGATIVE_INFINITY
- return '-INF';
- }
- if (x < 0 || x > 1) {
- return Math.log(1 + x);
- }
- for (var i = 1; i < n; i++) {
- ret += Math.pow(-x, i) / i;
- }
-
- return -ret;
-};
-//# sourceMappingURL=log1p.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/log1p.js.map b/node_modules/locutus/php/math/log1p.js.map
deleted file mode 100644
index 73d2962..0000000
--- a/node_modules/locutus/php/math/log1p.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/log1p.js"],"names":["module","exports","log1p","x","ret","n","Math","log","i","pow"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,CAAV;AACA;AACA,MAAIC,IAAI,EAAR;;AAEA,MAAIF,KAAK,CAAC,CAAV,EAAa;AACX;AACA,WAAO,MAAP;AACD;AACD,MAAIA,IAAI,CAAJ,IAASA,IAAI,CAAjB,EAAoB;AAClB,WAAOG,KAAKC,GAAL,CAAS,IAAIJ,CAAb,CAAP;AACD;AACD,OAAK,IAAIK,IAAI,CAAb,EAAgBA,IAAIH,CAApB,EAAuBG,GAAvB,EAA4B;AAC1BJ,WAAOE,KAAKG,GAAL,CAAS,CAACN,CAAV,EAAaK,CAAb,IAAkBA,CAAzB;AACD;;AAED,SAAO,CAACJ,GAAR;AACD,CAxBD","file":"log1p.js","sourcesContent":["module.exports = function log1p (x) {\n // discuss at: http://locutus.io/php/log1p/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Robert Eisele (http://www.xarg.org/)\n // note 1: Precision 'n' can be adjusted as desired\n // example 1: log1p(1e-15)\n // returns 1: 9.999999999999995e-16\n\n var ret = 0\n // degree of precision\n var n = 50\n\n if (x <= -1) {\n // JavaScript style would be to return Number.NEGATIVE_INFINITY\n return '-INF'\n }\n if (x < 0 || x > 1) {\n return Math.log(1 + x)\n }\n for (var i = 1; i < n; i++) {\n ret += Math.pow(-x, i) / i\n }\n\n return -ret\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/max.js b/node_modules/locutus/php/math/max.js
deleted file mode 100644
index 8e55173..0000000
--- a/node_modules/locutus/php/math/max.js
+++ /dev/null
@@ -1,119 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function max() {
- // discuss at: http://locutus.io/php/max/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Jack
- // note 1: Long code cause we're aiming for maximum PHP compatibility
- // example 1: max(1, 3, 5, 6, 7)
- // returns 1: 7
- // example 2: max([2, 4, 5])
- // returns 2: 5
- // example 3: max(0, 'hello')
- // returns 3: 0
- // example 4: max('hello', 0)
- // returns 4: 'hello'
- // example 5: max(-1, 'hello')
- // returns 5: 'hello'
- // example 6: max([2, 4, 8], [2, 5, 7])
- // returns 6: [2, 5, 7]
-
- var ar;
- var retVal;
- var i = 0;
- var n = 0;
- var argv = arguments;
- var argc = argv.length;
- var _obj2Array = function _obj2Array(obj) {
- if (Object.prototype.toString.call(obj) === '[object Array]') {
- return obj;
- } else {
- var ar = [];
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- ar.push(obj[i]);
- }
- }
- return ar;
- }
- };
- var _compare = function _compare(current, next) {
- var i = 0;
- var n = 0;
- var tmp = 0;
- var nl = 0;
- var cl = 0;
-
- if (current === next) {
- return 0;
- } else if ((typeof current === 'undefined' ? 'undefined' : _typeof(current)) === 'object') {
- if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- current = _obj2Array(current);
- next = _obj2Array(next);
- cl = current.length;
- nl = next.length;
- if (nl > cl) {
- return 1;
- } else if (nl < cl) {
- return -1;
- }
- for (i = 0, n = cl; i < n; ++i) {
- tmp = _compare(current[i], next[i]);
- if (tmp === 1) {
- return 1;
- } else if (tmp === -1) {
- return -1;
- }
- }
- return 0;
- }
- return -1;
- } else if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- return 1;
- } else if (isNaN(next) && !isNaN(current)) {
- if (current === 0) {
- return 0;
- }
- return current < 0 ? 1 : -1;
- } else if (isNaN(current) && !isNaN(next)) {
- if (next === 0) {
- return 0;
- }
- return next > 0 ? 1 : -1;
- }
-
- if (next === current) {
- return 0;
- }
-
- return next > current ? 1 : -1;
- };
-
- if (argc === 0) {
- throw new Error('At least one value should be passed to max()');
- } else if (argc === 1) {
- if (_typeof(argv[0]) === 'object') {
- ar = _obj2Array(argv[0]);
- } else {
- throw new Error('Wrong parameter count for max()');
- }
- if (ar.length === 0) {
- throw new Error('Array must contain at least one element for max()');
- }
- } else {
- ar = argv;
- }
-
- retVal = ar[0];
- for (i = 1, n = ar.length; i < n; ++i) {
- if (_compare(retVal, ar[i]) === 1) {
- retVal = ar[i];
- }
- }
-
- return retVal;
-};
-//# sourceMappingURL=max.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/max.js.map b/node_modules/locutus/php/math/max.js.map
deleted file mode 100644
index 003ad70..0000000
--- a/node_modules/locutus/php/math/max.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/max.js"],"names":["module","exports","max","ar","retVal","i","n","argv","arguments","argc","length","_obj2Array","obj","Object","prototype","toString","call","hasOwnProperty","push","_compare","current","next","tmp","nl","cl","isNaN","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,GAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,EAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,OAAOC,SAAX;AACA,MAAIC,OAAOF,KAAKG,MAAhB;AACA,MAAIC,aAAa,SAAbA,UAAa,CAAUC,GAAV,EAAe;AAC9B,QAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BJ,GAA/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AAT,EAAiBD,GAAGE,CAAH,CAAjB,MAA4B,CAAhC,EAAmC;AACjCD,eAASD,GAAGE,CAAH,CAAT;AACD;AACF;;AAED,SAAOD,MAAP;AACD,CAjHD","file":"max.js","sourcesContent":["module.exports = function max () {\n // discuss at: http://locutus.io/php/max/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Jack\n // note 1: Long code cause we're aiming for maximum PHP compatibility\n // example 1: max(1, 3, 5, 6, 7)\n // returns 1: 7\n // example 2: max([2, 4, 5])\n // returns 2: 5\n // example 3: max(0, 'hello')\n // returns 3: 0\n // example 4: max('hello', 0)\n // returns 4: 'hello'\n // example 5: max(-1, 'hello')\n // returns 5: 'hello'\n // example 6: max([2, 4, 8], [2, 5, 7])\n // returns 6: [2, 5, 7]\n\n var ar\n var retVal\n var i = 0\n var n = 0\n var argv = arguments\n var argc = argv.length\n var _obj2Array = function (obj) {\n if (Object.prototype.toString.call(obj) === '[object Array]') {\n return obj\n } else {\n var ar = []\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ar.push(obj[i])\n }\n }\n return ar\n }\n }\n var _compare = function (current, next) {\n var i = 0\n var n = 0\n var tmp = 0\n var nl = 0\n var cl = 0\n\n if (current === next) {\n return 0\n } else if (typeof current === 'object') {\n if (typeof next === 'object') {\n current = _obj2Array(current)\n next = _obj2Array(next)\n cl = current.length\n nl = next.length\n if (nl > cl) {\n return 1\n } else if (nl < cl) {\n return -1\n }\n for (i = 0, n = cl; i < n; ++i) {\n tmp = _compare(current[i], next[i])\n if (tmp === 1) {\n return 1\n } else if (tmp === -1) {\n return -1\n }\n }\n return 0\n }\n return -1\n } else if (typeof next === 'object') {\n return 1\n } else if (isNaN(next) && !isNaN(current)) {\n if (current === 0) {\n return 0\n }\n return (current < 0 ? 1 : -1)\n } else if (isNaN(current) && !isNaN(next)) {\n if (next === 0) {\n return 0\n }\n return (next > 0 ? 1 : -1)\n }\n\n if (next === current) {\n return 0\n }\n\n return (next > current ? 1 : -1)\n }\n\n if (argc === 0) {\n throw new Error('At least one value should be passed to max()')\n } else if (argc === 1) {\n if (typeof argv[0] === 'object') {\n ar = _obj2Array(argv[0])\n } else {\n throw new Error('Wrong parameter count for max()')\n }\n if (ar.length === 0) {\n throw new Error('Array must contain at least one element for max()')\n }\n } else {\n ar = argv\n }\n\n retVal = ar[0]\n for (i = 1, n = ar.length; i < n; ++i) {\n if (_compare(retVal, ar[i]) === 1) {\n retVal = ar[i]\n }\n }\n\n return retVal\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/min.js b/node_modules/locutus/php/math/min.js
deleted file mode 100644
index 40d2e29..0000000
--- a/node_modules/locutus/php/math/min.js
+++ /dev/null
@@ -1,121 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function min() {
- // discuss at: http://locutus.io/php/min/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Jack
- // note 1: Long code cause we're aiming for maximum PHP compatibility
- // example 1: min(1, 3, 5, 6, 7)
- // returns 1: 1
- // example 2: min([2, 4, 5])
- // returns 2: 2
- // example 3: min(0, 'hello')
- // returns 3: 0
- // example 4: min('hello', 0)
- // returns 4: 'hello'
- // example 5: min(-1, 'hello')
- // returns 5: -1
- // example 6: min([2, 4, 8], [2, 5, 7])
- // returns 6: [2, 4, 8]
-
- var ar;
- var retVal;
- var i = 0;
- var n = 0;
- var argv = arguments;
- var argc = argv.length;
- var _obj2Array = function _obj2Array(obj) {
- if (Object.prototype.toString.call(obj) === '[object Array]') {
- return obj;
- }
- var ar = [];
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- ar.push(obj[i]);
- }
- }
- return ar;
- };
-
- var _compare = function _compare(current, next) {
- var i = 0;
- var n = 0;
- var tmp = 0;
- var nl = 0;
- var cl = 0;
-
- if (current === next) {
- return 0;
- } else if ((typeof current === 'undefined' ? 'undefined' : _typeof(current)) === 'object') {
- if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- current = _obj2Array(current);
- next = _obj2Array(next);
- cl = current.length;
- nl = next.length;
- if (nl > cl) {
- return 1;
- } else if (nl < cl) {
- return -1;
- }
- for (i = 0, n = cl; i < n; ++i) {
- tmp = _compare(current[i], next[i]);
- if (tmp === 1) {
- return 1;
- } else if (tmp === -1) {
- return -1;
- }
- }
- return 0;
- }
- return -1;
- } else if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- return 1;
- } else if (isNaN(next) && !isNaN(current)) {
- if (current === 0) {
- return 0;
- }
- return current < 0 ? 1 : -1;
- } else if (isNaN(current) && !isNaN(next)) {
- if (next === 0) {
- return 0;
- }
- return next > 0 ? 1 : -1;
- }
-
- if (next === current) {
- return 0;
- }
-
- return next > current ? 1 : -1;
- };
-
- if (argc === 0) {
- throw new Error('At least one value should be passed to min()');
- } else if (argc === 1) {
- if (_typeof(argv[0]) === 'object') {
- ar = _obj2Array(argv[0]);
- } else {
- throw new Error('Wrong parameter count for min()');
- }
-
- if (ar.length === 0) {
- throw new Error('Array must contain at least one element for min()');
- }
- } else {
- ar = argv;
- }
-
- retVal = ar[0];
-
- for (i = 1, n = ar.length; i < n; ++i) {
- if (_compare(retVal, ar[i]) === -1) {
- retVal = ar[i];
- }
- }
-
- return retVal;
-};
-//# sourceMappingURL=min.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/min.js.map b/node_modules/locutus/php/math/min.js.map
deleted file mode 100644
index 0fdaf9c..0000000
--- a/node_modules/locutus/php/math/min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/min.js"],"names":["module","exports","min","ar","retVal","i","n","argv","arguments","argc","length","_obj2Array","obj","Object","prototype","toString","call","hasOwnProperty","push","_compare","current","next","tmp","nl","cl","isNaN","Error"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,GAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,EAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,OAAOC,SAAX;AACA,MAAIC,OAAOF,KAAKG,MAAhB;AACA,MAAIC,aAAa,SAAbA,UAAa,CAAUC,GAAV,EAAe;AAC9B,QAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BJ,GAA/B,MAAwC,gBAA5C,EAA8D;AAC5D,aAAOA,GAAP;AACD;AACD,QAAIT,KAAK,EAAT;AACA,SAAK,IAAIE,CAAT,IAAcO,GAAd,EAAmB;AACjB,UAAIA,IAAIK,cAAJ,CAAmBZ,CAAnB,CAAJ,EAA2B;AACzBF,WAAGe,IAAH,CAAQN,IAAIP,CAAJ,CAAR;AACD;AACF;AACD,WAAOF,EAAP;AACD,GAXD;;AAaA,MAAIgB,WAAW,SAAXA,QAAW,CAAUC,OAAV,EAAmBC,IAAnB,EAAyB;AACtC,QAAIhB,IAAI,CAAR;AACA,QAAIC,IAAI,CAAR;AACA,QAAIgB,MAAM,CAAV;AACA,QAAIC,KAAK,CAAT;AACA,QAAIC,KAAK,CAAT;;AAEA,QAAIJ,YAAYC,IAAhB,EAAsB;AACpB,aAAO,CAAP;AACD,KAFD,MAEO,IAAI,QAAOD,OAAP,yCAAOA,OAAP,OAAmB,QAAvB,EAAiC;AACtC,UAAI,QAAOC,IAAP,yCAAOA,IAAP,OAAgB,QAApB,EAA8B;AAC5BD,kBAAUT,WAAWS,OAAX,CAAV;AACAC,eAAOV,WAAWU,IAAX,CAAP;AACAG,aAAKJ,QAAQV,MAAb;AACAa,aAA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AAI,QAAOF,KAAK,CAAL,CAAP,MAAmB,QAAvB,EAAiC;AAC/BJ,WAAKQ,WAAWJ,KAAK,CAAL,CAAX,CAAL;AACD,KAFD,MAEO;AACL,YAAM,IAAImB,KAAJ,CAAU,iCAAV,CAAN;AACD;;AAED,QAAIvB,GAAGO,MAAH,KAAc,CAAlB,EAAqB;AACnB,YAAM,IAAIgB,KAAJ,CAAU,mDAAV,CAAN;AACD;AACF,GAVM,MAUA;AACLvB,SAAKI,IAAL;AACD;;AAEDH,WAASD,GAAG,CAAH,CAAT;;AAEA,OAAKE,IAAI,CAAJ,EAAOC,IAAIH,GAAGO,MAAnB,EAA2BL,IAAIC,CAA/B,EAAkC,EAAED,CAApC,EAAuC;AACrC,QAAIc,SAASf,MAAT,EAAiBD,GAAGE,CAAH,CAAjB,MAA4B,CAAC,CAAjC,EAAoC;AAClCD,eAASD,GAAGE,CAAH,CAAT;AACD;AACF;;AAED,SAAOD,MAAP;AACD,CAnHD","file":"min.js","sourcesContent":["module.exports = function min () {\n // discuss at: http://locutus.io/php/min/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Jack\n // note 1: Long code cause we're aiming for maximum PHP compatibility\n // example 1: min(1, 3, 5, 6, 7)\n // returns 1: 1\n // example 2: min([2, 4, 5])\n // returns 2: 2\n // example 3: min(0, 'hello')\n // returns 3: 0\n // example 4: min('hello', 0)\n // returns 4: 'hello'\n // example 5: min(-1, 'hello')\n // returns 5: -1\n // example 6: min([2, 4, 8], [2, 5, 7])\n // returns 6: [2, 4, 8]\n\n var ar\n var retVal\n var i = 0\n var n = 0\n var argv = arguments\n var argc = argv.length\n var _obj2Array = function (obj) {\n if (Object.prototype.toString.call(obj) === '[object Array]') {\n return obj\n }\n var ar = []\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ar.push(obj[i])\n }\n }\n return ar\n }\n\n var _compare = function (current, next) {\n var i = 0\n var n = 0\n var tmp = 0\n var nl = 0\n var cl = 0\n\n if (current === next) {\n return 0\n } else if (typeof current === 'object') {\n if (typeof next === 'object') {\n current = _obj2Array(current)\n next = _obj2Array(next)\n cl = current.length\n nl = next.length\n if (nl > cl) {\n return 1\n } else if (nl < cl) {\n return -1\n }\n for (i = 0, n = cl; i < n; ++i) {\n tmp = _compare(current[i], next[i])\n if (tmp === 1) {\n return 1\n } else if (tmp === -1) {\n return -1\n }\n }\n return 0\n }\n return -1\n } else if (typeof next === 'object') {\n return 1\n } else if (isNaN(next) && !isNaN(current)) {\n if (current === 0) {\n return 0\n }\n return (current < 0 ? 1 : -1)\n } else if (isNaN(current) && !isNaN(next)) {\n if (next === 0) {\n return 0\n }\n return (next > 0 ? 1 : -1)\n }\n\n if (next === current) {\n return 0\n }\n\n return (next > current ? 1 : -1)\n }\n\n if (argc === 0) {\n throw new Error('At least one value should be passed to min()')\n } else if (argc === 1) {\n if (typeof argv[0] === 'object') {\n ar = _obj2Array(argv[0])\n } else {\n throw new Error('Wrong parameter count for min()')\n }\n\n if (ar.length === 0) {\n throw new Error('Array must contain at least one element for min()')\n }\n } else {\n ar = argv\n }\n\n retVal = ar[0]\n\n for (i = 1, n = ar.length; i < n; ++i) {\n if (_compare(retVal, ar[i]) === -1) {\n retVal = ar[i]\n }\n }\n\n return retVal\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/mt_getrandmax.js b/node_modules/locutus/php/math/mt_getrandmax.js
deleted file mode 100644
index 1f76ca7..0000000
--- a/node_modules/locutus/php/math/mt_getrandmax.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function mt_getrandmax() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/mt_getrandmax/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: mt_getrandmax()
- // returns 1: 2147483647
-
- return 2147483647;
-};
-//# sourceMappingURL=mt_getrandmax.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/mt_getrandmax.js.map b/node_modules/locutus/php/math/mt_getrandmax.js.map
deleted file mode 100644
index 3efa229..0000000
--- a/node_modules/locutus/php/math/mt_getrandmax.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/mt_getrandmax.js"],"names":["module","exports","mt_getrandmax"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,GAA0B;AAAE;AAC3C;AACA;AACA;AACA;;AAEA,SAAO,UAAP;AACD,CAPD","file":"mt_getrandmax.js","sourcesContent":["module.exports = function mt_getrandmax () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/mt_getrandmax/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: mt_getrandmax()\n // returns 1: 2147483647\n\n return 2147483647\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/mt_rand.js b/node_modules/locutus/php/math/mt_rand.js
deleted file mode 100644
index 42f3be5..0000000
--- a/node_modules/locutus/php/math/mt_rand.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function mt_rand(min, max) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/mt_rand/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: Kongo
- // example 1: mt_rand(1, 1)
- // returns 1: 1
-
- var argc = arguments.length;
- if (argc === 0) {
- min = 0;
- max = 2147483647;
- } else if (argc === 1) {
- throw new Error('Warning: mt_rand() expects exactly 2 parameters, 1 given');
- } else {
- min = parseInt(min, 10);
- max = parseInt(max, 10);
- }
- return Math.floor(Math.random() * (max - min + 1)) + min;
-};
-//# sourceMappingURL=mt_rand.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/mt_rand.js.map b/node_modules/locutus/php/math/mt_rand.js.map
deleted file mode 100644
index fbd5a4d..0000000
--- a/node_modules/locutus/php/math/mt_rand.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/mt_rand.js"],"names":["module","exports","mt_rand","min","max","argc","arguments","length","Error","parseInt","Math","floor","random"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuBC,GAAvB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIF,SAAS,CAAb,EAAgB;AACdF,UAAM,CAAN;AACAC,UAAM,UAAN;AACD,GAHD,MAGO,IAAIC,SAAS,CAAb,EAAgB;AACrB,UAAM,IAAIG,KAAJ,CAAU,0DAAV,CAAN;AACD,GAFM,MAEA;AACLL,UAAMM,SAASN,GAAT,EAAc,EAAd,CAAN;AACAC,UAAMK,SAASL,GAAT,EAAc,EAAd,CAAN;AACD;AACD,SAAOM,KAAKC,KAAL,CAAWD,KAAKE,MAAL,MAAiBR,MAAMD,GAAN,GAAY,CAA7B,CAAX,IAA8CA,GAArD;AACD,CAnBD","file":"mt_rand.js","sourcesContent":["module.exports = function mt_rand (min, max) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/mt_rand/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: Kongo\n // example 1: mt_rand(1, 1)\n // returns 1: 1\n\n var argc = arguments.length\n if (argc === 0) {\n min = 0\n max = 2147483647\n } else if (argc === 1) {\n throw new Error('Warning: mt_rand() expects exactly 2 parameters, 1 given')\n } else {\n min = parseInt(min, 10)\n max = parseInt(max, 10)\n }\n return Math.floor(Math.random() * (max - min + 1)) + min\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/octdec.js b/node_modules/locutus/php/math/octdec.js
deleted file mode 100644
index e94fba6..0000000
--- a/node_modules/locutus/php/math/octdec.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function octdec(octString) {
- // discuss at: http://locutus.io/php/octdec/
- // original by: Philippe Baumann
- // example 1: octdec('77')
- // returns 1: 63
-
- octString = (octString + '').replace(/[^0-7]/gi, '');
- return parseInt(octString, 8);
-};
-//# sourceMappingURL=octdec.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/octdec.js.map b/node_modules/locutus/php/math/octdec.js.map
deleted file mode 100644
index 7b10ee2..0000000
--- a/node_modules/locutus/php/math/octdec.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/octdec.js"],"names":["module","exports","octdec","octString","replace","parseInt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,SAAjB,EAA4B;AAC3C;AACA;AACA;AACA;;AAEAA,cAAY,CAACA,YAAY,EAAb,EAAiBC,OAAjB,CAAyB,UAAzB,EAAqC,EAArC,CAAZ;AACA,SAAOC,SAASF,SAAT,EAAoB,CAApB,CAAP;AACD,CARD","file":"octdec.js","sourcesContent":["module.exports = function octdec (octString) {\n // discuss at: http://locutus.io/php/octdec/\n // original by: Philippe Baumann\n // example 1: octdec('77')\n // returns 1: 63\n\n octString = (octString + '').replace(/[^0-7]/gi, '')\n return parseInt(octString, 8)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/pi.js b/node_modules/locutus/php/math/pi.js
deleted file mode 100644
index ac13ffb..0000000
--- a/node_modules/locutus/php/math/pi.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function pi() {
- // discuss at: http://locutus.io/php/pi/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: dude
- // example 1: pi(8723321.4)
- // returns 1: 3.141592653589793
-
- return 3.141592653589793; // Math.PI
-};
-//# sourceMappingURL=pi.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/pi.js.map b/node_modules/locutus/php/math/pi.js.map
deleted file mode 100644
index 48d8d6f..0000000
--- a/node_modules/locutus/php/math/pi.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/pi.js"],"names":["module","exports","pi"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,EAAT,GAAe;AAC9B;AACA;AACA;AACA;AACA;;AAEA,SAAO,iBAAP,CAP8B,CAOL;AAC1B,CARD","file":"pi.js","sourcesContent":["module.exports = function pi () {\n // discuss at: http://locutus.io/php/pi/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: dude\n // example 1: pi(8723321.4)\n // returns 1: 3.141592653589793\n\n return 3.141592653589793 // Math.PI\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/pow.js b/node_modules/locutus/php/math/pow.js
deleted file mode 100644
index c9ef62d..0000000
--- a/node_modules/locutus/php/math/pow.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function pow(base, exp) {
- // discuss at: http://locutus.io/php/pow/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: pow(8723321.4, 7)
- // returns 1: 3.8439091680778995e+48
-
- return Math.pow(base, exp);
-};
-//# sourceMappingURL=pow.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/pow.js.map b/node_modules/locutus/php/math/pow.js.map
deleted file mode 100644
index 2e839fc..0000000
--- a/node_modules/locutus/php/math/pow.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/pow.js"],"names":["module","exports","pow","base","exp","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,IAAd,EAAoBC,GAApB,EAAyB;AACxC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKH,GAAL,CAASC,IAAT,EAAeC,GAAf,CAAP;AACD,CAPD","file":"pow.js","sourcesContent":["module.exports = function pow (base, exp) {\n // discuss at: http://locutus.io/php/pow/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: pow(8723321.4, 7)\n // returns 1: 3.8439091680778995e+48\n\n return Math.pow(base, exp)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/rad2deg.js b/node_modules/locutus/php/math/rad2deg.js
deleted file mode 100644
index 1cdd933..0000000
--- a/node_modules/locutus/php/math/rad2deg.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function rad2deg(angle) {
- // discuss at: http://locutus.io/php/rad2deg/
- // original by: Enrique Gonzalez
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: rad2deg(3.141592653589793)
- // returns 1: 180
-
- return angle * 57.29577951308232; // angle / Math.PI * 180
-};
-//# sourceMappingURL=rad2deg.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/rad2deg.js.map b/node_modules/locutus/php/math/rad2deg.js.map
deleted file mode 100644
index 36b9989..0000000
--- a/node_modules/locutus/php/math/rad2deg.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/rad2deg.js"],"names":["module","exports","rad2deg","angle"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,KAAlB,EAAyB;AACxC;AACA;AACA;AACA;AACA;;AAEA,SAAOA,QAAQ,iBAAf,CAPwC,CAOP;AAClC,CARD","file":"rad2deg.js","sourcesContent":["module.exports = function rad2deg (angle) {\n // discuss at: http://locutus.io/php/rad2deg/\n // original by: Enrique Gonzalez\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: rad2deg(3.141592653589793)\n // returns 1: 180\n\n return angle * 57.29577951308232 // angle / Math.PI * 180\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/rand.js b/node_modules/locutus/php/math/rand.js
deleted file mode 100644
index 086900d..0000000
--- a/node_modules/locutus/php/math/rand.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-module.exports = function rand(min, max) {
- // discuss at: http://locutus.io/php/rand/
- // original by: Leslie Hoare
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // note 1: See the commented out code below for a version which
- // note 1: will work with our experimental (though probably unnecessary)
- // note 1: srand() function)
- // example 1: rand(1, 1)
- // returns 1: 1
-
- var argc = arguments.length;
- if (argc === 0) {
- min = 0;
- max = 2147483647;
- } else if (argc === 1) {
- throw new Error('Warning: rand() expects exactly 2 parameters, 1 given');
- }
- return Math.floor(Math.random() * (max - min + 1)) + min;
-};
-//# sourceMappingURL=rand.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/rand.js.map b/node_modules/locutus/php/math/rand.js.map
deleted file mode 100644
index fcf11c0..0000000
--- a/node_modules/locutus/php/math/rand.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/rand.js"],"names":["module","exports","rand","min","max","argc","arguments","length","Error","Math","floor","random"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoBC,GAApB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,UAAUC,MAArB;AACA,MAAIF,SAAS,CAAb,EAAgB;AACdF,UAAM,CAAN;AACAC,UAAM,UAAN;AACD,GAHD,MAGO,IAAIC,SAAS,CAAb,EAAgB;AACrB,UAAM,IAAIG,KAAJ,CAAU,uDAAV,CAAN;AACD;AACD,SAAOC,KAAKC,KAAL,CAAWD,KAAKE,MAAL,MAAiBP,MAAMD,GAAN,GAAY,CAA7B,CAAX,IAA8CA,GAArD;AACD,CAlBD","file":"rand.js","sourcesContent":["module.exports = function rand (min, max) {\n // discuss at: http://locutus.io/php/rand/\n // original by: Leslie Hoare\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // note 1: See the commented out code below for a version which\n // note 1: will work with our experimental (though probably unnecessary)\n // note 1: srand() function)\n // example 1: rand(1, 1)\n // returns 1: 1\n\n var argc = arguments.length\n if (argc === 0) {\n min = 0\n max = 2147483647\n } else if (argc === 1) {\n throw new Error('Warning: rand() expects exactly 2 parameters, 1 given')\n }\n return Math.floor(Math.random() * (max - min + 1)) + min\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/round.js b/node_modules/locutus/php/math/round.js
deleted file mode 100644
index 372bc5b..0000000
--- a/node_modules/locutus/php/math/round.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict';
-
-module.exports = function round(value, precision, mode) {
- // discuss at: http://locutus.io/php/round/
- // original by: Philip Peterson
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: T.Wild
- // revised by: Rafał Kukawski (http://blog.kukawski.pl)
- // input by: Greenseed
- // input by: meo
- // input by: William
- // input by: Josep Sanz (http://www.ws3.es/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // note 1: Great work. Ideas for improvement:
- // note 1: - code more compliant with developer guidelines
- // note 1: - for implementing PHP constant arguments look at
- // note 1: the pathinfo() function, it offers the greatest
- // note 1: flexibility & compatibility possible
- // example 1: round(1241757, -3)
- // returns 1: 1242000
- // example 2: round(3.6)
- // returns 2: 4
- // example 3: round(2.835, 2)
- // returns 3: 2.84
- // example 4: round(1.1749999999999, 2)
- // returns 4: 1.17
- // example 5: round(58551.799999999996, 2)
- // returns 5: 58551.8
-
- var m, f, isHalf, sgn; // helper variables
- // making sure precision is integer
- precision |= 0;
- m = Math.pow(10, precision);
- value *= m;
- // sign of the number
- sgn = value > 0 | -(value < 0);
- isHalf = value % 1 === 0.5 * sgn;
- f = Math.floor(value);
-
- if (isHalf) {
- switch (mode) {
- case 'PHP_ROUND_HALF_DOWN':
- // rounds .5 toward zero
- value = f + (sgn < 0);
- break;
- case 'PHP_ROUND_HALF_EVEN':
- // rouds .5 towards the next even integer
- value = f + f % 2 * sgn;
- break;
- case 'PHP_ROUND_HALF_ODD':
- // rounds .5 towards the next odd integer
- value = f + !(f % 2);
- break;
- default:
- // rounds .5 away from zero
- value = f + (sgn > 0);
- }
- }
-
- return (isHalf ? value : Math.round(value)) / m;
-};
-//# sourceMappingURL=round.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/round.js.map b/node_modules/locutus/php/math/round.js.map
deleted file mode 100644
index d5abf17..0000000
--- a/node_modules/locutus/php/math/round.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/round.js"],"names":["module","exports","round","value","precision","mode","m","f","isHalf","sgn","Math","pow","floor"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,KAAhB,EAAuBC,SAAvB,EAAkCC,IAAlC,EAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,CAAJ,EAAOC,CAAP,EAAUC,MAAV,EAAkBC,GAAlB,CA3BuD,CA2BjC;AACtB;AACAL,eAAa,CAAb;AACAE,MAAII,KAAKC,GAAL,CAAS,EAAT,EAAaP,SAAb,CAAJ;AACAD,WAASG,CAAT;AACA;AACAG,QAAON,QAAQ,CAAT,GAAc,EAAEA,QAAQ,CAAV,CAApB;AACAK,WAASL,QAAQ,CAAR,KAAc,MAAMM,GAA7B;AACAF,MAAIG,KAAKE,KAAL,CAAWT,KAAX,CAAJ;;AAEA,MAAIK,MAAJ,EAAY;AACV,YAAQH,IAAR;AACE,WAAK,qBAAL;AACA;AACEF,gBAAQI,KAAKE,MAAM,CAAX,CAAR;AACA;AACF,WAAK,qBAAL;AACA;AACEN,gBAAQI,IAAKA,IAAI,CAAJ,GAAQE,GAArB;AACA;AACF,WAAK,oBAAL;AACA;AACEN,gBAAQI,IAAI,EAAEA,IAAI,CAAN,CAAZ;AACA;AACF;AACA;AACEJ,gBAAQI,KAAKE,MAAM,CAAX,CAAR;AAfJ;AAiBD;;AAED,SAAO,CAACD,SAASL,KAAT,GAAiBO,KAAKR,KAAL,CAAWC,KAAX,CAAlB,IAAuCG,CAA9C;AACD,CA1DD","file":"round.js","sourcesContent":["module.exports = function round (value, precision, mode) {\n // discuss at: http://locutus.io/php/round/\n // original by: Philip Peterson\n // revised by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: T.Wild\n // revised by: Rafał Kukawski (http://blog.kukawski.pl)\n // input by: Greenseed\n // input by: meo\n // input by: William\n // input by: Josep Sanz (http://www.ws3.es/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // note 1: Great work. Ideas for improvement:\n // note 1: - code more compliant with developer guidelines\n // note 1: - for implementing PHP constant arguments look at\n // note 1: the pathinfo() function, it offers the greatest\n // note 1: flexibility & compatibility possible\n // example 1: round(1241757, -3)\n // returns 1: 1242000\n // example 2: round(3.6)\n // returns 2: 4\n // example 3: round(2.835, 2)\n // returns 3: 2.84\n // example 4: round(1.1749999999999, 2)\n // returns 4: 1.17\n // example 5: round(58551.799999999996, 2)\n // returns 5: 58551.8\n\n var m, f, isHalf, sgn // helper variables\n // making sure precision is integer\n precision |= 0\n m = Math.pow(10, precision)\n value *= m\n // sign of the number\n sgn = (value > 0) | -(value < 0)\n isHalf = value % 1 === 0.5 * sgn\n f = Math.floor(value)\n\n if (isHalf) {\n switch (mode) {\n case 'PHP_ROUND_HALF_DOWN':\n // rounds .5 toward zero\n value = f + (sgn < 0)\n break\n case 'PHP_ROUND_HALF_EVEN':\n // rouds .5 towards the next even integer\n value = f + (f % 2 * sgn)\n break\n case 'PHP_ROUND_HALF_ODD':\n // rounds .5 towards the next odd integer\n value = f + !(f % 2)\n break\n default:\n // rounds .5 away from zero\n value = f + (sgn > 0)\n }\n }\n\n return (isHalf ? value : Math.round(value)) / m\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/sin.js b/node_modules/locutus/php/math/sin.js
deleted file mode 100644
index 1058e80..0000000
--- a/node_modules/locutus/php/math/sin.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function sin(arg) {
- // discuss at: http://locutus.io/php/sin/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: Math.ceil(sin(8723321.4) * 10000000)
- // returns 1: -9834330
-
- return Math.sin(arg);
-};
-//# sourceMappingURL=sin.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/sin.js.map b/node_modules/locutus/php/math/sin.js.map
deleted file mode 100644
index 75f9751..0000000
--- a/node_modules/locutus/php/math/sin.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/sin.js"],"names":["module","exports","sin","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,GAAL,CAASC,GAAT,CAAP;AACD,CAPD","file":"sin.js","sourcesContent":["module.exports = function sin (arg) {\n // discuss at: http://locutus.io/php/sin/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: Math.ceil(sin(8723321.4) * 10000000)\n // returns 1: -9834330\n\n return Math.sin(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/sinh.js b/node_modules/locutus/php/math/sinh.js
deleted file mode 100644
index 12e5275..0000000
--- a/node_modules/locutus/php/math/sinh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function sinh(arg) {
- // discuss at: http://locutus.io/php/sinh/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: sinh(-0.9834330348825909)
- // returns 1: -1.1497971402636502
-
- return (Math.exp(arg) - Math.exp(-arg)) / 2;
-};
-//# sourceMappingURL=sinh.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/sinh.js.map b/node_modules/locutus/php/math/sinh.js.map
deleted file mode 100644
index 8005233..0000000
--- a/node_modules/locutus/php/math/sinh.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/sinh.js"],"names":["module","exports","sinh","arg","Math","exp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;;AAEA,SAAO,CAACC,KAAKC,GAAL,CAASF,GAAT,IAAgBC,KAAKC,GAAL,CAAS,CAACF,GAAV,CAAjB,IAAmC,CAA1C;AACD,CAPD","file":"sinh.js","sourcesContent":["module.exports = function sinh (arg) {\n // discuss at: http://locutus.io/php/sinh/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: sinh(-0.9834330348825909)\n // returns 1: -1.1497971402636502\n\n return (Math.exp(arg) - Math.exp(-arg)) / 2\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/sqrt.js b/node_modules/locutus/php/math/sqrt.js
deleted file mode 100644
index 06cb9d4..0000000
--- a/node_modules/locutus/php/math/sqrt.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function sqrt(arg) {
- // discuss at: http://locutus.io/php/sqrt/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: sqrt(8723321.4)
- // returns 1: 2953.5269424875746
-
- return Math.sqrt(arg);
-};
-//# sourceMappingURL=sqrt.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/sqrt.js.map b/node_modules/locutus/php/math/sqrt.js.map
deleted file mode 100644
index 1e3f9f5..0000000
--- a/node_modules/locutus/php/math/sqrt.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/sqrt.js"],"names":["module","exports","sqrt","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,IAAL,CAAUC,GAAV,CAAP;AACD,CAPD","file":"sqrt.js","sourcesContent":["module.exports = function sqrt (arg) {\n // discuss at: http://locutus.io/php/sqrt/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: sqrt(8723321.4)\n // returns 1: 2953.5269424875746\n\n return Math.sqrt(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/tan.js b/node_modules/locutus/php/math/tan.js
deleted file mode 100644
index c031e7c..0000000
--- a/node_modules/locutus/php/math/tan.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-module.exports = function tan(arg) {
- // discuss at: http://locutus.io/php/tan/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: Math.ceil(tan(8723321.4) * 10000000)
- // returns 1: 54251849
-
- return Math.tan(arg);
-};
-//# sourceMappingURL=tan.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/tan.js.map b/node_modules/locutus/php/math/tan.js.map
deleted file mode 100644
index c694ae5..0000000
--- a/node_modules/locutus/php/math/tan.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/tan.js"],"names":["module","exports","tan","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,GAAd,EAAmB;AAClC;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,GAAL,CAASC,GAAT,CAAP;AACD,CAPD","file":"tan.js","sourcesContent":["module.exports = function tan (arg) {\n // discuss at: http://locutus.io/php/tan/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: Math.ceil(tan(8723321.4) * 10000000)\n // returns 1: 54251849\n\n return Math.tan(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/math/tanh.js b/node_modules/locutus/php/math/tanh.js
deleted file mode 100644
index b447719..0000000
--- a/node_modules/locutus/php/math/tanh.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-module.exports = function tanh(arg) {
- // discuss at: http://locutus.io/php/tanh/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // imprived by: Robert Eisele (http://www.xarg.org/)
- // example 1: tanh(5.4251848798444815)
- // returns 1: 0.9999612058841574
-
- return 1 - 2 / (Math.exp(2 * arg) + 1);
-};
-//# sourceMappingURL=tanh.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/math/tanh.js.map b/node_modules/locutus/php/math/tanh.js.map
deleted file mode 100644
index 2b8a060..0000000
--- a/node_modules/locutus/php/math/tanh.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/math/tanh.js"],"names":["module","exports","tanh","arg","Math","exp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;;AAEA,SAAO,IAAI,KAAKC,KAAKC,GAAL,CAAS,IAAIF,GAAb,IAAoB,CAAzB,CAAX;AACD,CARD","file":"tanh.js","sourcesContent":["module.exports = function tanh (arg) {\n // discuss at: http://locutus.io/php/tanh/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // imprived by: Robert Eisele (http://www.xarg.org/)\n // example 1: tanh(5.4251848798444815)\n // returns 1: 0.9999612058841574\n\n return 1 - 2 / (Math.exp(2 * arg) + 1)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/misc/index.js b/node_modules/locutus/php/misc/index.js
deleted file mode 100644
index b1687f4..0000000
--- a/node_modules/locutus/php/misc/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['pack'] = require('./pack');
-module.exports['uniqid'] = require('./uniqid');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/misc/index.js.map b/node_modules/locutus/php/misc/index.js.map
deleted file mode 100644
index 975e5b4..0000000
--- a/node_modules/locutus/php/misc/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/misc/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B","file":"index.js","sourcesContent":["module.exports['pack'] = require('./pack')\nmodule.exports['uniqid'] = require('./uniqid')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/misc/pack.js b/node_modules/locutus/php/misc/pack.js
deleted file mode 100644
index ec7d6b5..0000000
--- a/node_modules/locutus/php/misc/pack.js
+++ /dev/null
@@ -1,379 +0,0 @@
-'use strict';
-
-module.exports = function pack(format) {
- // discuss at: http://locutus.io/php/pack/
- // original by: Tim de Koning (http://www.kingsquare.nl)
- // parts by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // bugfixed by: Tim de Koning (http://www.kingsquare.nl)
- // note 1: Float encoding by: Jonas Raoni Soares Silva
- // note 1: Home: http://www.kingsquare.nl/blog/12-12-2009/13507444
- // note 1: Feedback: phpjs-pack@kingsquare.nl
- // note 1: "machine dependent byte order and size" aren't
- // note 1: applicable for JavaScript; pack works as on a 32bit,
- // note 1: little endian machine.
- // example 1: pack('nvc*', 0x1234, 0x5678, 65, 66)
- // returns 1: '\u00124xVAB'
- // example 2: pack('H4', '2345')
- // returns 2: '#E'
- // example 3: pack('H*', 'D5')
- // returns 3: 'Õ'
- // example 4: pack('d', -100.876)
- // returns 4: "\u0000\u0000\u0000\u0000\u00008YÀ"
- // test: skip-1
-
- var formatPointer = 0;
- var argumentPointer = 1;
- var result = '';
- var argument = '';
- var i = 0;
- var r = [];
- var instruction, quantifier, word, precisionBits, exponentBits, extraNullCount;
-
- // vars used by float encoding
- var bias;
- var minExp;
- var maxExp;
- var minUnnormExp;
- var status;
- var exp;
- var len;
- var bin;
- var signal;
- var n;
- var intPart;
- var floatPart;
- var lastBit;
- var rounded;
- var j;
- var k;
- var tmpResult;
-
- while (formatPointer < format.length) {
- instruction = format.charAt(formatPointer);
- quantifier = '';
- formatPointer++;
- while (formatPointer < format.length && format.charAt(formatPointer).match(/[\d*]/) !== null) {
- quantifier += format.charAt(formatPointer);
- formatPointer++;
- }
- if (quantifier === '') {
- quantifier = '1';
- }
-
- // Now pack variables: 'quantifier' times 'instruction'
- switch (instruction) {
- case 'a':
- case 'A':
- // NUL-padded string
- // SPACE-padded string
- if (typeof arguments[argumentPointer] === 'undefined') {
- throw new Error('Warning: pack() Type ' + instruction + ': not enough arguments');
- } else {
- argument = String(arguments[argumentPointer]);
- }
- if (quantifier === '*') {
- quantifier = argument.length;
- }
- for (i = 0; i < quantifier; i++) {
- if (typeof argument[i] === 'undefined') {
- if (instruction === 'a') {
- result += String.fromCharCode(0);
- } else {
- result += ' ';
- }
- } else {
- result += argument[i];
- }
- }
- argumentPointer++;
- break;
- case 'h':
- case 'H':
- // Hex string, low nibble first
- // Hex string, high nibble first
- if (typeof arguments[argumentPointer] === 'undefined') {
- throw new Error('Warning: pack() Type ' + instruction + ': not enough arguments');
- } else {
- argument = arguments[argumentPointer];
- }
- if (quantifier === '*') {
- quantifier = argument.length;
- }
- if (quantifier > argument.length) {
- var msg = 'Warning: pack() Type ' + instruction + ': not enough characters in string';
- throw new Error(msg);
- }
-
- for (i = 0; i < quantifier; i += 2) {
- // Always get per 2 bytes...
- word = argument[i];
- if (i + 1 >= quantifier || typeof argument[i + 1] === 'undefined') {
- word += '0';
- } else {
- word += argument[i + 1];
- }
- // The fastest way to reverse?
- if (instruction === 'h') {
- word = word[1] + word[0];
- }
- result += String.fromCharCode(parseInt(word, 16));
- }
- argumentPointer++;
- break;
-
- case 'c':
- case 'C':
- // signed char
- // unsigned char
- // c and C is the same in pack
- if (quantifier === '*') {
- quantifier = arguments.length - argumentPointer;
- }
- if (quantifier > arguments.length - argumentPointer) {
- throw new Error('Warning: pack() Type ' + instruction + ': too few arguments');
- }
-
- for (i = 0; i < quantifier; i++) {
- result += String.fromCharCode(arguments[argumentPointer]);
- argumentPointer++;
- }
- break;
-
- case 's':
- case 'S':
- case 'v':
- // signed short (always 16 bit, machine byte order)
- // unsigned short (always 16 bit, machine byte order)
- // s and S is the same in pack
- if (quantifier === '*') {
- quantifier = arguments.length - argumentPointer;
- }
- if (quantifier > arguments.length - argumentPointer) {
- throw new Error('Warning: pack() Type ' + instruction + ': too few arguments');
- }
-
- for (i = 0; i < quantifier; i++) {
- result += String.fromCharCode(arguments[argumentPointer] & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF);
- argumentPointer++;
- }
- break;
-
- case 'n':
- // unsigned short (always 16 bit, big endian byte order)
- if (quantifier === '*') {
- quantifier = arguments.length - argumentPointer;
- }
- if (quantifier > arguments.length - argumentPointer) {
- throw new Error('Warning: pack() Type ' + instruction + ': too few arguments');
- }
-
- for (i = 0; i < quantifier; i++) {
- result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] & 0xFF);
- argumentPointer++;
- }
- break;
-
- case 'i':
- case 'I':
- case 'l':
- case 'L':
- case 'V':
- // signed integer (machine dependent size and byte order)
- // unsigned integer (machine dependent size and byte order)
- // signed long (always 32 bit, machine byte order)
- // unsigned long (always 32 bit, machine byte order)
- // unsigned long (always 32 bit, little endian byte order)
- if (quantifier === '*') {
- quantifier = arguments.length - argumentPointer;
- }
- if (quantifier > arguments.length - argumentPointer) {
- throw new Error('Warning: pack() Type ' + instruction + ': too few arguments');
- }
-
- for (i = 0; i < quantifier; i++) {
- result += String.fromCharCode(arguments[argumentPointer] & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] >> 16 & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] >> 24 & 0xFF);
- argumentPointer++;
- }
-
- break;
- case 'N':
- // unsigned long (always 32 bit, big endian byte order)
- if (quantifier === '*') {
- quantifier = arguments.length - argumentPointer;
- }
- if (quantifier > arguments.length - argumentPointer) {
- throw new Error('Warning: pack() Type ' + instruction + ': too few arguments');
- }
-
- for (i = 0; i < quantifier; i++) {
- result += String.fromCharCode(arguments[argumentPointer] >> 24 & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] >> 16 & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF);
- result += String.fromCharCode(arguments[argumentPointer] & 0xFF);
- argumentPointer++;
- }
- break;
-
- case 'f':
- case 'd':
- // float (machine dependent size and representation)
- // double (machine dependent size and representation)
- // version based on IEEE754
- precisionBits = 23;
- exponentBits = 8;
- if (instruction === 'd') {
- precisionBits = 52;
- exponentBits = 11;
- }
-
- if (quantifier === '*') {
- quantifier = arguments.length - argumentPointer;
- }
- if (quantifier > arguments.length - argumentPointer) {
- throw new Error('Warning: pack() Type ' + instruction + ': too few arguments');
- }
- for (i = 0; i < quantifier; i++) {
- argument = arguments[argumentPointer];
- bias = Math.pow(2, exponentBits - 1) - 1;
- minExp = -bias + 1;
- maxExp = bias;
- minUnnormExp = minExp - precisionBits;
- status = isNaN(n = parseFloat(argument)) || n === -Infinity || n === +Infinity ? n : 0;
- exp = 0;
- len = 2 * bias + 1 + precisionBits + 3;
- bin = new Array(len);
- signal = (n = status !== 0 ? 0 : n) < 0;
- n = Math.abs(n);
- intPart = Math.floor(n);
- floatPart = n - intPart;
-
- for (k = len; k;) {
- bin[--k] = 0;
- }
- for (k = bias + 2; intPart && k;) {
- bin[--k] = intPart % 2;
- intPart = Math.floor(intPart / 2);
- }
- for (k = bias + 1; floatPart > 0 && k; --floatPart) {
- bin[++k] = ((floatPart *= 2) >= 1) - 0;
- }
- for (k = -1; ++k < len && !bin[k];) {}
-
- // @todo: Make this more readable:
- var key = (lastBit = precisionBits - 1 + (k = (exp = bias + 1 - k) >= minExp && exp <= maxExp ? k + 1 : bias + 1 - (exp = minExp - 1))) + 1;
-
- if (bin[key]) {
- if (!(rounded = bin[lastBit])) {
- for (j = lastBit + 2; !rounded && j < len; rounded = bin[j++]) {}
- }
- for (j = lastBit + 1; rounded && --j >= 0; (bin[j] = !bin[j] - 0) && (rounded = 0)) {}
- }
-
- for (k = k - 2 < 0 ? -1 : k - 3; ++k < len && !bin[k];) {}
-
- if ((exp = bias + 1 - k) >= minExp && exp <= maxExp) {
- ++k;
- } else {
- if (exp < minExp) {
- if (exp !== bias + 1 - len && exp < minUnnormExp) {
- // "encodeFloat::float underflow"
- }
- k = bias + 1 - (exp = minExp - 1);
- }
- }
-
- if (intPart || status !== 0) {
- exp = maxExp + 1;
- k = bias + 2;
- if (status === -Infinity) {
- signal = 1;
- } else if (isNaN(status)) {
- bin[k] = 1;
- }
- }
-
- n = Math.abs(exp + bias);
- tmpResult = '';
-
- for (j = exponentBits + 1; --j;) {
- tmpResult = n % 2 + tmpResult;
- n = n >>= 1;
- }
-
- n = 0;
- j = 0;
- k = (tmpResult = (signal ? '1' : '0') + tmpResult + bin.slice(k, k + precisionBits).join('')).length;
- r = [];
-
- for (; k;) {
- n += (1 << j) * tmpResult.charAt(--k);
- if (j === 7) {
- r[r.length] = String.fromCharCode(n);
- n = 0;
- }
- j = (j + 1) % 8;
- }
-
- r[r.length] = n ? String.fromCharCode(n) : '';
- result += r.join('');
- argumentPointer++;
- }
- break;
-
- case 'x':
- // NUL byte
- if (quantifier === '*') {
- throw new Error('Warning: pack(): Type x: \'*\' ignored');
- }
- for (i = 0; i < quantifier; i++) {
- result += String.fromCharCode(0);
- }
- break;
-
- case 'X':
- // Back up one byte
- if (quantifier === '*') {
- throw new Error('Warning: pack(): Type X: \'*\' ignored');
- }
- for (i = 0; i < quantifier; i++) {
- if (result.length === 0) {
- throw new Error('Warning: pack(): Type X:' + ' outside of string');
- } else {
- result = result.substring(0, result.length - 1);
- }
- }
- break;
-
- case '@':
- // NUL-fill to absolute position
- if (quantifier === '*') {
- throw new Error('Warning: pack(): Type X: \'*\' ignored');
- }
- if (quantifier > result.length) {
- extraNullCount = quantifier - result.length;
- for (i = 0; i < extraNullCount; i++) {
- result += String.fromCharCode(0);
- }
- }
- if (quantifier < result.length) {
- result = result.substring(0, quantifier);
- }
- break;
-
- default:
- throw new Error('Warning: pack() Type ' + instruction + ': unknown format code');
- }
- }
- if (argumentPointer < arguments.length) {
- var msg2 = 'Warning: pack(): ' + (arguments.length - argumentPointer) + ' arguments unused';
- throw new Error(msg2);
- }
-
- return result;
-};
-//# sourceMappingURL=pack.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/misc/pack.js.map b/node_modules/locutus/php/misc/pack.js.map
deleted file mode 100644
index b4b2457..0000000
--- a/node_modules/locutus/php/misc/pack.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/misc/pack.js"],"names":["module","exports","pack","format","formatPointer","argumentPointer","result","argument","i","r","instruction","quantifier","word","precisionBits","exponentBits","extraNullCount","bias","minExp","maxExp","minUnnormExp","status","exp","len","bin","signal","n","intPart","floatPart","lastBit","rounded","j","k","tmpResult","length","charAt","match","arguments","Error","String","fromCharCode","msg","parseInt","Math","pow","isNaN","parseFloat","Infinity","Array","abs","floor","key","slice","join","substring","msg2"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,MAAf,EAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,gBAAgB,CAApB;AACA,MAAIC,kBAAkB,CAAtB;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,WAAW,EAAf;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,WAAJ,EAAiBC,UAAjB,EAA6BC,IAA7B,EAAmCC,aAAnC,EAAkDC,YAAlD,EAAgEC,cAAhE;;AAEA;AACA,MAAIC,IAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,YAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,OAAJ;AACA,MAAIC,SAAJ;AACA,MAAIC,OAAJ;AACA,MAAIC,OAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,SAAJ;;AAEA,SAAO5B,gBAAgBD,OAAO8B,MAA9B,EAAsC;AACpCvB,kBAAcP,OAAO+B,MAAP,CAAc9B,aAAd,CAAd;AACAO,iBAAa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ACD;AACD;;AAEF;AACE,cAAM,IAAI0B,KAAJ,CAAU,0BAA0B3B,WAA1B,GAAwC,uBAAlD,CAAN;AAxTJ;AA0TD;AACD,MAAIL,kBAAkB+B,UAAUH,MAAhC,EAAwC;AACtC,QAAIqB,OAAO,uBAAuBlB,UAAUH,MAAV,GAAmB5B,eAA1C,IAA6D,mBAAxE;AACA,UAAM,IAAIgC,KAAJ,CAAUiB,IAAV,CAAN;AACD;;AAED,SAAOhD,MAAP;AACD,CA/XD","file":"pack.js","sourcesContent":["module.exports = function pack (format) {\n // discuss at: http://locutus.io/php/pack/\n // original by: Tim de Koning (http://www.kingsquare.nl)\n // parts by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // bugfixed by: Tim de Koning (http://www.kingsquare.nl)\n // note 1: Float encoding by: Jonas Raoni Soares Silva\n // note 1: Home: http://www.kingsquare.nl/blog/12-12-2009/13507444\n // note 1: Feedback: phpjs-pack@kingsquare.nl\n // note 1: \"machine dependent byte order and size\" aren't\n // note 1: applicable for JavaScript; pack works as on a 32bit,\n // note 1: little endian machine.\n // example 1: pack('nvc*', 0x1234, 0x5678, 65, 66)\n // returns 1: '\\u00124xVAB'\n // example 2: pack('H4', '2345')\n // returns 2: '#E'\n // example 3: pack('H*', 'D5')\n // returns 3: 'Õ'\n // example 4: pack('d', -100.876)\n // returns 4: \"\\u0000\\u0000\\u0000\\u0000\\u00008YÀ\"\n // test: skip-1\n\n var formatPointer = 0\n var argumentPointer = 1\n var result = ''\n var argument = ''\n var i = 0\n var r = []\n var instruction, quantifier, word, precisionBits, exponentBits, extraNullCount\n\n // vars used by float encoding\n var bias\n var minExp\n var maxExp\n var minUnnormExp\n var status\n var exp\n var len\n var bin\n var signal\n var n\n var intPart\n var floatPart\n var lastBit\n var rounded\n var j\n var k\n var tmpResult\n\n while (formatPointer < format.length) {\n instruction = format.charAt(formatPointer)\n quantifier = ''\n formatPointer++\n while ((formatPointer < format.length) && (format.charAt(formatPointer)\n .match(/[\\d*]/) !== null)) {\n quantifier += format.charAt(formatPointer)\n formatPointer++\n }\n if (quantifier === '') {\n quantifier = '1'\n }\n\n // Now pack variables: 'quantifier' times 'instruction'\n switch (instruction) {\n case 'a':\n case 'A':\n // NUL-padded string\n // SPACE-padded string\n if (typeof arguments[argumentPointer] === 'undefined') {\n throw new Error('Warning: pack() Type ' + instruction + ': not enough arguments')\n } else {\n argument = String(arguments[argumentPointer])\n }\n if (quantifier === '*') {\n quantifier = argument.length\n }\n for (i = 0; i < quantifier; i++) {\n if (typeof argument[i] === 'undefined') {\n if (instruction === 'a') {\n result += String.fromCharCode(0)\n } else {\n result += ' '\n }\n } else {\n result += argument[i]\n }\n }\n argumentPointer++\n break\n case 'h':\n case 'H':\n // Hex string, low nibble first\n // Hex string, high nibble first\n if (typeof arguments[argumentPointer] === 'undefined') {\n throw new Error('Warning: pack() Type ' + instruction + ': not enough arguments')\n } else {\n argument = arguments[argumentPointer]\n }\n if (quantifier === '*') {\n quantifier = argument.length\n }\n if (quantifier > argument.length) {\n var msg = 'Warning: pack() Type ' + instruction + ': not enough characters in string'\n throw new Error(msg)\n }\n\n for (i = 0; i < quantifier; i += 2) {\n // Always get per 2 bytes...\n word = argument[i]\n if (((i + 1) >= quantifier) || typeof argument[i + 1] === 'undefined') {\n word += '0'\n } else {\n word += argument[i + 1]\n }\n // The fastest way to reverse?\n if (instruction === 'h') {\n word = word[1] + word[0]\n }\n result += String.fromCharCode(parseInt(word, 16))\n }\n argumentPointer++\n break\n\n case 'c':\n case 'C':\n // signed char\n // unsigned char\n // c and C is the same in pack\n if (quantifier === '*') {\n quantifier = arguments.length - argumentPointer\n }\n if (quantifier > (arguments.length - argumentPointer)) {\n throw new Error('Warning: pack() Type ' + instruction + ': too few arguments')\n }\n\n for (i = 0; i < quantifier; i++) {\n result += String.fromCharCode(arguments[argumentPointer])\n argumentPointer++\n }\n break\n\n case 's':\n case 'S':\n case 'v':\n // signed short (always 16 bit, machine byte order)\n // unsigned short (always 16 bit, machine byte order)\n // s and S is the same in pack\n if (quantifier === '*') {\n quantifier = arguments.length - argumentPointer\n }\n if (quantifier > (arguments.length - argumentPointer)) {\n throw new Error('Warning: pack() Type ' + instruction + ': too few arguments')\n }\n\n for (i = 0; i < quantifier; i++) {\n result += String.fromCharCode(arguments[argumentPointer] & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF)\n argumentPointer++\n }\n break\n\n case 'n':\n // unsigned short (always 16 bit, big endian byte order)\n if (quantifier === '*') {\n quantifier = arguments.length - argumentPointer\n }\n if (quantifier > (arguments.length - argumentPointer)) {\n throw new Error('Warning: pack() Type ' + instruction + ': too few arguments')\n }\n\n for (i = 0; i < quantifier; i++) {\n result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] & 0xFF)\n argumentPointer++\n }\n break\n\n case 'i':\n case 'I':\n case 'l':\n case 'L':\n case 'V':\n // signed integer (machine dependent size and byte order)\n // unsigned integer (machine dependent size and byte order)\n // signed long (always 32 bit, machine byte order)\n // unsigned long (always 32 bit, machine byte order)\n // unsigned long (always 32 bit, little endian byte order)\n if (quantifier === '*') {\n quantifier = arguments.length - argumentPointer\n }\n if (quantifier > (arguments.length - argumentPointer)) {\n throw new Error('Warning: pack() Type ' + instruction + ': too few arguments')\n }\n\n for (i = 0; i < quantifier; i++) {\n result += String.fromCharCode(arguments[argumentPointer] & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] >> 16 & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] >> 24 & 0xFF)\n argumentPointer++\n }\n\n break\n case 'N':\n // unsigned long (always 32 bit, big endian byte order)\n if (quantifier === '*') {\n quantifier = arguments.length - argumentPointer\n }\n if (quantifier > (arguments.length - argumentPointer)) {\n throw new Error('Warning: pack() Type ' + instruction + ': too few arguments')\n }\n\n for (i = 0; i < quantifier; i++) {\n result += String.fromCharCode(arguments[argumentPointer] >> 24 & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] >> 16 & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] >> 8 & 0xFF)\n result += String.fromCharCode(arguments[argumentPointer] & 0xFF)\n argumentPointer++\n }\n break\n\n case 'f':\n case 'd':\n // float (machine dependent size and representation)\n // double (machine dependent size and representation)\n // version based on IEEE754\n precisionBits = 23\n exponentBits = 8\n if (instruction === 'd') {\n precisionBits = 52\n exponentBits = 11\n }\n\n if (quantifier === '*') {\n quantifier = arguments.length - argumentPointer\n }\n if (quantifier > (arguments.length - argumentPointer)) {\n throw new Error('Warning: pack() Type ' + instruction + ': too few arguments')\n }\n for (i = 0; i < quantifier; i++) {\n argument = arguments[argumentPointer]\n bias = Math.pow(2, exponentBits - 1) - 1\n minExp = -bias + 1\n maxExp = bias\n minUnnormExp = minExp - precisionBits\n status = isNaN(n = parseFloat(argument)) || n === -Infinity || n === +Infinity ? n : 0\n exp = 0\n len = 2 * bias + 1 + precisionBits + 3\n bin = new Array(len)\n signal = (n = status !== 0 ? 0 : n) < 0\n n = Math.abs(n)\n intPart = Math.floor(n)\n floatPart = n - intPart\n\n for (k = len; k;) {\n bin[--k] = 0\n }\n for (k = bias + 2; intPart && k;) {\n bin[--k] = intPart % 2\n intPart = Math.floor(intPart / 2)\n }\n for (k = bias + 1; floatPart > 0 && k; --floatPart) {\n (bin[++k] = ((floatPart *= 2) >= 1) - 0)\n }\n for (k = -1; ++k < len && !bin[k];) {}\n\n // @todo: Make this more readable:\n var key = (lastBit = precisionBits - 1 +\n (k =\n (exp = bias + 1 - k) >= minExp &&\n exp <= maxExp ? k + 1 : bias + 1 - (exp = minExp - 1))) + 1\n\n if (bin[key]) {\n if (!(rounded = bin[lastBit])) {\n for (j = lastBit + 2; !rounded && j < len; rounded = bin[j++]) {}\n }\n for (j = lastBit + 1; rounded && --j >= 0;\n (bin[j] = !bin[j] - 0) && (rounded = 0)) {}\n }\n\n for (k = k - 2 < 0 ? -1 : k - 3; ++k < len && !bin[k];) {}\n\n if ((exp = bias + 1 - k) >= minExp && exp <= maxExp) {\n ++k\n } else {\n if (exp < minExp) {\n if (exp !== bias + 1 - len && exp < minUnnormExp) {\n // \"encodeFloat::float underflow\"\n }\n k = bias + 1 - (exp = minExp - 1)\n }\n }\n\n if (intPart || status !== 0) {\n exp = maxExp + 1\n k = bias + 2\n if (status === -Infinity) {\n signal = 1\n } else if (isNaN(status)) {\n bin[k] = 1\n }\n }\n\n n = Math.abs(exp + bias)\n tmpResult = ''\n\n for (j = exponentBits + 1; --j;) {\n tmpResult = (n % 2) + tmpResult\n n = n >>= 1\n }\n\n n = 0\n j = 0\n k = (tmpResult = (signal ? '1' : '0') + tmpResult + (bin\n .slice(k, k + precisionBits)\n .join(''))\n ).length\n r = []\n\n for (; k;) {\n n += (1 << j) * tmpResult.charAt(--k)\n if (j === 7) {\n r[r.length] = String.fromCharCode(n)\n n = 0\n }\n j = (j + 1) % 8\n }\n\n r[r.length] = n ? String.fromCharCode(n) : ''\n result += r.join('')\n argumentPointer++\n }\n break\n\n case 'x':\n // NUL byte\n if (quantifier === '*') {\n throw new Error('Warning: pack(): Type x: \\'*\\' ignored')\n }\n for (i = 0; i < quantifier; i++) {\n result += String.fromCharCode(0)\n }\n break\n\n case 'X':\n // Back up one byte\n if (quantifier === '*') {\n throw new Error('Warning: pack(): Type X: \\'*\\' ignored')\n }\n for (i = 0; i < quantifier; i++) {\n if (result.length === 0) {\n throw new Error('Warning: pack(): Type X:' + ' outside of string')\n } else {\n result = result.substring(0, result.length - 1)\n }\n }\n break\n\n case '@':\n // NUL-fill to absolute position\n if (quantifier === '*') {\n throw new Error('Warning: pack(): Type X: \\'*\\' ignored')\n }\n if (quantifier > result.length) {\n extraNullCount = quantifier - result.length\n for (i = 0; i < extraNullCount; i++) {\n result += String.fromCharCode(0)\n }\n }\n if (quantifier < result.length) {\n result = result.substring(0, quantifier)\n }\n break\n\n default:\n throw new Error('Warning: pack() Type ' + instruction + ': unknown format code')\n }\n }\n if (argumentPointer < arguments.length) {\n var msg2 = 'Warning: pack(): ' + (arguments.length - argumentPointer) + ' arguments unused'\n throw new Error(msg2)\n }\n\n return result\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/misc/uniqid.js b/node_modules/locutus/php/misc/uniqid.js
deleted file mode 100644
index e2bb4f3..0000000
--- a/node_modules/locutus/php/misc/uniqid.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-module.exports = function uniqid(prefix, moreEntropy) {
- // discuss at: http://locutus.io/php/uniqid/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Kankrelune (http://www.webfaktory.info/)
- // note 1: Uses an internal counter (in locutus global) to avoid collision
- // example 1: var $id = uniqid()
- // example 1: var $result = $id.length === 13
- // returns 1: true
- // example 2: var $id = uniqid('foo')
- // example 2: var $result = $id.length === (13 + 'foo'.length)
- // returns 2: true
- // example 3: var $id = uniqid('bar', true)
- // example 3: var $result = $id.length === (23 + 'bar'.length)
- // returns 3: true
-
- if (typeof prefix === 'undefined') {
- prefix = '';
- }
-
- var retId;
- var _formatSeed = function _formatSeed(seed, reqWidth) {
- seed = parseInt(seed, 10).toString(16); // to hex str
- if (reqWidth < seed.length) {
- // so long we split
- return seed.slice(seed.length - reqWidth);
- }
- if (reqWidth > seed.length) {
- // so short we pad
- return Array(1 + (reqWidth - seed.length)).join('0') + seed;
- }
- return seed;
- };
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- if (!$locutus.php.uniqidSeed) {
- // init seed with big random int
- $locutus.php.uniqidSeed = Math.floor(Math.random() * 0x75bcd15);
- }
- $locutus.php.uniqidSeed++;
-
- // start with prefix, add current milliseconds hex string
- retId = prefix;
- retId += _formatSeed(parseInt(new Date().getTime() / 1000, 10), 8);
- // add seed hex string
- retId += _formatSeed($locutus.php.uniqidSeed, 5);
- if (moreEntropy) {
- // for more entropy we add a float lower to 10
- retId += (Math.random() * 10).toFixed(8).toString();
- }
-
- return retId;
-};
-//# sourceMappingURL=uniqid.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/misc/uniqid.js.map b/node_modules/locutus/php/misc/uniqid.js.map
deleted file mode 100644
index 27dd6f5..0000000
--- a/node_modules/locutus/php/misc/uniqid.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/misc/uniqid.js"],"names":["module","exports","uniqid","prefix","moreEntropy","retId","_formatSeed","seed","reqWidth","parseInt","toString","length","slice","Array","join","$global","window","global","$locutus","php","uniqidSeed","Math","floor","random","Date","getTime","toFixed"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyBC,WAAzB,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI,OAAOD,MAAP,KAAkB,WAAtB,EAAmC;AACjCA,aAAS,EAAT;AACD;;AAED,MAAIE,KAAJ;AACA,MAAIC,cAAc,SAAdA,WAAc,CAAUC,IAAV,EAAgBC,QAAhB,EAA0B;AAC1CD,WAAOE,SAASF,IAAT,EAAe,EAAf,EAAmBG,QAAnB,CAA4B,EAA5B,CAAP,CAD0C,CACH;AACvC,QAAIF,WAAWD,KAAKI,MAApB,EAA4B;AAC1B;AACA,aAAOJ,KAAKK,KAAL,CAAWL,KAAKI,MAAL,GAAcH,QAAzB,CAAP;AACD;AACD,QAAIA,WAAWD,KAAKI,MAApB,EAA4B;AAC1B;AACA,aAAOE,MAAM,KAAKL,WAAWD,KAAKI,MAArB,CAAN,EAAoCG,IAApC,CAAyC,GAAzC,IAAgDP,IAAvD;AACD;AACD,WAAOA,IAAP;AACD,GAXD;;AAaA,MAAIQ,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,MAAI,CAACD,SAASC,GAAT,CAAaC,UAAlB,EAA8B;AAC5B;AACAF,aAASC,GAAT,CAAaC,UAAb,GAA0BC,KAAKC,KAAL,CAAWD,KAAKE,MAAL,KAAgB,SAA3B,CAA1B;AACD;AACDL,WAASC,GAAT,CAAaC,UAAb;;AAEA;AACAf,UAAQF,MAAR;AACAE,WAASC,YAAYG,SAAS,IAAIe,IAAJ,GAAWC,OAAX,KAAuB,IAAhC,EAAsC,EAAtC,CAAZ,EAAuD,CAAvD,CAAT;AACA;AACApB,WAASC,YAAYY,SAASC,GAAT,CAAaC,UAAzB,EAAqC,CAArC,CAAT;AACA,MAAIhB,WAAJ,EAAiB;AACf;AACAC,aAAS,CAACgB,KAAKE,MAAL,KAAgB,EAAjB,EAAqBG,OAArB,CAA6B,CAA7B,EAAgChB,QAAhC,EAAT;AACD;;AAED,SAAOL,KAAP;AACD,CAvDD","file":"uniqid.js","sourcesContent":["module.exports = function uniqid (prefix, moreEntropy) {\n // discuss at: http://locutus.io/php/uniqid/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Kankrelune (http://www.webfaktory.info/)\n // note 1: Uses an internal counter (in locutus global) to avoid collision\n // example 1: var $id = uniqid()\n // example 1: var $result = $id.length === 13\n // returns 1: true\n // example 2: var $id = uniqid('foo')\n // example 2: var $result = $id.length === (13 + 'foo'.length)\n // returns 2: true\n // example 3: var $id = uniqid('bar', true)\n // example 3: var $result = $id.length === (23 + 'bar'.length)\n // returns 3: true\n\n if (typeof prefix === 'undefined') {\n prefix = ''\n }\n\n var retId\n var _formatSeed = function (seed, reqWidth) {\n seed = parseInt(seed, 10).toString(16) // to hex str\n if (reqWidth < seed.length) {\n // so long we split\n return seed.slice(seed.length - reqWidth)\n }\n if (reqWidth > seed.length) {\n // so short we pad\n return Array(1 + (reqWidth - seed.length)).join('0') + seed\n }\n return seed\n }\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n if (!$locutus.php.uniqidSeed) {\n // init seed with big random int\n $locutus.php.uniqidSeed = Math.floor(Math.random() * 0x75bcd15)\n }\n $locutus.php.uniqidSeed++\n\n // start with prefix, add current milliseconds hex string\n retId = prefix\n retId += _formatSeed(parseInt(new Date().getTime() / 1000, 10), 8)\n // add seed hex string\n retId += _formatSeed($locutus.php.uniqidSeed, 5)\n if (moreEntropy) {\n // for more entropy we add a float lower to 10\n retId += (Math.random() * 10).toFixed(8).toString()\n }\n\n return retId\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/net-gopher/gopher_parsedir.js b/node_modules/locutus/php/net-gopher/gopher_parsedir.js
deleted file mode 100644
index d681c9c..0000000
--- a/node_modules/locutus/php/net-gopher/gopher_parsedir.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict';
-
-module.exports = function gopher_parsedir(dirent) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/gopher_parsedir/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var entry = gopher_parsedir('0All about my gopher site.\t/allabout.txt\tgopher.example.com\t70\u000d\u000a')
- // example 1: entry.title
- // returns 1: 'All about my gopher site.'
-
- /* Types
- * 0 = plain text file
- * 1 = directory menu listing
- * 2 = CSO search query
- * 3 = error message
- * 4 = BinHex encoded text file
- * 5 = binary archive file
- * 6 = UUEncoded text file
- * 7 = search engine query
- * 8 = telnet session pointer
- * 9 = binary file
- * g = Graphics file format, primarily a GIF file
- * h = HTML file
- * i = informational message
- * s = Audio file format, primarily a WAV file
- */
-
- var entryPattern = /^(.)(.*?)\t(.*?)\t(.*?)\t(.*?)\u000d\u000a$/;
- var entry = dirent.match(entryPattern);
-
- if (entry === null) {
- throw new Error('Could not parse the directory entry');
- // return false;
- }
-
- var type = entry[1];
- switch (type) {
- case 'i':
- // GOPHER_INFO
- type = 255;
- break;
- case '1':
- // GOPHER_DIRECTORY
- type = 1;
- break;
- case '0':
- // GOPHER_DOCUMENT
- type = 0;
- break;
- case '4':
- // GOPHER_BINHEX
- type = 4;
- break;
- case '5':
- // GOPHER_DOSBINARY
- type = 5;
- break;
- case '6':
- // GOPHER_UUENCODED
- type = 6;
- break;
- case '9':
- // GOPHER_BINARY
- type = 9;
- break;
- case 'h':
- // GOPHER_HTTP
- type = 254;
- break;
- default:
- return {
- type: -1,
- data: dirent
- }; // GOPHER_UNKNOWN
- }
- return {
- type: type,
- title: entry[2],
- path: entry[3],
- host: entry[4],
- port: entry[5]
- };
-};
-//# sourceMappingURL=gopher_parsedir.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/net-gopher/gopher_parsedir.js.map b/node_modules/locutus/php/net-gopher/gopher_parsedir.js.map
deleted file mode 100644
index cd57753..0000000
--- a/node_modules/locutus/php/net-gopher/gopher_parsedir.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/net-gopher/gopher_parsedir.js"],"names":["module","exports","gopher_parsedir","dirent","entryPattern","entry","match","Error","type","data","title","path","host","port"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,eAAT,CAA0BC,MAA1B,EAAkC;AAAE;AACnD;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;AAiBA,MAAIC,eAAe,6CAAnB;AACA,MAAIC,QAAQF,OAAOG,KAAP,CAAaF,YAAb,CAAZ;;AAEA,MAAIC,UAAU,IAAd,EAAoB;AAClB,UAAM,IAAIE,KAAJ,CAAU,qCAAV,CAAN;AACA;AACD;;AAED,MAAIC,OAAOH,MAAM,CAAN,CAAX;AACA,UAAQG,IAAR;AACE,SAAK,GAAL;AACA;AACEA,aAAO,GAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,CAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,CAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,CAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,CAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,CAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,CAAP;AACA;AACF,SAAK,GAAL;AACA;AACEA,aAAO,GAAP;AACA;AACF;AACE,aAAO;AACLA,cAAM,CAAC,CADF;AAELC,cAAMN;AAFD,OAAP,CAlCJ,CAqCM;AArCN;AAuCA,SAAO;AACLK,UAAMA,IADD;AAELE,WAAOL,MAAM,CAAN,CAFF;AAGLM,UAAMN,MAAM,CAAN,CAHD;AAILO,UAAMP,MAAM,CAAN,CAJD;AAKLQ,UAAMR,MAAM,CAAN;AALD,GAAP;AAOD,CA/ED","file":"gopher_parsedir.js","sourcesContent":["module.exports = function gopher_parsedir (dirent) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/gopher_parsedir/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var entry = gopher_parsedir('0All about my gopher site.\\t/allabout.txt\\tgopher.example.com\\t70\\u000d\\u000a')\n // example 1: entry.title\n // returns 1: 'All about my gopher site.'\n\n /* Types\n * 0 = plain text file\n * 1 = directory menu listing\n * 2 = CSO search query\n * 3 = error message\n * 4 = BinHex encoded text file\n * 5 = binary archive file\n * 6 = UUEncoded text file\n * 7 = search engine query\n * 8 = telnet session pointer\n * 9 = binary file\n * g = Graphics file format, primarily a GIF file\n * h = HTML file\n * i = informational message\n * s = Audio file format, primarily a WAV file\n */\n\n var entryPattern = /^(.)(.*?)\\t(.*?)\\t(.*?)\\t(.*?)\\u000d\\u000a$/\n var entry = dirent.match(entryPattern)\n\n if (entry === null) {\n throw new Error('Could not parse the directory entry')\n // return false;\n }\n\n var type = entry[1]\n switch (type) {\n case 'i':\n // GOPHER_INFO\n type = 255\n break\n case '1':\n // GOPHER_DIRECTORY\n type = 1\n break\n case '0':\n // GOPHER_DOCUMENT\n type = 0\n break\n case '4':\n // GOPHER_BINHEX\n type = 4\n break\n case '5':\n // GOPHER_DOSBINARY\n type = 5\n break\n case '6':\n // GOPHER_UUENCODED\n type = 6\n break\n case '9':\n // GOPHER_BINARY\n type = 9\n break\n case 'h':\n // GOPHER_HTTP\n type = 254\n break\n default:\n return {\n type: -1,\n data: dirent\n } // GOPHER_UNKNOWN\n }\n return {\n type: type,\n title: entry[2],\n path: entry[3],\n host: entry[4],\n port: entry[5]\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/net-gopher/index.js b/node_modules/locutus/php/net-gopher/index.js
deleted file mode 100644
index 47d7848..0000000
--- a/node_modules/locutus/php/net-gopher/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['gopher_parsedir'] = require('./gopher_parsedir');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/net-gopher/index.js.map b/node_modules/locutus/php/net-gopher/index.js.map
deleted file mode 100644
index f881fd4..0000000
--- a/node_modules/locutus/php/net-gopher/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/net-gopher/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,iBAAf,IAAoCC,QAAQ,mBAAR,CAApC","file":"index.js","sourcesContent":["module.exports['gopher_parsedir'] = require('./gopher_parsedir')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/index.js b/node_modules/locutus/php/network/index.js
deleted file mode 100644
index 8c8eec6..0000000
--- a/node_modules/locutus/php/network/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports['inet_ntop'] = require('./inet_ntop');
-module.exports['inet_pton'] = require('./inet_pton');
-module.exports['ip2long'] = require('./ip2long');
-module.exports['long2ip'] = require('./long2ip');
-module.exports['setcookie'] = require('./setcookie');
-module.exports['setrawcookie'] = require('./setrawcookie');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/index.js.map b/node_modules/locutus/php/network/index.js.map
deleted file mode 100644
index c85fb14..0000000
--- a/node_modules/locutus/php/network/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC","file":"index.js","sourcesContent":["module.exports['inet_ntop'] = require('./inet_ntop')\nmodule.exports['inet_pton'] = require('./inet_pton')\nmodule.exports['ip2long'] = require('./ip2long')\nmodule.exports['long2ip'] = require('./long2ip')\nmodule.exports['setcookie'] = require('./setcookie')\nmodule.exports['setrawcookie'] = require('./setrawcookie')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/inet_ntop.js b/node_modules/locutus/php/network/inet_ntop.js
deleted file mode 100644
index 1ebf8e3..0000000
--- a/node_modules/locutus/php/network/inet_ntop.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function inet_ntop(a) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/inet_ntop/
- // original by: Theriault (https://github.com/Theriault)
- // example 1: inet_ntop('\x7F\x00\x00\x01')
- // returns 1: '127.0.0.1'
- // _example 2: inet_ntop('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1')
- // _returns 2: '::1'
-
- var i = 0;
- var m = '';
- var c = [];
-
- a += '';
- if (a.length === 4) {
- // IPv4
- return [a.charCodeAt(0), a.charCodeAt(1), a.charCodeAt(2), a.charCodeAt(3)].join('.');
- } else if (a.length === 16) {
- // IPv6
- for (i = 0; i < 16; i++) {
- c.push(((a.charCodeAt(i++) << 8) + a.charCodeAt(i)).toString(16));
- }
- return c.join(':').replace(/((^|:)0(?=:|$))+:?/g, function (t) {
- m = t.length > m.length ? t : m;
- return t;
- }).replace(m || ' ', '::');
- } else {
- // Invalid length
- return false;
- }
-};
-//# sourceMappingURL=inet_ntop.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/inet_ntop.js.map b/node_modules/locutus/php/network/inet_ntop.js.map
deleted file mode 100644
index f6e8809..0000000
--- a/node_modules/locutus/php/network/inet_ntop.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/inet_ntop.js"],"names":["module","exports","inet_ntop","a","i","m","c","length","charCodeAt","join","push","toString","replace","t"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,CAApB,EAAuB;AAAE;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,IAAI,EAAR;;AAEAH,OAAK,EAAL;AACA,MAAIA,EAAEI,MAAF,KAAa,CAAjB,EAAoB;AAClB;AACA,WAAO,CACLJ,EAAEK,UAAF,CAAa,CAAb,CADK,EAELL,EAAEK,UAAF,CAAa,CAAb,CAFK,EAGLL,EAAEK,UAAF,CAAa,CAAb,CAHK,EAILL,EAAEK,UAAF,CAAa,CAAb,CAJK,EAKLC,IALK,CAKA,GALA,CAAP;AAMD,GARD,MAQO,IAAIN,EAAEI,MAAF,KAAa,EAAjB,EAAqB;AAC1B;AACA,SAAKH,IAAI,CAAT,EAAYA,IAAI,EAAhB,EAAoBA,GAApB,EAAyB;AACvBE,QAAEI,IAAF,CAAO,CAAC,CAACP,EAAEK,UAAF,CAAaJ,GAAb,KAAqB,CAAtB,IAA2BD,EAAEK,UAAF,CAAaJ,CAAb,CAA5B,EAA6CO,QAA7C,CAAsD,EAAtD,CAAP;AACD;AACD,WAAOL,EAAEG,IAAF,CAAO,GAAP,EACJG,OADI,CACI,qBADJ,EAC2B,UAAUC,CAAV,EAAa;AAC3CR,UAAKQ,EAAEN,MAAF,GAAWF,EAAEE,MAAd,GAAwBM,CAAxB,GAA4BR,CAAhC;AACA,aAAOQ,CAAP;AACD,KAJI,EAKJD,OALI,CAKIP,KAAK,GALT,EAKc,IALd,CAAP;AAMD,GAXM,MAWA;AACL;AACA,WAAO,KAAP;AACD;AACF,CApCD","file":"inet_ntop.js","sourcesContent":["module.exports = function inet_ntop (a) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/inet_ntop/\n // original by: Theriault (https://github.com/Theriault)\n // example 1: inet_ntop('\\x7F\\x00\\x00\\x01')\n // returns 1: '127.0.0.1'\n // _example 2: inet_ntop('\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\1')\n // _returns 2: '::1'\n\n var i = 0\n var m = ''\n var c = []\n\n a += ''\n if (a.length === 4) {\n // IPv4\n return [\n a.charCodeAt(0),\n a.charCodeAt(1),\n a.charCodeAt(2),\n a.charCodeAt(3)\n ].join('.')\n } else if (a.length === 16) {\n // IPv6\n for (i = 0; i < 16; i++) {\n c.push(((a.charCodeAt(i++) << 8) + a.charCodeAt(i)).toString(16))\n }\n return c.join(':')\n .replace(/((^|:)0(?=:|$))+:?/g, function (t) {\n m = (t.length > m.length) ? t : m\n return t\n })\n .replace(m || ' ', '::')\n } else {\n // Invalid length\n return false\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/inet_pton.js b/node_modules/locutus/php/network/inet_pton.js
deleted file mode 100644
index 1aef12b..0000000
--- a/node_modules/locutus/php/network/inet_pton.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-module.exports = function inet_pton(a) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/inet_pton/
- // original by: Theriault (https://github.com/Theriault)
- // example 1: inet_pton('::')
- // returns 1: '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
- // example 2: inet_pton('127.0.0.1')
- // returns 2: '\x7F\x00\x00\x01'
-
- var r;
- var m;
- var x;
- var i;
- var j;
- var f = String.fromCharCode;
-
- // IPv4
- m = a.match(/^(?:\d{1,3}(?:\.|$)){4}/);
- if (m) {
- m = m[0].split('.');
- m = f(m[0]) + f(m[1]) + f(m[2]) + f(m[3]);
- // Return if 4 bytes, otherwise false.
- return m.length === 4 ? m : false;
- }
- r = /^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/;
-
- // IPv6
- m = a.match(r);
- if (m) {
- // Translate each hexadecimal value.
- for (j = 1; j < 4; j++) {
- // Indice 2 is :: and if no length, continue.
- if (j === 2 || m[j].length === 0) {
- continue;
- }
- m[j] = m[j].split(':');
- for (i = 0; i < m[j].length; i++) {
- m[j][i] = parseInt(m[j][i], 16);
- // Would be NaN if it was blank, return false.
- if (isNaN(m[j][i])) {
- // Invalid IP.
- return false;
- }
- m[j][i] = f(m[j][i] >> 8) + f(m[j][i] & 0xFF);
- }
- m[j] = m[j].join('');
- }
- x = m[1].length + m[3].length;
- if (x === 16) {
- return m[1] + m[3];
- } else if (x < 16 && m[2].length > 0) {
- return m[1] + new Array(16 - x + 1).join('\x00') + m[3];
- }
- }
-
- // Invalid IP
- return false;
-};
-//# sourceMappingURL=inet_pton.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/inet_pton.js.map b/node_modules/locutus/php/network/inet_pton.js.map
deleted file mode 100644
index 35ef339..0000000
--- a/node_modules/locutus/php/network/inet_pton.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/inet_pton.js"],"names":["module","exports","inet_pton","a","r","m","x","i","j","f","String","fromCharCode","match","split","length","parseInt","isNaN","join","Array"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAo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,EAAEG,CAAF,EAAKD,CAAL,KAAW,CAAb,IAAkBE,EAAEJ,EAAEG,CAAF,EAAKD,CAAL,IAAU,IAAZ,CAA5B;AACD;AACDF,QAAEG,CAAF,IAAOH,EAAEG,CAAF,EAAKS,IAAL,CAAU,EAAV,CAAP;AACD;AACDX,QAAID,EAAE,CAAF,EAAKS,MAAL,GAAcT,EAAE,CAAF,EAAKS,MAAvB;AACA,QAAIR,MAAM,EAAV,EAAc;AACZ,aAAOD,EAAE,CAAF,IAAOA,EAAE,CAAF,CAAd;AACD,KAFD,MAEO,IAAIC,IAAI,EAAJ,IAAUD,EAAE,CAAF,EAAKS,MAAL,GAAc,CAA5B,EAA+B;AACpC,aAAOT,EAAE,CAAF,IAAQ,IAAIa,KAAJ,CAAU,KAAKZ,CAAL,GAAS,CAAnB,CAAD,CACXW,IADW,CACN,MADM,CAAP,GACWZ,EAAE,CAAF,CADlB;AAED;AACF;;AAED;AACA,SAAO,KAAP;AACD,CAzDD","file":"inet_pton.js","sourcesContent":["module.exports = function inet_pton (a) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/inet_pton/\n // original by: Theriault (https://github.com/Theriault)\n // example 1: inet_pton('::')\n // returns 1: '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0'\n // example 2: inet_pton('127.0.0.1')\n // returns 2: '\\x7F\\x00\\x00\\x01'\n\n var r\n var m\n var x\n var i\n var j\n var f = String.fromCharCode\n\n // IPv4\n m = a.match(/^(?:\\d{1,3}(?:\\.|$)){4}/)\n if (m) {\n m = m[0].split('.')\n m = f(m[0]) + f(m[1]) + f(m[2]) + f(m[3])\n // Return if 4 bytes, otherwise false.\n return m.length === 4 ? m : false\n }\n r = /^((?:[\\da-f]{1,4}(?::|)){0,8})(::)?((?:[\\da-f]{1,4}(?::|)){0,8})$/\n\n // IPv6\n m = a.match(r)\n if (m) {\n // Translate each hexadecimal value.\n for (j = 1; j < 4; j++) {\n // Indice 2 is :: and if no length, continue.\n if (j === 2 || m[j].length === 0) {\n continue\n }\n m[j] = m[j].split(':')\n for (i = 0; i < m[j].length; i++) {\n m[j][i] = parseInt(m[j][i], 16)\n // Would be NaN if it was blank, return false.\n if (isNaN(m[j][i])) {\n // Invalid IP.\n return false\n }\n m[j][i] = f(m[j][i] >> 8) + f(m[j][i] & 0xFF)\n }\n m[j] = m[j].join('')\n }\n x = m[1].length + m[3].length\n if (x === 16) {\n return m[1] + m[3]\n } else if (x < 16 && m[2].length > 0) {\n return m[1] + (new Array(16 - x + 1))\n .join('\\x00') + m[3]\n }\n }\n\n // Invalid IP\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/ip2long.js b/node_modules/locutus/php/network/ip2long.js
deleted file mode 100644
index 5840bff..0000000
--- a/node_modules/locutus/php/network/ip2long.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-module.exports = function ip2long(argIP) {
- // discuss at: http://locutus.io/php/ip2long/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // improved by: Victor
- // revised by: fearphage (http://http/my.opera.com/fearphage/)
- // revised by: Theriault (https://github.com/Theriault)
- // estarget: es2015
- // example 1: ip2long('192.0.34.166')
- // returns 1: 3221234342
- // example 2: ip2long('0.0xABCDEF')
- // returns 2: 11259375
- // example 3: ip2long('255.255.255.256')
- // returns 3: false
-
- var i = 0;
- // PHP allows decimal, octal, and hexadecimal IP components.
- // PHP allows between 1 (e.g. 127) to 4 (e.g 127.0.0.1) components.
-
- var pattern = new RegExp(['^([1-9]\\d*|0[0-7]*|0x[\\da-f]+)', '(?:\\.([1-9]\\d*|0[0-7]*|0x[\\da-f]+))?', '(?:\\.([1-9]\\d*|0[0-7]*|0x[\\da-f]+))?', '(?:\\.([1-9]\\d*|0[0-7]*|0x[\\da-f]+))?$'].join(''), 'i');
-
- argIP = argIP.match(pattern); // Verify argIP format.
- if (!argIP) {
- // Invalid format.
- return false;
- }
- // Reuse argIP variable for component counter.
- argIP[0] = 0;
- for (i = 1; i < 5; i += 1) {
- argIP[0] += !!(argIP[i] || '').length;
- argIP[i] = parseInt(argIP[i]) || 0;
- }
- // Continue to use argIP for overflow values.
- // PHP does not allow any component to overflow.
- argIP.push(256, 256, 256, 256);
- // Recalculate overflow of last component supplied to make up for missing components.
- argIP[4 + argIP[0]] *= Math.pow(256, 4 - argIP[0]);
- if (argIP[1] >= argIP[5] || argIP[2] >= argIP[6] || argIP[3] >= argIP[7] || argIP[4] >= argIP[8]) {
- return false;
- }
-
- return argIP[1] * (argIP[0] === 1 || 16777216) + argIP[2] * (argIP[0] <= 2 || 65536) + argIP[3] * (argIP[0] <= 3 || 256) + argIP[4] * 1;
-};
-//# sourceMappingURL=ip2long.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/ip2long.js.map b/node_modules/locutus/php/network/ip2long.js.map
deleted file mode 100644
index 6e43ef7..0000000
--- a/node_modules/locutus/php/network/ip2long.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/ip2long.js"],"names":["module","exports","ip2long","argIP","i","pattern","RegExp","join","match","length","parseInt","push","Math","pow"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,KAAlB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAR;AACA;AACA;;AAEA,MAAMC,UAAU,IAAIC,MAAJ,CAAW,CACzB,kCADyB,EAEzB,yCAFyB,EAGzB,yCAHyB,EAIzB,0CAJyB,EAKzBC,IALyB,CAKpB,EALoB,CAAX,EAKJ,GALI,CAAhB;;AAOAJ,UAAQA,MAAMK,KAAN,CAAYH,OAAZ,CAAR,CAzBwC,CAyBX;AAC7B,MAAI,CAACF,KAAL,EAAY;AACV;AACA,WAAO,KAAP;AACD;AACD;AACAA,QAAM,CAAN,IAAW,CAAX;AACA,OAAKC,IAAI,CAAT,EAAYA,IAAI,CAAhB,EAAmBA,KAAK,CAAxB,EAA2B;AACzBD,UAAM,CAAN,KAAY,CAAC,CAAE,CAACA,MAAMC,CAAN,KAAY,EAAb,EAAiBK,MAAhC;AACAN,UAAMC,CAAN,IAAWM,SAASP,MAAMC,CAAN,CAAT,KAAsB,CAAjC;AACD;AACD;AACA;AACAD,QAAMQ,IAAN,CAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B;AACA;AACAR,QAAM,IAAIA,MAAM,CAAN,CAAV,KAAuBS,KAAKC,GAAL,CAAS,GAAT,EAAc,IAAIV,MAAM,CAAN,CAAlB,CAAvB;AACA,MAAIA,MAAM,CAAN,KAAYA,MAAM,CAAN,CAAZ,IACFA,MAAM,CAAN,KAAYA,MAAM,CAAN,CADV,IAEFA,MAAM,CAAN,KAAYA,MAAM,CAAN,CAFV,IAGFA,MAAM,CAAN,KAAYA,MAAM,CAAN,CAHd,EAGwB;AACtB,WAAO,KAAP;AACD;;AAED,SAAOA,MAAM,CAAN,KAAYA,MAAM,CAAN,MAAa,CAAb,IAAkB,QAA9B,IACLA,MAAM,CAAN,KAAYA,MAAM,CAAN,KAAY,CAAZ,IAAiB,KAA7B,CADK,GAELA,MAAM,CAAN,KAAYA,MAAM,CAAN,KAAY,CAAZ,IAAiB,GAA7B,CAFK,GAGLA,MAAM,CAAN,IAAW,CAHb;AAID,CApDD","file":"ip2long.js","sourcesContent":["module.exports = function ip2long (argIP) {\n // discuss at: http://locutus.io/php/ip2long/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // improved by: Victor\n // revised by: fearphage (http://http/my.opera.com/fearphage/)\n // revised by: Theriault (https://github.com/Theriault)\n // estarget: es2015\n // example 1: ip2long('192.0.34.166')\n // returns 1: 3221234342\n // example 2: ip2long('0.0xABCDEF')\n // returns 2: 11259375\n // example 3: ip2long('255.255.255.256')\n // returns 3: false\n\n let i = 0\n // PHP allows decimal, octal, and hexadecimal IP components.\n // PHP allows between 1 (e.g. 127) to 4 (e.g 127.0.0.1) components.\n\n const pattern = new RegExp([\n '^([1-9]\\\\d*|0[0-7]*|0x[\\\\da-f]+)',\n '(?:\\\\.([1-9]\\\\d*|0[0-7]*|0x[\\\\da-f]+))?',\n '(?:\\\\.([1-9]\\\\d*|0[0-7]*|0x[\\\\da-f]+))?',\n '(?:\\\\.([1-9]\\\\d*|0[0-7]*|0x[\\\\da-f]+))?$'\n ].join(''), 'i')\n\n argIP = argIP.match(pattern) // Verify argIP format.\n if (!argIP) {\n // Invalid format.\n return false\n }\n // Reuse argIP variable for component counter.\n argIP[0] = 0\n for (i = 1; i < 5; i += 1) {\n argIP[0] += !!((argIP[i] || '').length)\n argIP[i] = parseInt(argIP[i]) || 0\n }\n // Continue to use argIP for overflow values.\n // PHP does not allow any component to overflow.\n argIP.push(256, 256, 256, 256)\n // Recalculate overflow of last component supplied to make up for missing components.\n argIP[4 + argIP[0]] *= Math.pow(256, 4 - argIP[0])\n if (argIP[1] >= argIP[5] ||\n argIP[2] >= argIP[6] ||\n argIP[3] >= argIP[7] ||\n argIP[4] >= argIP[8]) {\n return false\n }\n\n return argIP[1] * (argIP[0] === 1 || 16777216) +\n argIP[2] * (argIP[0] <= 2 || 65536) +\n argIP[3] * (argIP[0] <= 3 || 256) +\n argIP[4] * 1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/long2ip.js b/node_modules/locutus/php/network/long2ip.js
deleted file mode 100644
index 68683a5..0000000
--- a/node_modules/locutus/php/network/long2ip.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function long2ip(ip) {
- // discuss at: http://locutus.io/php/long2ip/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // example 1: long2ip( 3221234342 )
- // returns 1: '192.0.34.166'
-
- if (!isFinite(ip)) {
- return false;
- }
-
- return [ip >>> 24, ip >>> 16 & 0xFF, ip >>> 8 & 0xFF, ip & 0xFF].join('.');
-};
-//# sourceMappingURL=long2ip.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/long2ip.js.map b/node_modules/locutus/php/network/long2ip.js.map
deleted file mode 100644
index a303278..0000000
--- a/node_modules/locutus/php/network/long2ip.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/long2ip.js"],"names":["module","exports","long2ip","ip","isFinite","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,EAAlB,EAAsB;AACrC;AACA;AACA;AACA;;AAEA,MAAI,CAACC,SAASD,EAAT,CAAL,EAAmB;AACjB,WAAO,KAAP;AACD;;AAED,SAAO,CAACA,OAAO,EAAR,EAAYA,OAAO,EAAP,GAAY,IAAxB,EAA8BA,OAAO,CAAP,GAAW,IAAzC,EAA+CA,KAAK,IAApD,EAA0DE,IAA1D,CAA+D,GAA/D,CAAP;AACD,CAXD","file":"long2ip.js","sourcesContent":["module.exports = function long2ip (ip) {\n // discuss at: http://locutus.io/php/long2ip/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // example 1: long2ip( 3221234342 )\n // returns 1: '192.0.34.166'\n\n if (!isFinite(ip)) {\n return false\n }\n\n return [ip >>> 24, ip >>> 16 & 0xFF, ip >>> 8 & 0xFF, ip & 0xFF].join('.')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/setcookie.js b/node_modules/locutus/php/network/setcookie.js
deleted file mode 100644
index 912f2fe..0000000
--- a/node_modules/locutus/php/network/setcookie.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function setcookie(name, value, expires, path, domain, secure) {
- // discuss at: http://locutus.io/php/setcookie/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // bugfixed by: Andreas
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // example 1: setcookie('author_name', 'Kevin van Zonneveld')
- // returns 1: true
-
- var setrawcookie = require('../network/setrawcookie');
- return setrawcookie(name, encodeURIComponent(value), expires, path, domain, secure);
-};
-//# sourceMappingURL=setcookie.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/setcookie.js.map b/node_modules/locutus/php/network/setcookie.js.map
deleted file mode 100644
index bd221c9..0000000
--- a/node_modules/locutus/php/network/setcookie.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/setcookie.js"],"names":["module","exports","setcookie","name","value","expires","path","domain","secure","setrawcookie","require","encodeURIComponent"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,IAApB,EAA0BC,KAA1B,EAAiCC,OAAjC,EAA0CC,IAA1C,EAAgDC,MAAhD,EAAwDC,MAAxD,EAAgE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,eAAeC,QAAQ,yBAAR,CAAnB;AACA,SAAOD,aAAaN,IAAb,EAAmBQ,mBAAmBP,KAAnB,CAAnB,EAA8CC,OAA9C,EAAuDC,IAAvD,EAA6DC,MAA7D,EAAqEC,MAArE,CAAP;AACD,CAXD","file":"setcookie.js","sourcesContent":["module.exports = function setcookie (name, value, expires, path, domain, secure) {\n // discuss at: http://locutus.io/php/setcookie/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // bugfixed by: Andreas\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // example 1: setcookie('author_name', 'Kevin van Zonneveld')\n // returns 1: true\n\n var setrawcookie = require('../network/setrawcookie')\n return setrawcookie(name, encodeURIComponent(value), expires, path, domain, secure)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/network/setrawcookie.js b/node_modules/locutus/php/network/setrawcookie.js
deleted file mode 100644
index 7ad21be..0000000
--- a/node_modules/locutus/php/network/setrawcookie.js
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-module.exports = function setrawcookie(name, value, expires, path, domain, secure) {
- // discuss at: http://locutus.io/php/setrawcookie/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: setcookie
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Michael
- // note 1: This function requires access to the `window` global and is Browser-only
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: setrawcookie('author_name', 'Kevin van Zonneveld')
- // returns 1: true
-
- if (typeof window === 'undefined') {
- return true;
- }
-
- if (typeof expires === 'string' && /^\d+$/.test(expires)) {
- expires = parseInt(expires, 10);
- }
-
- if (expires instanceof Date) {
- expires = expires.toUTCString();
- } else if (typeof expires === 'number') {
- expires = new Date(expires * 1e3).toUTCString();
- }
-
- var r = [name + '=' + value];
- var i = '';
- var s = {
- expires: expires,
- path: path,
- domain: domain
- };
- for (i in s) {
- if (s.hasOwnProperty(i)) {
- // Exclude items on Object.prototype
- s[i] && r.push(i + '=' + s[i]);
- }
- }
-
- if (secure) {
- r.push('secure');
- }
-
- window.document.cookie = r.join(';');
-
- return true;
-};
-//# sourceMappingURL=setrawcookie.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/network/setrawcookie.js.map b/node_modules/locutus/php/network/setrawcookie.js.map
deleted file mode 100644
index cec1cce..0000000
--- a/node_modules/locutus/php/network/setrawcookie.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/setrawcookie.js"],"names":["module","exports","setrawcookie","name","value","expires","path","domain","secure","window","test","parseInt","Date","toUTCString","r","i","s","hasOwnProperty","push","document","cookie","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,IAAvB,EAA6BC,KAA7B,EAAoCC,OAApC,EAA6CC,IAA7C,EAAmDC,MAAnD,EAA2DC,MAA3D,EAAmE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjC,WAAO,IAAP;AACD;;AAED,MAAI,OAAOJ,OAAP,KAAmB,QAAnB,IAAgC,OAAD,CAAUK,IAAV,CAAeL,OAAf,CAAnC,EAA4D;AAC1DA,cAAUM,SAASN,OAAT,EAAkB,EAAlB,CAAV;AACD;;AAED,MAAIA,mBAAmBO,IAAvB,EAA6B;AAC3BP,cAAUA,QAAQQ,WAAR,EAAV;AACD,GAFD,MAEO,IAAI,OAAOR,OAAP,KAAmB,QAAvB,EAAiC;AACtCA,cAAW,IAAIO,IAAJ,CAASP,UAAU,GAAnB,CAAD,CAA0BQ,WAA1B,EAAV;AACD;;AAED,MAAIC,IAAI,CAACX,OAAO,GAAP,GAAaC,KAAd,CAAR;AACA,MAAIW,IAAI,EAAR;AACA,MAAIC,IAAI;AACNX,aAASA,OADH;AAENC,UAAMA,IAFA;AAGNC,YAAQA;AAHF,GAAR;AAKA,OAAKQ,CAAL,IAAUC,CAAV,EAAa;AACX,QAAIA,EAAEC,cAAF,CAAiBF,CAAjB,CAAJ,EAAyB;AACvB;AACAC,QAAED,CAAF,KAAQD,EAAEI,IAAF,CAAOH,IAAI,GAAJ,GAAUC,EAAED,CAAF,CAAjB,CAAR;AACD;AACF;;AAED,MAAIP,MAAJ,EAAY;AACVM,MAAEI,IAAF,CAAO,QAAP;AACD;;AAEDT,SAAOU,QAAP,CAAgBC,MAAhB,GAAyBN,EAAEO,IAAF,CAAO,GAAP,CAAzB;;AAEA,SAAO,IAAP;AACD,CA9CD","file":"setrawcookie.js","sourcesContent":["module.exports = function setrawcookie (name, value, expires, path, domain, secure) {\n // discuss at: http://locutus.io/php/setrawcookie/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: setcookie\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Michael\n // note 1: This function requires access to the `window` global and is Browser-only\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: setrawcookie('author_name', 'Kevin van Zonneveld')\n // returns 1: true\n\n if (typeof window === 'undefined') {\n return true\n }\n\n if (typeof expires === 'string' && (/^\\d+$/).test(expires)) {\n expires = parseInt(expires, 10)\n }\n\n if (expires instanceof Date) {\n expires = expires.toUTCString()\n } else if (typeof expires === 'number') {\n expires = (new Date(expires * 1e3)).toUTCString()\n }\n\n var r = [name + '=' + value]\n var i = ''\n var s = {\n expires: expires,\n path: path,\n domain: domain\n }\n for (i in s) {\n if (s.hasOwnProperty(i)) {\n // Exclude items on Object.prototype\n s[i] && r.push(i + '=' + s[i])\n }\n }\n\n if (secure) {\n r.push('secure')\n }\n\n window.document.cookie = r.join(';')\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/pcre/index.js b/node_modules/locutus/php/pcre/index.js
deleted file mode 100644
index dbadf58..0000000
--- a/node_modules/locutus/php/pcre/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['preg_quote'] = require('./preg_quote');
-module.exports['sql_regcase'] = require('./sql_regcase');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/pcre/index.js.map b/node_modules/locutus/php/pcre/index.js.map
deleted file mode 100644
index 2b469db..0000000
--- a/node_modules/locutus/php/pcre/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/pcre/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC","file":"index.js","sourcesContent":["module.exports['preg_quote'] = require('./preg_quote')\nmodule.exports['sql_regcase'] = require('./sql_regcase')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/pcre/preg_quote.js b/node_modules/locutus/php/pcre/preg_quote.js
deleted file mode 100644
index 0dcfd71..0000000
--- a/node_modules/locutus/php/pcre/preg_quote.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = function preg_quote(str, delimiter) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/preg_quote/
- // original by: booeyOH
- // improved by: Ates Goral (http://magnetiq.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: preg_quote("$40")
- // returns 1: '\\$40'
- // example 2: preg_quote("*RRRING* Hello?")
- // returns 2: '\\*RRRING\\* Hello\\?'
- // example 3: preg_quote("\\.+*?[^]$(){}=!<>|:")
- // returns 3: '\\\\\\.\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:'
-
- return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&');
-};
-//# sourceMappingURL=preg_quote.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/pcre/preg_quote.js.map b/node_modules/locutus/php/pcre/preg_quote.js.map
deleted file mode 100644
index 890ea3f..0000000
--- a/node_modules/locutus/php/pcre/preg_quote.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/pcre/preg_quote.js"],"names":["module","exports","preg_quote","str","delimiter","replace","RegExp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,GAArB,EAA0BC,SAA1B,EAAqC;AAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACD,MAAM,EAAP,EACJE,OADI,CACI,IAAIC,MAAJ,CAAW,qCAAqCF,aAAa,EAAlD,IAAwD,IAAnE,EAAyE,GAAzE,CADJ,EACmF,MADnF,CAAP;AAED,CAhBD","file":"preg_quote.js","sourcesContent":["module.exports = function preg_quote (str, delimiter) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/preg_quote/\n // original by: booeyOH\n // improved by: Ates Goral (http://magnetiq.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: preg_quote(\"$40\")\n // returns 1: '\\\\$40'\n // example 2: preg_quote(\"*RRRING* Hello?\")\n // returns 2: '\\\\*RRRING\\\\* Hello\\\\?'\n // example 3: preg_quote(\"\\\\.+*?[^]$(){}=!<>|:\")\n // returns 3: '\\\\\\\\\\\\.\\\\+\\\\*\\\\?\\\\[\\\\^\\\\]\\\\$\\\\(\\\\)\\\\{\\\\}\\\\=\\\\!\\\\<\\\\>\\\\|\\\\:'\n\n return (str + '')\n .replace(new RegExp('[.\\\\\\\\+*?\\\\[\\\\^\\\\]$(){}=!<>|:\\\\' + (delimiter || '') + '-]', 'g'), '\\\\$&')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/pcre/sql_regcase.js b/node_modules/locutus/php/pcre/sql_regcase.js
deleted file mode 100644
index f0dd26d..0000000
--- a/node_modules/locutus/php/pcre/sql_regcase.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = function sql_regcase(str) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/sql_regcase/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: sql_regcase('Foo - bar.')
- // returns 1: '[Ff][Oo][Oo] - [Bb][Aa][Rr].'
-
- var setlocale = require('../strings/setlocale');
- var i = 0;
- var upper = '';
- var lower = '';
- var pos = 0;
- var retStr = '';
-
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- upper = $locutus.php.locales[$locutus.php.localeCategories.LC_CTYPE].LC_CTYPE.upper;
- lower = $locutus.php.locales[$locutus.php.localeCategories.LC_CTYPE].LC_CTYPE.lower;
-
- // @todo: Make this more readable
- for (i = 0; i < str.length; i++) {
- if ((pos = upper.indexOf(str.charAt(i))) !== -1 || (pos = lower.indexOf(str.charAt(i))) !== -1) {
- retStr += '[' + upper.charAt(pos) + lower.charAt(pos) + ']';
- } else {
- retStr += str.charAt(i);
- }
- }
-
- return retStr;
-};
-//# sourceMappingURL=sql_regcase.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/pcre/sql_regcase.js.map b/node_modules/locutus/php/pcre/sql_regcase.js.map
deleted file mode 100644
index bd74d2d..0000000
--- a/node_modules/locutus/php/pcre/sql_regcase.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/pcre/sql_regcase.js"],"names":["module","exports","sql_regcase","str","setlocale","require","i","upper","lower","pos","retStr","$global","window","global","$locutus","php","locales","localeCategories","LC_CTYPE","length","indexOf","charAt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,GAAtB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,QAAQ,EAAZ;AACA,MAAIC,QAAQ,EAAZ;AACA,MAAIC,MAAM,CAAV;AACA,MAAIC,SAAS,EAAb;;AAEAN,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAIO,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEAR,UAAQO,SAASC,GAAT,CAAaC,OAAb,CAAqBF,SAASC,GAAT,CAAaE,gBAAb,CAA8BC,QAAnD,EAA6DA,QAA7D,CAAsEX,KAA9E;AACAC,UAAQM,SAASC,GAAT,CAAaC,OAAb,CAAqBF,SAASC,GAAT,CAAaE,gBAAb,CAA8BC,QAAnD,EAA6DA,QAA7D,CAAsEV,KAA9E;;AAEA;AACA,OAAKF,IAAI,CAAT,EAAYA,IAAIH,IAAIgB,MAApB,EAA4Bb,GAA5B,EAAiC;AAC/B,QAAK,CAACG,MAAMF,MAAMa,OAAN,CAAcjB,IAAIkB,MAAJ,CAAWf,CAAX,CAAd,CAAP,MAAyC,CAAC,CAA3C,IACD,CAACG,MAAMD,MAAMY,OAAN,CAAcjB,IAAIkB,MAAJ,CAAWf,CAAX,CAAd,CAAP,MAAyC,CAAC,CAD7C,EACiD;AAC/CI,gBAAU,MAAMH,MAAMc,MAAN,CAAaZ,GAAb,CAAN,GAA0BD,MAAMa,MAAN,CAAaZ,GAAb,CAA1B,GAA8C,GAAxD;AACD,KAHD,MAGO;AACLC,gBAAUP,IAAIkB,MAAJ,CAAWf,CAAX,CAAV;AACD;AACF;;AAED,SAAOI,MAAP;AACD,CAlCD","file":"sql_regcase.js","sourcesContent":["module.exports = function sql_regcase (str) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/sql_regcase/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: sql_regcase('Foo - bar.')\n // returns 1: '[Ff][Oo][Oo] - [Bb][Aa][Rr].'\n\n var setlocale = require('../strings/setlocale')\n var i = 0\n var upper = ''\n var lower = ''\n var pos = 0\n var retStr = ''\n\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n upper = $locutus.php.locales[$locutus.php.localeCategories.LC_CTYPE].LC_CTYPE.upper\n lower = $locutus.php.locales[$locutus.php.localeCategories.LC_CTYPE].LC_CTYPE.lower\n\n // @todo: Make this more readable\n for (i = 0; i < str.length; i++) {\n if (((pos = upper.indexOf(str.charAt(i))) !== -1) ||\n ((pos = lower.indexOf(str.charAt(i))) !== -1)) {\n retStr += '[' + upper.charAt(pos) + lower.charAt(pos) + ']'\n } else {\n retStr += str.charAt(i)\n }\n }\n\n return retStr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/addcslashes.js b/node_modules/locutus/php/strings/addcslashes.js
deleted file mode 100644
index 1518078..0000000
--- a/node_modules/locutus/php/strings/addcslashes.js
+++ /dev/null
@@ -1,176 +0,0 @@
-'use strict';
-
-module.exports = function addcslashes(str, charlist) {
- // discuss at: http://locutus.io/php/addcslashes/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: We show double backslashes in the return value example
- // note 1: code below because a JavaScript string will not
- // note 1: render them as backslashes otherwise
- // example 1: addcslashes('foo[ ]', 'A..z'); // Escape all ASCII within capital A to lower z range, including square brackets
- // returns 1: "\\f\\o\\o\\[ \\]"
- // example 2: addcslashes("zoo['.']", 'z..A'); // Only escape z, period, and A here since not a lower-to-higher range
- // returns 2: "\\zoo['\\.']"
- // _example 3: addcslashes("@a\u0000\u0010\u00A9", "\0..\37!@\177..\377"); // Escape as octals those specified and less than 32 (0x20) or greater than 126 (0x7E), but not otherwise
- // _returns 3: '\\@a\\000\\020\\302\\251'
- // _example 4: addcslashes("\u0020\u007E", "\40..\175"); // Those between 32 (0x20 or 040) and 126 (0x7E or 0176) decimal value will be backslashed if specified (not octalized)
- // _returns 4: '\\ ~'
- // _example 5: addcslashes("\r\u0007\n", '\0..\37'); // Recognize C escape sequences if specified
- // _returns 5: "\\r\\a\\n"
- // _example 6: addcslashes("\r\u0007\n", '\0'); // Do not recognize C escape sequences if not specified
- // _returns 6: "\r\u0007\n"
-
- var target = '';
- var chrs = [];
- var i = 0;
- var j = 0;
- var c = '';
- var next = '';
- var rangeBegin = '';
- var rangeEnd = '';
- var chr = '';
- var begin = 0;
- var end = 0;
- var octalLength = 0;
- var postOctalPos = 0;
- var cca = 0;
- var escHexGrp = [];
- var encoded = '';
- var percentHex = /%([\dA-Fa-f]+)/g;
-
- var _pad = function _pad(n, c) {
- if ((n = n + '').length < c) {
- return new Array(++c - n.length).join('0') + n;
- }
- return n;
- };
-
- for (i = 0; i < charlist.length; i++) {
- c = charlist.charAt(i);
- next = charlist.charAt(i + 1);
- if (c === '\\' && next && /\d/.test(next)) {
- // Octal
- rangeBegin = charlist.slice(i + 1).match(/^\d+/)[0];
- octalLength = rangeBegin.length;
- postOctalPos = i + octalLength + 1;
- if (charlist.charAt(postOctalPos) + charlist.charAt(postOctalPos + 1) === '..') {
- // Octal begins range
- begin = rangeBegin.charCodeAt(0);
- if (/\\\d/.test(charlist.charAt(postOctalPos + 2) + charlist.charAt(postOctalPos + 3))) {
- // Range ends with octal
- rangeEnd = charlist.slice(postOctalPos + 3).match(/^\d+/)[0];
- // Skip range end backslash
- i += 1;
- } else if (charlist.charAt(postOctalPos + 2)) {
- // Range ends with character
- rangeEnd = charlist.charAt(postOctalPos + 2);
- } else {
- throw new Error('Range with no end point');
- }
- end = rangeEnd.charCodeAt(0);
- if (end > begin) {
- // Treat as a range
- for (j = begin; j <= end; j++) {
- chrs.push(String.fromCharCode(j));
- }
- } else {
- // Supposed to treat period, begin and end as individual characters only, not a range
- chrs.push('.', rangeBegin, rangeEnd);
- }
- // Skip dots and range end (already skipped range end backslash if present)
- i += rangeEnd.length + 2;
- } else {
- // Octal is by itself
- chr = String.fromCharCode(parseInt(rangeBegin, 8));
- chrs.push(chr);
- }
- // Skip range begin
- i += octalLength;
- } else if (next + charlist.charAt(i + 2) === '..') {
- // Character begins range
- rangeBegin = c;
- begin = rangeBegin.charCodeAt(0);
- if (/\\\d/.test(charlist.charAt(i + 3) + charlist.charAt(i + 4))) {
- // Range ends with octal
- rangeEnd = charlist.slice(i + 4).match(/^\d+/)[0];
- // Skip range end backslash
- i += 1;
- } else if (charlist.charAt(i + 3)) {
- // Range ends with character
- rangeEnd = charlist.charAt(i + 3);
- } else {
- throw new Error('Range with no end point');
- }
- end = rangeEnd.charCodeAt(0);
- if (end > begin) {
- // Treat as a range
- for (j = begin; j <= end; j++) {
- chrs.push(String.fromCharCode(j));
- }
- } else {
- // Supposed to treat period, begin and end as individual characters only, not a range
- chrs.push('.', rangeBegin, rangeEnd);
- }
- // Skip dots and range end (already skipped range end backslash if present)
- i += rangeEnd.length + 2;
- } else {
- // Character is by itself
- chrs.push(c);
- }
- }
-
- for (i = 0; i < str.length; i++) {
- c = str.charAt(i);
- if (chrs.indexOf(c) !== -1) {
- target += '\\';
- cca = c.charCodeAt(0);
- if (cca < 32 || cca > 126) {
- // Needs special escaping
- switch (c) {
- case '\n':
- target += 'n';
- break;
- case '\t':
- target += 't';
- break;
- case '\r':
- target += 'r';
- break;
- case '\x07':
- target += 'a';
- break;
- case '\v':
- target += 'v';
- break;
- case '\b':
- target += 'b';
- break;
- case '\f':
- target += 'f';
- break;
- default:
- // target += _pad(cca.toString(8), 3);break; // Sufficient for UTF-16
- encoded = encodeURIComponent(c);
-
- // 3-length-padded UTF-8 octets
- if ((escHexGrp = percentHex.exec(encoded)) !== null) {
- // already added a slash above:
- target += _pad(parseInt(escHexGrp[1], 16).toString(8), 3);
- }
- while ((escHexGrp = percentHex.exec(encoded)) !== null) {
- target += '\\' + _pad(parseInt(escHexGrp[1], 16).toString(8), 3);
- }
- break;
- }
- } else {
- // Perform regular backslashed escaping
- target += c;
- }
- } else {
- // Just add the character unescaped
- target += c;
- }
- }
-
- return target;
-};
-//# sourceMappingURL=addcslashes.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/addcslashes.js.map b/node_modules/locutus/php/strings/addcslashes.js.map
deleted file mode 100644
index a750b88..0000000
--- a/node_modules/locutus/php/strings/addcslashes.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/addcslashes.js"],"names":["module","exports","addcslashes","str","charlist","target","chrs","i","j","c","next","rangeBegin","rangeEnd","chr","begin","end","octalLength","postOctalPos","cca","escHexGrp","encoded","percentHex","_pad","n","length","Array","join","charAt","test","slice","match","charCodeAt","Error","push","String","fromCharCode","parseInt","indexOf","encodeURIComponent","exec","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,GAAtB,EAA2BC,QAA3B,EAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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b,MAAM,EAAN,IAAYA,MAAM,GAAtB,EAA2B;AACzB;AACA,gBAAQT,CAAR;AACE,eAAK,IAAL;AACEJ,sBAAU,GAAV;AACA;AACF,eAAK,IAAL;AACEA,sBAAU,GAAV;AACA;AACF,eAAK,IAAL;AACEA,sBAAU,GAAV;AACA;AACF,eAAK,MAAL;AACEA,sBAAU,GAAV;AACA;AACF,eAAK,IAAL;AACEA,sBAAU,GAAV;AACA;AACF,eAAK,IAAL;AACEA,sBAAU,GAAV;AACA;AACF,eAAK,IAAL;AACEA,sBAAU,GAAV;AACA;AACF;AACE;AACAe,sBAAUkB,mBAAmB7B,CAAnB,CAAV;;AAEA;AACA,gBAAI,CAACU,YAAYE,WAAWkB,IAAX,CAAgBnB,OAAhB,CAAb,MAA2C,IAA/C,EAAqD;AACnD;AACAf,wBAAUiB,KAAKc,SAASjB,UAAU,CAAV,CAAT,EAAuB,EAAvB,EAA2BqB,QAA3B,CAAoC,CAApC,CAAL,EAA6C,CAA7C,CAAV;AACD;AACD,mBAAO,CAACrB,YAAYE,WAAWkB,IAAX,CAAgBnB,OAAhB,CAAb,MAA2C,IAAlD,EAAwD;AACtDf,wBAAU,OAAOiB,KAAKc,SAASjB,UAAU,CAAV,CAAT,EAAuB,EAAvB,EAA2BqB,QAA3B,CAAoC,CAApC,CAAL,EAA6C,CAA7C,CAAjB;AACD;AACD;AAlCJ;AAoCD,OAtCD,MAsCO;AACL;AACAnC,kBAAUI,CAAV;AACD;AACF,KA7CD,MA6CO;AACL;AACAJ,gBAAUI,CAAV;AACD;AACF;;AAED,SAAOJ,MAAP;AACD,CA5KD","file":"addcslashes.js","sourcesContent":["module.exports = function addcslashes (str, charlist) {\n // discuss at: http://locutus.io/php/addcslashes/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: We show double backslashes in the return value example\n // note 1: code below because a JavaScript string will not\n // note 1: render them as backslashes otherwise\n // example 1: addcslashes('foo[ ]', 'A..z'); // Escape all ASCII within capital A to lower z range, including square brackets\n // returns 1: \"\\\\f\\\\o\\\\o\\\\[ \\\\]\"\n // example 2: addcslashes(\"zoo['.']\", 'z..A'); // Only escape z, period, and A here since not a lower-to-higher range\n // returns 2: \"\\\\zoo['\\\\.']\"\n // _example 3: addcslashes(\"@a\\u0000\\u0010\\u00A9\", \"\\0..\\37!@\\177..\\377\"); // Escape as octals those specified and less than 32 (0x20) or greater than 126 (0x7E), but not otherwise\n // _returns 3: '\\\\@a\\\\000\\\\020\\\\302\\\\251'\n // _example 4: addcslashes(\"\\u0020\\u007E\", \"\\40..\\175\"); // Those between 32 (0x20 or 040) and 126 (0x7E or 0176) decimal value will be backslashed if specified (not octalized)\n // _returns 4: '\\\\ ~'\n // _example 5: addcslashes(\"\\r\\u0007\\n\", '\\0..\\37'); // Recognize C escape sequences if specified\n // _returns 5: \"\\\\r\\\\a\\\\n\"\n // _example 6: addcslashes(\"\\r\\u0007\\n\", '\\0'); // Do not recognize C escape sequences if not specified\n // _returns 6: \"\\r\\u0007\\n\"\n\n var target = ''\n var chrs = []\n var i = 0\n var j = 0\n var c = ''\n var next = ''\n var rangeBegin = ''\n var rangeEnd = ''\n var chr = ''\n var begin = 0\n var end = 0\n var octalLength = 0\n var postOctalPos = 0\n var cca = 0\n var escHexGrp = []\n var encoded = ''\n var percentHex = /%([\\dA-Fa-f]+)/g\n\n var _pad = function (n, c) {\n if ((n = n + '').length < c) {\n return new Array(++c - n.length).join('0') + n\n }\n return n\n }\n\n for (i = 0; i < charlist.length; i++) {\n c = charlist.charAt(i)\n next = charlist.charAt(i + 1)\n if (c === '\\\\' && next && (/\\d/).test(next)) {\n // Octal\n rangeBegin = charlist.slice(i + 1).match(/^\\d+/)[0]\n octalLength = rangeBegin.length\n postOctalPos = i + octalLength + 1\n if (charlist.charAt(postOctalPos) + charlist.charAt(postOctalPos + 1) === '..') {\n // Octal begins range\n begin = rangeBegin.charCodeAt(0)\n if ((/\\\\\\d/).test(charlist.charAt(postOctalPos + 2) + charlist.charAt(postOctalPos + 3))) {\n // Range ends with octal\n rangeEnd = charlist.slice(postOctalPos + 3).match(/^\\d+/)[0]\n // Skip range end backslash\n i += 1\n } else if (charlist.charAt(postOctalPos + 2)) {\n // Range ends with character\n rangeEnd = charlist.charAt(postOctalPos + 2)\n } else {\n throw new Error('Range with no end point')\n }\n end = rangeEnd.charCodeAt(0)\n if (end > begin) {\n // Treat as a range\n for (j = begin; j <= end; j++) {\n chrs.push(String.fromCharCode(j))\n }\n } else {\n // Supposed to treat period, begin and end as individual characters only, not a range\n chrs.push('.', rangeBegin, rangeEnd)\n }\n // Skip dots and range end (already skipped range end backslash if present)\n i += rangeEnd.length + 2\n } else {\n // Octal is by itself\n chr = String.fromCharCode(parseInt(rangeBegin, 8))\n chrs.push(chr)\n }\n // Skip range begin\n i += octalLength\n } else if (next + charlist.charAt(i + 2) === '..') {\n // Character begins range\n rangeBegin = c\n begin = rangeBegin.charCodeAt(0)\n if ((/\\\\\\d/).test(charlist.charAt(i + 3) + charlist.charAt(i + 4))) {\n // Range ends with octal\n rangeEnd = charlist.slice(i + 4).match(/^\\d+/)[0]\n // Skip range end backslash\n i += 1\n } else if (charlist.charAt(i + 3)) {\n // Range ends with character\n rangeEnd = charlist.charAt(i + 3)\n } else {\n throw new Error('Range with no end point')\n }\n end = rangeEnd.charCodeAt(0)\n if (end > begin) {\n // Treat as a range\n for (j = begin; j <= end; j++) {\n chrs.push(String.fromCharCode(j))\n }\n } else {\n // Supposed to treat period, begin and end as individual characters only, not a range\n chrs.push('.', rangeBegin, rangeEnd)\n }\n // Skip dots and range end (already skipped range end backslash if present)\n i += rangeEnd.length + 2\n } else {\n // Character is by itself\n chrs.push(c)\n }\n }\n\n for (i = 0; i < str.length; i++) {\n c = str.charAt(i)\n if (chrs.indexOf(c) !== -1) {\n target += '\\\\'\n cca = c.charCodeAt(0)\n if (cca < 32 || cca > 126) {\n // Needs special escaping\n switch (c) {\n case '\\n':\n target += 'n'\n break\n case '\\t':\n target += 't'\n break\n case '\\u000D':\n target += 'r'\n break\n case '\\u0007':\n target += 'a'\n break\n case '\\v':\n target += 'v'\n break\n case '\\b':\n target += 'b'\n break\n case '\\f':\n target += 'f'\n break\n default:\n // target += _pad(cca.toString(8), 3);break; // Sufficient for UTF-16\n encoded = encodeURIComponent(c)\n\n // 3-length-padded UTF-8 octets\n if ((escHexGrp = percentHex.exec(encoded)) !== null) {\n // already added a slash above:\n target += _pad(parseInt(escHexGrp[1], 16).toString(8), 3)\n }\n while ((escHexGrp = percentHex.exec(encoded)) !== null) {\n target += '\\\\' + _pad(parseInt(escHexGrp[1], 16).toString(8), 3)\n }\n break\n }\n } else {\n // Perform regular backslashed escaping\n target += c\n }\n } else {\n // Just add the character unescaped\n target += c\n }\n }\n\n return target\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/addslashes.js b/node_modules/locutus/php/strings/addslashes.js
deleted file mode 100644
index b7c52ea..0000000
--- a/node_modules/locutus/php/strings/addslashes.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function addslashes(str) {
- // discuss at: http://locutus.io/php/addslashes/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Ates Goral (http://magnetiq.com)
- // improved by: marrtins
- // improved by: Nate
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/)
- // input by: Denny Wardhana
- // example 1: addslashes("kevin's birthday")
- // returns 1: "kevin\\'s birthday"
-
- return (str + '').replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0');
-};
-//# sourceMappingURL=addslashes.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/addslashes.js.map b/node_modules/locutus/php/strings/addslashes.js.map
deleted file mode 100644
index a3616b3..0000000
--- a/node_modules/locutus/php/strings/addslashes.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/addslashes.js"],"names":["module","exports","addslashes","str","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,GAArB,EAA0B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,OADI,CACI,SADJ,EACe,MADf,EAEJA,OAFI,CAEI,SAFJ,EAEe,KAFf,CAAP;AAGD,CAhBD","file":"addslashes.js","sourcesContent":["module.exports = function addslashes (str) {\n // discuss at: http://locutus.io/php/addslashes/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Ates Goral (http://magnetiq.com)\n // improved by: marrtins\n // improved by: Nate\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/)\n // input by: Denny Wardhana\n // example 1: addslashes(\"kevin's birthday\")\n // returns 1: \"kevin\\\\'s birthday\"\n\n return (str + '')\n .replace(/[\\\\\"']/g, '\\\\$&')\n .replace(/\\u0000/g, '\\\\0')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/bin2hex.js b/node_modules/locutus/php/strings/bin2hex.js
deleted file mode 100644
index 344c03d..0000000
--- a/node_modules/locutus/php/strings/bin2hex.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-module.exports = function bin2hex(s) {
- // discuss at: http://locutus.io/php/bin2hex/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Linuxworld
- // improved by: ntoniazzi (http://locutus.io/php/bin2hex:361#comment_177616)
- // example 1: bin2hex('Kev')
- // returns 1: '4b6576'
- // example 2: bin2hex(String.fromCharCode(0x00))
- // returns 2: '00'
-
- var i;
- var l;
- var o = '';
- var n;
-
- s += '';
-
- for (i = 0, l = s.length; i < l; i++) {
- n = s.charCodeAt(i).toString(16);
- o += n.length < 2 ? '0' + n : n;
- }
-
- return o;
-};
-//# sourceMappingURL=bin2hex.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/bin2hex.js.map b/node_modules/locutus/php/strings/bin2hex.js.map
deleted file mode 100644
index 7bac440..0000000
--- a/node_modules/locutus/php/strings/bin2hex.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/bin2hex.js"],"names":["module","exports","bin2hex","s","i","l","o","n","length","charCodeAt","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,CAAlB,EAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,CAAJ;;AAEAJ,OAAK,EAAL;;AAEA,OAAKC,IAAI,CAAJ,EAAOC,IAAIF,EAAEK,MAAlB,EAA0BJ,IAAIC,CAA9B,EAAiCD,GAAjC,EAAsC;AACpCG,QAAIJ,EAAEM,UAAF,CAAaL,CAAb,EACDM,QADC,CACQ,EADR,CAAJ;AAEAJ,SAAKC,EAAEC,MAAF,GAAW,CAAX,GAAe,MAAMD,CAArB,GAAyBA,CAA9B;AACD;;AAED,SAAOD,CAAP;AACD,CAzBD","file":"bin2hex.js","sourcesContent":["module.exports = function bin2hex (s) {\n // discuss at: http://locutus.io/php/bin2hex/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Linuxworld\n // improved by: ntoniazzi (http://locutus.io/php/bin2hex:361#comment_177616)\n // example 1: bin2hex('Kev')\n // returns 1: '4b6576'\n // example 2: bin2hex(String.fromCharCode(0x00))\n // returns 2: '00'\n\n var i\n var l\n var o = ''\n var n\n\n s += ''\n\n for (i = 0, l = s.length; i < l; i++) {\n n = s.charCodeAt(i)\n .toString(16)\n o += n.length < 2 ? '0' + n : n\n }\n\n return o\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/chop.js b/node_modules/locutus/php/strings/chop.js
deleted file mode 100644
index 3629945..0000000
--- a/node_modules/locutus/php/strings/chop.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function chop(str, charlist) {
- // discuss at: http://locutus.io/php/chop/
- // original by: Paulo Freitas
- // example 1: chop(' Kevin van Zonneveld ')
- // returns 1: ' Kevin van Zonneveld'
-
- var rtrim = require('../strings/rtrim');
- return rtrim(str, charlist);
-};
-//# sourceMappingURL=chop.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/chop.js.map b/node_modules/locutus/php/strings/chop.js.map
deleted file mode 100644
index 6164674..0000000
--- a/node_modules/locutus/php/strings/chop.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/chop.js"],"names":["module","exports","chop","str","charlist","rtrim","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoBC,QAApB,EAA8B;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,QAAQC,QAAQ,kBAAR,CAAZ;AACA,SAAOD,MAAMF,GAAN,EAAWC,QAAX,CAAP;AACD,CARD","file":"chop.js","sourcesContent":["module.exports = function chop (str, charlist) {\n // discuss at: http://locutus.io/php/chop/\n // original by: Paulo Freitas\n // example 1: chop(' Kevin van Zonneveld ')\n // returns 1: ' Kevin van Zonneveld'\n\n var rtrim = require('../strings/rtrim')\n return rtrim(str, charlist)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/chr.js b/node_modules/locutus/php/strings/chr.js
deleted file mode 100644
index 8a6f52d..0000000
--- a/node_modules/locutus/php/strings/chr.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-module.exports = function chr(codePt) {
- // discuss at: http://locutus.io/php/chr/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: chr(75) === 'K'
- // example 1: chr(65536) === '\uD800\uDC00'
- // returns 1: true
- // returns 1: true
-
- if (codePt > 0xFFFF) {
- // Create a four-byte string (length 2) since this code point is high
- // enough for the UTF-16 encoding (JavaScript internal use), to
- // require representation with two surrogates (reserved non-characters
- // used for building other characters; the first is "high" and the next "low")
- codePt -= 0x10000;
- return String.fromCharCode(0xD800 + (codePt >> 10), 0xDC00 + (codePt & 0x3FF));
- }
- return String.fromCharCode(codePt);
-};
-//# sourceMappingURL=chr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/chr.js.map b/node_modules/locutus/php/strings/chr.js.map
deleted file mode 100644
index 4c7e9f7..0000000
--- a/node_modules/locutus/php/strings/chr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/chr.js"],"names":["module","exports","chr","codePt","String","fromCharCode"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,MAAd,EAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,SAAS,MAAb,EAAqB;AAAE;AACrB;AACA;AACA;AACAA,cAAU,OAAV;AACA,WAAOC,OAAOC,YAAP,CAAoB,UAAUF,UAAU,EAApB,CAApB,EAA6C,UAAUA,SAAS,KAAnB,CAA7C,CAAP;AACD;AACD,SAAOC,OAAOC,YAAP,CAAoBF,MAApB,CAAP;AACD,CAjBD","file":"chr.js","sourcesContent":["module.exports = function chr (codePt) {\n // discuss at: http://locutus.io/php/chr/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: chr(75) === 'K'\n // example 1: chr(65536) === '\\uD800\\uDC00'\n // returns 1: true\n // returns 1: true\n\n if (codePt > 0xFFFF) { // Create a four-byte string (length 2) since this code point is high\n // enough for the UTF-16 encoding (JavaScript internal use), to\n // require representation with two surrogates (reserved non-characters\n // used for building other characters; the first is \"high\" and the next \"low\")\n codePt -= 0x10000\n return String.fromCharCode(0xD800 + (codePt >> 10), 0xDC00 + (codePt & 0x3FF))\n }\n return String.fromCharCode(codePt)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/chunk_split.js b/node_modules/locutus/php/strings/chunk_split.js
deleted file mode 100644
index 24f6e00..0000000
--- a/node_modules/locutus/php/strings/chunk_split.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function chunk_split(body, chunklen, end) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/chunk_split/
- // original by: Paulo Freitas
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Theriault (https://github.com/Theriault)
- // example 1: chunk_split('Hello world!', 1, '*')
- // returns 1: 'H*e*l*l*o* *w*o*r*l*d*!*'
- // example 2: chunk_split('Hello world!', 10, '*')
- // returns 2: 'Hello worl*d!*'
-
- chunklen = parseInt(chunklen, 10) || 76;
- end = end || '\r\n';
-
- if (chunklen < 1) {
- return false;
- }
-
- return body.match(new RegExp('.{0,' + chunklen + '}', 'g')).join(end);
-};
-//# sourceMappingURL=chunk_split.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/chunk_split.js.map b/node_modules/locutus/php/strings/chunk_split.js.map
deleted file mode 100644
index 401e1a6..0000000
--- a/node_modules/locutus/php/strings/chunk_split.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/chunk_split.js"],"names":["module","exports","chunk_split","body","chunklen","end","parseInt","match","RegExp","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4BC,QAA5B,EAAsCC,GAAtC,EAA2C;AAAE;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAD,aAAWE,SAASF,QAAT,EAAmB,EAAnB,KAA0B,EAArC;AACAC,QAAMA,OAAO,MAAb;;AAEA,MAAID,WAAW,CAAf,EAAkB;AAChB,WAAO,KAAP;AACD;;AAED,SAAOD,KAAKI,KAAL,CAAW,IAAIC,MAAJ,CAAW,SAASJ,QAAT,GAAoB,GAA/B,EAAoC,GAApC,CAAX,EACJK,IADI,CACCJ,GADD,CAAP;AAED,CApBD","file":"chunk_split.js","sourcesContent":["module.exports = function chunk_split (body, chunklen, end) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/chunk_split/\n // original by: Paulo Freitas\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: chunk_split('Hello world!', 1, '*')\n // returns 1: 'H*e*l*l*o* *w*o*r*l*d*!*'\n // example 2: chunk_split('Hello world!', 10, '*')\n // returns 2: 'Hello worl*d!*'\n\n chunklen = parseInt(chunklen, 10) || 76\n end = end || '\\r\\n'\n\n if (chunklen < 1) {\n return false\n }\n\n return body.match(new RegExp('.{0,' + chunklen + '}', 'g'))\n .join(end)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/convert_cyr_string.js b/node_modules/locutus/php/strings/convert_cyr_string.js
deleted file mode 100644
index 9184be6..0000000
--- a/node_modules/locutus/php/strings/convert_cyr_string.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict';
-
-module.exports = function convert_cyr_string(str, from, to) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/convert_cyr_string/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Assumes and converts to Unicode strings with character
- // note 1: code equivalents of the same numbers as in the from or
- // note 1: target character set; Note that neither the input or output
- // note 1: should be treated as actual Unicode, since the PHP function
- // note 1: this is original by does not either
- // note 1: One could easily represent (or convert the results) of a
- // note 1: string form as arrays of code points instead but since JavaScript
- // note 1: currently has no clear binary data type, we chose to use strings
- // note 1: as in PHP
- // example 1: convert_cyr_string(String.fromCharCode(214), 'k', 'w').charCodeAt(0) === 230; // Char. 214 of KOI8-R gives equivalent number value 230 in win1251
- // returns 1: true
-
- var _cyrWin1251 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 154, 174, 190, 46, 159, 189, 46, 46, 179, 191, 180, 157, 46, 46, 156, 183, 46, 46, 182, 166, 173, 46, 46, 158, 163, 152, 164, 155, 46, 46, 46, 167, 225, 226, 247, 231, 228, 229, 246, 250, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 230, 232, 227, 254, 251, 253, 255, 249, 248, 252, 224, 241, 193, 194, 215, 199, 196, 197, 214, 218, 201, 202, 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, 198, 200, 195, 222, 219, 221, 223, 217, 216, 220, 192, 209, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 184, 186, 32, 179, 191, 32, 32, 32, 32, 32, 180, 162, 32, 32, 32, 32, 168, 170, 32, 178, 175, 32, 32, 32, 32, 32, 165, 161, 169, 254, 224, 225, 246, 228, 229, 244, 227, 245, 232, 233, 234, 235, 236, 237, 238, 239, 255, 240, 241, 242, 243, 230, 226, 252, 251, 231, 248, 253, 249, 247, 250, 222, 192, 193, 214, 196, 197, 212, 195, 213, 200, 201, 202, 203, 204, 205, 206, 207, 223, 208, 209, 210, 211, 198, 194, 220, 219, 199, 216, 221, 217, 215, 218];
- var _cyrCp866 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 225, 226, 247, 231, 228, 229, 246, 250, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 230, 232, 227, 254, 251, 253, 255, 249, 248, 252, 224, 241, 193, 194, 215, 199, 196, 197, 214, 218, 201, 202, 203, 204, 205, 206, 207, 208, 35, 35, 35, 124, 124, 124, 124, 43, 43, 124, 124, 43, 43, 43, 43, 43, 43, 45, 45, 124, 45, 43, 124, 124, 43, 43, 45, 45, 124, 45, 43, 45, 45, 45, 45, 43, 43, 43, 43, 43, 43, 43, 43, 35, 35, 124, 124, 35, 210, 211, 212, 213, 198, 200, 195, 222, 219, 221, 223, 217, 216, 220, 192, 209, 179, 163, 180, 164, 183, 167, 190, 174, 32, 149, 158, 32, 152, 159, 148, 154, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 205, 186, 213, 241, 243, 201, 32, 245, 187, 212, 211, 200, 190, 32, 247, 198, 199, 204, 181, 240, 242, 185, 32, 244, 203, 207, 208, 202, 216, 32, 246, 32, 238, 160, 161, 230, 164, 165, 228, 163, 229, 168, 169, 170, 171, 172, 173, 174, 175, 239, 224, 225, 226, 227, 166, 162, 236, 235, 167, 232, 237, 233, 231, 234, 158, 128, 129, 150, 132, 133, 148, 131, 149, 136, 137, 138, 139, 140, 141, 142, 143, 159, 144, 145, 146, 147, 134, 130, 156, 155, 135, 152, 157, 153, 151, 154];
- var _cyrIso88595 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 179, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 225, 226, 247, 231, 228, 229, 246, 250, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 230, 232, 227, 254, 251, 253, 255, 249, 248, 252, 224, 241, 193, 194, 215, 199, 196, 197, 214, 218, 201, 202, 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, 198, 200, 195, 222, 219, 221, 223, 217, 216, 220, 192, 209, 32, 163, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 241, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 161, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 238, 208, 209, 230, 212, 213, 228, 211, 229, 216, 217, 218, 219, 220, 221, 222, 223, 239, 224, 225, 226, 227, 214, 210, 236, 235, 215, 232, 237, 233, 231, 234, 206, 176, 177, 198, 180, 181, 196, 179, 197, 184, 185, 186, 187, 188, 189, 190, 191, 207, 192, 193, 194, 195, 182, 178, 204, 203, 183, 200, 205, 201, 199, 202];
- var _cyrMac = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 225, 226, 247, 231, 228, 229, 246, 250, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 230, 232, 227, 254, 251, 253, 255, 249, 248, 252, 224, 241, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 179, 163, 209, 193, 194, 215, 199, 196, 197, 214, 218, 201, 202, 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, 198, 200, 195, 222, 219, 221, 223, 217, 216, 220, 192, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 160, 161, 162, 222, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 221, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 254, 224, 225, 246, 228, 229, 244, 227, 245, 232, 233, 234, 235, 236, 237, 238, 239, 223, 240, 241, 242, 243, 230, 226, 252, 251, 231, 248, 253, 249, 247, 250, 158, 128, 129, 150, 132, 133, 148, 131, 149, 136, 137, 138, 139, 140, 141, 142, 143, 159, 144, 145, 146, 147, 134, 130, 156, 155, 135, 152, 157, 153, 151, 154];
-
- var fromTable = null;
- var toTable = null;
- var tmp;
- var i = 0;
- var retStr = '';
-
- switch (from.toUpperCase()) {
- case 'W':
- fromTable = _cyrWin1251;
- break;
- case 'A':
- case 'D':
- fromTable = _cyrCp866;
- break;
- case 'I':
- fromTable = _cyrIso88595;
- break;
- case 'M':
- fromTable = _cyrMac;
- break;
- case 'K':
- break;
- default:
- // Can we throw a warning instead? That would be more in line with PHP
- throw new Error('Unknown source charset: ' + fromTable);
- }
-
- switch (to.toUpperCase()) {
- case 'W':
- toTable = _cyrWin1251;
- break;
- case 'A':
- case 'D':
- toTable = _cyrCp866;
- break;
- case 'I':
- toTable = _cyrIso88595;
- break;
- case 'M':
- toTable = _cyrMac;
- break;
- case 'K':
- break;
- default:
- // Can we throw a warning instead? That would be more in line with PHP
- throw new Error('Unknown destination charset: ' + toTable);
- }
-
- if (!str) {
- return str;
- }
-
- for (i = 0; i < str.length; i++) {
- tmp = fromTable === null ? str.charAt(i) : String.fromCharCode(fromTable[str.charAt(i).charCodeAt(0)]);
-
- retStr += toTable === null ? tmp : String.fromCharCode(toTable[tmp.charCodeAt(0) + 256]);
- }
-
- return retStr;
-};
-//# sourceMappingURL=convert_cyr_string.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/convert_cyr_string.js.map b/node_modules/locutus/php/strings/convert_cyr_string.js.map
deleted file mode 100644
index 58d8bec..0000000
--- a/node_modules/locutus/php/strings/convert_cyr_string.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/convert_cyr_string.js"],"names":["module","exports","convert_cyr_string","str","from","to","_cyrWin1251","_cyrCp866","_cyrIso88595","_cyrMac","fromTable","toTable","tmp","i","retStr","toUpperCase","Error","length","charAt","String","fromCharCode","charCodeAt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,kBAAT,CAA6BC,GAA7B,EAAkCC,IAAlC,EAAwC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5B,EAAiC;AAC/BD,UAAOF,cAAc,IAAf,GACFP,IAAIe,MAAJ,CAAWL,CAAX,CADE,GAEFM,OAAOC,YAAP,CAAoBV,UAAUP,IAAIe,MAAJ,CAAWL,CAAX,EAAcQ,UAAd,CAAyB,CAAzB,CAAV,CAApB,CAFJ;;AAIAP,cAAWH,YAAY,IAAb,GACNC,GADM,GAENO,OAAOC,YAAP,CAAoBT,QAAQC,IAAIS,UAAJ,CAAe,CAAf,IAAoB,GAA5B,CAApB,CAFJ;AAGD;;AAED,SAAOP,MAAP;AACD,CA1lED","file":"convert_cyr_string.js","sourcesContent":["module.exports = function convert_cyr_string (str, from, to) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/convert_cyr_string/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Assumes and converts to Unicode strings with character\n // note 1: code equivalents of the same numbers as in the from or\n // note 1: target character set; Note that neither the input or output\n // note 1: should be treated as actual Unicode, since the PHP function\n // note 1: this is original by does not either\n // note 1: One could easily represent (or convert the results) of a\n // note 1: string form as arrays of code points instead but since JavaScript\n // note 1: currently has no clear binary data type, we chose to use strings\n // note 1: as in PHP\n // example 1: convert_cyr_string(String.fromCharCode(214), 'k', 'w').charCodeAt(0) === 230; // Char. 214 of KOI8-R gives equivalent number value 230 in win1251\n // returns 1: true\n\n var _cyrWin1251 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 46,\n 154,\n 174,\n 190,\n 46,\n 159,\n 189,\n 46,\n 46,\n 179,\n 191,\n 180,\n 157,\n 46,\n 46,\n 156,\n 183,\n 46,\n 46,\n 182,\n 166,\n 173,\n 46,\n 46,\n 158,\n 163,\n 152,\n 164,\n 155,\n 46,\n 46,\n 46,\n 167,\n 225,\n 226,\n 247,\n 231,\n 228,\n 229,\n 246,\n 250,\n 233,\n 234,\n 235,\n 236,\n 237,\n 238,\n 239,\n 240,\n 242,\n 243,\n 244,\n 245,\n 230,\n 232,\n 227,\n 254,\n 251,\n 253,\n 255,\n 249,\n 248,\n 252,\n 224,\n 241,\n 193,\n 194,\n 215,\n 199,\n 196,\n 197,\n 214,\n 218,\n 201,\n 202,\n 203,\n 204,\n 205,\n 206,\n 207,\n 208,\n 210,\n 211,\n 212,\n 213,\n 198,\n 200,\n 195,\n 222,\n 219,\n 221,\n 223,\n 217,\n 216,\n 220,\n 192,\n 209,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 184,\n 186,\n 32,\n 179,\n 191,\n 32,\n 32,\n 32,\n 32,\n 32,\n 180,\n 162,\n 32,\n 32,\n 32,\n 32,\n 168,\n 170,\n 32,\n 178,\n 175,\n 32,\n 32,\n 32,\n 32,\n 32,\n 165,\n 161,\n 169,\n 254,\n 224,\n 225,\n 246,\n 228,\n 229,\n 244,\n 227,\n 245,\n 232,\n 233,\n 234,\n 235,\n 236,\n 237,\n 238,\n 239,\n 255,\n 240,\n 241,\n 242,\n 243,\n 230,\n 226,\n 252,\n 251,\n 231,\n 248,\n 253,\n 249,\n 247,\n 250,\n 222,\n 192,\n 193,\n 214,\n 196,\n 197,\n 212,\n 195,\n 213,\n 200,\n 201,\n 202,\n 203,\n 204,\n 205,\n 206,\n 207,\n 223,\n 208,\n 209,\n 210,\n 211,\n 198,\n 194,\n 220,\n 219,\n 199,\n 216,\n 221,\n 217,\n 215,\n 218\n ]\n var _cyrCp866 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 225,\n 226,\n 247,\n 231,\n 228,\n 229,\n 246,\n 250,\n 233,\n 234,\n 235,\n 236,\n 237,\n 238,\n 239,\n 240,\n 242,\n 243,\n 244,\n 245,\n 230,\n 232,\n 227,\n 254,\n 251,\n 253,\n 255,\n 249,\n 248,\n 252,\n 224,\n 241,\n 193,\n 194,\n 215,\n 199,\n 196,\n 197,\n 214,\n 218,\n 201,\n 202,\n 203,\n 204,\n 205,\n 206,\n 207,\n 208,\n 35,\n 35,\n 35,\n 124,\n 124,\n 124,\n 124,\n 43,\n 43,\n 124,\n 124,\n 43,\n 43,\n 43,\n 43,\n 43,\n 43,\n 45,\n 45,\n 124,\n 45,\n 43,\n 124,\n 124,\n 43,\n 43,\n 45,\n 45,\n 124,\n 45,\n 43,\n 45,\n 45,\n 45,\n 45,\n 43,\n 43,\n 43,\n 43,\n 43,\n 43,\n 43,\n 43,\n 35,\n 35,\n 124,\n 124,\n 35,\n 210,\n 211,\n 212,\n 213,\n 198,\n 200,\n 195,\n 222,\n 219,\n 221,\n 223,\n 217,\n 216,\n 220,\n 192,\n 209,\n 179,\n 163,\n 180,\n 164,\n 183,\n 167,\n 190,\n 174,\n 32,\n 149,\n 158,\n 32,\n 152,\n 159,\n 148,\n 154,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 205,\n 186,\n 213,\n 241,\n 243,\n 201,\n 32,\n 245,\n 187,\n 212,\n 211,\n 200,\n 190,\n 32,\n 247,\n 198,\n 199,\n 204,\n 181,\n 240,\n 242,\n 185,\n 32,\n 244,\n 203,\n 207,\n 208,\n 202,\n 216,\n 32,\n 246,\n 32,\n 238,\n 160,\n 161,\n 230,\n 164,\n 165,\n 228,\n 163,\n 229,\n 168,\n 169,\n 170,\n 171,\n 172,\n 173,\n 174,\n 175,\n 239,\n 224,\n 225,\n 226,\n 227,\n 166,\n 162,\n 236,\n 235,\n 167,\n 232,\n 237,\n 233,\n 231,\n 234,\n 158,\n 128,\n 129,\n 150,\n 132,\n 133,\n 148,\n 131,\n 149,\n 136,\n 137,\n 138,\n 139,\n 140,\n 141,\n 142,\n 143,\n 159,\n 144,\n 145,\n 146,\n 147,\n 134,\n 130,\n 156,\n 155,\n 135,\n 152,\n 157,\n 153,\n 151,\n 154\n ]\n var _cyrIso88595 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 179,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 225,\n 226,\n 247,\n 231,\n 228,\n 229,\n 246,\n 250,\n 233,\n 234,\n 235,\n 236,\n 237,\n 238,\n 239,\n 240,\n 242,\n 243,\n 244,\n 245,\n 230,\n 232,\n 227,\n 254,\n 251,\n 253,\n 255,\n 249,\n 248,\n 252,\n 224,\n 241,\n 193,\n 194,\n 215,\n 199,\n 196,\n 197,\n 214,\n 218,\n 201,\n 202,\n 203,\n 204,\n 205,\n 206,\n 207,\n 208,\n 210,\n 211,\n 212,\n 213,\n 198,\n 200,\n 195,\n 222,\n 219,\n 221,\n 223,\n 217,\n 216,\n 220,\n 192,\n 209,\n 32,\n 163,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 241,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 161,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 32,\n 238,\n 208,\n 209,\n 230,\n 212,\n 213,\n 228,\n 211,\n 229,\n 216,\n 217,\n 218,\n 219,\n 220,\n 221,\n 222,\n 223,\n 239,\n 224,\n 225,\n 226,\n 227,\n 214,\n 210,\n 236,\n 235,\n 215,\n 232,\n 237,\n 233,\n 231,\n 234,\n 206,\n 176,\n 177,\n 198,\n 180,\n 181,\n 196,\n 179,\n 197,\n 184,\n 185,\n 186,\n 187,\n 188,\n 189,\n 190,\n 191,\n 207,\n 192,\n 193,\n 194,\n 195,\n 182,\n 178,\n 204,\n 203,\n 183,\n 200,\n 205,\n 201,\n 199,\n 202\n ]\n var _cyrMac = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 225,\n 226,\n 247,\n 231,\n 228,\n 229,\n 246,\n 250,\n 233,\n 234,\n 235,\n 236,\n 237,\n 238,\n 239,\n 240,\n 242,\n 243,\n 244,\n 245,\n 230,\n 232,\n 227,\n 254,\n 251,\n 253,\n 255,\n 249,\n 248,\n 252,\n 224,\n 241,\n 160,\n 161,\n 162,\n 163,\n 164,\n 165,\n 166,\n 167,\n 168,\n 169,\n 170,\n 171,\n 172,\n 173,\n 174,\n 175,\n 176,\n 177,\n 178,\n 179,\n 180,\n 181,\n 182,\n 183,\n 184,\n 185,\n 186,\n 187,\n 188,\n 189,\n 190,\n 191,\n 128,\n 129,\n 130,\n 131,\n 132,\n 133,\n 134,\n 135,\n 136,\n 137,\n 138,\n 139,\n 140,\n 141,\n 142,\n 143,\n 144,\n 145,\n 146,\n 147,\n 148,\n 149,\n 150,\n 151,\n 152,\n 153,\n 154,\n 155,\n 156,\n 179,\n 163,\n 209,\n 193,\n 194,\n 215,\n 199,\n 196,\n 197,\n 214,\n 218,\n 201,\n 202,\n 203,\n 204,\n 205,\n 206,\n 207,\n 208,\n 210,\n 211,\n 212,\n 213,\n 198,\n 200,\n 195,\n 222,\n 219,\n 221,\n 223,\n 217,\n 216,\n 220,\n 192,\n\n 255,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 111,\n 112,\n 113,\n 114,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 123,\n 124,\n 125,\n 126,\n 127,\n 192,\n 193,\n 194,\n 195,\n 196,\n 197,\n 198,\n 199,\n 200,\n 201,\n 202,\n 203,\n 204,\n 205,\n 206,\n 207,\n 208,\n 209,\n 210,\n 211,\n 212,\n 213,\n 214,\n 215,\n 216,\n 217,\n 218,\n 219,\n 220,\n 221,\n 222,\n 223,\n 160,\n 161,\n 162,\n 222,\n 164,\n 165,\n 166,\n 167,\n 168,\n 169,\n 170,\n 171,\n 172,\n 173,\n 174,\n 175,\n 176,\n 177,\n 178,\n 221,\n 180,\n 181,\n 182,\n 183,\n 184,\n 185,\n 186,\n 187,\n 188,\n 189,\n 190,\n 191,\n 254,\n 224,\n 225,\n 246,\n 228,\n 229,\n 244,\n 227,\n 245,\n 232,\n 233,\n 234,\n 235,\n 236,\n 237,\n 238,\n 239,\n 223,\n 240,\n 241,\n\n 242,\n 243,\n 230,\n 226,\n 252,\n 251,\n 231,\n 248,\n 253,\n 249,\n 247,\n 250,\n 158,\n 128,\n 129,\n 150,\n 132,\n 133,\n 148,\n 131,\n 149,\n 136,\n 137,\n 138,\n 139,\n 140,\n 141,\n 142,\n 143,\n 159,\n 144,\n 145,\n 146,\n 147,\n 134,\n 130,\n 156,\n 155,\n 135,\n 152,\n 157,\n 153,\n 151,\n 154\n ]\n\n var fromTable = null\n var toTable = null\n var tmp\n var i = 0\n var retStr = ''\n\n switch (from.toUpperCase()) {\n case 'W':\n fromTable = _cyrWin1251\n break\n case 'A':\n case 'D':\n fromTable = _cyrCp866\n break\n case 'I':\n fromTable = _cyrIso88595\n break\n case 'M':\n fromTable = _cyrMac\n break\n case 'K':\n break\n default:\n // Can we throw a warning instead? That would be more in line with PHP\n throw new Error('Unknown source charset: ' + fromTable)\n }\n\n switch (to.toUpperCase()) {\n case 'W':\n toTable = _cyrWin1251\n break\n case 'A':\n case 'D':\n toTable = _cyrCp866\n break\n case 'I':\n toTable = _cyrIso88595\n break\n case 'M':\n toTable = _cyrMac\n break\n case 'K':\n break\n default:\n // Can we throw a warning instead? That would be more in line with PHP\n throw new Error('Unknown destination charset: ' + toTable)\n }\n\n if (!str) {\n return str\n }\n\n for (i = 0; i < str.length; i++) {\n tmp = (fromTable === null)\n ? str.charAt(i)\n : String.fromCharCode(fromTable[str.charAt(i).charCodeAt(0)])\n\n retStr += (toTable === null)\n ? tmp\n : String.fromCharCode(toTable[tmp.charCodeAt(0) + 256])\n }\n\n return retStr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/convert_uuencode.js b/node_modules/locutus/php/strings/convert_uuencode.js
deleted file mode 100644
index 7541512..0000000
--- a/node_modules/locutus/php/strings/convert_uuencode.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-
-module.exports = function convert_uuencode(str) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/convert_uuencode/
- // original by: Ole Vrijenhoek
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // reimplemented by: Ole Vrijenhoek
- // example 1: convert_uuencode("test\ntext text\r\n")
- // returns 1: "0=&5S=`IT97AT('1E>'0-\"@\n`\n"
-
- var isScalar = require('../var/is_scalar');
-
- var chr = function chr(c) {
- return String.fromCharCode(c);
- };
-
- if (!str || str === '') {
- return chr(0);
- } else if (!isScalar(str)) {
- return false;
- }
-
- var c = 0;
- var u = 0;
- var i = 0;
- var a = 0;
- var encoded = '';
- var tmp1 = '';
- var tmp2 = '';
- var bytes = {};
-
- // divide string into chunks of 45 characters
- var chunk = function chunk() {
- bytes = str.substr(u, 45).split('');
- for (i in bytes) {
- bytes[i] = bytes[i].charCodeAt(0);
- }
- return bytes.length || 0;
- };
-
- while ((c = chunk()) !== 0) {
- u += 45;
-
- // New line encoded data starts with number of bytes encoded.
- encoded += chr(c + 32);
-
- // Convert each char in bytes[] to a byte
- for (i in bytes) {
- tmp1 = bytes[i].toString(2);
- while (tmp1.length < 8) {
- tmp1 = '0' + tmp1;
- }
- tmp2 += tmp1;
- }
-
- while (tmp2.length % 6) {
- tmp2 = tmp2 + '0';
- }
-
- for (i = 0; i <= tmp2.length / 6 - 1; i++) {
- tmp1 = tmp2.substr(a, 6);
- if (tmp1 === '000000') {
- encoded += chr(96);
- } else {
- encoded += chr(parseInt(tmp1, 2) + 32);
- }
- a += 6;
- }
- a = 0;
- tmp2 = '';
- encoded += '\n';
- }
-
- // Add termination characters
- encoded += chr(96) + '\n';
-
- return encoded;
-};
-//# sourceMappingURL=convert_uuencode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/convert_uuencode.js.map b/node_modules/locutus/php/strings/convert_uuencode.js.map
deleted file mode 100644
index 298fb92..0000000
--- a/node_modules/locutus/php/strings/convert_uuencode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/convert_uuencode.js"],"names":["module","exports","convert_uuencode","str","isScalar","require","chr","c","String","fromCharCode","u","i","a","encoded","tmp1","tmp2","bytes","chunk","substr","split","charCodeAt","length","toString","parseInt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,gBAAT,CAA2BC,GAA3B,EAAgC;AAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,kBAAR,CAAf;;AAEA,MAAIC,MAAM,SAANA,GAAM,CAAUC,CAAV,EAAa;AACrB,WAAOC,OAAOC,YAAP,CAAoBF,CAApB,CAAP;AACD,GAFD;;AAIA,MAAI,CAACJ,GAAD,IAAQA,QAAQ,EAApB,EAAwB;AACtB,WAAOG,IAAI,CAAJ,CAAP;AACD,GAFD,MAEO,IAAI,CAACF,SAASD,GAAT,CAAL,EAAoB;AACzB,WAAO,KAAP;AACD;;AAED,MAAII,IAAI,CAAR;AACA,MAAIG,IAAI,CAAR;AACA,MAAIC,IAAI,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AED;AACAA,aAAWP,IAAI,EAAJ,IAAU,IAArB;;AAEA,SAAOO,OAAP;AACD,CA5ED","file":"convert_uuencode.js","sourcesContent":["module.exports = function convert_uuencode (str) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/convert_uuencode/\n // original by: Ole Vrijenhoek\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // reimplemented by: Ole Vrijenhoek\n // example 1: convert_uuencode(\"test\\ntext text\\r\\n\")\n // returns 1: \"0=&5S=`IT97AT('1E>'0-\\\"@\\n`\\n\"\n\n var isScalar = require('../var/is_scalar')\n\n var chr = function (c) {\n return String.fromCharCode(c)\n }\n\n if (!str || str === '') {\n return chr(0)\n } else if (!isScalar(str)) {\n return false\n }\n\n var c = 0\n var u = 0\n var i = 0\n var a = 0\n var encoded = ''\n var tmp1 = ''\n var tmp2 = ''\n var bytes = {}\n\n // divide string into chunks of 45 characters\n var chunk = function () {\n bytes = str.substr(u, 45).split('')\n for (i in bytes) {\n bytes[i] = bytes[i].charCodeAt(0)\n }\n return bytes.length || 0\n }\n\n while ((c = chunk()) !== 0) {\n u += 45\n\n // New line encoded data starts with number of bytes encoded.\n encoded += chr(c + 32)\n\n // Convert each char in bytes[] to a byte\n for (i in bytes) {\n tmp1 = bytes[i].toString(2)\n while (tmp1.length < 8) {\n tmp1 = '0' + tmp1\n }\n tmp2 += tmp1\n }\n\n while (tmp2.length % 6) {\n tmp2 = tmp2 + '0'\n }\n\n for (i = 0; i <= (tmp2.length / 6) - 1; i++) {\n tmp1 = tmp2.substr(a, 6)\n if (tmp1 === '000000') {\n encoded += chr(96)\n } else {\n encoded += chr(parseInt(tmp1, 2) + 32)\n }\n a += 6\n }\n a = 0\n tmp2 = ''\n encoded += '\\n'\n }\n\n // Add termination characters\n encoded += chr(96) + '\\n'\n\n return encoded\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/count_chars.js b/node_modules/locutus/php/strings/count_chars.js
deleted file mode 100644
index 2e3f0ed..0000000
--- a/node_modules/locutus/php/strings/count_chars.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-module.exports = function count_chars(str, mode) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/count_chars/
- // original by: Ates Goral (http://magnetiq.com)
- // improved by: Jack
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // revised by: Theriault (https://github.com/Theriault)
- // example 1: count_chars("Hello World!", 3)
- // returns 1: " !HWdelor"
- // example 2: count_chars("Hello World!", 1)
- // returns 2: {32:1,33:1,72:1,87:1,100:1,101:1,108:3,111:2,114:1}
-
- var result = {};
- var resultArr = [];
- var i;
-
- str = ('' + str).split('').sort().join('').match(/(.)\1*/g);
-
- if ((mode & 1) === 0) {
- for (i = 0; i !== 256; i++) {
- result[i] = 0;
- }
- }
-
- if (mode === 2 || mode === 4) {
- for (i = 0; i !== str.length; i += 1) {
- delete result[str[i].charCodeAt(0)];
- }
- for (i in result) {
- result[i] = mode === 4 ? String.fromCharCode(i) : 0;
- }
- } else if (mode === 3) {
- for (i = 0; i !== str.length; i += 1) {
- result[i] = str[i].slice(0, 1);
- }
- } else {
- for (i = 0; i !== str.length; i += 1) {
- result[str[i].charCodeAt(0)] = str[i].length;
- }
- }
- if (mode < 3) {
- return result;
- }
-
- for (i in result) {
- resultArr.push(result[i]);
- }
-
- return resultArr.join('');
-};
-//# sourceMappingURL=count_chars.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/count_chars.js.map b/node_modules/locutus/php/strings/count_chars.js.map
deleted file mode 100644
index bd2c885..0000000
--- a/node_modules/locutus/php/strings/count_chars.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/count_chars.js"],"names":["module","exports","count_chars","str","mode","result","resultArr","i","split","sort","join","match","length","charCodeAt","String","fromC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AP,CAAkB,CAAlB,CAAP,IAA+BV,IAAII,CAAJ,EAAOK,MAAtC;AACD;AACF;AACD,MAAIR,OAAO,CAAX,EAAc;AACZ,WAAOC,MAAP;AACD;;AAED,OAAKE,CAAL,IAAUF,MAAV,EAAkB;AAChBC,cAAUW,IAAV,CAAeZ,OAAOE,CAAP,CAAf;AACD;;AAED,SAAOD,UAAUI,IAAV,CAAe,EAAf,CAAP;AACD,CAtDD","file":"count_chars.js","sourcesContent":["module.exports = function count_chars (str, mode) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/count_chars/\n // original by: Ates Goral (http://magnetiq.com)\n // improved by: Jack\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // revised by: Theriault (https://github.com/Theriault)\n // example 1: count_chars(\"Hello World!\", 3)\n // returns 1: \" !HWdelor\"\n // example 2: count_chars(\"Hello World!\", 1)\n // returns 2: {32:1,33:1,72:1,87:1,100:1,101:1,108:3,111:2,114:1}\n\n var result = {}\n var resultArr = []\n var i\n\n str = ('' + str)\n .split('')\n .sort()\n .join('')\n .match(/(.)\\1*/g)\n\n if ((mode & 1) === 0) {\n for (i = 0; i !== 256; i++) {\n result[i] = 0\n }\n }\n\n if (mode === 2 || mode === 4) {\n for (i = 0; i !== str.length; i += 1) {\n delete result[str[i].charCodeAt(0)]\n }\n for (i in result) {\n result[i] = (mode === 4) ? String.fromCharCode(i) : 0\n }\n } else if (mode === 3) {\n for (i = 0; i !== str.length; i += 1) {\n result[i] = str[i].slice(0, 1)\n }\n } else {\n for (i = 0; i !== str.length; i += 1) {\n result[str[i].charCodeAt(0)] = str[i].length\n }\n }\n if (mode < 3) {\n return result\n }\n\n for (i in result) {\n resultArr.push(result[i])\n }\n\n return resultArr.join('')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/crc32.js b/node_modules/locutus/php/strings/crc32.js
deleted file mode 100644
index 0387bda..0000000
--- a/node_modules/locutus/php/strings/crc32.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-module.exports = function crc32(str) {
- // discuss at: http://locutus.io/php/crc32/
- // original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // improved by: T0bsn
- // example 1: crc32('Kevin van Zonneveld')
- // returns 1: 1249991249
-
- var utf8Encode = require('../xml/utf8_encode');
- str = utf8Encode(str);
- var table = ['00000000', '77073096', 'EE0E612C', '990951BA', '076DC419', '706AF48F', 'E963A535', '9E6495A3', '0EDB8832', '79DCB8A4', 'E0D5E91E', '97D2D988', '09B64C2B', '7EB17CBD', 'E7B82D07', '90BF1D91', '1DB71064', '6AB020F2', 'F3B97148', '84BE41DE', '1ADAD47D', '6DDDE4EB', 'F4D4B551', '83D385C7', '136C9856', '646BA8C0', 'FD62F97A', '8A65C9EC', '14015C4F', '63066CD9', 'FA0F3D63', '8D080DF5', '3B6E20C8', '4C69105E', 'D56041E4', 'A2677172', '3C03E4D1', '4B04D447', 'D20D85FD', 'A50AB56B', '35B5A8FA', '42B2986C', 'DBBBC9D6', 'ACBCF940', '32D86CE3', '45DF5C75', 'DCD60DCF', 'ABD13D59', '26D930AC', '51DE003A', 'C8D75180', 'BFD06116', '21B4F4B5', '56B3C423', 'CFBA9599', 'B8BDA50F', '2802B89E', '5F058808', 'C60CD9B2', 'B10BE924', '2F6F7C87', '58684C11', 'C1611DAB', 'B6662D3D', '76DC4190', '01DB7106', '98D220BC', 'EFD5102A', '71B18589', '06B6B51F', '9FBFE4A5', 'E8B8D433', '7807C9A2', '0F00F934', '9609A88E', 'E10E9818', '7F6A0DBB', '086D3D2D', '91646C97', 'E6635C01', '6B6B51F4', '1C6C6162', '856530D8', 'F262004E', '6C0695ED', '1B01A57B', '8208F4C1', 'F50FC457', '65B0D9C6', '12B7E950', '8BBEB8EA', 'FCB9887C', '62DD1DDF', '15DA2D49', '8CD37CF3', 'FBD44C65', '4DB26158', '3AB551CE', 'A3BC0074', 'D4BB30E2', '4ADFA541', '3DD895D7', 'A4D1C46D', 'D3D6F4FB', '4369E96A', '346ED9FC', 'AD678846', 'DA60B8D0', '44042D73', '33031DE5', 'AA0A4C5F', 'DD0D7CC9', '5005713C', '270241AA', 'BE0B1010', 'C90C2086', '5768B525', '206F85B3', 'B966D409', 'CE61E49F', '5EDEF90E', '29D9C998', 'B0D09822', 'C7D7A8B4', '59B33D17', '2EB40D81', 'B7BD5C3B', 'C0BA6CAD', 'EDB88320', '9ABFB3B6', '03B6E20C', '74B1D29A', 'EAD54739', '9DD277AF', '04DB2615', '73DC1683', 'E3630B12', '94643B84', '0D6D6A3E', '7A6A5AA8', 'E40ECF0B', '9309FF9D', '0A00AE27', '7D079EB1', 'F00F9344', '8708A3D2', '1E01F268', '6906C2FE', 'F762575D', '806567CB', '196C3671', '6E6B06E7', 'FED41B76', '89D32BE0', '10DA7A5A', '67DD4ACC', 'F9B9DF6F', '8EBEEFF9', '17B7BE43', '60B08ED5', 'D6D6A3E8', 'A1D1937E', '38D8C2C4', '4FDFF252', 'D1BB67F1', 'A6BC5767', '3FB506DD', '48B2364B', 'D80D2BDA', 'AF0A1B4C', '36034AF6', '41047A60', 'DF60EFC3', 'A867DF55', '316E8EEF', '4669BE79', 'CB61B38C', 'BC66831A', '256FD2A0', '5268E236', 'CC0C7795', 'BB0B4703', '220216B9', '5505262F', 'C5BA3BBE', 'B2BD0B28', '2BB45A92', '5CB36A04', 'C2D7FFA7', 'B5D0CF31', '2CD99E8B', '5BDEAE1D', '9B64C2B0', 'EC63F226', '756AA39C', '026D930A', '9C0906A9', 'EB0E363F', '72076785', '05005713', '95BF4A82', 'E2B87A14', '7BB12BAE', '0CB61B38', '92D28E9B', 'E5D5BE0D', '7CDCEFB7', '0BDBDF21', '86D3D2D4', 'F1D4E242', '68DDB3F8', '1FDA836E', '81BE16CD', 'F6B9265B', '6FB077E1', '18B74777', '88085AE6', 'FF0F6A70', '66063BCA', '11010B5C', '8F659EFF', 'F862AE69', '616BFFD3', '166CCF45', 'A00AE278', 'D70DD2EE', '4E048354', '3903B3C2', 'A7672661', 'D06016F7', '4969474D', '3E6E77DB', 'AED16A4A', 'D9D65ADC', '40DF0B66', '37D83BF0', 'A9BCAE53', 'DEBB9EC5', '47B2CF7F', '30B5FFE9', 'BDBDF21C', 'CABAC28A', '53B39330', '24B4A3A6', 'BAD03605', 'CDD70693', '54DE5729', '23D967BF', 'B3667A2E', 'C4614AB8', '5D681B02', '2A6F2B94', 'B40BBE37', 'C30C8EA1', '5A05DF1B', '2D02EF8D'].join(' ');
- // @todo: ^-- Now that `table` is an array, maybe we can use that directly using slices,
- // instead of converting it to a string and substringing
-
- var crc = 0;
- var x = 0;
- var y = 0;
-
- crc = crc ^ -1;
- for (var i = 0, iTop = str.length; i < iTop; i++) {
- y = (crc ^ str.charCodeAt(i)) & 0xFF;
- x = '0x' + table.substr(y * 9, 8);
- crc = crc >>> 8 ^ x;
- }
-
- return crc ^ -1;
-};
-//# sourceMappingURL=crc32.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/crc32.js.map b/node_modules/locutus/php/strings/crc32.js.map
deleted file mode 100644
index aeea2b0..0000000
--- a/node_modules/locutus/php/strings/crc32.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/crc32.js"],"names":["module","exports","crc32","str","utf8Encode","require","table","join","crc","x","y","i","iTop","length","charCodeAt","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACpC;AACA;AACA;AACA;AACA;;AAEA,MAAIC,aAAaC,QAAQ,oBAAR,CAAjB;AACAF,QAAMC,WAAWD,GAAX,CAAN;AACA,MAAIG,QAAQ,CACV,UADU,EAEV,UAFU,EAGV,UAHU,EAIV,UAJU,EAKV,UALU,EAMV,UANU,EAOV,UAPU,EAQV,UARU,EASV,UATU,EAUV,UAVU,EAWV,UAXU,EAYV,UAZU,EAaV,UAbU,EAcV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AAvC,EAA6CD,GAA7C,EAAkD;AAChDD,QAAI,CAACF,MAAML,IAAIW,UAAJ,CAAeH,CAAf,CAAP,IAA4B,IAAhC;AACAF,QAAI,OAAOH,MAAMS,MAAN,CAAaL,IAAI,CAAjB,EAAoB,CAApB,CAAX;AACAF,UAAOA,QAAQ,CAAT,GAAcC,CAApB;AACD;;AAED,SAAOD,MAAO,CAAC,CAAf;AACD,CA1RD","file":"crc32.js","sourcesContent":["module.exports = function crc32 (str) {\n // discuss at: http://locutus.io/php/crc32/\n // original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // improved by: T0bsn\n // example 1: crc32('Kevin van Zonneveld')\n // returns 1: 1249991249\n\n var utf8Encode = require('../xml/utf8_encode')\n str = utf8Encode(str)\n var table = [\n '00000000',\n '77073096',\n 'EE0E612C',\n '990951BA',\n '076DC419',\n '706AF48F',\n 'E963A535',\n '9E6495A3',\n '0EDB8832',\n '79DCB8A4',\n 'E0D5E91E',\n '97D2D988',\n '09B64C2B',\n '7EB17CBD',\n 'E7B82D07',\n '90BF1D91',\n '1DB71064',\n '6AB020F2',\n 'F3B97148',\n '84BE41DE',\n '1ADAD47D',\n '6DDDE4EB',\n 'F4D4B551',\n '83D385C7',\n '136C9856',\n '646BA8C0',\n 'FD62F97A',\n '8A65C9EC',\n '14015C4F',\n '63066CD9',\n 'FA0F3D63',\n '8D080DF5',\n '3B6E20C8',\n '4C69105E',\n 'D56041E4',\n 'A2677172',\n '3C03E4D1',\n '4B04D447',\n 'D20D85FD',\n 'A50AB56B',\n '35B5A8FA',\n '42B2986C',\n 'DBBBC9D6',\n 'ACBCF940',\n '32D86CE3',\n '45DF5C75',\n 'DCD60DCF',\n 'ABD13D59',\n '26D930AC',\n '51DE003A',\n 'C8D75180',\n 'BFD06116',\n '21B4F4B5',\n '56B3C423',\n 'CFBA9599',\n 'B8BDA50F',\n '2802B89E',\n '5F058808',\n 'C60CD9B2',\n 'B10BE924',\n '2F6F7C87',\n '58684C11',\n 'C1611DAB',\n 'B6662D3D',\n '76DC4190',\n '01DB7106',\n '98D220BC',\n 'EFD5102A',\n '71B18589',\n '06B6B51F',\n '9FBFE4A5',\n 'E8B8D433',\n '7807C9A2',\n '0F00F934',\n '9609A88E',\n 'E10E9818',\n '7F6A0DBB',\n '086D3D2D',\n '91646C97',\n 'E6635C01',\n '6B6B51F4',\n '1C6C6162',\n '856530D8',\n 'F262004E',\n '6C0695ED',\n '1B01A57B',\n '8208F4C1',\n 'F50FC457',\n '65B0D9C6',\n '12B7E950',\n '8BBEB8EA',\n 'FCB9887C',\n '62DD1DDF',\n '15DA2D49',\n '8CD37CF3',\n 'FBD44C65',\n '4DB26158',\n '3AB551CE',\n 'A3BC0074',\n 'D4BB30E2',\n '4ADFA541',\n '3DD895D7',\n 'A4D1C46D',\n 'D3D6F4FB',\n '4369E96A',\n '346ED9FC',\n 'AD678846',\n 'DA60B8D0',\n '44042D73',\n '33031DE5',\n 'AA0A4C5F',\n 'DD0D7CC9',\n '5005713C',\n '270241AA',\n 'BE0B1010',\n 'C90C2086',\n '5768B525',\n '206F85B3',\n 'B966D409',\n 'CE61E49F',\n '5EDEF90E',\n '29D9C998',\n 'B0D09822',\n 'C7D7A8B4',\n '59B33D17',\n '2EB40D81',\n 'B7BD5C3B',\n 'C0BA6CAD',\n 'EDB88320',\n '9ABFB3B6',\n '03B6E20C',\n '74B1D29A',\n 'EAD54739',\n '9DD277AF',\n '04DB2615',\n '73DC1683',\n 'E3630B12',\n '94643B84',\n '0D6D6A3E',\n '7A6A5AA8',\n 'E40ECF0B',\n '9309FF9D',\n '0A00AE27',\n '7D079EB1',\n 'F00F9344',\n '8708A3D2',\n '1E01F268',\n '6906C2FE',\n 'F762575D',\n '806567CB',\n '196C3671',\n '6E6B06E7',\n 'FED41B76',\n '89D32BE0',\n '10DA7A5A',\n '67DD4ACC',\n 'F9B9DF6F',\n '8EBEEFF9',\n '17B7BE43',\n '60B08ED5',\n 'D6D6A3E8',\n 'A1D1937E',\n '38D8C2C4',\n '4FDFF252',\n 'D1BB67F1',\n 'A6BC5767',\n '3FB506DD',\n '48B2364B',\n 'D80D2BDA',\n 'AF0A1B4C',\n '36034AF6',\n '41047A60',\n 'DF60EFC3',\n 'A867DF55',\n '316E8EEF',\n '4669BE79',\n 'CB61B38C',\n 'BC66831A',\n '256FD2A0',\n '5268E236',\n 'CC0C7795',\n 'BB0B4703',\n '220216B9',\n '5505262F',\n 'C5BA3BBE',\n 'B2BD0B28',\n '2BB45A92',\n '5CB36A04',\n 'C2D7FFA7',\n 'B5D0CF31',\n '2CD99E8B',\n '5BDEAE1D',\n '9B64C2B0',\n 'EC63F226',\n '756AA39C',\n '026D930A',\n '9C0906A9',\n 'EB0E363F',\n '72076785',\n '05005713',\n '95BF4A82',\n 'E2B87A14',\n '7BB12BAE',\n '0CB61B38',\n '92D28E9B',\n 'E5D5BE0D',\n '7CDCEFB7',\n '0BDBDF21',\n '86D3D2D4',\n 'F1D4E242',\n '68DDB3F8',\n '1FDA836E',\n '81BE16CD',\n 'F6B9265B',\n '6FB077E1',\n '18B74777',\n '88085AE6',\n 'FF0F6A70',\n '66063BCA',\n '11010B5C',\n '8F659EFF',\n 'F862AE69',\n '616BFFD3',\n '166CCF45',\n 'A00AE278',\n 'D70DD2EE',\n '4E048354',\n '3903B3C2',\n 'A7672661',\n 'D06016F7',\n '4969474D',\n '3E6E77DB',\n 'AED16A4A',\n 'D9D65ADC',\n '40DF0B66',\n '37D83BF0',\n 'A9BCAE53',\n 'DEBB9EC5',\n '47B2CF7F',\n '30B5FFE9',\n 'BDBDF21C',\n 'CABAC28A',\n '53B39330',\n '24B4A3A6',\n 'BAD03605',\n 'CDD70693',\n '54DE5729',\n '23D967BF',\n 'B3667A2E',\n 'C4614AB8',\n '5D681B02',\n '2A6F2B94',\n 'B40BBE37',\n 'C30C8EA1',\n '5A05DF1B',\n '2D02EF8D'\n ].join(' ')\n // @todo: ^-- Now that `table` is an array, maybe we can use that directly using slices,\n // instead of converting it to a string and substringing\n\n var crc = 0\n var x = 0\n var y = 0\n\n crc = crc ^ (-1)\n for (var i = 0, iTop = str.length; i < iTop; i++) {\n y = (crc ^ str.charCodeAt(i)) & 0xFF\n x = '0x' + table.substr(y * 9, 8)\n crc = (crc >>> 8) ^ x\n }\n\n return crc ^ (-1)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/echo.js b/node_modules/locutus/php/strings/echo.js
deleted file mode 100644
index cdd8433..0000000
--- a/node_modules/locutus/php/strings/echo.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-module.exports = function echo() {
- // discuss at: http://locutus.io/php/echo/
- // original by: Philip Peterson
- // improved by: echo is bad
- // improved by: Nate
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // revised by: Der Simon (http://innerdom.sourceforge.net/)
- // bugfixed by: Eugene Bulkin (http://doubleaw.com/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: EdorFaus
- // note 1: In 1.3.2 and earlier, this function wrote to the body of the document when it
- // note 1: was called in webbrowsers, in addition to supporting XUL.
- // note 1: This involved >100 lines of boilerplate to do this in a safe way.
- // note 1: Since I can't imageine a complelling use-case for this, and XUL is deprecated
- // note 1: I have removed this behavior in favor of just calling `console.log`
- // note 2: You'll see functions depends on `echo` instead of `console.log` as we'll want
- // note 2: to have 1 contact point to interface with the outside world, so that it's easy
- // note 2: to support other ways of printing output.
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // input by: JB
- // example 1: echo('Hello world')
- // returns 1: undefined
-
- var args = Array.prototype.slice.call(arguments);
- return console.log(args.join(' '));
-};
-//# sourceMappingURL=echo.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/echo.js.map b/node_modules/locutus/php/strings/echo.js.map
deleted file mode 100644
index c75e2e1..0000000
--- a/node_modules/locutus/php/strings/echo.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/echo.js"],"names":["module","exports","echo","args","Array","prototype","slice","call","arguments","console","log","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,GAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,MAAMC,SAAN,CAAgBC,KAAhB,CAAsBC,IAAtB,CAA2BC,SAA3B,CAAX;AACA,SAAOC,QAAQC,GAAR,CAAYP,KAAKQ,IAAL,CAAU,GAAV,CAAZ,CAAP;AACD,CA5BD","file":"echo.js","sourcesContent":["module.exports = function echo () {\n // discuss at: http://locutus.io/php/echo/\n // original by: Philip Peterson\n // improved by: echo is bad\n // improved by: Nate\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // revised by: Der Simon (http://innerdom.sourceforge.net/)\n // bugfixed by: Eugene Bulkin (http://doubleaw.com/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: EdorFaus\n // note 1: In 1.3.2 and earlier, this function wrote to the body of the document when it\n // note 1: was called in webbrowsers, in addition to supporting XUL.\n // note 1: This involved >100 lines of boilerplate to do this in a safe way.\n // note 1: Since I can't imageine a complelling use-case for this, and XUL is deprecated\n // note 1: I have removed this behavior in favor of just calling `console.log`\n // note 2: You'll see functions depends on `echo` instead of `console.log` as we'll want\n // note 2: to have 1 contact point to interface with the outside world, so that it's easy\n // note 2: to support other ways of printing output.\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // input by: JB\n // example 1: echo('Hello world')\n // returns 1: undefined\n\n var args = Array.prototype.slice.call(arguments)\n return console.log(args.join(' '))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/explode.js b/node_modules/locutus/php/strings/explode.js
deleted file mode 100644
index d9bbd9e..0000000
--- a/node_modules/locutus/php/strings/explode.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function explode(delimiter, string, limit) {
- // discuss at: http://locutus.io/php/explode/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: explode(' ', 'Kevin van Zonneveld')
- // returns 1: [ 'Kevin', 'van', 'Zonneveld' ]
-
- if (arguments.length < 2 || typeof delimiter === 'undefined' || typeof string === 'undefined') {
- return null;
- }
- if (delimiter === '' || delimiter === false || delimiter === null) {
- return false;
- }
- if (typeof delimiter === 'function' || (typeof delimiter === 'undefined' ? 'undefined' : _typeof(delimiter)) === 'object' || typeof string === 'function' || (typeof string === 'undefined' ? 'undefined' : _typeof(string)) === 'object') {
- return {
- 0: ''
- };
- }
- if (delimiter === true) {
- delimiter = '1';
- }
-
- // Here we go...
- delimiter += '';
- string += '';
-
- var s = string.split(delimiter);
-
- if (typeof limit === 'undefined') return s;
-
- // Support for limit
- if (limit === 0) limit = 1;
-
- // Positive limit
- if (limit > 0) {
- if (limit >= s.length) {
- return s;
- }
- return s.slice(0, limit - 1).concat([s.slice(limit - 1).join(delimiter)]);
- }
-
- // Negative limit
- if (-limit >= s.length) {
- return [];
- }
-
- s.splice(s.length + limit);
- return s;
-};
-//# sourceMappingURL=explode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/explode.js.map b/node_modules/locutus/php/strings/explode.js.map
deleted file mode 100644
index f3962a9..0000000
--- a/node_modules/locutus/php/strings/explode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/explode.js"],"names":["module","exports","explode","delimiter","string","limit","ar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,MAAF,GAAWF,KAApB;AACA,SAAOG,CAAP;AACD,CA1DD","file":"explode.js","sourcesContent":["module.exports = function explode (delimiter, string, limit) {\n // discuss at: http://locutus.io/php/explode/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: explode(' ', 'Kevin van Zonneveld')\n // returns 1: [ 'Kevin', 'van', 'Zonneveld' ]\n\n if (arguments.length < 2 ||\n typeof delimiter === 'undefined' ||\n typeof string === 'undefined') {\n return null\n }\n if (delimiter === '' ||\n delimiter === false ||\n delimiter === null) {\n return false\n }\n if (typeof delimiter === 'function' ||\n typeof delimiter === 'object' ||\n typeof string === 'function' ||\n typeof string === 'object') {\n return {\n 0: ''\n }\n }\n if (delimiter === true) {\n delimiter = '1'\n }\n\n // Here we go...\n delimiter += ''\n string += ''\n\n var s = string.split(delimiter)\n\n if (typeof limit === 'undefined') return s\n\n // Support for limit\n if (limit === 0) limit = 1\n\n // Positive limit\n if (limit > 0) {\n if (limit >= s.length) {\n return s\n }\n return s\n .slice(0, limit - 1)\n .concat([s.slice(limit - 1)\n .join(delimiter)\n ])\n }\n\n // Negative limit\n if (-limit >= s.length) {\n return []\n }\n\n s.splice(s.length + limit)\n return s\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/get_html_translation_table.js b/node_modules/locutus/php/strings/get_html_translation_table.js
deleted file mode 100644
index 9b5bbe6..0000000
--- a/node_modules/locutus/php/strings/get_html_translation_table.js
+++ /dev/null
@@ -1,166 +0,0 @@
-'use strict';
-
-module.exports = function get_html_translation_table(table, quoteStyle) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/get_html_translation_table/
- // original by: Philip Peterson
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: noname
- // bugfixed by: Alex
- // bugfixed by: Marco
- // bugfixed by: madipta
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: T.Wild
- // improved by: KELAN
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: Frank Forte
- // input by: Ratheous
- // note 1: It has been decided that we're not going to add global
- // note 1: dependencies to Locutus, meaning the constants are not
- // note 1: real constants, but strings instead. Integers are also supported if someone
- // note 1: chooses to create the constants themselves.
- // example 1: get_html_translation_table('HTML_SPECIALCHARS')
- // returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}
-
- var entities = {};
- var hashMap = {};
- var decimal;
- var constMappingTable = {};
- var constMappingQuoteStyle = {};
- var useTable = {};
- var useQuoteStyle = {};
-
- // Translate arguments
- constMappingTable[0] = 'HTML_SPECIALCHARS';
- constMappingTable[1] = 'HTML_ENTITIES';
- constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
- constMappingQuoteStyle[2] = 'ENT_COMPAT';
- constMappingQuoteStyle[3] = 'ENT_QUOTES';
-
- useTable = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
-
- useQuoteStyle = !isNaN(quoteStyle) ? constMappingQuoteStyle[quoteStyle] : quoteStyle ? quoteStyle.toUpperCase() : 'ENT_COMPAT';
-
- if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
- throw new Error('Table: ' + useTable + ' not supported');
- }
-
- entities['38'] = '&amp;';
- if (useTable === 'HTML_ENTITIES') {
- entities['160'] = '&nbsp;';
- entities['161'] = '&iexcl;';
- entities['162'] = '&cent;';
- entities['163'] = '&pound;';
- entities['164'] = '&curren;';
- entities['165'] = '&yen;';
- entities['166'] = '&brvbar;';
- entities['167'] = '&sect;';
- entities['168'] = '&uml;';
- entities['169'] = '&copy;';
- entities['170'] = '&ordf;';
- entities['171'] = '&laquo;';
- entities['172'] = '&not;';
- entities['173'] = '&shy;';
- entities['174'] = '&reg;';
- entities['175'] = '&macr;';
- entities['176'] = '&deg;';
- entities['177'] = '&plusmn;';
- entities['178'] = '&sup2;';
- entities['179'] = '&sup3;';
- entities['180'] = '&acute;';
- entities['181'] = '&micro;';
- entities['182'] = '&para;';
- entities['183'] = '&middot;';
- entities['184'] = '&cedil;';
- entities['185'] = '&sup1;';
- entities['186'] = '&ordm;';
- entities['187'] = '&raquo;';
- entities['188'] = '&frac14;';
- entities['189'] = '&frac12;';
- entities['190'] = '&frac34;';
- entities['191'] = '&iquest;';
- entities['192'] = '&Agrave;';
- entities['193'] = '&Aacute;';
- entities['194'] = '&Acirc;';
- entities['195'] = '&Atilde;';
- entities['196'] = '&Auml;';
- entities['197'] = '&Aring;';
- entities['198'] = '&AElig;';
- entities['199'] = '&Ccedil;';
- entities['200'] = '&Egrave;';
- entities['201'] = '&Eacute;';
- entities['202'] = '&Ecirc;';
- entities['203'] = '&Euml;';
- entities['204'] = '&Igrave;';
- entities['205'] = '&Iacute;';
- entities['206'] = '&Icirc;';
- entities['207'] = '&Iuml;';
- entities['208'] = '&ETH;';
- entities['209'] = '&Ntilde;';
- entities['210'] = '&Ograve;';
- entities['211'] = '&Oacute;';
- entities['212'] = '&Ocirc;';
- entities['213'] = '&Otilde;';
- entities['214'] = '&Ouml;';
- entities['215'] = '&times;';
- entities['216'] = '&Oslash;';
- entities['217'] = '&Ugrave;';
- entities['218'] = '&Uacute;';
- entities['219'] = '&Ucirc;';
- entities['220'] = '&Uuml;';
- entities['221'] = '&Yacute;';
- entities['222'] = '&THORN;';
- entities['223'] = '&szlig;';
- entities['224'] = '&agrave;';
- entities['225'] = '&aacute;';
- entities['226'] = '&acirc;';
- entities['227'] = '&atilde;';
- entities['228'] = '&auml;';
- entities['229'] = '&aring;';
- entities['230'] = '&aelig;';
- entities['231'] = '&ccedil;';
- entities['232'] = '&egrave;';
- entities['233'] = '&eacute;';
- entities['234'] = '&ecirc;';
- entities['235'] = '&euml;';
- entities['236'] = '&igrave;';
- entities['237'] = '&iacute;';
- entities['238'] = '&icirc;';
- entities['239'] = '&iuml;';
- entities['240'] = '&eth;';
- entities['241'] = '&ntilde;';
- entities['242'] = '&ograve;';
- entities['243'] = '&oacute;';
- entities['244'] = '&ocirc;';
- entities['245'] = '&otilde;';
- entities['246'] = '&ouml;';
- entities['247'] = '&divide;';
- entities['248'] = '&oslash;';
- entities['249'] = '&ugrave;';
- entities['250'] = '&uacute;';
- entities['251'] = '&ucirc;';
- entities['252'] = '&uuml;';
- entities['253'] = '&yacute;';
- entities['254'] = '&thorn;';
- entities['255'] = '&yuml;';
- }
-
- if (useQuoteStyle !== 'ENT_NOQUOTES') {
- entities['34'] = '&quot;';
- }
- if (useQuoteStyle === 'ENT_QUOTES') {
- entities['39'] = '&#39;';
- }
- entities['60'] = '&lt;';
- entities['62'] = '&gt;';
-
- // ascii decimals to real symbols
- for (decimal in entities) {
- if (entities.hasOwnProperty(decimal)) {
- hashMap[String.fromCharCode(decimal)] = entities[decimal];
- }
- }
-
- return hashMap;
-};
-//# sourceMappingURL=get_html_translation_table.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/get_html_translation_table.js.map b/node_modules/locutus/php/strings/get_html_translation_table.js.map
deleted file mode 100644
index 01c0a7a..0000000
--- a/node_modules/locutus/php/strings/get_html_translation_table.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/get_html_translation_table.js"],"names":["module","exports","get_html_translation_table","table","quoteStyle","entities","hashMap","decimal","constMappingTable","constMappingQuoteStyle","useTable","useQuoteStyle","isNaN","toUpperCase","Error","hasOwnProperty","String","fromCharCode"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,0BAAT,CAAqCC,KAArC,EAA4CC,UAA5C,EAAwD;AAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAW,EAAf;AACA,MAAIC,UAAU,EAAd;AACA,MAAIC,OAAJ;AACA,MAAIC,oBAAoB,EAAxB;AACA,MAAIC,yBAAyB,EAA7B;AACA,MAAIC,WAAW,EAAf;AACA,MAAIC,gBAAgB,EAApB;;AAEA;AACAH,oBAAkB,CAA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,QAAlB;AACD;;AAED,MAAIM,kBAAkB,cAAtB,EAAsC;AACpCN,aAAS,IAAT,IAAiB,QAAjB;AACD;AACD,MAAIM,kBAAkB,YAAtB,EAAoC;AAClCN,aAAS,IAAT,IAAiB,OAAjB;AACD;AACDA,WAAS,IAAT,IAAiB,MAAjB;AACAA,WAAS,IAAT,IAAiB,MAAjB;;AAEA;AACA,OAAKE,OAAL,IAAgBF,QAAhB,EAA0B;AACxB,QAAIA,SAASU,cAAT,CAAwBR,OAAxB,CAAJ,EAAsC;AACpCD,cAAQU,OAAOC,YAAP,CAAoBV,OAApB,CAAR,IAAwCF,SAASE,OAAT,CAAxC;AACD;AACF;;AAED,SAAOD,OAAP;AACD,CAzKD","file":"get_html_translation_table.js","sourcesContent":["module.exports = function get_html_translation_table (table, quoteStyle) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/get_html_translation_table/\n // original by: Philip Peterson\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: noname\n // bugfixed by: Alex\n // bugfixed by: Marco\n // bugfixed by: madipta\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: T.Wild\n // improved by: KELAN\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: Frank Forte\n // input by: Ratheous\n // note 1: It has been decided that we're not going to add global\n // note 1: dependencies to Locutus, meaning the constants are not\n // note 1: real constants, but strings instead. Integers are also supported if someone\n // note 1: chooses to create the constants themselves.\n // example 1: get_html_translation_table('HTML_SPECIALCHARS')\n // returns 1: {'\"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}\n\n var entities = {}\n var hashMap = {}\n var decimal\n var constMappingTable = {}\n var constMappingQuoteStyle = {}\n var useTable = {}\n var useQuoteStyle = {}\n\n // Translate arguments\n constMappingTable[0] = 'HTML_SPECIALCHARS'\n constMappingTable[1] = 'HTML_ENTITIES'\n constMappingQuoteStyle[0] = 'ENT_NOQUOTES'\n constMappingQuoteStyle[2] = 'ENT_COMPAT'\n constMappingQuoteStyle[3] = 'ENT_QUOTES'\n\n useTable = !isNaN(table)\n ? constMappingTable[table]\n : table\n ? table.toUpperCase()\n : 'HTML_SPECIALCHARS'\n\n useQuoteStyle = !isNaN(quoteStyle)\n ? constMappingQuoteStyle[quoteStyle]\n : quoteStyle\n ? quoteStyle.toUpperCase()\n : 'ENT_COMPAT'\n\n if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {\n throw new Error('Table: ' + useTable + ' not supported')\n }\n\n entities['38'] = '&amp;'\n if (useTable === 'HTML_ENTITIES') {\n entities['160'] = '&nbsp;'\n entities['161'] = '&iexcl;'\n entities['162'] = '&cent;'\n entities['163'] = '&pound;'\n entities['164'] = '&curren;'\n entities['165'] = '&yen;'\n entities['166'] = '&brvbar;'\n entities['167'] = '&sect;'\n entities['168'] = '&uml;'\n entities['169'] = '&copy;'\n entities['170'] = '&ordf;'\n entities['171'] = '&laquo;'\n entities['172'] = '&not;'\n entities['173'] = '&shy;'\n entities['174'] = '&reg;'\n entities['175'] = '&macr;'\n entities['176'] = '&deg;'\n entities['177'] = '&plusmn;'\n entities['178'] = '&sup2;'\n entities['179'] = '&sup3;'\n entities['180'] = '&acute;'\n entities['181'] = '&micro;'\n entities['182'] = '&para;'\n entities['183'] = '&middot;'\n entities['184'] = '&cedil;'\n entities['185'] = '&sup1;'\n entities['186'] = '&ordm;'\n entities['187'] = '&raquo;'\n entities['188'] = '&frac14;'\n entities['189'] = '&frac12;'\n entities['190'] = '&frac34;'\n entities['191'] = '&iquest;'\n entities['192'] = '&Agrave;'\n entities['193'] = '&Aacute;'\n entities['194'] = '&Acirc;'\n entities['195'] = '&Atilde;'\n entities['196'] = '&Auml;'\n entities['197'] = '&Aring;'\n entities['198'] = '&AElig;'\n entities['199'] = '&Ccedil;'\n entities['200'] = '&Egrave;'\n entities['201'] = '&Eacute;'\n entities['202'] = '&Ecirc;'\n entities['203'] = '&Euml;'\n entities['204'] = '&Igrave;'\n entities['205'] = '&Iacute;'\n entities['206'] = '&Icirc;'\n entities['207'] = '&Iuml;'\n entities['208'] = '&ETH;'\n entities['209'] = '&Ntilde;'\n entities['210'] = '&Ograve;'\n entities['211'] = '&Oacute;'\n entities['212'] = '&Ocirc;'\n entities['213'] = '&Otilde;'\n entities['214'] = '&Ouml;'\n entities['215'] = '&times;'\n entities['216'] = '&Oslash;'\n entities['217'] = '&Ugrave;'\n entities['218'] = '&Uacute;'\n entities['219'] = '&Ucirc;'\n entities['220'] = '&Uuml;'\n entities['221'] = '&Yacute;'\n entities['222'] = '&THORN;'\n entities['223'] = '&szlig;'\n entities['224'] = '&agrave;'\n entities['225'] = '&aacute;'\n entities['226'] = '&acirc;'\n entities['227'] = '&atilde;'\n entities['228'] = '&auml;'\n entities['229'] = '&aring;'\n entities['230'] = '&aelig;'\n entities['231'] = '&ccedil;'\n entities['232'] = '&egrave;'\n entities['233'] = '&eacute;'\n entities['234'] = '&ecirc;'\n entities['235'] = '&euml;'\n entities['236'] = '&igrave;'\n entities['237'] = '&iacute;'\n entities['238'] = '&icirc;'\n entities['239'] = '&iuml;'\n entities['240'] = '&eth;'\n entities['241'] = '&ntilde;'\n entities['242'] = '&ograve;'\n entities['243'] = '&oacute;'\n entities['244'] = '&ocirc;'\n entities['245'] = '&otilde;'\n entities['246'] = '&ouml;'\n entities['247'] = '&divide;'\n entities['248'] = '&oslash;'\n entities['249'] = '&ugrave;'\n entities['250'] = '&uacute;'\n entities['251'] = '&ucirc;'\n entities['252'] = '&uuml;'\n entities['253'] = '&yacute;'\n entities['254'] = '&thorn;'\n entities['255'] = '&yuml;'\n }\n\n if (useQuoteStyle !== 'ENT_NOQUOTES') {\n entities['34'] = '&quot;'\n }\n if (useQuoteStyle === 'ENT_QUOTES') {\n entities['39'] = '&#39;'\n }\n entities['60'] = '&lt;'\n entities['62'] = '&gt;'\n\n // ascii decimals to real symbols\n for (decimal in entities) {\n if (entities.hasOwnProperty(decimal)) {\n hashMap[String.fromCharCode(decimal)] = entities[decimal]\n }\n }\n\n return hashMap\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/hex2bin.js b/node_modules/locutus/php/strings/hex2bin.js
deleted file mode 100644
index ef0331b..0000000
--- a/node_modules/locutus/php/strings/hex2bin.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-module.exports = function hex2bin(s) {
- // discuss at: http://locutus.io/php/hex2bin/
- // original by: Dumitru Uzun (http://duzun.me)
- // example 1: hex2bin('44696d61')
- // returns 1: 'Dima'
- // example 2: hex2bin('00')
- // returns 2: '\x00'
- // example 3: hex2bin('2f1q')
- // returns 3: false
-
- var ret = [];
- var i = 0;
- var l;
-
- s += '';
-
- for (l = s.length; i < l; i += 2) {
- var c = parseInt(s.substr(i, 1), 16);
- var k = parseInt(s.substr(i + 1, 1), 16);
- if (isNaN(c) || isNaN(k)) return false;
- ret.push(c << 4 | k);
- }
-
- return String.fromCharCode.apply(String, ret);
-};
-//# sourceMappingURL=hex2bin.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/hex2bin.js.map b/node_modules/locutus/php/strings/hex2bin.js.map
deleted file mode 100644
index 40e66b4..0000000
--- a/node_modules/locutus/php/strings/hex2bin.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/hex2bin.js"],"names":["module","exports","hex2bin","s","ret","i","l","length","c","parseInt","substr","k","isNaN","push","String","fromCharCode","apply"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,CAAlB,EAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,CAAJ;;AAEAH,OAAK,EAAL;;AAEA,OAAKG,IAAIH,EAAEI,MAAX,EAAmBF,IAAIC,CAAvB,EAA0BD,KAAK,CAA/B,EAAkC;AAChC,QAAIG,IAAIC,SAASN,EAAEO,MAAF,CAASL,CAAT,EAAY,CAAZ,CAAT,EAAyB,EAAzB,CAAR;AACA,QAAIM,IAAIF,SAASN,EAAEO,MAAF,CAASL,IAAI,CAAb,EAAgB,CAAhB,CAAT,EAA6B,EAA7B,CAAR;AACA,QAAIO,MAAMJ,CAAN,KAAYI,MAAMD,CAAN,CAAhB,EAA0B,OAAO,KAAP;AAC1BP,QAAIS,IAAJ,CAAUL,KAAK,CAAN,GAAWG,CAApB;AACD;;AAED,SAAOG,OAAOC,YAAP,CAAoBC,KAApB,CAA0BF,MAA1B,EAAkCV,GAAlC,CAAP;AACD,CAxBD","file":"hex2bin.js","sourcesContent":["module.exports = function hex2bin (s) {\n // discuss at: http://locutus.io/php/hex2bin/\n // original by: Dumitru Uzun (http://duzun.me)\n // example 1: hex2bin('44696d61')\n // returns 1: 'Dima'\n // example 2: hex2bin('00')\n // returns 2: '\\x00'\n // example 3: hex2bin('2f1q')\n // returns 3: false\n\n var ret = []\n var i = 0\n var l\n\n s += ''\n\n for (l = s.length; i < l; i += 2) {\n var c = parseInt(s.substr(i, 1), 16)\n var k = parseInt(s.substr(i + 1, 1), 16)\n if (isNaN(c) || isNaN(k)) return false\n ret.push((c << 4) | k)\n }\n\n return String.fromCharCode.apply(String, ret)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/html_entity_decode.js b/node_modules/locutus/php/strings/html_entity_decode.js
deleted file mode 100644
index f240e21..0000000
--- a/node_modules/locutus/php/strings/html_entity_decode.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-module.exports = function html_entity_decode(string, quoteStyle) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/html_entity_decode/
- // original by: john (http://www.jd-tech.net)
- // input by: ger
- // input by: Ratheous
- // input by: Nick Kolosov (http://sammy.ru)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: marc andreu
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Fox
- // example 1: html_entity_decode('Kevin &amp; van Zonneveld')
- // returns 1: 'Kevin & van Zonneveld'
- // example 2: html_entity_decode('&amp;lt;')
- // returns 2: '&lt;'
-
- var getHtmlTranslationTable = require('../strings/get_html_translation_table');
- var tmpStr = '';
- var entity = '';
- var symbol = '';
- tmpStr = string.toString();
-
- var hashMap = getHtmlTranslationTable('HTML_ENTITIES', quoteStyle);
- if (hashMap === false) {
- return false;
- }
-
- // @todo: &amp; problem
- // http://locutus.io/php/get_html_translation_table:416#comment_97660
- delete hashMap['&'];
- hashMap['&'] = '&amp;';
-
- for (symbol in hashMap) {
- entity = hashMap[symbol];
- tmpStr = tmpStr.split(entity).join(symbol);
- }
- tmpStr = tmpStr.split('&#039;').join("'");
-
- return tmpStr;
-};
-//# sourceMappingURL=html_entity_decode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/html_entity_decode.js.map b/node_modules/locutus/php/strings/html_entity_decode.js.map
deleted file mode 100644
index 4b00249..0000000
--- a/node_modules/locutus/php/strings/html_entity_decode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/html_entity_decode.js"],"names":["module","exports","html_entity_decode","string","quoteStyle","getHtmlTranslationTable","require","tmpStr","entity","symbol","toString","hashMap","split","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,kBAAT,CAA6BC,MAA7B,EAAqCC,UAArC,EAAiD;AAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,0BAA0BC,QAAQ,uCAAR,CAA9B;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,SAAS,EAAb;AACAF,WAASJ,OAAOO,QAAP,EAAT;;AAEA,MAAIC,UAAUN,wBAAwB,eAAxB,EAAyCD,UAAzC,CAAd;AACA,MAAIO,YAAY,KAAhB,EAAuB;AACrB,WAAO,KAAP;AACD;;AAED;AACA;AACA,SAAQA,QAAQ,GAAR,CAAR;AACAA,UAAQ,GAAR,IAAe,OAAf;;AAEA,OAAKF,MAAL,IAAeE,OAAf,EAAwB;AACtBH,aAASG,QAAQF,MAAR,CAAT;AACAF,aAASA,OAAOK,KAAP,CAAaJ,MAAb,EAAqBK,IAArB,CAA0BJ,MAA1B,CAAT;AACD;AACDF,WAASA,OAAOK,KAAP,CAAa,QAAb,EAAuBC,IAAvB,CAA4B,GAA5B,CAAT;;AAEA,SAAON,MAAP;AACD,CAzCD","file":"html_entity_decode.js","sourcesContent":["module.exports = function html_entity_decode (string, quoteStyle) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/html_entity_decode/\n // original by: john (http://www.jd-tech.net)\n // input by: ger\n // input by: Ratheous\n // input by: Nick Kolosov (http://sammy.ru)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: marc andreu\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Fox\n // example 1: html_entity_decode('Kevin &amp; van Zonneveld')\n // returns 1: 'Kevin & van Zonneveld'\n // example 2: html_entity_decode('&amp;lt;')\n // returns 2: '&lt;'\n\n var getHtmlTranslationTable = require('../strings/get_html_translation_table')\n var tmpStr = ''\n var entity = ''\n var symbol = ''\n tmpStr = string.toString()\n\n var hashMap = getHtmlTranslationTable('HTML_ENTITIES', quoteStyle)\n if (hashMap === false) {\n return false\n }\n\n // @todo: &amp; problem\n // http://locutus.io/php/get_html_translation_table:416#comment_97660\n delete (hashMap['&'])\n hashMap['&'] = '&amp;'\n\n for (symbol in hashMap) {\n entity = hashMap[symbol]\n tmpStr = tmpStr.split(entity).join(symbol)\n }\n tmpStr = tmpStr.split('&#039;').join(\"'\")\n\n return tmpStr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/htmlentities.js b/node_modules/locutus/php/strings/htmlentities.js
deleted file mode 100644
index 2cba4e5..0000000
--- a/node_modules/locutus/php/strings/htmlentities.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = function htmlentities(string, quoteStyle, charset, doubleEncode) {
- // discuss at: http://locutus.io/php/htmlentities/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // improved by: nobbler
- // improved by: Jack
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // improved by: Dj (http://locutus.io/php/htmlentities:425#comment_134018)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: Ratheous
- // note 1: function is compatible with PHP 5.2 and older
- // example 1: htmlentities('Kevin & van Zonneveld')
- // returns 1: 'Kevin &amp; van Zonneveld'
- // example 2: htmlentities("foo'bar","ENT_QUOTES")
- // returns 2: 'foo&#039;bar'
-
- var getHtmlTranslationTable = require('../strings/get_html_translation_table');
- var hashMap = getHtmlTranslationTable('HTML_ENTITIES', quoteStyle);
-
- string = string === null ? '' : string + '';
-
- if (!hashMap) {
- return false;
- }
-
- if (quoteStyle && quoteStyle === 'ENT_QUOTES') {
- hashMap["'"] = '&#039;';
- }
-
- doubleEncode = doubleEncode === null || !!doubleEncode;
-
- var regex = new RegExp('&(?:#\\d+|#x[\\da-f]+|[a-zA-Z][\\da-z]*);|[' + Object.keys(hashMap).join('')
- // replace regexp special chars
- .replace(/([()[\]{}\-.*+?^$|/\\])/g, '\\$1') + ']', 'g');
-
- return string.replace(regex, function (ent) {
- if (ent.length > 1) {
- return doubleEncode ? hashMap['&'] + ent.substr(1) : ent;
- }
-
- return hashMap[ent];
- });
-};
-//# sourceMappingURL=htmlentities.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/htmlentities.js.map b/node_modules/locutus/php/strings/htmlentities.js.map
deleted file mode 100644
index 1dc29b8..0000000
--- a/node_modules/locutus/php/strings/htmlentities.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/htmlentities.js"],"names":["module","exports","htmlentities","string","quoteStyle","charset","doubleEncode","getHtmlTranslationTable","require","hashMap","regex","RegExp","Object","keys","join","replace","ent","length","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,UAA/B,EAA2CC,OAA3C,EAAoDC,YAApD,EAAkE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,0BAA0BC,QAAQ,uCAAR,CAA9B;AACA,MAAIC,UAAUF,wBAAwB,eAAxB,EAAyCH,UAAzC,CAAd;;AAEAD,WAASA,WAAW,IAAX,GAAkB,EAAlB,GAAuBA,SAAS,EAAzC;;AAEA,MAAI,CAACM,OAAL,EAAc;AACZ,WAAO,KAAP;AACD;;AAED,MAAIL,cAAcA,eAAe,YAAjC,EAA+C;AAC7CK,YAAQ,GAAR,IAAe,QAAf;AACD;;AAEDH,iBAAeA,iBAAiB,IAAjB,IAAyB,CAAC,CAACA,YAA1C;;AAEA,MAAII,QAAQ,IAAIC,MAAJ,CAAW,gDACrBC,OAAOC,IAAP,CAAYJ,OAAZ,EACCK,IADD,CACM,EADN;AAEA;AAFA,GAGCC,OAHD,CAGS,0BAHT,EAGqC,MAHrC,CADqB,GAI0B,GAJrC,EAKV,GALU,CAAZ;;AAOA,SAAOZ,OAAOY,OAAP,CAAeL,KAAf,EAAsB,UAAUM,GAAV,EAAe;AAC1C,QAAIA,IAAIC,MAAJ,GAAa,CAAjB,EAAoB;AAClB,aAAOX,eAAeG,QAAQ,GAAR,IAAeO,IAAIE,MAAJ,CAAW,CAAX,CAA9B,GAA8CF,GAArD;AACD;;AAED,WAAOP,QAAQO,GAAR,CAAP;AACD,GANM,CAAP;AAOD,CA/CD","file":"htmlentities.js","sourcesContent":["module.exports = function htmlentities (string, quoteStyle, charset, doubleEncode) {\n // discuss at: http://locutus.io/php/htmlentities/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // improved by: nobbler\n // improved by: Jack\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // improved by: Dj (http://locutus.io/php/htmlentities:425#comment_134018)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: Ratheous\n // note 1: function is compatible with PHP 5.2 and older\n // example 1: htmlentities('Kevin & van Zonneveld')\n // returns 1: 'Kevin &amp; van Zonneveld'\n // example 2: htmlentities(\"foo'bar\",\"ENT_QUOTES\")\n // returns 2: 'foo&#039;bar'\n\n var getHtmlTranslationTable = require('../strings/get_html_translation_table')\n var hashMap = getHtmlTranslationTable('HTML_ENTITIES', quoteStyle)\n\n string = string === null ? '' : string + ''\n\n if (!hashMap) {\n return false\n }\n\n if (quoteStyle && quoteStyle === 'ENT_QUOTES') {\n hashMap[\"'\"] = '&#039;'\n }\n\n doubleEncode = doubleEncode === null || !!doubleEncode\n\n var regex = new RegExp('&(?:#\\\\d+|#x[\\\\da-f]+|[a-zA-Z][\\\\da-z]*);|[' +\n Object.keys(hashMap)\n .join('')\n // replace regexp special chars\n .replace(/([()[\\]{}\\-.*+?^$|/\\\\])/g, '\\\\$1') + ']',\n 'g')\n\n return string.replace(regex, function (ent) {\n if (ent.length > 1) {\n return doubleEncode ? hashMap['&'] + ent.substr(1) : ent\n }\n\n return hashMap[ent]\n })\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/htmlspecialchars.js b/node_modules/locutus/php/strings/htmlspecialchars.js
deleted file mode 100644
index d19950c..0000000
--- a/node_modules/locutus/php/strings/htmlspecialchars.js
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict';
-
-module.exports = function htmlspecialchars(string, quoteStyle, charset, doubleEncode) {
- // discuss at: http://locutus.io/php/htmlspecialchars/
- // original by: Mirek Slugen
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Nathan
- // bugfixed by: Arno
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // input by: Ratheous
- // input by: Mailfaker (http://www.weedem.fr/)
- // input by: felix
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // note 1: charset argument not supported
- // example 1: htmlspecialchars("<a href='test'>Test</a>", 'ENT_QUOTES')
- // returns 1: '&lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;'
- // example 2: htmlspecialchars("ab\"c'd", ['ENT_NOQUOTES', 'ENT_QUOTES'])
- // returns 2: 'ab"c&#039;d'
- // example 3: htmlspecialchars('my "&entity;" is still here', null, null, false)
- // returns 3: 'my &quot;&entity;&quot; is still here'
-
- var optTemp = 0;
- var i = 0;
- var noquotes = false;
- if (typeof quoteStyle === 'undefined' || quoteStyle === null) {
- quoteStyle = 2;
- }
- string = string || '';
- string = string.toString();
-
- if (doubleEncode !== false) {
- // Put this first to avoid double-encoding
- string = string.replace(/&/g, '&amp;');
- }
-
- string = string.replace(/</g, '&lt;').replace(/>/g, '&gt;');
-
- var OPTS = {
- 'ENT_NOQUOTES': 0,
- 'ENT_HTML_QUOTE_SINGLE': 1,
- 'ENT_HTML_QUOTE_DOUBLE': 2,
- 'ENT_COMPAT': 2,
- 'ENT_QUOTES': 3,
- 'ENT_IGNORE': 4
- };
- if (quoteStyle === 0) {
- noquotes = true;
- }
- if (typeof quoteStyle !== 'number') {
- // Allow for a single string or an array of string flags
- quoteStyle = [].concat(quoteStyle);
- for (i = 0; i < quoteStyle.length; i++) {
- // Resolve string input to bitwise e.g. 'ENT_IGNORE' becomes 4
- if (OPTS[quoteStyle[i]] === 0) {
- noquotes = true;
- } else if (OPTS[quoteStyle[i]]) {
- optTemp = optTemp | OPTS[quoteStyle[i]];
- }
- }
- quoteStyle = optTemp;
- }
- if (quoteStyle & OPTS.ENT_HTML_QUOTE_SINGLE) {
- string = string.replace(/'/g, '&#039;');
- }
- if (!noquotes) {
- string = string.replace(/"/g, '&quot;');
- }
-
- return string;
-};
-//# sourceMappingURL=htmlspecialchars.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/htmlspecialchars.js.map b/node_modules/locutus/php/strings/htmlspecialchars.js.map
deleted file mode 100644
index f34757b..0000000
--- a/node_modules/locutus/php/strings/htmlspecialchars.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/htmlspecialchars.js"],"names":["module","exports","htmlspecialchars","string","quoteStyle","charset","doubleEncode","optTemp","i","noquotes","toString","replace","OPTS","concat","length","ENT_HTML_QUOTE_SINGLE"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,gBAAT,CAA2BC,MAA3B,EAAmCC,UAAnC,EAA+CC,OAA/C,EAAwDC,YAAxD,EAAsE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAU,CAAd;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,WAAW,KAAf;AACA,MAAI,OAAOL,UAAP,KAAsB,WAAtB,IAAqCA,eAAe,IAAxD,EAA8D;AAC5DA,iBAAa,CAAb;AACD;AACDD,WAASA,UAAU,EAAnB;AACAA,WAASA,OAAOO,QAAP,EAAT;;AAEA,MAAIJ,iBAAiB,KAArB,EAA4B;AAC1B;AACAH,aAASA,OAAOQ,OAAP,CAAe,IAAf,EAAqB,OAArB,CAAT;AACD;;AAEDR,WAASA,OACNQ,OADM,CACE,IADF,EACQ,MADR,EAENA,OAFM,CAEE,IAFF,EAEQ,MAFR,CAAT;;AAIA,MAAIC,OAAO;AACT,oBAAgB,CADP;AAET,6BAAyB,CAFhB;AAGT,6BAAyB,CAHhB;AAIT,kBAAc,CAJL;AAKT,kBAAc,CALL;AAMT,kBAAc;AANL,GAAX;AAQA,MAAIR,eAAe,CAAnB,EAAsB;AACpBK,eAAW,IAAX;AACD;AACD,MAAI,OAAOL,UAAP,KAAsB,QAA1B,EAAoC;AAClC;AACAA,iBAAa,GAAGS,MAAH,CAAUT,UAAV,CAAb;AACA,SAAKI,IAAI,CAAT,EAAYA,IAAIJ,WAAWU,MAA3B,EAAmCN,GAAnC,EAAwC;AACtC;AACA,UAAII,KAAKR,WAAWI,CAAX,CAAL,MAAwB,CAA5B,EAA+B;AAC7BC,mBAAW,IAAX;AACD,OAFD,MAEO,IAAIG,KAAKR,WAAWI,CAAX,CAAL,CAAJ,EAAyB;AAC9BD,kBAAUA,UAAUK,KAAKR,WAAWI,CAAX,CAAL,CAApB;AACD;AACF;AACDJ,iBAAaG,OAAb;AACD;AACD,MAAIH,aAAaQ,KAAKG,qBAAtB,EAA6C;AAC3CZ,aAASA,OAAOQ,OAAP,CAAe,IAAf,EAAqB,QAArB,CAAT;AACD;AACD,MAAI,CAACF,QAAL,EAAe;AACbN,aAASA,OAAOQ,OAAP,CAAe,IAAf,EAAqB,QAArB,CAAT;AACD;;AAED,SAAOR,MAAP;AACD,CAvED","file":"htmlspecialchars.js","sourcesContent":["module.exports = function htmlspecialchars (string, quoteStyle, charset, doubleEncode) {\n // discuss at: http://locutus.io/php/htmlspecialchars/\n // original by: Mirek Slugen\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Nathan\n // bugfixed by: Arno\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // input by: Ratheous\n // input by: Mailfaker (http://www.weedem.fr/)\n // input by: felix\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // note 1: charset argument not supported\n // example 1: htmlspecialchars(\"<a href='test'>Test</a>\", 'ENT_QUOTES')\n // returns 1: '&lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;'\n // example 2: htmlspecialchars(\"ab\\\"c'd\", ['ENT_NOQUOTES', 'ENT_QUOTES'])\n // returns 2: 'ab\"c&#039;d'\n // example 3: htmlspecialchars('my \"&entity;\" is still here', null, null, false)\n // returns 3: 'my &quot;&entity;&quot; is still here'\n\n var optTemp = 0\n var i = 0\n var noquotes = false\n if (typeof quoteStyle === 'undefined' || quoteStyle === null) {\n quoteStyle = 2\n }\n string = string || ''\n string = string.toString()\n\n if (doubleEncode !== false) {\n // Put this first to avoid double-encoding\n string = string.replace(/&/g, '&amp;')\n }\n\n string = string\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n\n var OPTS = {\n 'ENT_NOQUOTES': 0,\n 'ENT_HTML_QUOTE_SINGLE': 1,\n 'ENT_HTML_QUOTE_DOUBLE': 2,\n 'ENT_COMPAT': 2,\n 'ENT_QUOTES': 3,\n 'ENT_IGNORE': 4\n }\n if (quoteStyle === 0) {\n noquotes = true\n }\n if (typeof quoteStyle !== 'number') {\n // Allow for a single string or an array of string flags\n quoteStyle = [].concat(quoteStyle)\n for (i = 0; i < quoteStyle.length; i++) {\n // Resolve string input to bitwise e.g. 'ENT_IGNORE' becomes 4\n if (OPTS[quoteStyle[i]] === 0) {\n noquotes = true\n } else if (OPTS[quoteStyle[i]]) {\n optTemp = optTemp | OPTS[quoteStyle[i]]\n }\n }\n quoteStyle = optTemp\n }\n if (quoteStyle & OPTS.ENT_HTML_QUOTE_SINGLE) {\n string = string.replace(/'/g, '&#039;')\n }\n if (!noquotes) {\n string = string.replace(/\"/g, '&quot;')\n }\n\n return string\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/htmlspecialchars_decode.js b/node_modules/locutus/php/strings/htmlspecialchars_decode.js
deleted file mode 100644
index 5609951..0000000
--- a/node_modules/locutus/php/strings/htmlspecialchars_decode.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-
-module.exports = function htmlspecialchars_decode(string, quoteStyle) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/htmlspecialchars_decode/
- // original by: Mirek Slugen
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Mateusz "loonquawl" Zalega
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: ReverseSyntax
- // input by: Slawomir Kaniecki
- // input by: Scott Cariss
- // input by: Francois
- // input by: Ratheous
- // input by: Mailfaker (http://www.weedem.fr/)
- // revised by: Kevin van Zonneveld (http://kvz.io)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // example 1: htmlspecialchars_decode("<p>this -&gt; &quot;</p>", 'ENT_NOQUOTES')
- // returns 1: '<p>this -> &quot;</p>'
- // example 2: htmlspecialchars_decode("&amp;quot;")
- // returns 2: '&quot;'
-
- var optTemp = 0;
- var i = 0;
- var noquotes = false;
-
- if (typeof quoteStyle === 'undefined') {
- quoteStyle = 2;
- }
- string = string.toString().replace(/&lt;/g, '<').replace(/&gt;/g, '>');
- var OPTS = {
- 'ENT_NOQUOTES': 0,
- 'ENT_HTML_QUOTE_SINGLE': 1,
- 'ENT_HTML_QUOTE_DOUBLE': 2,
- 'ENT_COMPAT': 2,
- 'ENT_QUOTES': 3,
- 'ENT_IGNORE': 4
- };
- if (quoteStyle === 0) {
- noquotes = true;
- }
- if (typeof quoteStyle !== 'number') {
- // Allow for a single string or an array of string flags
- quoteStyle = [].concat(quoteStyle);
- for (i = 0; i < quoteStyle.length; i++) {
- // Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
- if (OPTS[quoteStyle[i]] === 0) {
- noquotes = true;
- } else if (OPTS[quoteStyle[i]]) {
- optTemp = optTemp | OPTS[quoteStyle[i]];
- }
- }
- quoteStyle = optTemp;
- }
- if (quoteStyle & OPTS.ENT_HTML_QUOTE_SINGLE) {
- // PHP doesn't currently escape if more than one 0, but it should:
- string = string.replace(/&#0*39;/g, "'");
- // This would also be useful here, but not a part of PHP:
- // string = string.replace(/&apos;|&#x0*27;/g, "'");
- }
- if (!noquotes) {
- string = string.replace(/&quot;/g, '"');
- }
- // Put this in last place to avoid escape being double-decoded
- string = string.replace(/&amp;/g, '&');
-
- return string;
-};
-//# sourceMappingURL=htmlspecialchars_decode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/htmlspecialchars_decode.js.map b/node_modules/locutus/php/strings/htmlspecialchars_decode.js.map
deleted file mode 100644
index d2f38de..0000000
--- a/node_modules/locutus/php/strings/htmlspecialchars_decode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/htmlspecialchars_decode.js"],"names":["module","exports","htmlspecialchars_decode","string","quoteStyle","optTemp","i","noquotes","toString","replace","OPTS","concat","length","ENT_HTML_QUOTE_SINGLE"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,uBAAT,CAAkCC,MAAlC,EAA0CC,UAA1C,EAAsD;AAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAU,CAAd;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,WAAW,KAAf;;AAEA,MAAI,OAAOH,UAAP,KAAsB,WAA1B,EAAuC;AACrCA,iBAAa,CAAb;AACD;AACDD,WAASA,OAAOK,QAAP,GACNC,OADM,CACE,OADF,EACW,GADX,EAENA,OAFM,CAEE,OAFF,EAEW,GAFX,CAAT;AAGA,MAAIC,OAAO;AACT,oBAAgB,CADP;AAET,6BAAyB,CAFhB;AAGT,6BAAyB,CAHhB;AAIT,kBAAc,CAJL;AAKT,kBAAc,CALL;AAMT,kBAAc;AANL,GAAX;AAQA,MAAIN,eAAe,CAAnB,EAAsB;AACpBG,eAAW,IAAX;AACD;AACD,MAAI,OAAOH,UAAP,KAAsB,QAA1B,EAAoC;AAClC;AACAA,iBAAa,GAAGO,MAAH,CAAUP,UAAV,CAAb;AACA,SAAKE,IAAI,CAAT,EAAYA,IAAIF,WAAWQ,MAA3B,EAAmCN,GAAnC,EAAwC;AACtC;AACA,UAAII,KAAKN,WAAWE,CAAX,CAAL,MAAwB,CAA5B,EAA+B;AAC7BC,mBAAW,IAAX;AACD,OAFD,MAEO,IAAIG,KAAKN,WAAWE,CAAX,CAAL,CAAJ,EAAyB;AAC9BD,kBAAUA,UAAUK,KAAKN,WAAWE,CAAX,CAAL,CAApB;AACD;AACF;AACDF,iBAAaC,OAAb;AACD;AACD,MAAID,aAAaM,KAAKG,qBAAtB,EAA6C;AAC3C;AACAV,aAASA,OAAOM,OAAP,CAAe,UAAf,EAA2B,GAA3B,CAAT;AACA;AACA;AACD;AACD,MAAI,CAACF,QAAL,EAAe;AACbJ,aAASA,OAAOM,OAAP,CAAe,SAAf,EAA0B,GAA1B,CAAT;AACD;AACD;AACAN,WAASA,OAAOM,OAAP,CAAe,QAAf,EAAyB,GAAzB,CAAT;;AAEA,SAAON,MAAP;AACD,CApED","file":"htmlspecialchars_decode.js","sourcesContent":["module.exports = function htmlspecialchars_decode (string, quoteStyle) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/htmlspecialchars_decode/\n // original by: Mirek Slugen\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Mateusz \"loonquawl\" Zalega\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: ReverseSyntax\n // input by: Slawomir Kaniecki\n // input by: Scott Cariss\n // input by: Francois\n // input by: Ratheous\n // input by: Mailfaker (http://www.weedem.fr/)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // example 1: htmlspecialchars_decode(\"<p>this -&gt; &quot;</p>\", 'ENT_NOQUOTES')\n // returns 1: '<p>this -> &quot;</p>'\n // example 2: htmlspecialchars_decode(\"&amp;quot;\")\n // returns 2: '&quot;'\n\n var optTemp = 0\n var i = 0\n var noquotes = false\n\n if (typeof quoteStyle === 'undefined') {\n quoteStyle = 2\n }\n string = string.toString()\n .replace(/&lt;/g, '<')\n .replace(/&gt;/g, '>')\n var OPTS = {\n 'ENT_NOQUOTES': 0,\n 'ENT_HTML_QUOTE_SINGLE': 1,\n 'ENT_HTML_QUOTE_DOUBLE': 2,\n 'ENT_COMPAT': 2,\n 'ENT_QUOTES': 3,\n 'ENT_IGNORE': 4\n }\n if (quoteStyle === 0) {\n noquotes = true\n }\n if (typeof quoteStyle !== 'number') {\n // Allow for a single string or an array of string flags\n quoteStyle = [].concat(quoteStyle)\n for (i = 0; i < quoteStyle.length; i++) {\n // Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4\n if (OPTS[quoteStyle[i]] === 0) {\n noquotes = true\n } else if (OPTS[quoteStyle[i]]) {\n optTemp = optTemp | OPTS[quoteStyle[i]]\n }\n }\n quoteStyle = optTemp\n }\n if (quoteStyle & OPTS.ENT_HTML_QUOTE_SINGLE) {\n // PHP doesn't currently escape if more than one 0, but it should:\n string = string.replace(/&#0*39;/g, \"'\")\n // This would also be useful here, but not a part of PHP:\n // string = string.replace(/&apos;|&#x0*27;/g, \"'\");\n }\n if (!noquotes) {\n string = string.replace(/&quot;/g, '\"')\n }\n // Put this in last place to avoid escape being double-decoded\n string = string.replace(/&amp;/g, '&')\n\n return string\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/implode.js b/node_modules/locutus/php/strings/implode.js
deleted file mode 100644
index 3bbcae3..0000000
--- a/node_modules/locutus/php/strings/implode.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function implode(glue, pieces) {
- // discuss at: http://locutus.io/php/implode/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Waldo Malqui Silva (http://waldo.malqui.info)
- // improved by: Itsacon (http://www.itsacon.net/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: implode(' ', ['Kevin', 'van', 'Zonneveld'])
- // returns 1: 'Kevin van Zonneveld'
- // example 2: implode(' ', {first:'Kevin', last: 'van Zonneveld'})
- // returns 2: 'Kevin van Zonneveld'
-
- var i = '';
- var retVal = '';
- var tGlue = '';
-
- if (arguments.length === 1) {
- pieces = glue;
- glue = '';
- }
-
- if ((typeof pieces === 'undefined' ? 'undefined' : _typeof(pieces)) === 'object') {
- if (Object.prototype.toString.call(pieces) === '[object Array]') {
- return pieces.join(glue);
- }
- for (i in pieces) {
- retVal += tGlue + pieces[i];
- tGlue = glue;
- }
- return retVal;
- }
-
- return pieces;
-};
-//# sourceMappingURL=implode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/implode.js.map b/node_modules/locutus/php/strings/implode.js.map
deleted file mode 100644
index 9e0b68f..0000000
--- a/node_modules/locutus/php/strings/implode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/implode.js"],"names":["module","exports","implode","glue","pieces","i","retVal","tGlue","arguments","length","Object","prototype","toString","call","join"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,IAAlB,EAAwBC,MAAxB,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,EAAR;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,QAAQ,EAAZ;;AAEA,MAAIC,UAAUC,MAAV,KAAqB,CAAzB,EAA4B;AAC1BL,aAASD,IAAT;AACAA,WAAO,EAAP;AACD;;AAED,MAAI,QAAOC,MAAP,yCAAOA,MAAP,OAAkB,QAAtB,EAAgC;AAC9B,QAAIM,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BT,MAA/B,MAA2C,gBAA/C,EAAiE;AAC/D,aAAOA,OAAOU,IAAP,CAAYX,IAAZ,CAAP;AACD;AACD,SAAKE,CAAL,IAAUD,MAAV,EAAkB;AAChBE,gBAAUC,QAAQH,OAAOC,CAAP,CAAlB;AACAE,cAAQJ,IAAR;AACD;AACD,WAAOG,MAAP;AACD;;AAED,SAAOF,MAAP;AACD,CAhCD","file":"implode.js","sourcesContent":["module.exports = function implode (glue, pieces) {\n // discuss at: http://locutus.io/php/implode/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Waldo Malqui Silva (http://waldo.malqui.info)\n // improved by: Itsacon (http://www.itsacon.net/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: implode(' ', ['Kevin', 'van', 'Zonneveld'])\n // returns 1: 'Kevin van Zonneveld'\n // example 2: implode(' ', {first:'Kevin', last: 'van Zonneveld'})\n // returns 2: 'Kevin van Zonneveld'\n\n var i = ''\n var retVal = ''\n var tGlue = ''\n\n if (arguments.length === 1) {\n pieces = glue\n glue = ''\n }\n\n if (typeof pieces === 'object') {\n if (Object.prototype.toString.call(pieces) === '[object Array]') {\n return pieces.join(glue)\n }\n for (i in pieces) {\n retVal += tGlue + pieces[i]\n tGlue = glue\n }\n return retVal\n }\n\n return pieces\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/index.js b/node_modules/locutus/php/strings/index.js
deleted file mode 100644
index c0c1a98..0000000
--- a/node_modules/locutus/php/strings/index.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-
-module.exports['addcslashes'] = require('./addcslashes');
-module.exports['addslashes'] = require('./addslashes');
-module.exports['bin2hex'] = require('./bin2hex');
-module.exports['chop'] = require('./chop');
-module.exports['chr'] = require('./chr');
-module.exports['chunk_split'] = require('./chunk_split');
-module.exports['convert_cyr_string'] = require('./convert_cyr_string');
-module.exports['convert_uuencode'] = require('./convert_uuencode');
-module.exports['count_chars'] = require('./count_chars');
-module.exports['crc32'] = require('./crc32');
-module.exports['echo'] = require('./echo');
-module.exports['explode'] = require('./explode');
-module.exports['get_html_translation_table'] = require('./get_html_translation_table');
-module.exports['hex2bin'] = require('./hex2bin');
-module.exports['html_entity_decode'] = require('./html_entity_decode');
-module.exports['htmlentities'] = require('./htmlentities');
-module.exports['htmlspecialchars'] = require('./htmlspecialchars');
-module.exports['htmlspecialchars_decode'] = require('./htmlspecialchars_decode');
-module.exports['implode'] = require('./implode');
-module.exports['join'] = require('./join');
-module.exports['lcfirst'] = require('./lcfirst');
-module.exports['levenshtein'] = require('./levenshtein');
-module.exports['localeconv'] = require('./localeconv');
-module.exports['ltrim'] = require('./ltrim');
-module.exports['md5'] = require('./md5');
-module.exports['md5_file'] = require('./md5_file');
-module.exports['metaphone'] = require('./metaphone');
-module.exports['money_format'] = require('./money_format');
-module.exports['nl2br'] = require('./nl2br');
-module.exports['nl_langinfo'] = require('./nl_langinfo');
-module.exports['number_format'] = require('./number_format');
-module.exports['ord'] = require('./ord');
-module.exports['parse_str'] = require('./parse_str');
-module.exports['printf'] = require('./printf');
-module.exports['quoted_printable_decode'] = require('./quoted_printable_decode');
-module.exports['quoted_printable_encode'] = require('./quoted_printable_encode');
-module.exports['quotemeta'] = require('./quotemeta');
-module.exports['rtrim'] = require('./rtrim');
-module.exports['setlocale'] = require('./setlocale');
-module.exports['sha1'] = require('./sha1');
-module.exports['sha1_file'] = require('./sha1_file');
-module.exports['similar_text'] = require('./similar_text');
-module.exports['soundex'] = require('./soundex');
-module.exports['split'] = require('./split');
-module.exports['sprintf'] = require('./sprintf');
-module.exports['sscanf'] = require('./sscanf');
-module.exports['str_getcsv'] = require('./str_getcsv');
-module.exports['str_ireplace'] = require('./str_ireplace');
-module.exports['str_pad'] = require('./str_pad');
-module.exports['str_repeat'] = require('./str_repeat');
-module.exports['str_replace'] = require('./str_replace');
-module.exports['str_rot13'] = require('./str_rot13');
-module.exports['str_shuffle'] = require('./str_shuffle');
-module.exports['str_split'] = require('./str_split');
-module.exports['str_word_count'] = require('./str_word_count');
-module.exports['strcasecmp'] = require('./strcasecmp');
-module.exports['strchr'] = require('./strchr');
-module.exports['strcmp'] = require('./strcmp');
-module.exports['strcoll'] = require('./strcoll');
-module.exports['strcspn'] = require('./strcspn');
-module.exports['strip_tags'] = require('./strip_tags');
-module.exports['stripos'] = require('./stripos');
-module.exports['stripslashes'] = require('./stripslashes');
-module.exports['stristr'] = require('./stristr');
-module.exports['strlen'] = require('./strlen');
-module.exports['strnatcasecmp'] = require('./strnatcasecmp');
-module.exports['strnatcmp'] = require('./strnatcmp');
-module.exports['strncasecmp'] = require('./strncasecmp');
-module.exports['strncmp'] = require('./strncmp');
-module.exports['strpbrk'] = require('./strpbrk');
-module.exports['strpos'] = require('./strpos');
-module.exports['strrchr'] = require('./strrchr');
-module.exports['strrev'] = require('./strrev');
-module.exports['strripos'] = require('./strripos');
-module.exports['strrpos'] = require('./strrpos');
-module.exports['strspn'] = require('./strspn');
-module.exports['strstr'] = require('./strstr');
-module.exports['strtok'] = require('./strtok');
-module.exports['strtolower'] = require('./strtolower');
-module.exports['strtoupper'] = require('./strtoupper');
-module.exports['strtr'] = require('./strtr');
-module.exports['substr'] = require('./substr');
-module.exports['substr_compare'] = require('./substr_compare');
-module.exports['substr_count'] = require('./substr_count');
-module.exports['substr_replace'] = require('./substr_replace');
-module.exports['trim'] = require('./trim');
-module.exports['ucfirst'] = require('./ucfirst');
-module.exports['ucwords'] = require('./ucwords');
-module.exports['vprintf'] = require('./vprintf');
-module.exports['vsprintf'] = require('./vsprintf');
-module.exports['wordwrap'] = require('./wordwrap');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/index.js.map b/node_modules/locutus/php/strings/index.js.map
deleted file mode 100644
index f61d55e..0000000
--- a/node_modules/locutus/php/strings/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,KAAf,IAAwBC,QAAQ,OAAR,CAAxB;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,oBAAf,IAAuCC,QAAQ,sBAAR,CAAvC;AACAF,OAAOC,OAAP,CAAe,kBAAf,IAAqCC,QAAQ,oBAAR,CAArC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,4BAAf,IAA+CC,QAAQ,8BAAR,CAA/C;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,oBAAf,IAAuCC,QAAQ,sBAAR,CAAvC;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC;AACAF,OAAOC,OAAP,CAAe,kBAAf,IAAqCC,QAAQ,oBAAR,CAArC;AACAF,OAAOC,OAAP,CAAe,yBAAf,IAA4CC,QAAQ,2BAAR,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,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC;AACAF,OAAOC,OAAP,CAAe,gBAAf,IAAmCC,QAAQ,kBAAR,CAAnC;AACAF,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B","file":"index.js","sourcesContent":["module.exports['addcslashes'] = require('./addcslashes')\nmodule.exports['addslashes'] = require('./addslashes')\nmodule.exports['bin2hex'] = require('./bin2hex')\nmodule.exports['chop'] = require('./chop')\nmodule.exports['chr'] = require('./chr')\nmodule.exports['chunk_split'] = require('./chunk_split')\nmodule.exports['convert_cyr_string'] = require('./convert_cyr_string')\nmodule.exports['convert_uuencode'] = require('./convert_uuencode')\nmodule.exports['count_chars'] = require('./count_chars')\nmodule.exports['crc32'] = require('./crc32')\nmodule.exports['echo'] = require('./echo')\nmodule.exports['explode'] = require('./explode')\nmodule.exports['get_html_translation_table'] = require('./get_html_translation_table')\nmodule.exports['hex2bin'] = require('./hex2bin')\nmodule.exports['html_entity_decode'] = require('./html_entity_decode')\nmodule.exports['htmlentities'] = require('./htmlentities')\nmodule.exports['htmlspecialchars'] = require('./htmlspecialchars')\nmodule.exports['htmlspecialchars_decode'] = require('./htmlspecialchars_decode')\nmodule.exports['implode'] = require('./implode')\nmodule.exports['join'] = require('./join')\nmodule.exports['lcfirst'] = require('./lcfirst')\nmodule.exports['levenshtein'] = require('./levenshtein')\nmodule.exports['localeconv'] = require('./localeconv')\nmodule.exports['ltrim'] = require('./ltrim')\nmodule.exports['md5'] = require('./md5')\nmodule.exports['md5_file'] = require('./md5_file')\nmodule.exports['metaphone'] = require('./metaphone')\nmodule.exports['money_format'] = require('./money_format')\nmodule.exports['nl2br'] = require('./nl2br')\nmodule.exports['nl_langinfo'] = require('./nl_langinfo')\nmodule.exports['number_format'] = require('./number_format')\nmodule.exports['ord'] = require('./ord')\nmodule.exports['parse_str'] = require('./parse_str')\nmodule.exports['printf'] = require('./printf')\nmodule.exports['quoted_printable_decode'] = require('./quoted_printable_decode')\nmodule.exports['quoted_printable_encode'] = require('./quoted_printable_encode')\nmodule.exports['quotemeta'] = require('./quotemeta')\nmodule.exports['rtrim'] = require('./rtrim')\nmodule.exports['setlocale'] = require('./setlocale')\nmodule.exports['sha1'] = require('./sha1')\nmodule.exports['sha1_file'] = require('./sha1_file')\nmodule.exports['similar_text'] = require('./similar_text')\nmodule.exports['soundex'] = require('./soundex')\nmodule.exports['split'] = require('./split')\nmodule.exports['sprintf'] = require('./sprintf')\nmodule.exports['sscanf'] = require('./sscanf')\nmodule.exports['str_getcsv'] = require('./str_getcsv')\nmodule.exports['str_ireplace'] = require('./str_ireplace')\nmodule.exports['str_pad'] = require('./str_pad')\nmodule.exports['str_repeat'] = require('./str_repeat')\nmodule.exports['str_replace'] = require('./str_replace')\nmodule.exports['str_rot13'] = require('./str_rot13')\nmodule.exports['str_shuffle'] = require('./str_shuffle')\nmodule.exports['str_split'] = require('./str_split')\nmodule.exports['str_word_count'] = require('./str_word_count')\nmodule.exports['strcasecmp'] = require('./strcasecmp')\nmodule.exports['strchr'] = require('./strchr')\nmodule.exports['strcmp'] = require('./strcmp')\nmodule.exports['strcoll'] = require('./strcoll')\nmodule.exports['strcspn'] = require('./strcspn')\nmodule.exports['strip_tags'] = require('./strip_tags')\nmodule.exports['stripos'] = require('./stripos')\nmodule.exports['stripslashes'] = require('./stripslashes')\nmodule.exports['stristr'] = require('./stristr')\nmodule.exports['strlen'] = require('./strlen')\nmodule.exports['strnatcasecmp'] = require('./strnatcasecmp')\nmodule.exports['strnatcmp'] = require('./strnatcmp')\nmodule.exports['strncasecmp'] = require('./strncasecmp')\nmodule.exports['strncmp'] = require('./strncmp')\nmodule.exports['strpbrk'] = require('./strpbrk')\nmodule.exports['strpos'] = require('./strpos')\nmodule.exports['strrchr'] = require('./strrchr')\nmodule.exports['strrev'] = require('./strrev')\nmodule.exports['strripos'] = require('./strripos')\nmodule.exports['strrpos'] = require('./strrpos')\nmodule.exports['strspn'] = require('./strspn')\nmodule.exports['strstr'] = require('./strstr')\nmodule.exports['strtok'] = require('./strtok')\nmodule.exports['strtolower'] = require('./strtolower')\nmodule.exports['strtoupper'] = require('./strtoupper')\nmodule.exports['strtr'] = require('./strtr')\nmodule.exports['substr'] = require('./substr')\nmodule.exports['substr_compare'] = require('./substr_compare')\nmodule.exports['substr_count'] = require('./substr_count')\nmodule.exports['substr_replace'] = require('./substr_replace')\nmodule.exports['trim'] = require('./trim')\nmodule.exports['ucfirst'] = require('./ucfirst')\nmodule.exports['ucwords'] = require('./ucwords')\nmodule.exports['vprintf'] = require('./vprintf')\nmodule.exports['vsprintf'] = require('./vsprintf')\nmodule.exports['wordwrap'] = require('./wordwrap')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/join.js b/node_modules/locutus/php/strings/join.js
deleted file mode 100644
index f0e8718..0000000
--- a/node_modules/locutus/php/strings/join.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function join(glue, pieces) {
- // discuss at: http://locutus.io/php/join/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: join(' ', ['Kevin', 'van', 'Zonneveld'])
- // returns 1: 'Kevin van Zonneveld'
-
- var implode = require('../strings/implode');
- return implode(glue, pieces);
-};
-//# sourceMappingURL=join.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/join.js.map b/node_modules/locutus/php/strings/join.js.map
deleted file mode 100644
index 91d5d71..0000000
--- a/node_modules/locutus/php/strings/join.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/join.js"],"names":["module","exports","join","glue","pieces","implode","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,IAAf,EAAqBC,MAArB,EAA6B;AAC5C;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,oBAAR,CAAd;AACA,SAAOD,QAAQF,IAAR,EAAcC,MAAd,CAAP;AACD,CARD","file":"join.js","sourcesContent":["module.exports = function join (glue, pieces) {\n // discuss at: http://locutus.io/php/join/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: join(' ', ['Kevin', 'van', 'Zonneveld'])\n // returns 1: 'Kevin van Zonneveld'\n\n var implode = require('../strings/implode')\n return implode(glue, pieces)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/lcfirst.js b/node_modules/locutus/php/strings/lcfirst.js
deleted file mode 100644
index ea8df57..0000000
--- a/node_modules/locutus/php/strings/lcfirst.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function lcfirst(str) {
- // discuss at: http://locutus.io/php/lcfirst/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: lcfirst('Kevin Van Zonneveld')
- // returns 1: 'kevin Van Zonneveld'
-
- str += '';
- var f = str.charAt(0).toLowerCase();
- return f + str.substr(1);
-};
-//# sourceMappingURL=lcfirst.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/lcfirst.js.map b/node_modules/locutus/php/strings/lcfirst.js.map
deleted file mode 100644
index a3508d1..0000000
--- a/node_modules/locutus/php/strings/lcfirst.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/lcfirst.js"],"names":["module","exports","lcfirst","str","f","charAt","toLowerCase","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuB;AACtC;AACA;AACA;AACA;;AAEAA,SAAO,EAAP;AACA,MAAIC,IAAID,IAAIE,MAAJ,CAAW,CAAX,EACLC,WADK,EAAR;AAEA,SAAOF,IAAID,IAAII,MAAJ,CAAW,CAAX,CAAX;AACD,CAVD","file":"lcfirst.js","sourcesContent":["module.exports = function lcfirst (str) {\n // discuss at: http://locutus.io/php/lcfirst/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: lcfirst('Kevin Van Zonneveld')\n // returns 1: 'kevin Van Zonneveld'\n\n str += ''\n var f = str.charAt(0)\n .toLowerCase()\n return f + str.substr(1)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/levenshtein.js b/node_modules/locutus/php/strings/levenshtein.js
deleted file mode 100644
index 6725f0e..0000000
--- a/node_modules/locutus/php/strings/levenshtein.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-
-module.exports = function levenshtein(s1, s2, costIns, costRep, costDel) {
- // discuss at: http://locutus.io/php/levenshtein/
- // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Andrea Giammarchi (http://webreflection.blogspot.com)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // reimplemented by: Alexander M Beedie
- // reimplemented by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: levenshtein('Kevin van Zonneveld', 'Kevin van Sommeveld')
- // returns 1: 3
- // example 2: levenshtein("carrrot", "carrots")
- // returns 2: 2
- // example 3: levenshtein("carrrot", "carrots", 2, 3, 4)
- // returns 3: 6
-
- // var LEVENSHTEIN_MAX_LENGTH = 255 // PHP limits the function to max 255 character-long strings
-
- costIns = costIns == null ? 1 : +costIns;
- costRep = costRep == null ? 1 : +costRep;
- costDel = costDel == null ? 1 : +costDel;
-
- if (s1 === s2) {
- return 0;
- }
-
- var l1 = s1.length;
- var l2 = s2.length;
-
- if (l1 === 0) {
- return l2 * costIns;
- }
- if (l2 === 0) {
- return l1 * costDel;
- }
-
- // Enable the 3 lines below to set the same limits on string length as PHP does
- // if (l1 > LEVENSHTEIN_MAX_LENGTH || l2 > LEVENSHTEIN_MAX_LENGTH) {
- // return -1;
- // }
-
- var split = false;
- try {
- split = !'0'[0];
- } catch (e) {
- // Earlier IE may not support access by string index
- split = true;
- }
-
- if (split) {
- s1 = s1.split('');
- s2 = s2.split('');
- }
-
- var p1 = new Array(l2 + 1);
- var p2 = new Array(l2 + 1);
-
- var i1, i2, c0, c1, c2, tmp;
-
- for (i2 = 0; i2 <= l2; i2++) {
- p1[i2] = i2 * costIns;
- }
-
- for (i1 = 0; i1 < l1; i1++) {
- p2[0] = p1[0] + costDel;
-
- for (i2 = 0; i2 < l2; i2++) {
- c0 = p1[i2] + (s1[i1] === s2[i2] ? 0 : costRep);
- c1 = p1[i2 + 1] + costDel;
-
- if (c1 < c0) {
- c0 = c1;
- }
-
- c2 = p2[i2] + costIns;
-
- if (c2 < c0) {
- c0 = c2;
- }
-
- p2[i2 + 1] = c0;
- }
-
- tmp = p1;
- p1 = p2;
- p2 = tmp;
- }
-
- c0 = p1[l2];
-
- return c0;
-};
-//# sourceMappingURL=levenshtein.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/levenshtein.js.map b/node_modules/locutus/php/strings/levenshtein.js.map
deleted file mode 100644
index d7149c4..0000000
--- a/node_modules/locutus/php/strings/levenshtein.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/levenshtein.js"],"names":["module","exports","levenshtein","s1","s2","costIns","costRep","costDel","l1","length","l2","split","e","p1","Array","p2","i1","i2","c0","c1","c2","tmp"],"mappings":";;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KAAKZ,OAAd;AACD;;AAED,OAAKW,KAAK,CAAV,EAAaA,KAAKR,EAAlB,EAAsBQ,IAAtB,EAA4B;AAC1BD,OAAG,CAAH,IAAQF,GAAG,CAAH,IAAQN,OAAhB;;AAEA,SAAKU,KAAK,CAAV,EAAaA,KAAKP,EAAlB,EAAsBO,IAAtB,EAA4B;AAC1BC,WAAKL,GAAGI,EAAH,KAAWd,GAAGa,EAAH,MAAWZ,GAAGa,EAAH,CAAZ,GAAsB,CAAtB,GAA0BX,OAApC,CAAL;AACAa,WAAKN,GAAGI,KAAK,CAAR,IAAaV,OAAlB;;AAEA,UAAIY,KAAKD,EAAT,EAAa;AACXA,aAAKC,EAAL;AACD;;AAEDC,WAAKL,GAAGE,EAAH,IAASZ,OAAd;;AAEA,UAAIe,KAAKF,EAAT,EAAa;AACXA,aAAKE,EAAL;AACD;;AAEDL,SAAGE,KAAK,CAAR,IAAaC,EAAb;AACD;;AAEDG,UAAMR,EAAN;AACAA,SAAKE,EAAL;AACAA,SAAKM,GAAL;AACD;;AAEDH,OAAKL,GAAGH,EAAH,CAAL;;AAEA,SAAOQ,EAAP;AACD,CA1FD","file":"levenshtein.js","sourcesContent":["module.exports = function levenshtein (s1, s2, costIns, costRep, costDel) {\n // discuss at: http://locutus.io/php/levenshtein/\n // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: Andrea Giammarchi (http://webreflection.blogspot.com)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // reimplemented by: Alexander M Beedie\n // reimplemented by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: levenshtein('Kevin van Zonneveld', 'Kevin van Sommeveld')\n // returns 1: 3\n // example 2: levenshtein(\"carrrot\", \"carrots\")\n // returns 2: 2\n // example 3: levenshtein(\"carrrot\", \"carrots\", 2, 3, 4)\n // returns 3: 6\n\n // var LEVENSHTEIN_MAX_LENGTH = 255 // PHP limits the function to max 255 character-long strings\n\n costIns = costIns == null ? 1 : +costIns\n costRep = costRep == null ? 1 : +costRep\n costDel = costDel == null ? 1 : +costDel\n\n if (s1 === s2) {\n return 0\n }\n\n var l1 = s1.length\n var l2 = s2.length\n\n if (l1 === 0) {\n return l2 * costIns\n }\n if (l2 === 0) {\n return l1 * costDel\n }\n\n // Enable the 3 lines below to set the same limits on string length as PHP does\n // if (l1 > LEVENSHTEIN_MAX_LENGTH || l2 > LEVENSHTEIN_MAX_LENGTH) {\n // return -1;\n // }\n\n var split = false\n try {\n split = !('0')[0]\n } catch (e) {\n // Earlier IE may not support access by string index\n split = true\n }\n\n if (split) {\n s1 = s1.split('')\n s2 = s2.split('')\n }\n\n var p1 = new Array(l2 + 1)\n var p2 = new Array(l2 + 1)\n\n var i1, i2, c0, c1, c2, tmp\n\n for (i2 = 0; i2 <= l2; i2++) {\n p1[i2] = i2 * costIns\n }\n\n for (i1 = 0; i1 < l1; i1++) {\n p2[0] = p1[0] + costDel\n\n for (i2 = 0; i2 < l2; i2++) {\n c0 = p1[i2] + ((s1[i1] === s2[i2]) ? 0 : costRep)\n c1 = p1[i2 + 1] + costDel\n\n if (c1 < c0) {\n c0 = c1\n }\n\n c2 = p2[i2] + costIns\n\n if (c2 < c0) {\n c0 = c2\n }\n\n p2[i2 + 1] = c0\n }\n\n tmp = p1\n p1 = p2\n p2 = tmp\n }\n\n c0 = p1[l2]\n\n return c0\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/localeconv.js b/node_modules/locutus/php/strings/localeconv.js
deleted file mode 100644
index f61c25b..0000000
--- a/node_modules/locutus/php/strings/localeconv.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-module.exports = function localeconv() {
- // discuss at: http://locutus.io/php/localeconv/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: setlocale('LC_ALL', 'en_US')
- // example 1: localeconv()
- // returns 1: {decimal_point: '.', thousands_sep: '', positive_sign: '', negative_sign: '-', int_frac_digits: 2, frac_digits: 2, p_cs_precedes: 1, p_sep_by_space: 0, n_cs_precedes: 1, n_sep_by_space: 0, p_sign_posn: 1, n_sign_posn: 1, grouping: [], int_curr_symbol: 'USD ', currency_symbol: '$', mon_decimal_point: '.', mon_thousands_sep: ',', mon_grouping: [3, 3]}
-
- var setlocale = require('../strings/setlocale');
-
- var arr = {};
- var prop = '';
-
- // ensure setup of localization variables takes place, if not already
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- // Make copies
- for (prop in $locutus.php.locales[$locutus.php.localeCategories.LC_NUMERIC].LC_NUMERIC) {
- arr[prop] = $locutus.php.locales[$locutus.php.localeCategories.LC_NUMERIC].LC_NUMERIC[prop];
- }
- for (prop in $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY].LC_MONETARY) {
- arr[prop] = $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY].LC_MONETARY[prop];
- }
-
- return arr;
-};
-//# sourceMappingURL=localeconv.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/localeconv.js.map b/node_modules/locutus/php/strings/localeconv.js.map
deleted file mode 100644
index a63abcb..0000000
--- a/node_modules/locutus/php/strings/localeconv.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/localeconv.js"],"names":["module","exports","localeconv","setlocale","require","arr","prop","$global","window","global","$locutus","php","locales","localeCategories","LC_NUMERIC","LC_MONETARY"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,GAAuB;AACtC;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEA,MAAIC,MAAM,EAAV;AACA,MAAIC,OAAO,EAAX;;AAEA;AACAH,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAII,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA;AACA,OAAKL,IAAL,IAAaI,SAASC,GAAT,CAAaC,OAAb,CAAqBF,SAASC,GAAT,CAAaE,gBAAb,CAA8BC,UAAnD,EAA+DA,UAA5E,EAAwF;AACtFT,QAAIC,IAAJ,IAAYI,SAASC,GAAT,CAAaC,OAAb,CAAqBF,SAASC,GAAT,CAAaE,gBAAb,CAA8BC,UAAnD,EAA+DA,UAA/D,CAA0ER,IAA1E,CAAZ;AACD;AACD,OAAKA,IAAL,IAAaI,SAASC,GAAT,CAAaC,OAAb,CAAqBF,SAASC,GAAT,CAAaE,gBAAb,CAA8BE,WAAnD,EAAgEA,WAA7E,EAA0F;AACxFV,QAAIC,IAAJ,IAAYI,SAASC,GAAT,CAAaC,OAAb,CAAqBF,SAASC,GAAT,CAAaE,gBAAb,CAA8BE,WAAnD,EAAgEA,WAAhE,CAA4ET,IAA5E,CAAZ;AACD;;AAED,SAAOD,GAAP;AACD,CA7BD","file":"localeconv.js","sourcesContent":["module.exports = function localeconv () {\n // discuss at: http://locutus.io/php/localeconv/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: setlocale('LC_ALL', 'en_US')\n // example 1: localeconv()\n // returns 1: {decimal_point: '.', thousands_sep: '', positive_sign: '', negative_sign: '-', int_frac_digits: 2, frac_digits: 2, p_cs_precedes: 1, p_sep_by_space: 0, n_cs_precedes: 1, n_sep_by_space: 0, p_sign_posn: 1, n_sign_posn: 1, grouping: [], int_curr_symbol: 'USD ', currency_symbol: '$', mon_decimal_point: '.', mon_thousands_sep: ',', mon_grouping: [3, 3]}\n\n var setlocale = require('../strings/setlocale')\n\n var arr = {}\n var prop = ''\n\n // ensure setup of localization variables takes place, if not already\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n // Make copies\n for (prop in $locutus.php.locales[$locutus.php.localeCategories.LC_NUMERIC].LC_NUMERIC) {\n arr[prop] = $locutus.php.locales[$locutus.php.localeCategories.LC_NUMERIC].LC_NUMERIC[prop]\n }\n for (prop in $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY].LC_MONETARY) {\n arr[prop] = $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY].LC_MONETARY[prop]\n }\n\n return arr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ltrim.js b/node_modules/locutus/php/strings/ltrim.js
deleted file mode 100644
index f47b69c..0000000
--- a/node_modules/locutus/php/strings/ltrim.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function ltrim(str, charlist) {
- // discuss at: http://locutus.io/php/ltrim/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: Erkekjetter
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: ltrim(' Kevin van Zonneveld ')
- // returns 1: 'Kevin van Zonneveld '
-
- charlist = !charlist ? ' \\s\xA0' : (charlist + '').replace(/([[\]().?/*{}+$^:])/g, '$1');
-
- var re = new RegExp('^[' + charlist + ']+', 'g');
-
- return (str + '').replace(re, '');
-};
-//# sourceMappingURL=ltrim.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ltrim.js.map b/node_modules/locutus/php/strings/ltrim.js.map
deleted file mode 100644
index ad7f2f5..0000000
--- a/node_modules/locutus/php/strings/ltrim.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/ltrim.js"],"names":["module","exports","ltrim","str","charlist","replace","re","RegExp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,QAArB,EAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,aAAW,CAACA,QAAD,GAAY,UAAZ,GAA2B,CAACA,WAAW,EAAZ,EACnCC,OADmC,CAC3B,sBAD2B,EACH,IADG,CAAtC;;AAGA,MAAIC,KAAK,IAAIC,MAAJ,CAAW,OAAOH,QAAP,GAAkB,IAA7B,EAAmC,GAAnC,CAAT;;AAEA,SAAO,CAACD,MAAM,EAAP,EACJE,OADI,CACIC,EADJ,EACQ,EADR,CAAP;AAED,CAhBD","file":"ltrim.js","sourcesContent":["module.exports = function ltrim (str, charlist) {\n // discuss at: http://locutus.io/php/ltrim/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: Erkekjetter\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: ltrim(' Kevin van Zonneveld ')\n // returns 1: 'Kevin van Zonneveld '\n\n charlist = !charlist ? ' \\\\s\\u00A0' : (charlist + '')\n .replace(/([[\\]().?/*{}+$^:])/g, '$1')\n\n var re = new RegExp('^[' + charlist + ']+', 'g')\n\n return (str + '')\n .replace(re, '')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/md5.js b/node_modules/locutus/php/strings/md5.js
deleted file mode 100644
index 5a77bfc..0000000
--- a/node_modules/locutus/php/strings/md5.js
+++ /dev/null
@@ -1,243 +0,0 @@
-'use strict';
-
-module.exports = function md5(str) {
- // discuss at: http://locutus.io/php/md5/
- // original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // improved by: Michael White (http://getsprink.com)
- // improved by: Jack
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // note 1: Keep in mind that in accordance with PHP, the whole string is buffered and then
- // note 1: hashed. If available, we'd recommend using Node's native crypto modules directly
- // note 1: in a steaming fashion for faster and more efficient hashing
- // example 1: md5('Kevin van Zonneveld')
- // returns 1: '6e658d4bfcb59cc13f96c14450ac40b9'
-
- var hash;
- try {
- var crypto = require('crypto');
- var md5sum = crypto.createHash('md5');
- md5sum.update(str);
- hash = md5sum.digest('hex');
- } catch (e) {
- hash = undefined;
- }
-
- if (hash !== undefined) {
- return hash;
- }
-
- var utf8Encode = require('../xml/utf8_encode');
- var xl;
-
- var _rotateLeft = function _rotateLeft(lValue, iShiftBits) {
- return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
- };
-
- var _addUnsigned = function _addUnsigned(lX, lY) {
- var lX4, lY4, lX8, lY8, lResult;
- lX8 = lX & 0x80000000;
- lY8 = lY & 0x80000000;
- lX4 = lX & 0x40000000;
- lY4 = lY & 0x40000000;
- lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
- if (lX4 & lY4) {
- return lResult ^ 0x80000000 ^ lX8 ^ lY8;
- }
- if (lX4 | lY4) {
- if (lResult & 0x40000000) {
- return lResult ^ 0xC0000000 ^ lX8 ^ lY8;
- } else {
- return lResult ^ 0x40000000 ^ lX8 ^ lY8;
- }
- } else {
- return lResult ^ lX8 ^ lY8;
- }
- };
-
- var _F = function _F(x, y, z) {
- return x & y | ~x & z;
- };
- var _G = function _G(x, y, z) {
- return x & z | y & ~z;
- };
- var _H = function _H(x, y, z) {
- return x ^ y ^ z;
- };
- var _I = function _I(x, y, z) {
- return y ^ (x | ~z);
- };
-
- var _FF = function _FF(a, b, c, d, x, s, ac) {
- a = _addUnsigned(a, _addUnsigned(_addUnsigned(_F(b, c, d), x), ac));
- return _addUnsigned(_rotateLeft(a, s), b);
- };
-
- var _GG = function _GG(a, b, c, d, x, s, ac) {
- a = _addUnsigned(a, _addUnsigned(_addUnsigned(_G(b, c, d), x), ac));
- return _addUnsigned(_rotateLeft(a, s), b);
- };
-
- var _HH = function _HH(a, b, c, d, x, s, ac) {
- a = _addUnsigned(a, _addUnsigned(_addUnsigned(_H(b, c, d), x), ac));
- return _addUnsigned(_rotateLeft(a, s), b);
- };
-
- var _II = function _II(a, b, c, d, x, s, ac) {
- a = _addUnsigned(a, _addUnsigned(_addUnsigned(_I(b, c, d), x), ac));
- return _addUnsigned(_rotateLeft(a, s), b);
- };
-
- var _convertToWordArray = function _convertToWordArray(str) {
- var lWordCount;
- var lMessageLength = str.length;
- var lNumberOfWordsTemp1 = lMessageLength + 8;
- var lNumberOfWordsTemp2 = (lNumberOfWordsTemp1 - lNumberOfWordsTemp1 % 64) / 64;
- var lNumberOfWords = (lNumberOfWordsTemp2 + 1) * 16;
- var lWordArray = new Array(lNumberOfWords - 1);
- var lBytePosition = 0;
- var lByteCount = 0;
- while (lByteCount < lMessageLength) {
- lWordCount = (lByteCount - lByteCount % 4) / 4;
- lBytePosition = lByteCount % 4 * 8;
- lWordArray[lWordCount] = lWordArray[lWordCount] | str.charCodeAt(lByteCount) << lBytePosition;
- lByteCount++;
- }
- lWordCount = (lByteCount - lByteCount % 4) / 4;
- lBytePosition = lByteCount % 4 * 8;
- lWordArray[lWordCount] = lWordArray[lWordCount] | 0x80 << lBytePosition;
- lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
- lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
- return lWordArray;
- };
-
- var _wordToHex = function _wordToHex(lValue) {
- var wordToHexValue = '';
- var wordToHexValueTemp = '';
- var lByte;
- var lCount;
-
- for (lCount = 0; lCount <= 3; lCount++) {
- lByte = lValue >>> lCount * 8 & 255;
- wordToHexValueTemp = '0' + lByte.toString(16);
- wordToHexValue = wordToHexValue + wordToHexValueTemp.substr(wordToHexValueTemp.length - 2, 2);
- }
- return wordToHexValue;
- };
-
- var x = [];
- var k;
- var AA;
- var BB;
- var CC;
- var DD;
- var a;
- var b;
- var c;
- var d;
- var S11 = 7;
- var S12 = 12;
- var S13 = 17;
- var S14 = 22;
- var S21 = 5;
- var S22 = 9;
- var S23 = 14;
- var S24 = 20;
- var S31 = 4;
- var S32 = 11;
- var S33 = 16;
- var S34 = 23;
- var S41 = 6;
- var S42 = 10;
- var S43 = 15;
- var S44 = 21;
-
- str = utf8Encode(str);
- x = _convertToWordArray(str);
- a = 0x67452301;
- b = 0xEFCDAB89;
- c = 0x98BADCFE;
- d = 0x10325476;
-
- xl = x.length;
- for (k = 0; k < xl; k += 16) {
- AA = a;
- BB = b;
- CC = c;
- DD = d;
- a = _FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
- d = _FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
- c = _FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
- b = _FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
- a = _FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
- d = _FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
- c = _FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
- b = _FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
- a = _FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
- d = _FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
- c = _FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
- b = _FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
- a = _FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
- d = _FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
- c = _FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
- b = _FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
- a = _GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
- d = _GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
- c = _GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
- b = _GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
- a = _GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
- d = _GG(d, a, b, c, x[k + 10], S22, 0x2441453);
- c = _GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
- b = _GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
- a = _GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
- d = _GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
- c = _GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
- b = _GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
- a = _GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
- d = _GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
- c = _GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
- b = _GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
- a = _HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
- d = _HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
- c = _HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
- b = _HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
- a = _HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
- d = _HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
- c = _HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
- b = _HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
- a = _HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
- d = _HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
- c = _HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
- b = _HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
- a = _HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
- d = _HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
- c = _HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
- b = _HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
- a = _II(a, b, c, d, x[k + 0], S41, 0xF4292244);
- d = _II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
- c = _II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
- b = _II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
- a = _II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
- d = _II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
- c = _II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
- b = _II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
- a = _II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
- d = _II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
- c = _II(c, d, a, b, x[k + 6], S43, 0xA3014314);
- b = _II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
- a = _II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
- d = _II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
- c = _II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
- b = _II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
- a = _addUnsigned(a, AA);
- b = _addUnsigned(b, BB);
- c = _addUnsigned(c, CC);
- d = _addUnsigned(d, DD);
- }
-
- var temp = _wordToHex(a) + _wordToHex(b) + _wordToHex(c) + _wordToHex(d);
-
- return temp.toLowerCase();
-};
-//# sourceMappingURL=md5.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/md5.js.map b/node_modules/locutus/php/strings/md5.js.map
deleted file mode 100644
index 2190d9a..0000000
--- a/node_modules/locutus/php/strings/md5.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/md5.js"],"names":["module","exports","md5","str","hash","crypto","require","md5sum","createHash","update","digest","e","undefined","utf8Encode","xl","_rotateLeft","lValue","iShiftBits","_addUnsigned","lX","lY","lX4","lY4","lX8","lY8","lResult","_F","x","y","z","_G","_H","_I","_FF","a","b","c","d","s","ac","_GG","_HH","_II","_convertToWordArray","lWordCount","lMessageLength","length","lNumberOfWordsTemp1","lNumberOfWordsTemp2","lNumberOfWords","lWordArray","Array","lBytePosition","lByteCount","charCodeAt","_wordToHex","wordToHexValue","wordToHexValueTemp","lByte","lCount","toString","substr","k","AA","BB","CC","DD","S11","S12","S13","S14","S21","S22","S23","S24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EAAOC,CAAP,EAAUC,CAAV,EAAaH,CAAb,EAAgBP,EAAEmC,IAAI,CAAN,CAAhB,EAA0BoB,GAA1B,EAA+B,UAA/B,CAAJ;AACAhD,QAAIhB,aAAagB,CAAb,EAAgB6B,EAAhB,CAAJ;AACA5B,QAAIjB,aAAaiB,CAAb,EAAgB6B,EAAhB,CAAJ;AACA5B,QAAIlB,aAAakB,CAAb,EAAgB6B,EAAhB,CAAJ;AACA5B,QAAInB,aAAamB,CAAb,EAAgB6B,EAAhB,CAAJ;AACD;;AAED,MAAIiB,OAAO5B,WAAWrB,CAAX,IAAgBqB,WAAWpB,CAAX,CAAhB,GAAgCoB,WAAWnB,CAAX,CAAhC,GAAgDmB,WAAWlB,CAAX,CAA3D;;AAEA,SAAO8C,KAAKC,WAAL,EAAP;AACD,CAhPD","file":"md5.js","sourcesContent":["module.exports = function md5 (str) {\n // discuss at: http://locutus.io/php/md5/\n // original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // improved by: Michael White (http://getsprink.com)\n // improved by: Jack\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // note 1: Keep in mind that in accordance with PHP, the whole string is buffered and then\n // note 1: hashed. If available, we'd recommend using Node's native crypto modules directly\n // note 1: in a steaming fashion for faster and more efficient hashing\n // example 1: md5('Kevin van Zonneveld')\n // returns 1: '6e658d4bfcb59cc13f96c14450ac40b9'\n\n var hash\n try {\n var crypto = require('crypto')\n var md5sum = crypto.createHash('md5')\n md5sum.update(str)\n hash = md5sum.digest('hex')\n } catch (e) {\n hash = undefined\n }\n\n if (hash !== undefined) {\n return hash\n }\n\n var utf8Encode = require('../xml/utf8_encode')\n var xl\n\n var _rotateLeft = function (lValue, iShiftBits) {\n return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits))\n }\n\n var _addUnsigned = function (lX, lY) {\n var lX4, lY4, lX8, lY8, lResult\n lX8 = (lX & 0x80000000)\n lY8 = (lY & 0x80000000)\n lX4 = (lX & 0x40000000)\n lY4 = (lY & 0x40000000)\n lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF)\n if (lX4 & lY4) {\n return (lResult ^ 0x80000000 ^ lX8 ^ lY8)\n }\n if (lX4 | lY4) {\n if (lResult & 0x40000000) {\n return (lResult ^ 0xC0000000 ^ lX8 ^ lY8)\n } else {\n return (lResult ^ 0x40000000 ^ lX8 ^ lY8)\n }\n } else {\n return (lResult ^ lX8 ^ lY8)\n }\n }\n\n var _F = function (x, y, z) {\n return (x & y) | ((~x) & z)\n }\n var _G = function (x, y, z) {\n return (x & z) | (y & (~z))\n }\n var _H = function (x, y, z) {\n return (x ^ y ^ z)\n }\n var _I = function (x, y, z) {\n return (y ^ (x | (~z)))\n }\n\n var _FF = function (a, b, c, d, x, s, ac) {\n a = _addUnsigned(a, _addUnsigned(_addUnsigned(_F(b, c, d), x), ac))\n return _addUnsigned(_rotateLeft(a, s), b)\n }\n\n var _GG = function (a, b, c, d, x, s, ac) {\n a = _addUnsigned(a, _addUnsigned(_addUnsigned(_G(b, c, d), x), ac))\n return _addUnsigned(_rotateLeft(a, s), b)\n }\n\n var _HH = function (a, b, c, d, x, s, ac) {\n a = _addUnsigned(a, _addUnsigned(_addUnsigned(_H(b, c, d), x), ac))\n return _addUnsigned(_rotateLeft(a, s), b)\n }\n\n var _II = function (a, b, c, d, x, s, ac) {\n a = _addUnsigned(a, _addUnsigned(_addUnsigned(_I(b, c, d), x), ac))\n return _addUnsigned(_rotateLeft(a, s), b)\n }\n\n var _convertToWordArray = function (str) {\n var lWordCount\n var lMessageLength = str.length\n var lNumberOfWordsTemp1 = lMessageLength + 8\n var lNumberOfWordsTemp2 = (lNumberOfWordsTemp1 - (lNumberOfWordsTemp1 % 64)) / 64\n var lNumberOfWords = (lNumberOfWordsTemp2 + 1) * 16\n var lWordArray = new Array(lNumberOfWords - 1)\n var lBytePosition = 0\n var lByteCount = 0\n while (lByteCount < lMessageLength) {\n lWordCount = (lByteCount - (lByteCount % 4)) / 4\n lBytePosition = (lByteCount % 4) * 8\n lWordArray[lWordCount] = (lWordArray[lWordCount] |\n (str.charCodeAt(lByteCount) << lBytePosition))\n lByteCount++\n }\n lWordCount = (lByteCount - (lByteCount % 4)) / 4\n lBytePosition = (lByteCount % 4) * 8\n lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition)\n lWordArray[lNumberOfWords - 2] = lMessageLength << 3\n lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29\n return lWordArray\n }\n\n var _wordToHex = function (lValue) {\n var wordToHexValue = ''\n var wordToHexValueTemp = ''\n var lByte\n var lCount\n\n for (lCount = 0; lCount <= 3; lCount++) {\n lByte = (lValue >>> (lCount * 8)) & 255\n wordToHexValueTemp = '0' + lByte.toString(16)\n wordToHexValue = wordToHexValue + wordToHexValueTemp.substr(wordToHexValueTemp.length - 2, 2)\n }\n return wordToHexValue\n }\n\n var x = []\n var k\n var AA\n var BB\n var CC\n var DD\n var a\n var b\n var c\n var d\n var S11 = 7\n var S12 = 12\n var S13 = 17\n var S14 = 22\n var S21 = 5\n var S22 = 9\n var S23 = 14\n var S24 = 20\n var S31 = 4\n var S32 = 11\n var S33 = 16\n var S34 = 23\n var S41 = 6\n var S42 = 10\n var S43 = 15\n var S44 = 21\n\n str = utf8Encode(str)\n x = _convertToWordArray(str)\n a = 0x67452301\n b = 0xEFCDAB89\n c = 0x98BADCFE\n d = 0x10325476\n\n xl = x.length\n for (k = 0; k < xl; k += 16) {\n AA = a\n BB = b\n CC = c\n DD = d\n a = _FF(a, b, c, d, x[k + 0], S11, 0xD76AA478)\n d = _FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756)\n c = _FF(c, d, a, b, x[k + 2], S13, 0x242070DB)\n b = _FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE)\n a = _FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF)\n d = _FF(d, a, b, c, x[k + 5], S12, 0x4787C62A)\n c = _FF(c, d, a, b, x[k + 6], S13, 0xA8304613)\n b = _FF(b, c, d, a, x[k + 7], S14, 0xFD469501)\n a = _FF(a, b, c, d, x[k + 8], S11, 0x698098D8)\n d = _FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF)\n c = _FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1)\n b = _FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE)\n a = _FF(a, b, c, d, x[k + 12], S11, 0x6B901122)\n d = _FF(d, a, b, c, x[k + 13], S12, 0xFD987193)\n c = _FF(c, d, a, b, x[k + 14], S13, 0xA679438E)\n b = _FF(b, c, d, a, x[k + 15], S14, 0x49B40821)\n a = _GG(a, b, c, d, x[k + 1], S21, 0xF61E2562)\n d = _GG(d, a, b, c, x[k + 6], S22, 0xC040B340)\n c = _GG(c, d, a, b, x[k + 11], S23, 0x265E5A51)\n b = _GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA)\n a = _GG(a, b, c, d, x[k + 5], S21, 0xD62F105D)\n d = _GG(d, a, b, c, x[k + 10], S22, 0x2441453)\n c = _GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681)\n b = _GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8)\n a = _GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6)\n d = _GG(d, a, b, c, x[k + 14], S22, 0xC33707D6)\n c = _GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87)\n b = _GG(b, c, d, a, x[k + 8], S24, 0x455A14ED)\n a = _GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905)\n d = _GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8)\n c = _GG(c, d, a, b, x[k + 7], S23, 0x676F02D9)\n b = _GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A)\n a = _HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942)\n d = _HH(d, a, b, c, x[k + 8], S32, 0x8771F681)\n c = _HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122)\n b = _HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C)\n a = _HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44)\n d = _HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9)\n c = _HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60)\n b = _HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70)\n a = _HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6)\n d = _HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA)\n c = _HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085)\n b = _HH(b, c, d, a, x[k + 6], S34, 0x4881D05)\n a = _HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039)\n d = _HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5)\n c = _HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8)\n b = _HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665)\n a = _II(a, b, c, d, x[k + 0], S41, 0xF4292244)\n d = _II(d, a, b, c, x[k + 7], S42, 0x432AFF97)\n c = _II(c, d, a, b, x[k + 14], S43, 0xAB9423A7)\n b = _II(b, c, d, a, x[k + 5], S44, 0xFC93A039)\n a = _II(a, b, c, d, x[k + 12], S41, 0x655B59C3)\n d = _II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92)\n c = _II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D)\n b = _II(b, c, d, a, x[k + 1], S44, 0x85845DD1)\n a = _II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F)\n d = _II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0)\n c = _II(c, d, a, b, x[k + 6], S43, 0xA3014314)\n b = _II(b, c, d, a, x[k + 13], S44, 0x4E0811A1)\n a = _II(a, b, c, d, x[k + 4], S41, 0xF7537E82)\n d = _II(d, a, b, c, x[k + 11], S42, 0xBD3AF235)\n c = _II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB)\n b = _II(b, c, d, a, x[k + 9], S44, 0xEB86D391)\n a = _addUnsigned(a, AA)\n b = _addUnsigned(b, BB)\n c = _addUnsigned(c, CC)\n d = _addUnsigned(d, DD)\n }\n\n var temp = _wordToHex(a) + _wordToHex(b) + _wordToHex(c) + _wordToHex(d)\n\n return temp.toLowerCase()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/md5_file.js b/node_modules/locutus/php/strings/md5_file.js
deleted file mode 100644
index 022069e..0000000
--- a/node_modules/locutus/php/strings/md5_file.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function md5_file(str_filename) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/md5_file/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // note 1: Relies on file_get_contents which does not work in the browser, so Node only.
- // note 2: Keep in mind that in accordance with PHP, the whole file is buffered and then
- // note 2: hashed. We'd recommend Node's native crypto modules for faster and more
- // note 2: efficient hashing
- // example 1: md5_file('test/never-change.txt')
- // returns 1: 'bc3aa724b0ec7dce4c26e7f4d0d9b064'
-
- var fileGetContents = require('../filesystem/file_get_contents');
- var md5 = require('../strings/md5');
- var buf = fileGetContents(str_filename);
-
- if (buf === false) {
- return false;
- }
-
- return md5(buf);
-};
-//# sourceMappingURL=md5_file.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/md5_file.js.map b/node_modules/locutus/php/strings/md5_file.js.map
deleted file mode 100644
index a662dd3..0000000
--- a/node_modules/locutus/php/strings/md5_file.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/md5_file.js"],"names":["module","exports","md5_file","str_filename","fileGetContents","require","md5","buf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,YAAnB,EAAiC;AAAE;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,kBAAkBC,QAAQ,iCAAR,CAAtB;AACA,MAAIC,MAAMD,QAAQ,gBAAR,CAAV;AACA,MAAIE,MAAMH,gBAAgBD,YAAhB,CAAV;;AAEA,MAAII,QAAQ,KAAZ,EAAmB;AACjB,WAAO,KAAP;AACD;;AAED,SAAOD,IAAIC,GAAJ,CAAP;AACD,CArBD","file":"md5_file.js","sourcesContent":["module.exports = function md5_file (str_filename) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/md5_file/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // note 1: Relies on file_get_contents which does not work in the browser, so Node only.\n // note 2: Keep in mind that in accordance with PHP, the whole file is buffered and then\n // note 2: hashed. We'd recommend Node's native crypto modules for faster and more\n // note 2: efficient hashing\n // example 1: md5_file('test/never-change.txt')\n // returns 1: 'bc3aa724b0ec7dce4c26e7f4d0d9b064'\n\n var fileGetContents = require('../filesystem/file_get_contents')\n var md5 = require('../strings/md5')\n var buf = fileGetContents(str_filename)\n\n if (buf === false) {\n return false\n }\n\n return md5(buf)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/metaphone.js b/node_modules/locutus/php/strings/metaphone.js
deleted file mode 100644
index 09117ef..0000000
--- a/node_modules/locutus/php/strings/metaphone.js
+++ /dev/null
@@ -1,227 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function metaphone(word, maxPhonemes) {
- // discuss at: http://locutus.io/php/metaphone/
- // original by: Greg Frazier
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: metaphone('Gnu')
- // returns 1: 'N'
- // example 2: metaphone('bigger')
- // returns 2: 'BKR'
- // example 3: metaphone('accuracy')
- // returns 3: 'AKKRS'
- // example 4: metaphone('batch batcher')
- // returns 4: 'BXBXR'
-
- var type = typeof word === 'undefined' ? 'undefined' : _typeof(word);
-
- if (type === 'undefined' || type === 'object' && word !== null) {
- // weird!
- return null;
- }
-
- // infinity and NaN values are treated as strings
- if (type === 'number') {
- if (isNaN(word)) {
- word = 'NAN';
- } else if (!isFinite(word)) {
- word = 'INF';
- }
- }
-
- if (maxPhonemes < 0) {
- return false;
- }
-
- maxPhonemes = Math.floor(+maxPhonemes) || 0;
-
- // alpha depends on locale, so this var might need an update
- // or should be turned into a regex
- // for now assuming pure a-z
- var alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
- var vowel = 'AEIOU';
- var soft = 'EIY';
- var leadingNonAlpha = new RegExp('^[^' + alpha + ']+');
-
- word = typeof word === 'string' ? word : '';
- word = word.toUpperCase().replace(leadingNonAlpha, '');
-
- if (!word) {
- return '';
- }
-
- var is = function is(p, c) {
- return c !== '' && p.indexOf(c) !== -1;
- };
-
- var i = 0;
- var cc = word.charAt(0); // current char. Short name because it's used all over the function
- var nc = word.charAt(1); // next char
- var nnc; // after next char
- var pc; // previous char
- var l = word.length;
- var meta = '';
- // traditional is an internal param that could be exposed for now let it be a local var
- var traditional = true;
-
- switch (cc) {
- case 'A':
- meta += nc === 'E' ? nc : cc;
- i += 1;
- break;
- case 'G':
- case 'K':
- case 'P':
- if (nc === 'N') {
- meta += nc;
- i += 2;
- }
- break;
- case 'W':
- if (nc === 'R') {
- meta += nc;
- i += 2;
- } else if (nc === 'H' || is(vowel, nc)) {
- meta += 'W';
- i += 2;
- }
- break;
- case 'X':
- meta += 'S';
- i += 1;
- break;
- case 'E':
- case 'I':
- case 'O':
- case 'U':
- meta += cc;
- i++;
- break;
- }
-
- for (; i < l && (maxPhonemes === 0 || meta.length < maxPhonemes); i += 1) {
- // eslint-disable-line no-unmodified-loop-condition,max-len
- cc = word.charAt(i);
- nc = word.charAt(i + 1);
- pc = word.charAt(i - 1);
- nnc = word.charAt(i + 2);
-
- if (cc === pc && cc !== 'C') {
- continue;
- }
-
- switch (cc) {
- case 'B':
- if (pc !== 'M') {
- meta += cc;
- }
- break;
- case 'C':
- if (is(soft, nc)) {
- if (nc === 'I' && nnc === 'A') {
- meta += 'X';
- } else if (pc !== 'S') {
- meta += 'S';
- }
- } else if (nc === 'H') {
- meta += !traditional && (nnc === 'R' || pc === 'S') ? 'K' : 'X';
- i += 1;
- } else {
- meta += 'K';
- }
- break;
- case 'D':
- if (nc === 'G' && is(soft, nnc)) {
- meta += 'J';
- i += 1;
- } else {
- meta += 'T';
- }
- break;
- case 'G':
- if (nc === 'H') {
- if (!(is('BDH', word.charAt(i - 3)) || word.charAt(i - 4) === 'H')) {
- meta += 'F';
- i += 1;
- }
- } else if (nc === 'N') {
- if (is(alpha, nnc) && word.substr(i + 1, 3) !== 'NED') {
- meta += 'K';
- }
- } else if (is(soft, nc) && pc !== 'G') {
- meta += 'J';
- } else {
- meta += 'K';
- }
- break;
- case 'H':
- if (is(vowel, nc) && !is('CGPST', pc)) {
- meta += cc;
- }
- break;
- case 'K':
- if (pc !== 'C') {
- meta += 'K';
- }
- break;
- case 'P':
- meta += nc === 'H' ? 'F' : cc;
- break;
- case 'Q':
- meta += 'K';
- break;
- case 'S':
- if (nc === 'I' && is('AO', nnc)) {
- meta += 'X';
- } else if (nc === 'H') {
- meta += 'X';
- i += 1;
- } else if (!traditional && word.substr(i + 1, 3) === 'CHW') {
- meta += 'X';
- i += 2;
- } else {
- meta += 'S';
- }
- break;
- case 'T':
- if (nc === 'I' && is('AO', nnc)) {
- meta += 'X';
- } else if (nc === 'H') {
- meta += '0';
- i += 1;
- } else if (word.substr(i + 1, 2) !== 'CH') {
- meta += 'T';
- }
- break;
- case 'V':
- meta += 'F';
- break;
- case 'W':
- case 'Y':
- if (is(vowel, nc)) {
- meta += cc;
- }
- break;
- case 'X':
- meta += 'KS';
- break;
- case 'Z':
- meta += 'S';
- break;
- case 'F':
- case 'J':
- case 'L':
- case 'M':
- case 'N':
- case 'R':
- meta += cc;
- break;
- }
- }
-
- return meta;
-};
-//# sourceMappingURL=metaphone.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/metaphone.js.map b/node_modules/locutus/php/strings/metaphone.js.map
deleted file mode 100644
index 4882abc..0000000
--- a/node_modules/locutus/php/strings/metaphone.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/metaphone.js"],"names":["module","exports","metaphone","word","maxPhonemes","type","isNaN","isFinite","Math","floor","alpha","vowel","soft","leadingNonAlpha","RegExp","toUpperCase","replace","is","p","c","indexOf","i","cc","charAt","nc","nnc","pc","l","length","meta","traditional","substr"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,IAApB,EAA0BC,WAA1B,EAAuC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAcF,IAAd,yCAAcA,IAAd,CAAJ;;AAEA,MAAIE,SAAS,WAAT,IAAwBA,SAAS,QAAT,IAAqBF,SAAS,IAA1D,EAAgE;AAC9D;AACA,WAAO,IAAP;AACD;;AAED;AACA,MAAIE,SAAS,QAAb,EAAuB;AACrB,QAAIC,MAAMH,IAAN,CAAJ,EAAiB;AACfA,aAAO,KAAP;AACD,KAFD,MAEO,IAAI,CAACI,SAASJ,IAAT,CAAL,EAAqB;AAC1BA,aAAO,KAAP;AACD;AACF;;AAED,MAAIC,cAAc,CAAlB,EAAqB;AACnB,WAAO,KAAP;AACD;;AAEDA,gBAAcI,KAAKC,KAAL,CAAW,CAACL,WAAZ,KAA4B,CAA1C;;AAEA;AACA;AACA;AACA,MAAIM,QAAQ,4BAAZ;AACA,MAAIC,QAAQ,OAAZ;AACA,MAAIC,OAAO,KAAX;AACA,MAAIC,kBAAkB,IAAIC,MAAJ,CAAW,QAAQJ,KAAR,GAAg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AQ,GAAR;AACAR,eAAK,CAAL;AACD,SAHM,MAGA;AACLQ,kBAAQ,GAAR;AACD;AACD;AACF,WAAK,GAAL;AACE,YAAIL,OAAO,GAAP,IAAcP,GAAG,IAAH,EAASQ,GAAT,CAAlB,EAAiC;AAC/BI,kBAAQ,GAAR;AACD,SAFD,MAEO,IAAIL,OAAO,GAAX,EAAgB;AACrBK,kBAAQ,GAAR;AACAR,eAAK,CAAL;AACD,SAHM,MAGA,IAAIlB,KAAK4B,MAAL,CAAYV,IAAI,CAAhB,EAAmB,CAAnB,MAA0B,IAA9B,EAAoC;AACzCQ,kBAAQ,GAAR;AACD;AACD;AACF,WAAK,GAAL;AACEA,gBAAQ,GAAR;AACA;AACF,WAAK,GAAL;AACA,WAAK,GAAL;AACE,YAAIZ,GAAGN,KAAH,EAAUa,EAAV,CAAJ,EAAmB;AACjBK,kBAAQP,EAAR;AACD;AACD;AACF,WAAK,GAAL;AACEO,gBAAQ,IAAR;AACA;AACF,WAAK,GAAL;AACEA,gBAAQ,GAAR;AACA;AACF,WAAK,GAAL;AACA,WAAK,GAAL;AACA,WAAK,GAAL;AACA,WAAK,GAAL;AACA,WAAK,GAAL;AACA,WAAK,GAAL;AACEA,gBAAQP,EAAR;AACA;AAzGJ;AA2GD;;AAED,SAAOO,IAAP;AACD,CA5ND","file":"metaphone.js","sourcesContent":["module.exports = function metaphone (word, maxPhonemes) {\n // discuss at: http://locutus.io/php/metaphone/\n // original by: Greg Frazier\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: metaphone('Gnu')\n // returns 1: 'N'\n // example 2: metaphone('bigger')\n // returns 2: 'BKR'\n // example 3: metaphone('accuracy')\n // returns 3: 'AKKRS'\n // example 4: metaphone('batch batcher')\n // returns 4: 'BXBXR'\n\n var type = typeof word\n\n if (type === 'undefined' || type === 'object' && word !== null) {\n // weird!\n return null\n }\n\n // infinity and NaN values are treated as strings\n if (type === 'number') {\n if (isNaN(word)) {\n word = 'NAN'\n } else if (!isFinite(word)) {\n word = 'INF'\n }\n }\n\n if (maxPhonemes < 0) {\n return false\n }\n\n maxPhonemes = Math.floor(+maxPhonemes) || 0\n\n // alpha depends on locale, so this var might need an update\n // or should be turned into a regex\n // for now assuming pure a-z\n var alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n var vowel = 'AEIOU'\n var soft = 'EIY'\n var leadingNonAlpha = new RegExp('^[^' + alpha + ']+')\n\n word = typeof word === 'string' ? word : ''\n word = word.toUpperCase().replace(leadingNonAlpha, '')\n\n if (!word) {\n return ''\n }\n\n var is = function (p, c) {\n return c !== '' && p.indexOf(c) !== -1\n }\n\n var i = 0\n var cc = word.charAt(0) // current char. Short name because it's used all over the function\n var nc = word.charAt(1) // next char\n var nnc // after next char\n var pc // previous char\n var l = word.length\n var meta = ''\n // traditional is an internal param that could be exposed for now let it be a local var\n var traditional = true\n\n switch (cc) {\n case 'A':\n meta += nc === 'E' ? nc : cc\n i += 1\n break\n case 'G':\n case 'K':\n case 'P':\n if (nc === 'N') {\n meta += nc\n i += 2\n }\n break\n case 'W':\n if (nc === 'R') {\n meta += nc\n i += 2\n } else if (nc === 'H' || is(vowel, nc)) {\n meta += 'W'\n i += 2\n }\n break\n case 'X':\n meta += 'S'\n i += 1\n break\n case 'E':\n case 'I':\n case 'O':\n case 'U':\n meta += cc\n i++\n break\n }\n\n for (; i < l && (maxPhonemes === 0 || meta.length < maxPhonemes); i += 1) { // eslint-disable-line no-unmodified-loop-condition,max-len\n cc = word.charAt(i)\n nc = word.charAt(i + 1)\n pc = word.charAt(i - 1)\n nnc = word.charAt(i + 2)\n\n if (cc === pc && cc !== 'C') {\n continue\n }\n\n switch (cc) {\n case 'B':\n if (pc !== 'M') {\n meta += cc\n }\n break\n case 'C':\n if (is(soft, nc)) {\n if (nc === 'I' && nnc === 'A') {\n meta += 'X'\n } else if (pc !== 'S') {\n meta += 'S'\n }\n } else if (nc === 'H') {\n meta += !traditional && (nnc === 'R' || pc === 'S') ? 'K' : 'X'\n i += 1\n } else {\n meta += 'K'\n }\n break\n case 'D':\n if (nc === 'G' && is(soft, nnc)) {\n meta += 'J'\n i += 1\n } else {\n meta += 'T'\n }\n break\n case 'G':\n if (nc === 'H') {\n if (!(is('BDH', word.charAt(i - 3)) || word.charAt(i - 4) === 'H')) {\n meta += 'F'\n i += 1\n }\n } else if (nc === 'N') {\n if (is(alpha, nnc) && word.substr(i + 1, 3) !== 'NED') {\n meta += 'K'\n }\n } else if (is(soft, nc) && pc !== 'G') {\n meta += 'J'\n } else {\n meta += 'K'\n }\n break\n case 'H':\n if (is(vowel, nc) && !is('CGPST', pc)) {\n meta += cc\n }\n break\n case 'K':\n if (pc !== 'C') {\n meta += 'K'\n }\n break\n case 'P':\n meta += nc === 'H' ? 'F' : cc\n break\n case 'Q':\n meta += 'K'\n break\n case 'S':\n if (nc === 'I' && is('AO', nnc)) {\n meta += 'X'\n } else if (nc === 'H') {\n meta += 'X'\n i += 1\n } else if (!traditional && word.substr(i + 1, 3) === 'CHW') {\n meta += 'X'\n i += 2\n } else {\n meta += 'S'\n }\n break\n case 'T':\n if (nc === 'I' && is('AO', nnc)) {\n meta += 'X'\n } else if (nc === 'H') {\n meta += '0'\n i += 1\n } else if (word.substr(i + 1, 2) !== 'CH') {\n meta += 'T'\n }\n break\n case 'V':\n meta += 'F'\n break\n case 'W':\n case 'Y':\n if (is(vowel, nc)) {\n meta += cc\n }\n break\n case 'X':\n meta += 'KS'\n break\n case 'Z':\n meta += 'S'\n break\n case 'F':\n case 'J':\n case 'L':\n case 'M':\n case 'N':\n case 'R':\n meta += cc\n break\n }\n }\n\n return meta\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/money_format.js b/node_modules/locutus/php/strings/money_format.js
deleted file mode 100644
index 80f78f9..0000000
--- a/node_modules/locutus/php/strings/money_format.js
+++ /dev/null
@@ -1,252 +0,0 @@
-'use strict';
-
-module.exports = function money_format(format, number) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/money_format/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: daniel airton wermann (http://wermann.com.br)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // note 1: This depends on setlocale having the appropriate
- // note 1: locale (these examples use 'en_US')
- // example 1: money_format('%i', 1234.56)
- // returns 1: ' USD 1,234.56'
- // example 2: money_format('%14#8.2n', 1234.5678)
- // returns 2: ' $ 1,234.57'
- // example 3: money_format('%14#8.2n', -1234.5678)
- // returns 3: '-$ 1,234.57'
- // example 4: money_format('%(14#8.2n', 1234.5678)
- // returns 4: ' $ 1,234.57 '
- // example 5: money_format('%(14#8.2n', -1234.5678)
- // returns 5: '($ 1,234.57)'
- // example 6: money_format('%=014#8.2n', 1234.5678)
- // returns 6: ' $000001,234.57'
- // example 7: money_format('%=014#8.2n', -1234.5678)
- // returns 7: '-$000001,234.57'
- // example 8: money_format('%=*14#8.2n', 1234.5678)
- // returns 8: ' $*****1,234.57'
- // example 9: money_format('%=*14#8.2n', -1234.5678)
- // returns 9: '-$*****1,234.57'
- // example 10: money_format('%=*^14#8.2n', 1234.5678)
- // returns 10: ' $****1234.57'
- // example 11: money_format('%=*^14#8.2n', -1234.5678)
- // returns 11: ' -$****1234.57'
- // example 12: money_format('%=*!14#8.2n', 1234.5678)
- // returns 12: ' *****1,234.57'
- // example 13: money_format('%=*!14#8.2n', -1234.5678)
- // returns 13: '-*****1,234.57'
- // example 14: money_format('%i', 3590)
- // returns 14: ' USD 3,590.00'
-
- var setlocale = require('../strings/setlocale');
-
- // Per PHP behavior, there seems to be no extra padding
- // for sign when there is a positive number, though my
- // understanding of the description is that there should be padding;
- // need to revisit examples
-
- // Helpful info at http://ftp.gnu.org/pub/pub/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_7.html
- // and http://publib.boulder.ibm.com/infocenter/zos/v1r10/index.jsp?topic=/com.ibm.zos.r10.bpxbd00/strfmp.htm
-
- if (typeof number !== 'number') {
- return null;
- }
- // 1: flags, 3: width, 5: left, 7: right, 8: conversion
- var regex = /%((=.|[+^(!-])*?)(\d*?)(#(\d+))?(\.(\d+))?([in%])/g;
-
- // Ensure the locale data we need is set up
- setlocale('LC_ALL', 0);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- var monetary = $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY].LC_MONETARY;
-
- var doReplace = function doReplace(n0, flags, n2, width, n4, left, n6, right, conversion) {
- var value = '';
- var repl = '';
- if (conversion === '%') {
- // Percent does not seem to be allowed with intervening content
- return '%';
- }
- var fill = flags && /=./.test(flags) ? flags.match(/=(.)/)[1] : ' '; // flag: =f (numeric fill)
- // flag: ! (suppress currency symbol)
- var showCurrSymbol = !flags || flags.indexOf('!') === -1;
- // field width: w (minimum field width)
- width = parseInt(width, 10) || 0;
-
- var neg = number < 0;
- // Convert to string
- number = number + '';
- // We don't want negative symbol represented here yet
- number = neg ? number.slice(1) : number;
-
- var decpos = number.indexOf('.');
- // Get integer portion
- var integer = decpos !== -1 ? number.slice(0, decpos) : number;
- // Get decimal portion
- var fraction = decpos !== -1 ? number.slice(decpos + 1) : '';
-
- var _strSplice = function _strSplice(integerStr, idx, thouSep) {
- var integerArr = integerStr.split('');
- integerArr.splice(idx, 0, thouSep);
- return integerArr.join('');
- };
-
- var intLen = integer.length;
- left = parseInt(left, 10);
- var filler = intLen < left;
- if (filler) {
- var fillnum = left - intLen;
- integer = new Array(fillnum + 1).join(fill) + integer;
- }
- if (flags.indexOf('^') === -1) {
- // flag: ^ (disable grouping characters (of locale))
- // use grouping characters
- // ','
- var thouSep = monetary.mon_thousands_sep;
- // [3] (every 3 digits in U.S.A. locale)
- var monGrouping = monetary.mon_grouping;
-
- if (monGrouping[0] < integer.length) {
- for (var i = 0, idx = integer.length; i < monGrouping.length; i++) {
- // e.g., 3
- idx -= monGrouping[i];
- if (idx <= 0) {
- break;
- }
- if (filler && idx < fillnum) {
- thouSep = fill;
- }
- integer = _strSplice(integer, idx, thouSep);
- }
- }
- if (monGrouping[i - 1] > 0) {
- // Repeating last grouping (may only be one) until highest portion of integer reached
- while (idx > monGrouping[i - 1]) {
- idx -= monGrouping[i - 1];
- if (filler && idx < fillnum) {
- thouSep = fill;
- }
- integer = _strSplice(integer, idx, thouSep);
- }
- }
- }
-
- // left, right
- if (right === '0') {
- // No decimal or fractional digits
- value = integer;
- } else {
- // '.'
- var decPt = monetary.mon_decimal_point;
- if (right === '' || right === undefined) {
- right = conversion === 'i' ? monetary.int_frac_digits : monetary.frac_digits;
- }
- right = parseInt(right, 10);
-
- if (right === 0) {
- // Only remove fractional portion if explicitly set to zero digits
- fraction = '';
- decPt = '';
- } else if (right < fraction.length) {
- fraction = Math.round(parseFloat(fraction.slice(0, right) + '.' + fraction.substr(right, 1)));
- if (right > fraction.length) {
- fraction = new Array(right - fraction.length + 1).join('0') + fraction; // prepend with 0's
- }
- } else if (right > fraction.length) {
- fraction += new Array(right - fraction.length + 1).join('0'); // pad with 0's
- }
- value = integer + decPt + fraction;
- }
-
- var symbol = '';
- if (showCurrSymbol) {
- // 'i' vs. 'n' ('USD' vs. '$')
- symbol = conversion === 'i' ? monetary.int_curr_symbol : monetary.currency_symbol;
- }
- var signPosn = neg ? monetary.n_sign_posn : monetary.p_sign_posn;
-
- // 0: no space between curr. symbol and value
- // 1: space sep. them unless symb. and sign are adjacent then space sep. them from value
- // 2: space sep. sign and value unless symb. and sign are adjacent then space separates
- var sepBySpace = neg ? monetary.n_sep_by_space : monetary.p_sep_by_space;
-
- // p_cs_precedes, n_cs_precedes
- // positive currency symbol follows value = 0; precedes value = 1
- var csPrecedes = neg ? monetary.n_cs_precedes : monetary.p_cs_precedes;
-
- // Assemble symbol/value/sign and possible space as appropriate
- if (flags.indexOf('(') !== -1) {
- // flag: parenth. for negative
- // @todo: unclear on whether and how sepBySpace, signPosn, or csPrecedes have
- // an impact here (as they do below), but assuming for now behaves as signPosn 0 as
- // far as localized sepBySpace and signPosn behavior
- repl = (csPrecedes ? symbol + (sepBySpace === 1 ? ' ' : '') : '') + value + (!csPrecedes ? (sepBySpace === 1 ? ' ' : '') + symbol : '');
- if (neg) {
- repl = '(' + repl + ')';
- } else {
- repl = ' ' + repl + ' ';
- }
- } else {
- // '+' is default
- // ''
- var posSign = monetary.positive_sign;
- // '-'
- var negSign = monetary.negative_sign;
- var sign = neg ? negSign : posSign;
- var otherSign = neg ? posSign : negSign;
- var signPadding = '';
- if (signPosn) {
- // has a sign
- signPadding = new Array(otherSign.length - sign.length + 1).join(' ');
- }
-
- var valueAndCS = '';
- switch (signPosn) {
- // 0: parentheses surround value and curr. symbol;
- // 1: sign precedes them;
- // 2: sign follows them;
- // 3: sign immed. precedes curr. symbol; (but may be space between)
- // 4: sign immed. succeeds curr. symbol; (but may be space between)
- case 0:
- valueAndCS = csPrecedes ? symbol + (sepBySpace === 1 ? ' ' : '') + value : value + (sepBySpace === 1 ? ' ' : '') + symbol;
- repl = '(' + valueAndCS + ')';
- break;
- case 1:
- valueAndCS = csPrecedes ? symbol + (sepBySpace === 1 ? ' ' : '') + value : value + (sepBySpace === 1 ? ' ' : '') + symbol;
- repl = signPadding + sign + (sepBySpace === 2 ? ' ' : '') + valueAndCS;
- break;
- case 2:
- valueAndCS = csPrecedes ? symbol + (sepBySpace === 1 ? ' ' : '') + value : value + (sepBySpace === 1 ? ' ' : '') + symbol;
- repl = valueAndCS + (sepBySpace === 2 ? ' ' : '') + sign + signPadding;
- break;
- case 3:
- repl = csPrecedes ? signPadding + sign + (sepBySpace === 2 ? ' ' : '') + symbol + (sepBySpace === 1 ? ' ' : '') + value : value + (sepBySpace === 1 ? ' ' : '') + sign + signPadding + (sepBySpace === 2 ? ' ' : '') + symbol;
- break;
- case 4:
- repl = csPrecedes ? symbol + (sepBySpace === 2 ? ' ' : '') + signPadding + sign + (sepBySpace === 1 ? ' ' : '') + value : value + (sepBySpace === 1 ? ' ' : '') + symbol + (sepBySpace === 2 ? ' ' : '') + sign + signPadding;
- break;
- }
- }
-
- var padding = width - repl.length;
- if (padding > 0) {
- padding = new Array(padding + 1).join(' ');
- // @todo: How does p_sep_by_space affect the count if there is a space?
- // Included in count presumably?
- if (flags.indexOf('-') !== -1) {
- // left-justified (pad to right)
- repl += padding;
- } else {
- // right-justified (pad to left)
- repl = padding + repl;
- }
- }
- return repl;
- };
-
- return format.replace(regex, doReplace);
-};
-//# sourceMappingURL=money_format.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/money_format.js.map b/node_modules/locutus/php/strings/money_format.js.map
deleted file mode 100644
index 0a99628..0000000
--- a/node_modules/locutus/php/strings/money_format.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/money_format.js"],"names":["module","exports","money_format","format","number","setlocale","require","regex","$global","window","global","$locutus","php","monetary","locales","localeCategories","LC_MONETARY","doReplace","n0","flags","n2","width","n4","left","n6","right","conversion","value","repl","fill","test","match","showCurrSymbol","indexOf","parseInt","neg","slice","decpos","integer","fraction","_strSplice","integerStr","idx","thouSep","integerArr","split","splice","join","intLen","length","filler","fillnum","Array","mon_thousands_sep","monGrouping","mon_grouping","i","decPt","mon_decimal_point","undefined","int_frac_digits","frac_digits","Math","round","parseFloat","substr","symbol","int_curr_symbol","currency_symbol","signPosn","n_sign_posn","p_sign_posn","sepBySpace","n_sep_by_space","p_sep_by_space","csPrecedes","n_cs_precedes","p_cs_precedes","posSign","positive_sign","negSign","negative_sign","sign","otherSign","signPadding","valueAndCS","padding","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,MAA/B,EAAuC;AAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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,GAAmB,GAAnB,GAAyB,EAD1B,IACgC7C,KAF7B,GAGHA,SAAS6C,eAAe,CAAf,GAAmB,GAAnB,GAAyB,EAAlC,IAAwCU,IAAxC,GAA+CE,WAA/C,IACCZ,eAAe,CAAf,GAAmB,GAAnB,GAAyB,EAD1B,IACgCN,MAJpC;AAKA;AACF,aAAK,CAAL;AACEtC,iBAAO+C,aACHT,UAAUM,eAAe,CAAf,GAAmB,GAAnB,GAAyB,EAAnC,IAAyCY,WAAzC,GAAuDF,IAAvD,IACCV,eAAe,CAAf,GAAmB,GAAnB,GAAyB,EAD1B,IACgC7C,KAF7B,GAGHA,SAAS6C,eAAe,CAAf,GAAmB,GAAnB,GAAyB,EAAlC,IAAwCN,MAAxC,IACCM,eAAe,CAAf,GAAmB,GAAnB,GAAyB,EAD1B,IACgCU,IADhC,GACuCE,WAJ3C;AAKA;AArCJ;AAuCD;;AAED,QAAIE,UAAUjE,QAAQO,KAAKqB,MAA3B;AACA,QAAIqC,UAAU,CAAd,EAAiB;AACfA,gBAAU,IAAIlC,KAAJ,CAAUkC,UAAU,CAApB,EAAuBvC,IAAvB,CAA4B,GAA5B,CAAV;AACA;AACA;AACA,UAAI5B,MAAMc,OAAN,CAAc,GAAd,MAAuB,CAAC,CAA5B,EAA+B;AAC7B;AACAL,gBAAQ0D,OAAR;AACD,OAHD,MAGO;AACL;AACA1D,eAAO0D,UAAU1D,IAAjB;AACD;AACF;AACD,WAAOA,IAAP;AACD,GAvMD;;AAyMA,SAAOzB,OAAOoF,OAAP,CAAehF,KAAf,EAAsBU,SAAtB,CAAP;AACD,CAxQD","file":"money_format.js","sourcesContent":["module.exports = function money_format (format, number) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/money_format/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: daniel airton wermann (http://wermann.com.br)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // note 1: This depends on setlocale having the appropriate\n // note 1: locale (these examples use 'en_US')\n // example 1: money_format('%i', 1234.56)\n // returns 1: ' USD 1,234.56'\n // example 2: money_format('%14#8.2n', 1234.5678)\n // returns 2: ' $ 1,234.57'\n // example 3: money_format('%14#8.2n', -1234.5678)\n // returns 3: '-$ 1,234.57'\n // example 4: money_format('%(14#8.2n', 1234.5678)\n // returns 4: ' $ 1,234.57 '\n // example 5: money_format('%(14#8.2n', -1234.5678)\n // returns 5: '($ 1,234.57)'\n // example 6: money_format('%=014#8.2n', 1234.5678)\n // returns 6: ' $000001,234.57'\n // example 7: money_format('%=014#8.2n', -1234.5678)\n // returns 7: '-$000001,234.57'\n // example 8: money_format('%=*14#8.2n', 1234.5678)\n // returns 8: ' $*****1,234.57'\n // example 9: money_format('%=*14#8.2n', -1234.5678)\n // returns 9: '-$*****1,234.57'\n // example 10: money_format('%=*^14#8.2n', 1234.5678)\n // returns 10: ' $****1234.57'\n // example 11: money_format('%=*^14#8.2n', -1234.5678)\n // returns 11: ' -$****1234.57'\n // example 12: money_format('%=*!14#8.2n', 1234.5678)\n // returns 12: ' *****1,234.57'\n // example 13: money_format('%=*!14#8.2n', -1234.5678)\n // returns 13: '-*****1,234.57'\n // example 14: money_format('%i', 3590)\n // returns 14: ' USD 3,590.00'\n\n var setlocale = require('../strings/setlocale')\n\n // Per PHP behavior, there seems to be no extra padding\n // for sign when there is a positive number, though my\n // understanding of the description is that there should be padding;\n // need to revisit examples\n\n // Helpful info at http://ftp.gnu.org/pub/pub/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_7.html\n // and http://publib.boulder.ibm.com/infocenter/zos/v1r10/index.jsp?topic=/com.ibm.zos.r10.bpxbd00/strfmp.htm\n\n if (typeof number !== 'number') {\n return null\n }\n // 1: flags, 3: width, 5: left, 7: right, 8: conversion\n var regex = /%((=.|[+^(!-])*?)(\\d*?)(#(\\d+))?(\\.(\\d+))?([in%])/g\n\n // Ensure the locale data we need is set up\n setlocale('LC_ALL', 0)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n var monetary = $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY].LC_MONETARY\n\n var doReplace = function (n0, flags, n2, width, n4, left, n6, right, conversion) {\n var value = ''\n var repl = ''\n if (conversion === '%') {\n // Percent does not seem to be allowed with intervening content\n return '%'\n }\n var fill = flags && (/=./).test(flags) ? flags.match(/=(.)/)[1] : ' ' // flag: =f (numeric fill)\n // flag: ! (suppress currency symbol)\n var showCurrSymbol = !flags || flags.indexOf('!') === -1\n // field width: w (minimum field width)\n width = parseInt(width, 10) || 0\n\n var neg = number < 0\n // Convert to string\n number = number + ''\n // We don't want negative symbol represented here yet\n number = neg ? number.slice(1) : number\n\n var decpos = number.indexOf('.')\n // Get integer portion\n var integer = decpos !== -1 ? number.slice(0, decpos) : number\n // Get decimal portion\n var fraction = decpos !== -1 ? number.slice(decpos + 1) : ''\n\n var _strSplice = function (integerStr, idx, thouSep) {\n var integerArr = integerStr.split('')\n integerArr.splice(idx, 0, thouSep)\n return integerArr.join('')\n }\n\n var intLen = integer.length\n left = parseInt(left, 10)\n var filler = intLen < left\n if (filler) {\n var fillnum = left - intLen\n integer = new Array(fillnum + 1).join(fill) + integer\n }\n if (flags.indexOf('^') === -1) {\n // flag: ^ (disable grouping characters (of locale))\n // use grouping characters\n // ','\n var thouSep = monetary.mon_thousands_sep\n // [3] (every 3 digits in U.S.A. locale)\n var monGrouping = monetary.mon_grouping\n\n if (monGrouping[0] < integer.length) {\n for (var i = 0, idx = integer.length; i < monGrouping.length; i++) {\n // e.g., 3\n idx -= monGrouping[i]\n if (idx <= 0) {\n break\n }\n if (filler && idx < fillnum) {\n thouSep = fill\n }\n integer = _strSplice(integer, idx, thouSep)\n }\n }\n if (monGrouping[i - 1] > 0) {\n // Repeating last grouping (may only be one) until highest portion of integer reached\n while (idx > monGrouping[i - 1]) {\n idx -= monGrouping[i - 1]\n if (filler && idx < fillnum) {\n thouSep = fill\n }\n integer = _strSplice(integer, idx, thouSep)\n }\n }\n }\n\n // left, right\n if (right === '0') {\n // No decimal or fractional digits\n value = integer\n } else {\n // '.'\n var decPt = monetary.mon_decimal_point\n if (right === '' || right === undefined) {\n right = conversion === 'i' ? monetary.int_frac_digits : monetary.frac_digits\n }\n right = parseInt(right, 10)\n\n if (right === 0) {\n // Only remove fractional portion if explicitly set to zero digits\n fraction = ''\n decPt = ''\n } else if (right < fraction.length) {\n fraction = Math.round(parseFloat(\n fraction.slice(0, right) + '.' + fraction.substr(right, 1)\n ))\n if (right > fraction.length) {\n fraction = new Array(right - fraction.length + 1).join('0') + fraction // prepend with 0's\n }\n } else if (right > fraction.length) {\n fraction += new Array(right - fraction.length + 1).join('0') // pad with 0's\n }\n value = integer + decPt + fraction\n }\n\n var symbol = ''\n if (showCurrSymbol) {\n // 'i' vs. 'n' ('USD' vs. '$')\n symbol = conversion === 'i' ? monetary.int_curr_symbol : monetary.currency_symbol\n }\n var signPosn = neg ? monetary.n_sign_posn : monetary.p_sign_posn\n\n // 0: no space between curr. symbol and value\n // 1: space sep. them unless symb. and sign are adjacent then space sep. them from value\n // 2: space sep. sign and value unless symb. and sign are adjacent then space separates\n var sepBySpace = neg ? monetary.n_sep_by_space : monetary.p_sep_by_space\n\n // p_cs_precedes, n_cs_precedes\n // positive currency symbol follows value = 0; precedes value = 1\n var csPrecedes = neg ? monetary.n_cs_precedes : monetary.p_cs_precedes\n\n // Assemble symbol/value/sign and possible space as appropriate\n if (flags.indexOf('(') !== -1) {\n // flag: parenth. for negative\n // @todo: unclear on whether and how sepBySpace, signPosn, or csPrecedes have\n // an impact here (as they do below), but assuming for now behaves as signPosn 0 as\n // far as localized sepBySpace and signPosn behavior\n repl = (csPrecedes ? symbol + (sepBySpace === 1 ? ' ' : '') : '') + value + (!csPrecedes ? (\n sepBySpace === 1 ? ' ' : '') + symbol : '')\n if (neg) {\n repl = '(' + repl + ')'\n } else {\n repl = ' ' + repl + ' '\n }\n } else {\n // '+' is default\n // ''\n var posSign = monetary.positive_sign\n // '-'\n var negSign = monetary.negative_sign\n var sign = neg ? (negSign) : (posSign)\n var otherSign = neg ? (posSign) : (negSign)\n var signPadding = ''\n if (signPosn) {\n // has a sign\n signPadding = new Array(otherSign.length - sign.length + 1).join(' ')\n }\n\n var valueAndCS = ''\n switch (signPosn) {\n // 0: parentheses surround value and curr. symbol;\n // 1: sign precedes them;\n // 2: sign follows them;\n // 3: sign immed. precedes curr. symbol; (but may be space between)\n // 4: sign immed. succeeds curr. symbol; (but may be space between)\n case 0:\n valueAndCS = csPrecedes\n ? symbol + (sepBySpace === 1 ? ' ' : '') + value\n : value + (sepBySpace === 1 ? ' ' : '') + symbol\n repl = '(' + valueAndCS + ')'\n break\n case 1:\n valueAndCS = csPrecedes\n ? symbol + (sepBySpace === 1 ? ' ' : '') + value\n : value + (sepBySpace === 1 ? ' ' : '') + symbol\n repl = signPadding + sign + (sepBySpace === 2 ? ' ' : '') + valueAndCS\n break\n case 2:\n valueAndCS = csPrecedes\n ? symbol + (sepBySpace === 1 ? ' ' : '') + value\n : value + (sepBySpace === 1 ? ' ' : '') + symbol\n repl = valueAndCS + (sepBySpace === 2 ? ' ' : '') + sign + signPadding\n break\n case 3:\n repl = csPrecedes\n ? signPadding + sign + (sepBySpace === 2 ? ' ' : '') + symbol +\n (sepBySpace === 1 ? ' ' : '') + value\n : value + (sepBySpace === 1 ? ' ' : '') + sign + signPadding +\n (sepBySpace === 2 ? ' ' : '') + symbol\n break\n case 4:\n repl = csPrecedes\n ? symbol + (sepBySpace === 2 ? ' ' : '') + signPadding + sign +\n (sepBySpace === 1 ? ' ' : '') + value\n : value + (sepBySpace === 1 ? ' ' : '') + symbol +\n (sepBySpace === 2 ? ' ' : '') + sign + signPadding\n break\n }\n }\n\n var padding = width - repl.length\n if (padding > 0) {\n padding = new Array(padding + 1).join(' ')\n // @todo: How does p_sep_by_space affect the count if there is a space?\n // Included in count presumably?\n if (flags.indexOf('-') !== -1) {\n // left-justified (pad to right)\n repl += padding\n } else {\n // right-justified (pad to left)\n repl = padding + repl\n }\n }\n return repl\n }\n\n return format.replace(regex, doReplace)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/nl2br.js b/node_modules/locutus/php/strings/nl2br.js
deleted file mode 100644
index d740445..0000000
--- a/node_modules/locutus/php/strings/nl2br.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function nl2br(str, isXhtml) {
- // discuss at: http://locutus.io/php/nl2br/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Philip Peterson
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Atli Þór
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Maximusya
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Reynier de la Rosa (http://scriptinside.blogspot.com.es/)
- // input by: Brett Zamir (http://brett-zamir.me)
- // example 1: nl2br('Kevin\nvan\nZonneveld')
- // returns 1: 'Kevin<br />\nvan<br />\nZonneveld'
- // example 2: nl2br("\nOne\nTwo\n\nThree\n", false)
- // returns 2: '<br>\nOne<br>\nTwo<br>\n<br>\nThree<br>\n'
- // example 3: nl2br("\nOne\nTwo\n\nThree\n", true)
- // returns 3: '<br />\nOne<br />\nTwo<br />\n<br />\nThree<br />\n'
- // example 4: nl2br(null)
- // returns 4: ''
-
- // Some latest browsers when str is null return and unexpected null value
- if (typeof str === 'undefined' || str === null) {
- return '';
- }
-
- // Adjust comment to avoid issue on locutus.io display
- var breakTag = isXhtml || typeof isXhtml === 'undefined' ? '<br ' + '/>' : '<br>';
-
- return (str + '').replace(/(\r\n|\n\r|\r|\n)/g, breakTag + '$1');
-};
-//# sourceMappingURL=nl2br.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/nl2br.js.map b/node_modules/locutus/php/strings/nl2br.js.map
deleted file mode 100644
index fb5e3d2..0000000
--- a/node_modules/locutus/php/strings/nl2br.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/nl2br.js"],"names":["module","exports","nl2br","str","isXhtml","breakTag","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,OAArB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAI,OAAOD,GAAP,KAAe,WAAf,IAA8BA,QAAQ,IAA1C,EAAgD;AAC9C,WAAO,EAAP;AACD;;AAED;AACA,MAAIE,WAAYD,WAAW,OAAOA,OAAP,KAAmB,WAA/B,GAA8C,SAAS,IAAvD,GAA8D,MAA7E;;AAEA,SAAO,CAACD,MAAM,EAAP,EACJG,OADI,CACI,oBADJ,EAC0BD,WAAW,IADrC,CAAP;AAED,CA/BD","file":"nl2br.js","sourcesContent":["module.exports = function nl2br (str, isXhtml) {\n // discuss at: http://locutus.io/php/nl2br/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Philip Peterson\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Atli Þór\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Maximusya\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Reynier de la Rosa (http://scriptinside.blogspot.com.es/)\n // input by: Brett Zamir (http://brett-zamir.me)\n // example 1: nl2br('Kevin\\nvan\\nZonneveld')\n // returns 1: 'Kevin<br />\\nvan<br />\\nZonneveld'\n // example 2: nl2br(\"\\nOne\\nTwo\\n\\nThree\\n\", false)\n // returns 2: '<br>\\nOne<br>\\nTwo<br>\\n<br>\\nThree<br>\\n'\n // example 3: nl2br(\"\\nOne\\nTwo\\n\\nThree\\n\", true)\n // returns 3: '<br />\\nOne<br />\\nTwo<br />\\n<br />\\nThree<br />\\n'\n // example 4: nl2br(null)\n // returns 4: ''\n\n // Some latest browsers when str is null return and unexpected null value\n if (typeof str === 'undefined' || str === null) {\n return ''\n }\n\n // Adjust comment to avoid issue on locutus.io display\n var breakTag = (isXhtml || typeof isXhtml === 'undefined') ? '<br ' + '/>' : '<br>'\n\n return (str + '')\n .replace(/(\\r\\n|\\n\\r|\\r|\\n)/g, breakTag + '$1')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/nl_langinfo.js b/node_modules/locutus/php/strings/nl_langinfo.js
deleted file mode 100644
index 5acb293..0000000
--- a/node_modules/locutus/php/strings/nl_langinfo.js
+++ /dev/null
@@ -1,108 +0,0 @@
-'use strict';
-
-module.exports = function nl_langinfo(item) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/nl_langinfo/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: nl_langinfo('DAY_1')
- // returns 1: 'Sunday'
-
- var setlocale = require('../strings/setlocale');
-
- setlocale('LC_ALL', 0); // Ensure locale data is available
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- var loc = $locutus.php.locales[$locutus.php.localeCategories.LC_TIME];
- if (item.indexOf('ABDAY_') === 0) {
- return loc.LC_TIME.a[parseInt(item.replace(/^ABDAY_/, ''), 10) - 1];
- } else if (item.indexOf('DAY_') === 0) {
- return loc.LC_TIME.A[parseInt(item.replace(/^DAY_/, ''), 10) - 1];
- } else if (item.indexOf('ABMON_') === 0) {
- return loc.LC_TIME.b[parseInt(item.replace(/^ABMON_/, ''), 10) - 1];
- } else if (item.indexOf('MON_') === 0) {
- return loc.LC_TIME.B[parseInt(item.replace(/^MON_/, ''), 10) - 1];
- } else {
- switch (item) {
- // More LC_TIME
- case 'AM_STR':
- return loc.LC_TIME.p[0];
- case 'PM_STR':
- return loc.LC_TIME.p[1];
- case 'D_T_FMT':
- return loc.LC_TIME.c;
- case 'D_FMT':
- return loc.LC_TIME.x;
- case 'T_FMT':
- return loc.LC_TIME.X;
- case 'T_FMT_AMPM':
- return loc.LC_TIME.r;
- case 'ERA':
- case 'ERA_YEAR':
- case 'ERA_D_T_FMT':
- case 'ERA_D_FMT':
- case 'ERA_T_FMT':
- // all fall-throughs
- return loc.LC_TIME[item];
- }
- loc = $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY];
- if (item === 'CRNCYSTR') {
- // alias
- item = 'CURRENCY_SYMBOL';
- }
- switch (item) {
- case 'INT_CURR_SYMBOL':
- case 'CURRENCY_SYMBOL':
- case 'MON_DECIMAL_POINT':
- case 'MON_THOUSANDS_SEP':
- case 'POSITIVE_SIGN':
- case 'NEGATIVE_SIGN':
- case 'INT_FRAC_DIGITS':
- case 'FRAC_DIGITS':
- case 'P_CS_PRECEDES':
- case 'P_SEP_BY_SPACE':
- case 'N_CS_PRECEDES':
- case 'N_SEP_BY_SPACE':
- case 'P_SIGN_POSN':
- case 'N_SIGN_POSN':
- // all fall-throughs
- return loc.LC_MONETARY[item.toLowerCase()];
- case 'MON_GROUPING':
- // Same as above, or return something different since this returns an array?
- return loc.LC_MONETARY[item.toLowerCase()];
- }
- loc = $locutus.php.locales[$locutus.php.localeCategories.LC_NUMERIC];
- switch (item) {
- case 'RADIXCHAR':
- case 'DECIMAL_POINT':
- // Fall-through
- return loc.LC_NUMERIC[item.toLowerCase()];
- case 'THOUSEP':
- case 'THOUSANDS_SEP':
- // Fall-through
- return loc.LC_NUMERIC[item.toLowerCase()];
- case 'GROUPING':
- // Same as above, or return something different since this returns an array?
- return loc.LC_NUMERIC[item.toLowerCase()];
- }
- loc = $locutus.php.locales[$locutus.php.localeCategories.LC_MESSAGES];
- switch (item) {
- case 'YESEXPR':
- case 'NOEXPR':
- case 'YESSTR':
- case 'NOSTR':
- // all fall-throughs
- return loc.LC_MESSAGES[item];
- }
- loc = $locutus.php.locales[$locutus.php.localeCategories.LC_CTYPE];
- if (item === 'CODESET') {
- return loc.LC_CTYPE[item];
- }
-
- return false;
- }
-};
-//# sourceMappingURL=nl_langinfo.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/nl_langinfo.js.map b/node_modules/locutus/php/strings/nl_langinfo.js.map
deleted file mode 100644
index 0bdeabe..0000000
--- a/node_modules/locutus/php/strings/nl_langinfo.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/nl_langinfo.js"],"names":["module","exports","nl_langinfo","item","setlocale","require","$global","window","global","$locutus","php","loc","locales","localeCategories","LC_TIME","indexOf","a","parseInt","replace","A","b","B","p","c","x","X","r","LC_MONETARY","toLowerCase","LC_NUMERIC","LC_MESSAGES","LC_CTYPE"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEAD,YAAU,QAAV,EAAoB,CAApB,EAR2C,CAQpB;;AAEvB,MAAIE,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,MAAIC,MAAMF,SAASC,GAAT,CAAaE,OAAb,CAAqBH,SAASC,GAAT,CAAaG,gBAAb,CAA8BC,OAAnD,CAAV;AACA,MAAIX,KAAKY,OAAL,CAAa,QAAb,MAA2B,CAA/B,EAAkC;AAChC,WAAOJ,IAAIG,OAAJ,CAAYE,CAAZ,CAAcC,SAASd,KAAKe,OAAL,CAAa,SAAb,EAAwB,EAAxB,CAAT,EAAsC,EAAtC,IAA4C,CAA1D,CAAP;AACD,GAFD,MAEO,IAAIf,KAAKY,OAAL,CAAa,MAAb,MAAyB,CAA7B,EAAgC;AACr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AnD,CAAN;AACA,QAAI5B,SAAS,SAAb,EAAwB;AACtB,aAAOQ,IAAIoB,QAAJ,CAAa5B,IAAb,CAAP;AACD;;AAED,WAAO,KAAP;AACD;AACF,CAvGD","file":"nl_langinfo.js","sourcesContent":["module.exports = function nl_langinfo (item) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/nl_langinfo/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: nl_langinfo('DAY_1')\n // returns 1: 'Sunday'\n\n var setlocale = require('../strings/setlocale')\n\n setlocale('LC_ALL', 0) // Ensure locale data is available\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n var loc = $locutus.php.locales[$locutus.php.localeCategories.LC_TIME]\n if (item.indexOf('ABDAY_') === 0) {\n return loc.LC_TIME.a[parseInt(item.replace(/^ABDAY_/, ''), 10) - 1]\n } else if (item.indexOf('DAY_') === 0) {\n return loc.LC_TIME.A[parseInt(item.replace(/^DAY_/, ''), 10) - 1]\n } else if (item.indexOf('ABMON_') === 0) {\n return loc.LC_TIME.b[parseInt(item.replace(/^ABMON_/, ''), 10) - 1]\n } else if (item.indexOf('MON_') === 0) {\n return loc.LC_TIME.B[parseInt(item.replace(/^MON_/, ''), 10) - 1]\n } else {\n switch (item) {\n // More LC_TIME\n case 'AM_STR':\n return loc.LC_TIME.p[0]\n case 'PM_STR':\n return loc.LC_TIME.p[1]\n case 'D_T_FMT':\n return loc.LC_TIME.c\n case 'D_FMT':\n return loc.LC_TIME.x\n case 'T_FMT':\n return loc.LC_TIME.X\n case 'T_FMT_AMPM':\n return loc.LC_TIME.r\n case 'ERA':\n case 'ERA_YEAR':\n case 'ERA_D_T_FMT':\n case 'ERA_D_FMT':\n case 'ERA_T_FMT':\n // all fall-throughs\n return loc.LC_TIME[item]\n }\n loc = $locutus.php.locales[$locutus.php.localeCategories.LC_MONETARY]\n if (item === 'CRNCYSTR') {\n // alias\n item = 'CURRENCY_SYMBOL'\n }\n switch (item) {\n case 'INT_CURR_SYMBOL':\n case 'CURRENCY_SYMBOL':\n case 'MON_DECIMAL_POINT':\n case 'MON_THOUSANDS_SEP':\n case 'POSITIVE_SIGN':\n case 'NEGATIVE_SIGN':\n case 'INT_FRAC_DIGITS':\n case 'FRAC_DIGITS':\n case 'P_CS_PRECEDES':\n case 'P_SEP_BY_SPACE':\n case 'N_CS_PRECEDES':\n case 'N_SEP_BY_SPACE':\n case 'P_SIGN_POSN':\n case 'N_SIGN_POSN':\n // all fall-throughs\n return loc.LC_MONETARY[item.toLowerCase()]\n case 'MON_GROUPING':\n // Same as above, or return something different since this returns an array?\n return loc.LC_MONETARY[item.toLowerCase()]\n }\n loc = $locutus.php.locales[$locutus.php.localeCategories.LC_NUMERIC]\n switch (item) {\n case 'RADIXCHAR':\n case 'DECIMAL_POINT':\n // Fall-through\n return loc.LC_NUMERIC[item.toLowerCase()]\n case 'THOUSEP':\n case 'THOUSANDS_SEP':\n // Fall-through\n return loc.LC_NUMERIC[item.toLowerCase()]\n case 'GROUPING':\n // Same as above, or return something different since this returns an array?\n return loc.LC_NUMERIC[item.toLowerCase()]\n }\n loc = $locutus.php.locales[$locutus.php.localeCategories.LC_MESSAGES]\n switch (item) {\n case 'YESEXPR':\n case 'NOEXPR':\n case 'YESSTR':\n case 'NOSTR':\n // all fall-throughs\n return loc.LC_MESSAGES[item]\n }\n loc = $locutus.php.locales[$locutus.php.localeCategories.LC_CTYPE]\n if (item === 'CODESET') {\n return loc.LC_CTYPE[item]\n }\n\n return false\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/number_format.js b/node_modules/locutus/php/strings/number_format.js
deleted file mode 100644
index 2cf6538..0000000
--- a/node_modules/locutus/php/strings/number_format.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict';
-
-module.exports = function number_format(number, decimals, decPoint, thousandsSep) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/number_format/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: davook
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Michael White (http://getsprink.com)
- // bugfixed by: Benjamin Lupton
- // bugfixed by: Allan Jensen (http://www.winternet.no)
- // bugfixed by: Howard Yeend
- // bugfixed by: Diogo Resende
- // bugfixed by: Rival
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // revised by: Luke Smith (http://lucassmith.name)
- // input by: Kheang Hok Chin (http://www.distantia.ca/)
- // input by: Jay Klehr
- // input by: Amir Habibi (http://www.residence-mixte.com/)
- // input by: Amirouche
- // example 1: number_format(1234.56)
- // returns 1: '1,235'
- // example 2: number_format(1234.56, 2, ',', ' ')
- // returns 2: '1 234,56'
- // example 3: number_format(1234.5678, 2, '.', '')
- // returns 3: '1234.57'
- // example 4: number_format(67, 2, ',', '.')
- // returns 4: '67,00'
- // example 5: number_format(1000)
- // returns 5: '1,000'
- // example 6: number_format(67.311, 2)
- // returns 6: '67.31'
- // example 7: number_format(1000.55, 1)
- // returns 7: '1,000.6'
- // example 8: number_format(67000, 5, ',', '.')
- // returns 8: '67.000,00000'
- // example 9: number_format(0.9, 0)
- // returns 9: '1'
- // example 10: number_format('1.20', 2)
- // returns 10: '1.20'
- // example 11: number_format('1.20', 4)
- // returns 11: '1.2000'
- // example 12: number_format('1.2000', 3)
- // returns 12: '1.200'
- // example 13: number_format('1 000,50', 2, '.', ' ')
- // returns 13: '100 050.00'
- // example 14: number_format(1e-8, 8, '.', '')
- // returns 14: '0.00000001'
-
- number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
- var n = !isFinite(+number) ? 0 : +number;
- var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
- var sep = typeof thousandsSep === 'undefined' ? ',' : thousandsSep;
- var dec = typeof decPoint === 'undefined' ? '.' : decPoint;
- var s = '';
-
- var toFixedFix = function toFixedFix(n, prec) {
- var k = Math.pow(10, prec);
- return '' + (Math.round(n * k) / k).toFixed(prec);
- };
-
- // @todo: for IE parseFloat(0.55).toFixed(0) = 0;
- s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
- if (s[0].length > 3) {
- s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
- }
- if ((s[1] || '').length < prec) {
- s[1] = s[1] || '';
- s[1] += new Array(prec - s[1].length + 1).join('0');
- }
-
- return s.join(dec);
-};
-//# sourceMappingURL=number_format.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/number_format.js.map b/node_modules/locutus/php/strings/number_format.js.map
deleted file mode 100644
index e220ea8..0000000
--- a/node_modules/locutus/php/strings/number_format.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/number_format.js"],"names":["module","exports","number_format","number","decimals","decPoint","thousandsSep","replace","n","isFinite","prec","Math","abs","sep","dec","s","toFixedFix","k","pow","round","toFixed","split","length","Array","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,MAAxB,EAAgCC,QAAhC,EAA0CC,QAA1C,EAAoDC,YAApD,EAAkE;AAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAH,WAAS,CAACA,SAAS,EAAV,EAAcI,OAAd,CAAsB,eAAtB,EAAuC,EAAvC,CAAT;AACA,MAAIC,IAAI,CAACC,SAAS,CAACN,MAA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oint, thousandsSep) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/number_format/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: davook\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Michael White (http://getsprink.com)\n // bugfixed by: Benjamin Lupton\n // bugfixed by: Allan Jensen (http://www.winternet.no)\n // bugfixed by: Howard Yeend\n // bugfixed by: Diogo Resende\n // bugfixed by: Rival\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // revised by: Luke Smith (http://lucassmith.name)\n // input by: Kheang Hok Chin (http://www.distantia.ca/)\n // input by: Jay Klehr\n // input by: Amir Habibi (http://www.residence-mixte.com/)\n // input by: Amirouche\n // example 1: number_format(1234.56)\n // returns 1: '1,235'\n // example 2: number_format(1234.56, 2, ',', ' ')\n // returns 2: '1 234,56'\n // example 3: number_format(1234.5678, 2, '.', '')\n // returns 3: '1234.57'\n // example 4: number_format(67, 2, ',', '.')\n // returns 4: '67,00'\n // example 5: number_format(1000)\n // returns 5: '1,000'\n // example 6: number_format(67.311, 2)\n // returns 6: '67.31'\n // example 7: number_format(1000.55, 1)\n // returns 7: '1,000.6'\n // example 8: number_format(67000, 5, ',', '.')\n // returns 8: '67.000,00000'\n // example 9: number_format(0.9, 0)\n // returns 9: '1'\n // example 10: number_format('1.20', 2)\n // returns 10: '1.20'\n // example 11: number_format('1.20', 4)\n // returns 11: '1.2000'\n // example 12: number_format('1.2000', 3)\n // returns 12: '1.200'\n // example 13: number_format('1 000,50', 2, '.', ' ')\n // returns 13: '100 050.00'\n // example 14: number_format(1e-8, 8, '.', '')\n // returns 14: '0.00000001'\n\n number = (number + '').replace(/[^0-9+\\-Ee.]/g, '')\n var n = !isFinite(+number) ? 0 : +number\n var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals)\n var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep\n var dec = (typeof decPoint === 'undefined') ? '.' : decPoint\n var s = ''\n\n var toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec)\n return '' + (Math.round(n * k) / k)\n .toFixed(prec)\n }\n\n // @todo: for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.')\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep)\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || ''\n s[1] += new Array(prec - s[1].length + 1).join('0')\n }\n\n return s.join(dec)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ord.js b/node_modules/locutus/php/strings/ord.js
deleted file mode 100644
index a23cc36..0000000
--- a/node_modules/locutus/php/strings/ord.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-module.exports = function ord(string) {
- // discuss at: http://locutus.io/php/ord/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: incidence
- // example 1: ord('K')
- // returns 1: 75
- // example 2: ord('\uD800\uDC00'); // surrogate pair to create a single Unicode character
- // returns 2: 65536
-
- var str = string + '';
- var code = str.charCodeAt(0);
-
- if (code >= 0xD800 && code <= 0xDBFF) {
- // High surrogate (could change last hex to 0xDB7F to treat
- // high private surrogates as single characters)
- var hi = code;
- if (str.length === 1) {
- // This is just a high surrogate with no following low surrogate,
- // so we return its value;
- return code;
- // we could also throw an error as it is not a complete character,
- // but someone may want to know
- }
- var low = str.charCodeAt(1);
- return (hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000;
- }
- if (code >= 0xDC00 && code <= 0xDFFF) {
- // Low surrogate
- // This is just a low surrogate with no preceding high surrogate,
- // so we return its value;
- return code;
- // we could also throw an error as it is not a complete character,
- // but someone may want to know
- }
-
- return code;
-};
-//# sourceMappingURL=ord.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ord.js.map b/node_modules/locutus/php/strings/ord.js.map
deleted file mode 100644
index 6d21ed7..0000000
--- a/node_modules/locutus/php/strings/ord.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/ord.js"],"names":["module","exports","ord","string","str","code","charCodeAt","hi","length","low"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,GAAT,CAAcC,MAAd,EAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAMD,SAAS,EAAnB;AACA,MAAIE,OAAOD,IAAIE,UAAJ,CAAe,CAAf,CAAX;;AAEA,MAAID,QAAQ,MAAR,IAAkBA,QAAQ,MAA9B,EAAsC;AACpC;AACA;AACA,QAAIE,KAAKF,IAAT;AACA,QAAID,IAAII,MAAJ,KAAe,CAAnB,EAAsB;AACpB;AACA;AACA,aAAOH,IAAP;AACA;AACA;AACD;AACD,QAAII,MAAML,IAAIE,UAAJ,CAAe,CAAf,CAAV;AACA,WAAQ,CAACC,KAAK,MAAN,IAAgB,KAAjB,IAA2BE,MAAM,MAAjC,IAA2C,OAAlD;AACD;AACD,MAAIJ,QAAQ,MAAR,IAAkBA,QAAQ,MAA9B,EAAsC;AACpC;AACA;AACA;AACA,WAAOA,IAAP;AACA;AACA;AACD;;AAED,SAAOA,IAAP;AACD,CAtCD","file":"ord.js","sourcesContent":["module.exports = function ord (string) {\n // discuss at: http://locutus.io/php/ord/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: incidence\n // example 1: ord('K')\n // returns 1: 75\n // example 2: ord('\\uD800\\uDC00'); // surrogate pair to create a single Unicode character\n // returns 2: 65536\n\n var str = string + ''\n var code = str.charCodeAt(0)\n\n if (code >= 0xD800 && code <= 0xDBFF) {\n // High surrogate (could change last hex to 0xDB7F to treat\n // high private surrogates as single characters)\n var hi = code\n if (str.length === 1) {\n // This is just a high surrogate with no following low surrogate,\n // so we return its value;\n return code\n // we could also throw an error as it is not a complete character,\n // but someone may want to know\n }\n var low = str.charCodeAt(1)\n return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000\n }\n if (code >= 0xDC00 && code <= 0xDFFF) {\n // Low surrogate\n // This is just a low surrogate with no preceding high surrogate,\n // so we return its value;\n return code\n // we could also throw an error as it is not a complete character,\n // but someone may want to know\n }\n\n return code\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/parse_str.js b/node_modules/locutus/php/strings/parse_str.js
deleted file mode 100644
index 2ab8cb2..0000000
--- a/node_modules/locutus/php/strings/parse_str.js
+++ /dev/null
@@ -1,160 +0,0 @@
-'use strict';
-
-module.exports = function parse_str(str, array) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/parse_str/
- // original by: Cagri Ekin
- // improved by: Michael White (http://getsprink.com)
- // improved by: Jack
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: stag019
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/)
- // reimplemented by: stag019
- // input by: Dreamer
- // input by: Zaide (http://zaidesthings.com/)
- // input by: David Pesta (http://davidpesta.com/)
- // input by: jeicquest
- // bugfixed by: Rafał Kukawski
- // note 1: When no argument is specified, will put variables in global scope.
- // note 1: When a particular argument has been passed, and the
- // note 1: returned value is different parse_str of PHP.
- // note 1: For example, a=b=c&d====c
- // example 1: var $arr = {}
- // example 1: parse_str('first=foo&second=bar', $arr)
- // example 1: var $result = $arr
- // returns 1: { first: 'foo', second: 'bar' }
- // example 2: var $arr = {}
- // example 2: parse_str('str_a=Jack+and+Jill+didn%27t+see+the+well.', $arr)
- // example 2: var $result = $arr
- // returns 2: { str_a: "Jack and Jill didn't see the well." }
- // example 3: var $abc = {3:'a'}
- // example 3: parse_str('a[b]["c"]=def&a[q]=t+5', $abc)
- // example 3: var $result = $abc
- // returns 3: {"3":"a","a":{"b":{"c":"def"},"q":"t 5"}}
- // example 4: var $arr = {}
- // example 4: parse_str('a[][]=value', $arr)
- // example 4: var $result = $arr
- // returns 4: {"a":{"0":{"0":"value"}}}
- // example 5: var $arr = {}
- // example 5: parse_str('a=1&a[]=2', $arr)
- // example 5: var $result = $arr
- // returns 5: {"a":{"0":"2"}}
-
- var strArr = String(str).replace(/^&/, '').replace(/&$/, '').split('&');
- var sal = strArr.length;
- var i;
- var j;
- var ct;
- var p;
- var lastObj;
- var obj;
- var chr;
- var tmp;
- var key;
- var value;
- var postLeftBracketPos;
- var keys;
- var keysLen;
-
- var _fixStr = function _fixStr(str) {
- return decodeURIComponent(str.replace(/\+/g, '%20'));
- };
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- if (!array) {
- array = $global;
- }
-
- for (i = 0; i < sal; i++) {
- tmp = strArr[i].split('=');
- key = _fixStr(tmp[0]);
- value = tmp.length < 2 ? '' : _fixStr(tmp[1]);
-
- while (key.charAt(0) === ' ') {
- key = key.slice(1);
- }
-
- if (key.indexOf('\x00') > -1) {
- key = key.slice(0, key.indexOf('\x00'));
- }
-
- if (key && key.charAt(0) !== '[') {
- keys = [];
- postLeftBracketPos = 0;
-
- for (j = 0; j < key.length; j++) {
- if (key.charAt(j) === '[' && !postLeftBracketPos) {
- postLeftBracketPos = j + 1;
- } else if (key.charAt(j) === ']') {
- if (postLeftBracketPos) {
- if (!keys.length) {
- keys.push(key.slice(0, postLeftBracketPos - 1));
- }
-
- keys.push(key.substr(postLeftBracketPos, j - postLeftBracketPos));
- postLeftBracketPos = 0;
-
- if (key.charAt(j + 1) !== '[') {
- break;
- }
- }
- }
- }
-
- if (!keys.length) {
- keys = [key];
- }
-
- for (j = 0; j < keys[0].length; j++) {
- chr = keys[0].charAt(j);
-
- if (chr === ' ' || chr === '.' || chr === '[') {
- keys[0] = keys[0].substr(0, j) + '_' + keys[0].substr(j + 1);
- }
-
- if (chr === '[') {
- break;
- }
- }
-
- obj = array;
-
- for (j = 0, keysLen = keys.length; j < keysLen; j++) {
- key = keys[j].replace(/^['"]/, '').replace(/['"]$/, '');
- lastObj = obj;
-
- if ((key === '' || key === ' ') && j !== 0) {
- // Insert new dimension
- ct = -1;
-
- for (p in obj) {
- if (obj.hasOwnProperty(p)) {
- if (+p > ct && p.match(/^\d+$/g)) {
- ct = +p;
- }
- }
- }
-
- key = ct + 1;
- }
-
- // if primitive value, replace with object
- if (Object(obj[key]) !== obj[key]) {
- obj[key] = {};
- }
-
- obj = obj[key];
- }
-
- lastObj[key] = value;
- }
- }
-};
-//# sourceMappingURL=parse_str.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/parse_str.js.map b/node_modules/locutus/php/strings/parse_str.js.map
deleted file mode 100644
index f5d4e78..0000000
--- a/node_modules/locutus/php/strings/parse_str.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/parse_str.js"],"names":["module","exports","parse_str","str","array","strArr","String","replace","split","sal","length","i","j","ct","p","lastObj","obj","chr","tmp","key","value","postLeftBracketPos","keys","keysLen","_fixStr","decodeURIComponent","$global","window","global","$locutus","php","charAt","slice","indexOf","push","substr","hasOwnProperty","match","Object"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyBC,KAAzB,EAAgC;AAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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http://locutus.io/php/parse_str/\n // original by: Cagri Ekin\n // improved by: Michael White (http://getsprink.com)\n // improved by: Jack\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: stag019\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/)\n // reimplemented by: stag019\n // input by: Dreamer\n // input by: Zaide (http://zaidesthings.com/)\n // input by: David Pesta (http://davidpesta.com/)\n // input by: jeicquest\n // bugfixed by: Rafał Kukawski\n // note 1: When no argument is specified, will put variables in global scope.\n // note 1: When a particular argument has been passed, and the\n // note 1: returned value is different parse_str of PHP.\n // note 1: For example, a=b=c&d====c\n // example 1: var $arr = {}\n // example 1: parse_str('first=foo&second=bar', $arr)\n // example 1: var $result = $arr\n // returns 1: { first: 'foo', second: 'bar' }\n // example 2: var $arr = {}\n // example 2: parse_str('str_a=Jack+and+Jill+didn%27t+see+the+well.', $arr)\n // example 2: var $result = $arr\n // returns 2: { str_a: \"Jack and Jill didn't see the well.\" }\n // example 3: var $abc = {3:'a'}\n // example 3: parse_str('a[b][\"c\"]=def&a[q]=t+5', $abc)\n // example 3: var $result = $abc\n // returns 3: {\"3\":\"a\",\"a\":{\"b\":{\"c\":\"def\"},\"q\":\"t 5\"}}\n // example 4: var $arr = {}\n // example 4: parse_str('a[][]=value', $arr)\n // example 4: var $result = $arr\n // returns 4: {\"a\":{\"0\":{\"0\":\"value\"}}}\n // example 5: var $arr = {}\n // example 5: parse_str('a=1&a[]=2', $arr)\n // example 5: var $result = $arr\n // returns 5: {\"a\":{\"0\":\"2\"}}\n\n var strArr = String(str).replace(/^&/, '').replace(/&$/, '').split('&')\n var sal = strArr.length\n var i\n var j\n var ct\n var p\n var lastObj\n var obj\n var chr\n var tmp\n var key\n var value\n var postLeftBracketPos\n var keys\n var keysLen\n\n var _fixStr = function (str) {\n return decodeURIComponent(str.replace(/\\+/g, '%20'))\n }\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n if (!array) {\n array = $global\n }\n\n for (i = 0; i < sal; i++) {\n tmp = strArr[i].split('=')\n key = _fixStr(tmp[0])\n value = (tmp.length < 2) ? '' : _fixStr(tmp[1])\n\n while (key.charAt(0) === ' ') {\n key = key.slice(1)\n }\n\n if (key.indexOf('\\x00') > -1) {\n key = key.slice(0, key.indexOf('\\x00'))\n }\n\n if (key && key.charAt(0) !== '[') {\n keys = []\n postLeftBracketPos = 0\n\n for (j = 0; j < key.length; j++) {\n if (key.charAt(j) === '[' && !postLeftBracketPos) {\n postLeftBracketPos = j + 1\n } else if (key.charAt(j) === ']') {\n if (postLeftBracketPos) {\n if (!keys.length) {\n keys.push(key.slice(0, postLeftBracketPos - 1))\n }\n\n keys.push(key.substr(postLeftBracketPos, j - postLeftBracketPos))\n postLeftBracketPos = 0\n\n if (key.charAt(j + 1) !== '[') {\n break\n }\n }\n }\n }\n\n if (!keys.length) {\n keys = [key]\n }\n\n for (j = 0; j < keys[0].length; j++) {\n chr = keys[0].charAt(j)\n\n if (chr === ' ' || chr === '.' || chr === '[') {\n keys[0] = keys[0].substr(0, j) + '_' + keys[0].substr(j + 1)\n }\n\n if (chr === '[') {\n break\n }\n }\n\n obj = array\n\n for (j = 0, keysLen = keys.length; j < keysLen; j++) {\n key = keys[j].replace(/^['\"]/, '').replace(/['\"]$/, '')\n lastObj = obj\n\n if ((key === '' || key === ' ') && j !== 0) {\n // Insert new dimension\n ct = -1\n\n for (p in obj) {\n if (obj.hasOwnProperty(p)) {\n if (+p > ct && p.match(/^\\d+$/g)) {\n ct = +p\n }\n }\n }\n\n key = ct + 1\n }\n\n // if primitive value, replace with object\n if (Object(obj[key]) !== obj[key]) {\n obj[key] = {}\n }\n\n obj = obj[key]\n }\n\n lastObj[key] = value\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/printf.js b/node_modules/locutus/php/strings/printf.js
deleted file mode 100644
index 2cc1f95..0000000
--- a/node_modules/locutus/php/strings/printf.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function printf() {
- // discuss at: http://locutus.io/php/printf/
- // original by: Ash Searle (http://hexmen.com/blog/)
- // improved by: Michael White (http://getsprink.com)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: printf("%01.2f", 123.1)
- // returns 1: 6
-
- var sprintf = require('../strings/sprintf');
- var echo = require('../strings/echo');
- var ret = sprintf.apply(this, arguments);
- echo(ret);
- return ret.length;
-};
-//# sourceMappingURL=printf.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/printf.js.map b/node_modules/locutus/php/strings/printf.js.map
deleted file mode 100644
index b0975cc..0000000
--- a/node_modules/locutus/php/strings/printf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/printf.js"],"names":["module","exports","printf","sprintf","require","echo","ret","apply","arguments","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,GAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,oBAAR,CAAd;AACA,MAAIC,OAAOD,QAAQ,iBAAR,CAAX;AACA,MAAIE,MAAMH,QAAQI,KAAR,CAAc,IAAd,EAAoBC,SAApB,CAAV;AACAH,OAAKC,GAAL;AACA,SAAOA,IAAIG,MAAX;AACD,CAbD","file":"printf.js","sourcesContent":["module.exports = function printf () {\n // discuss at: http://locutus.io/php/printf/\n // original by: Ash Searle (http://hexmen.com/blog/)\n // improved by: Michael White (http://getsprink.com)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: printf(\"%01.2f\", 123.1)\n // returns 1: 6\n\n var sprintf = require('../strings/sprintf')\n var echo = require('../strings/echo')\n var ret = sprintf.apply(this, arguments)\n echo(ret)\n return ret.length\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/quoted_printable_decode.js b/node_modules/locutus/php/strings/quoted_printable_decode.js
deleted file mode 100644
index 5ad45dc..0000000
--- a/node_modules/locutus/php/strings/quoted_printable_decode.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-module.exports = function quoted_printable_decode(str) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/quoted_printable_decode/
- // original by: Ole Vrijenhoek
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Theriault (https://github.com/Theriault)
- // reimplemented by: Theriault (https://github.com/Theriault)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: quoted_printable_decode('a=3Db=3Dc')
- // returns 1: 'a=b=c'
- // example 2: quoted_printable_decode('abc =20\r\n123 =20\r\n')
- // returns 2: 'abc \r\n123 \r\n'
- // example 3: quoted_printable_decode('012345678901234567890123456789012345678901234567890123456789012345678901234=\r\n56789')
- // returns 3: '01234567890123456789012345678901234567890123456789012345678901234567890123456789'
- // example 4: quoted_printable_decode("Lorem ipsum dolor sit amet=23, consectetur adipisicing elit")
- // returns 4: 'Lorem ipsum dolor sit amet#, consectetur adipisicing elit'
-
- // Decodes all equal signs followed by two hex digits
- var RFC2045Decode1 = /=\r\n/gm;
-
- // the RFC states against decoding lower case encodings, but following apparent PHP behavior
- var RFC2045Decode2IN = /=([0-9A-F]{2})/gim;
- // RFC2045Decode2IN = /=([0-9A-F]{2})/gm,
-
- var RFC2045Decode2OUT = function RFC2045Decode2OUT(sMatch, sHex) {
- return String.fromCharCode(parseInt(sHex, 16));
- };
-
- return str.replace(RFC2045Decode1, '').replace(RFC2045Decode2IN, RFC2045Decode2OUT);
-};
-//# sourceMappingURL=quoted_printable_decode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/quoted_printable_decode.js.map b/node_modules/locutus/php/strings/quoted_printable_decode.js.map
deleted file mode 100644
index d52de41..0000000
--- a/node_modules/locutus/php/strings/quoted_printable_decode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/quoted_printable_decode.js"],"names":["module","exports","quoted_printable_decode","str","RFC2045Decode1","RFC2045Decode2IN","RFC2045Decode2OUT","sMatch","sHex","String","fromCharCode","parseInt","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,uBAAT,CAAkCC,GAAlC,EAAuC;AAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAIC,iBAAiB,SAArB;;AAEA;AACA,MAAIC,mBAAmB,mBAAvB;AACA;;AAEA,MAAIC,oBAAoB,SAApBA,iBAAoB,CAAUC,MAAV,EAAkBC,IAAlB,EAAwB;AAC9C,WAAOC,OAAOC,YAAP,CAAoBC,SAASH,IAAT,EAAe,EAAf,CAApB,CAAP;AACD,GAFD;;AAIA,SAAOL,IAAIS,OAAJ,CAAYR,cAAZ,EAA4B,EAA5B,EACJQ,OADI,CACIP,gBADJ,EACsBC,iBADtB,CAAP;AAED,CA7BD","file":"quoted_printable_decode.js","sourcesContent":["module.exports = function quoted_printable_decode (str) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/quoted_printable_decode/\n // original by: Ole Vrijenhoek\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Theriault (https://github.com/Theriault)\n // reimplemented by: Theriault (https://github.com/Theriault)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: quoted_printable_decode('a=3Db=3Dc')\n // returns 1: 'a=b=c'\n // example 2: quoted_printable_decode('abc =20\\r\\n123 =20\\r\\n')\n // returns 2: 'abc \\r\\n123 \\r\\n'\n // example 3: quoted_printable_decode('012345678901234567890123456789012345678901234567890123456789012345678901234=\\r\\n56789')\n // returns 3: '01234567890123456789012345678901234567890123456789012345678901234567890123456789'\n // example 4: quoted_printable_decode(\"Lorem ipsum dolor sit amet=23, consectetur adipisicing elit\")\n // returns 4: 'Lorem ipsum dolor sit amet#, consectetur adipisicing elit'\n\n // Decodes all equal signs followed by two hex digits\n var RFC2045Decode1 = /=\\r\\n/gm\n\n // the RFC states against decoding lower case encodings, but following apparent PHP behavior\n var RFC2045Decode2IN = /=([0-9A-F]{2})/gim\n // RFC2045Decode2IN = /=([0-9A-F]{2})/gm,\n\n var RFC2045Decode2OUT = function (sMatch, sHex) {\n return String.fromCharCode(parseInt(sHex, 16))\n }\n\n return str.replace(RFC2045Decode1, '')\n .replace(RFC2045Decode2IN, RFC2045Decode2OUT)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/quoted_printable_encode.js b/node_modules/locutus/php/strings/quoted_printable_encode.js
deleted file mode 100644
index 27a39b1..0000000
--- a/node_modules/locutus/php/strings/quoted_printable_encode.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = function quoted_printable_encode(str) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/quoted_printable_encode/
- // original by: Theriault (https://github.com/Theriault)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // example 1: quoted_printable_encode('a=b=c')
- // returns 1: 'a=3Db=3Dc'
- // example 2: quoted_printable_encode('abc \r\n123 \r\n')
- // returns 2: 'abc =20\r\n123 =20\r\n'
- // example 3: quoted_printable_encode('0123456789012345678901234567890123456789012345678901234567890123456789012345')
- // returns 3: '012345678901234567890123456789012345678901234567890123456789012345678901234=\r\n5'
- // test: skip-2
-
- var hexChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'];
- var RFC2045Encode1IN = / \r\n|\r\n|[^!-<>-~ ]/gm;
- var RFC2045Encode1OUT = function RFC2045Encode1OUT(sMatch) {
- // Encode space before CRLF sequence to prevent spaces from being stripped
- // Keep hard line breaks intact; CRLF sequences
- if (sMatch.length > 1) {
- return sMatch.replace(' ', '=20');
- }
- // Encode matching character
- var chr = sMatch.charCodeAt(0);
- return '=' + hexChars[chr >>> 4 & 15] + hexChars[chr & 15];
- };
-
- // Split lines to 75 characters; the reason it's 75 and not 76 is because softline breaks are
- // preceeded by an equal sign; which would be the 76th character. However, if the last line/string
- // was exactly 76 characters, then a softline would not be needed. PHP currently softbreaks
- // anyway; so this function replicates PHP.
-
- var RFC2045Encode2IN = /.{1,72}(?!\r\n)[^=]{0,3}/g;
- var RFC2045Encode2OUT = function RFC2045Encode2OUT(sMatch) {
- if (sMatch.substr(sMatch.length - 2) === '\r\n') {
- return sMatch;
- }
- return sMatch + '=\r\n';
- };
-
- str = str.replace(RFC2045Encode1IN, RFC2045Encode1OUT).replace(RFC2045Encode2IN, RFC2045Encode2OUT);
-
- // Strip last softline break
- return str.substr(0, str.length - 3);
-};
-//# sourceMappingURL=quoted_printable_encode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/quoted_printable_encode.js.map b/node_modules/locutus/php/strings/quoted_printable_encode.js.map
deleted file mode 100644
index 2be312f..0000000
--- a/node_modules/locutus/php/strings/quoted_printable_encode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/quoted_printable_encode.js"],"names":["module","exports","quoted_printable_encode","str","hexChars","RFC2045Encode1IN","RFC2045Encode1OUT","sMatch","length","replace","chr","charCodeAt","RFC2045Encode2IN","RFC2045Encode2OUT","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,uBAAT,CAAkCC,GAAlC,EAAuC;AAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAW,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,EAAoC,GAApC,EAAyC,GAAzC,EAA8C,GAA9C,EAAmD,GAAnD,EAAwD,GAAxD,EAA6D,GAA7D,EAAkE,GAAlE,EAAuE,GAAvE,EAA4E,GAA5E,CAAf;AACA,MAAIC,mBAAmB,yBAAvB;AACA,MAAIC,oBAAoB,SAApBA,iBAAoB,CAAUC,MAAV,EAAkB;AACxC;AACA;AACA,QAAIA,OAAOC,MAAP,GAAgB,CAApB,EAAuB;AACrB,aAAOD,OAAOE,OAAP,CAAe,GAAf,EAAoB,KAApB,CAAP;AACD;AACD;AACA,QAAIC,MAAMH,OAAOI,UAAP,CAAkB,CAAlB,CAAV;AACA,WAAO,MAAMP,SAAWM,QAAQ,CAAT,GAAc,EAAxB,CAAN,GAAqCN,SAAUM,MAAM,EAAhB,CAA5C;AACD,GATD;;AAWA;AACA;AACA;AACA;;AAEA,MAAIE,mBAAmB,2BAAvB;AACA,MAAIC,oBAAoB,SAApBA,iBAAoB,CAAUN,MAAV,EAAkB;AACxC,QAAIA,OAAOO,MAAP,CAAcP,OAAOC,MAAP,GAAgB,CAA9B,MAAqC,MAAzC,EAAiD;AAC/C,aAAOD,MAAP;AACD;AACD,WAAOA,SAAS,OAAhB;AACD,GALD;;AAOAJ,QAAMA,IACHM,OADG,CACKJ,gBADL,EACuBC,iBADvB,EAEHG,OAFG,CAEKG,gBAFL,EAEuBC,iBAFvB,CAAN;;AAIA;AACA,SAAOV,IAAIW,MAAJ,CAAW,CAAX,EAAcX,IAAIK,MAAJ,GAAa,CAA3B,CAAP;AACD,CA7CD","file":"quoted_printable_encode.js","sourcesContent":["module.exports = function quoted_printable_encode (str) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/quoted_printable_encode/\n // original by: Theriault (https://github.com/Theriault)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: quoted_printable_encode('a=b=c')\n // returns 1: 'a=3Db=3Dc'\n // example 2: quoted_printable_encode('abc \\r\\n123 \\r\\n')\n // returns 2: 'abc =20\\r\\n123 =20\\r\\n'\n // example 3: quoted_printable_encode('0123456789012345678901234567890123456789012345678901234567890123456789012345')\n // returns 3: '012345678901234567890123456789012345678901234567890123456789012345678901234=\\r\\n5'\n // test: skip-2\n\n var hexChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']\n var RFC2045Encode1IN = / \\r\\n|\\r\\n|[^!-<>-~ ]/gm\n var RFC2045Encode1OUT = function (sMatch) {\n // Encode space before CRLF sequence to prevent spaces from being stripped\n // Keep hard line breaks intact; CRLF sequences\n if (sMatch.length > 1) {\n return sMatch.replace(' ', '=20')\n }\n // Encode matching character\n var chr = sMatch.charCodeAt(0)\n return '=' + hexChars[((chr >>> 4) & 15)] + hexChars[(chr & 15)]\n }\n\n // Split lines to 75 characters; the reason it's 75 and not 76 is because softline breaks are\n // preceeded by an equal sign; which would be the 76th character. However, if the last line/string\n // was exactly 76 characters, then a softline would not be needed. PHP currently softbreaks\n // anyway; so this function replicates PHP.\n\n var RFC2045Encode2IN = /.{1,72}(?!\\r\\n)[^=]{0,3}/g\n var RFC2045Encode2OUT = function (sMatch) {\n if (sMatch.substr(sMatch.length - 2) === '\\r\\n') {\n return sMatch\n }\n return sMatch + '=\\r\\n'\n }\n\n str = str\n .replace(RFC2045Encode1IN, RFC2045Encode1OUT)\n .replace(RFC2045Encode2IN, RFC2045Encode2OUT)\n\n // Strip last softline break\n return str.substr(0, str.length - 3)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/quotemeta.js b/node_modules/locutus/php/strings/quotemeta.js
deleted file mode 100644
index a1f2190..0000000
--- a/node_modules/locutus/php/strings/quotemeta.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function quotemeta(str) {
- // discuss at: http://locutus.io/php/quotemeta/
- // original by: Paulo Freitas
- // example 1: quotemeta(". + * ? ^ ( $ )")
- // returns 1: '\\. \\+ \\* \\? \\^ \\( \\$ \\)'
-
- return (str + '').replace(/([.\\+*?[^\]$()])/g, '\\$1');
-};
-//# sourceMappingURL=quotemeta.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/quotemeta.js.map b/node_modules/locutus/php/strings/quotemeta.js.map
deleted file mode 100644
index 8731bbb..0000000
--- a/node_modules/locutus/php/strings/quotemeta.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/quotemeta.js"],"names":["module","exports","quotemeta","str","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyB;AACxC;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,OADI,CACI,oBADJ,EAC0B,MAD1B,CAAP;AAED,CARD","file":"quotemeta.js","sourcesContent":["module.exports = function quotemeta (str) {\n // discuss at: http://locutus.io/php/quotemeta/\n // original by: Paulo Freitas\n // example 1: quotemeta(\". + * ? ^ ( $ )\")\n // returns 1: '\\\\. \\\\+ \\\\* \\\\? \\\\^ \\\\( \\\\$ \\\\)'\n\n return (str + '')\n .replace(/([.\\\\+*?[^\\]$()])/g, '\\\\$1')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/rtrim.js b/node_modules/locutus/php/strings/rtrim.js
deleted file mode 100644
index d781b5b..0000000
--- a/node_modules/locutus/php/strings/rtrim.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = function rtrim(str, charlist) {
- // discuss at: http://locutus.io/php/rtrim/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // input by: Erkekjetter
- // input by: rem
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: rtrim(' Kevin van Zonneveld ')
- // returns 1: ' Kevin van Zonneveld'
-
- charlist = !charlist ? ' \\s\xA0' : (charlist + '').replace(/([[\]().?/*{}+$^:])/g, '\\$1');
-
- var re = new RegExp('[' + charlist + ']+$', 'g');
-
- return (str + '').replace(re, '');
-};
-//# sourceMappingURL=rtrim.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/rtrim.js.map b/node_modules/locutus/php/strings/rtrim.js.map
deleted file mode 100644
index 7676ced..0000000
--- a/node_modules/locutus/php/strings/rtrim.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/rtrim.js"],"names":["module","exports","rtrim","str","charlist","replace","re","RegExp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,QAArB,EAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,aAAW,CAACA,QAAD,GAAY,UAAZ,GAA2B,CAACA,WAAW,EAAZ,EACnCC,OADmC,CAC3B,sBAD2B,EACH,MADG,CAAtC;;AAGA,MAAIC,KAAK,IAAIC,MAAJ,CAAW,MAAMH,QAAN,GAAiB,KAA5B,EAAmC,GAAnC,CAAT;;AAEA,SAAO,CAACD,MAAM,EAAP,EAAWE,OAAX,CAAmBC,EAAnB,EAAuB,EAAvB,CAAP;AACD,CAjBD","file":"rtrim.js","sourcesContent":["module.exports = function rtrim (str, charlist) {\n // discuss at: http://locutus.io/php/rtrim/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // input by: Erkekjetter\n // input by: rem\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: rtrim(' Kevin van Zonneveld ')\n // returns 1: ' Kevin van Zonneveld'\n\n charlist = !charlist ? ' \\\\s\\u00A0' : (charlist + '')\n .replace(/([[\\]().?/*{}+$^:])/g, '\\\\$1')\n\n var re = new RegExp('[' + charlist + ']+$', 'g')\n\n return (str + '').replace(re, '')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/setlocale.js b/node_modules/locutus/php/strings/setlocale.js
deleted file mode 100644
index 8b4155f..0000000
--- a/node_modules/locutus/php/strings/setlocale.js
+++ /dev/null
@@ -1,335 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function setlocale(category, locale) {
- // discuss at: http://locutus.io/php/setlocale/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: Blues (http://hacks.bluesmoon.info/strftime/strftime.js)
- // original by: YUI Library (http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html)
- // note 1: Is extensible, but currently only implements locales en,
- // note 1: en_US, en_GB, en_AU, fr, and fr_CA for LC_TIME only; C for LC_CTYPE;
- // note 1: C and en for LC_MONETARY/LC_NUMERIC; en for LC_COLLATE
- // note 1: Uses global: locutus to store locale info
- // note 1: Consider using http://demo.icu-project.org/icu-bin/locexp as basis for localization (as in i18n_loc_set_default())
- // note 2: This function tries to establish the locale via the `window` global.
- // note 2: This feature will not work in Node and hence is Browser-only
- // example 1: setlocale('LC_ALL', 'en_US')
- // returns 1: 'en_US'
-
- var getenv = require('../info/getenv');
-
- var categ = '';
- var cats = [];
- var i = 0;
-
- var _copy = function _copy(orig) {
- if (orig instanceof RegExp) {
- return new RegExp(orig);
- } else if (orig instanceof Date) {
- return new Date(orig);
- }
- var newObj = {};
- for (var i in orig) {
- if (_typeof(orig[i]) === 'object') {
- newObj[i] = _copy(orig[i]);
- } else {
- newObj[i] = orig[i];
- }
- }
- return newObj;
- };
-
- // Function usable by a ngettext implementation (apparently not an accessible part of setlocale(),
- // but locale-specific) See http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
- // though amended with others from https://developer.mozilla.org/En/Localization_and_Plurals (new
- // categories noted with "MDC" below, though not sure of whether there is a convention for the
- // relative order of these newer groups as far as ngettext) The function name indicates the number
- // of plural forms (nplural) Need to look into http://cldr.unicode.org/ (maybe future JavaScript);
- // Dojo has some functions (under new BSD), including JSON conversions of LDML XML from CLDR:
- // http://bugs.dojotoolkit.org/browser/dojo/trunk/cldr and docs at
- // http://api.dojotoolkit.org/jsdoc/HEAD/dojo.cldr
-
- // var _nplurals1 = function (n) {
- // // e.g., Japanese
- // return 0
- // }
- var _nplurals2a = function _nplurals2a(n) {
- // e.g., English
- return n !== 1 ? 1 : 0;
- };
- var _nplurals2b = function _nplurals2b(n) {
- // e.g., French
- return n > 1 ? 1 : 0;
- };
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- // Reconcile Windows vs. *nix locale names?
- // Allow different priority orders of languages, esp. if implement gettext as in
- // LANGUAGE env. var.? (e.g., show German if French is not available)
- if (!$locutus.php.locales || !$locutus.php.locales.fr_CA || !$locutus.php.locales.fr_CA.LC_TIME || !$locutus.php.locales.fr_CA.LC_TIME.x) {
- // Can add to the locales
- $locutus.php.locales = {};
-
- $locutus.php.locales.en = {
- 'LC_COLLATE': function LC_COLLATE(str1, str2) {
- // @todo: This one taken from strcmp, but need for other locales; we don't use localeCompare
- // since its locale is not settable
- return str1 === str2 ? 0 : str1 > str2 ? 1 : -1;
- },
- 'LC_CTYPE': {
- // Need to change any of these for English as opposed to C?
- an: /^[A-Za-z\d]+$/g,
- al: /^[A-Za-z]+$/g,
- ct: /^[\u0000-\u001F\u007F]+$/g,
- dg: /^[\d]+$/g,
- gr: /^[\u0021-\u007E]+$/g,
- lw: /^[a-z]+$/g,
- pr: /^[\u0020-\u007E]+$/g,
- pu: /^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,
- sp: /^[\f\n\r\t\v ]+$/g,
- up: /^[A-Z]+$/g,
- xd: /^[A-Fa-f\d]+$/g,
- CODESET: 'UTF-8',
- // Used by sql_regcase
- lower: 'abcdefghijklmnopqrstuvwxyz',
- upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- },
- 'LC_TIME': {
- // Comments include nl_langinfo() constant equivalents and any
- // changes from Blues' implementation
- a: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
- // ABDAY_
- A: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
- // DAY_
- b: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- // ABMON_
- B: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
- // MON_
- c: '%a %d %b %Y %r %Z',
- // D_T_FMT // changed %T to %r per results
- p: ['AM', 'PM'],
- // AM_STR/PM_STR
- P: ['am', 'pm'],
- // Not available in nl_langinfo()
- r: '%I:%M:%S %p',
- // T_FMT_AMPM (Fixed for all locales)
- x: '%m/%d/%Y',
- // D_FMT // switched order of %m and %d; changed %y to %Y (C uses %y)
- X: '%r',
- // T_FMT // changed from %T to %r (%T is default for C, not English US)
- // Following are from nl_langinfo() or http://www.cptec.inpe.br/sx4/sx4man2/g1ab02e/strftime.4.html
- alt_digits: '',
- // e.g., ordinal
- ERA: '',
- ERA_YEAR: '',
- ERA_D_T_FMT: '',
- ERA_D_FMT: '',
- ERA_T_FMT: ''
- },
- // Assuming distinction between numeric and monetary is thus:
- // See below for C locale
- 'LC_MONETARY': {
- // based on Windows "english" (English_United States.1252) locale
- int_curr_symbol: 'USD',
- currency_symbol: '$',
- mon_decimal_point: '.',
- mon_thousands_sep: ',',
- mon_grouping: [3],
- // use mon_thousands_sep; "" for no grouping; additional array members
- // indicate successive group lengths after first group
- // (e.g., if to be 1,23,456, could be [3, 2])
- positive_sign: '',
- negative_sign: '-',
- int_frac_digits: 2,
- // Fractional digits only for money defaults?
- frac_digits: 2,
- p_cs_precedes: 1,
- // positive currency symbol follows value = 0; precedes value = 1
- p_sep_by_space: 0,
- // 0: no space between curr. symbol and value; 1: space sep. them unless symb.
- // and sign are adjacent then space sep. them from value; 2: space sep. sign
- // and value unless symb. and sign are adjacent then space separates
- n_cs_precedes: 1,
- // see p_cs_precedes
- n_sep_by_space: 0,
- // see p_sep_by_space
- p_sign_posn: 3,
- // 0: parentheses surround quantity and curr. symbol; 1: sign precedes them;
- // 2: sign follows them; 3: sign immed. precedes curr. symbol; 4: sign immed.
- // succeeds curr. symbol
- n_sign_posn: 0 // see p_sign_posn
- },
- 'LC_NUMERIC': {
- // based on Windows "english" (English_United States.1252) locale
- decimal_point: '.',
- thousands_sep: ',',
- grouping: [3] // see mon_grouping, but for non-monetary values (use thousands_sep)
- },
- 'LC_MESSAGES': {
- YESEXPR: '^[yY].*',
- NOEXPR: '^[nN].*',
- YESSTR: '',
- NOSTR: ''
- },
- nplurals: _nplurals2a
- };
- $locutus.php.locales.en_US = _copy($locutus.php.locales.en);
- $locutus.php.locales.en_US.LC_TIME.c = '%a %d %b %Y %r %Z';
- $locutus.php.locales.en_US.LC_TIME.x = '%D';
- $locutus.php.locales.en_US.LC_TIME.X = '%r';
- // The following are based on *nix settings
- $locutus.php.locales.en_US.LC_MONETARY.int_curr_symbol = 'USD ';
- $locutus.php.locales.en_US.LC_MONETARY.p_sign_posn = 1;
- $locutus.php.locales.en_US.LC_MONETARY.n_sign_posn = 1;
- $locutus.php.locales.en_US.LC_MONETARY.mon_grouping = [3, 3];
- $locutus.php.locales.en_US.LC_NUMERIC.thousands_sep = '';
- $locutus.php.locales.en_US.LC_NUMERIC.grouping = [];
-
- $locutus.php.locales.en_GB = _copy($locutus.php.locales.en);
- $locutus.php.locales.en_GB.LC_TIME.r = '%l:%M:%S %P %Z';
-
- $locutus.php.locales.en_AU = _copy($locutus.php.locales.en_GB);
- // Assume C locale is like English (?) (We need C locale for LC_CTYPE)
- $locutus.php.locales.C = _copy($locutus.php.locales.en);
- $locutus.php.locales.C.LC_CTYPE.CODESET = 'ANSI_X3.4-1968';
- $locutus.php.locales.C.LC_MONETARY = {
- int_curr_symbol: '',
- currency_symbol: '',
- mon_decimal_point: '',
- mon_thousands_sep: '',
- mon_grouping: [],
- p_cs_precedes: 127,
- p_sep_by_space: 127,
- n_cs_precedes: 127,
- n_sep_by_space: 127,
- p_sign_posn: 127,
- n_sign_posn: 127,
- positive_sign: '',
- negative_sign: '',
- int_frac_digits: 127,
- frac_digits: 127
- };
- $locutus.php.locales.C.LC_NUMERIC = {
- decimal_point: '.',
- thousands_sep: '',
- grouping: []
- };
- // D_T_FMT
- $locutus.php.locales.C.LC_TIME.c = '%a %b %e %H:%M:%S %Y';
- // D_FMT
- $locutus.php.locales.C.LC_TIME.x = '%m/%d/%y';
- // T_FMT
- $locutus.php.locales.C.LC_TIME.X = '%H:%M:%S';
- $locutus.php.locales.C.LC_MESSAGES.YESEXPR = '^[yY]';
- $locutus.php.locales.C.LC_MESSAGES.NOEXPR = '^[nN]';
-
- $locutus.php.locales.fr = _copy($locutus.php.locales.en);
- $locutus.php.locales.fr.nplurals = _nplurals2b;
- $locutus.php.locales.fr.LC_TIME.a = ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'];
- $locutus.php.locales.fr.LC_TIME.A = ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'];
- $locutus.php.locales.fr.LC_TIME.b = ['jan', 'f\xE9v', 'mar', 'avr', 'mai', 'jun', 'jui', 'ao\xFB', 'sep', 'oct', 'nov', 'd\xE9c'];
- $locutus.php.locales.fr.LC_TIME.B = ['janvier', 'f\xE9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', 'ao\xFBt', 'septembre', 'octobre', 'novembre', 'd\xE9cembre'];
- $locutus.php.locales.fr.LC_TIME.c = '%a %d %b %Y %T %Z';
- $locutus.php.locales.fr.LC_TIME.p = ['', ''];
- $locutus.php.locales.fr.LC_TIME.P = ['', ''];
- $locutus.php.locales.fr.LC_TIME.x = '%d.%m.%Y';
- $locutus.php.locales.fr.LC_TIME.X = '%T';
-
- $locutus.php.locales.fr_CA = _copy($locutus.php.locales.fr);
- $locutus.php.locales.fr_CA.LC_TIME.x = '%Y-%m-%d';
- }
- if (!$locutus.php.locale) {
- $locutus.php.locale = 'en_US';
- // Try to establish the locale via the `window` global
- if (typeof window !== 'undefined' && window.document) {
- var d = window.document;
- var NS_XHTML = 'http://www.w3.org/1999/xhtml';
- var NS_XML = 'http://www.w3.org/XML/1998/namespace';
- if (d.getElementsByTagNameNS && d.getElementsByTagNameNS(NS_XHTML, 'html')[0]) {
- if (d.getElementsByTagNameNS(NS_XHTML, 'html')[0].getAttributeNS && d.getElementsByTagNameNS(NS_XHTML, 'html')[0].getAttributeNS(NS_XML, 'lang')) {
- $locutus.php.locale = d.getElementsByTagName(NS_XHTML, 'html')[0].getAttributeNS(NS_XML, 'lang');
- } else if (d.getElementsByTagNameNS(NS_XHTML, 'html')[0].lang) {
- // XHTML 1.0 only
- $locutus.php.locale = d.getElementsByTagNameNS(NS_XHTML, 'html')[0].lang;
- }
- } else if (d.getElementsByTagName('html')[0] && d.getElementsByTagName('html')[0].lang) {
- $locutus.php.locale = d.getElementsByTagName('html')[0].lang;
- }
- }
- }
- // PHP-style
- $locutus.php.locale = $locutus.php.locale.replace('-', '_');
- // @todo: locale if declared locale hasn't been defined
- if (!($locutus.php.locale in $locutus.php.locales)) {
- if ($locutus.php.locale.replace(/_[a-zA-Z]+$/, '') in $locutus.php.locales) {
- $locutus.php.locale = $locutus.php.locale.replace(/_[a-zA-Z]+$/, '');
- }
- }
-
- if (!$locutus.php.localeCategories) {
- $locutus.php.localeCategories = {
- 'LC_COLLATE': $locutus.php.locale,
- // for string comparison, see strcoll()
- 'LC_CTYPE': $locutus.php.locale,
- // for character classification and conversion, for example strtoupper()
- 'LC_MONETARY': $locutus.php.locale,
- // for localeconv()
- 'LC_NUMERIC': $locutus.php.locale,
- // for decimal separator (See also localeconv())
- 'LC_TIME': $locutus.php.locale,
- // for date and time formatting with strftime()
- // for system responses (available if PHP was compiled with libintl):
- 'LC_MESSAGES': $locutus.php.locale
- };
- }
-
- if (locale === null || locale === '') {
- locale = getenv(category) || getenv('LANG');
- } else if (Object.prototype.toString.call(locale) === '[object Array]') {
- for (i = 0; i < locale.length; i++) {
- if (!(locale[i] in $locutus.php.locales)) {
- if (i === locale.length - 1) {
- // none found
- return false;
- }
- continue;
- }
- locale = locale[i];
- break;
- }
- }
-
- // Just get the locale
- if (locale === '0' || locale === 0) {
- if (category === 'LC_ALL') {
- for (categ in $locutus.php.localeCategories) {
- // Add ".UTF-8" or allow ".@latint", etc. to the end?
- cats.push(categ + '=' + $locutus.php.localeCategories[categ]);
- }
- return cats.join(';');
- }
- return $locutus.php.localeCategories[category];
- }
-
- if (!(locale in $locutus.php.locales)) {
- // Locale not found
- return false;
- }
-
- // Set and get locale
- if (category === 'LC_ALL') {
- for (categ in $locutus.php.localeCategories) {
- $locutus.php.localeCategories[categ] = locale;
- }
- } else {
- $locutus.php.localeCategories[category] = locale;
- }
-
- return locale;
-};
-//# sourceMappingURL=setlocale.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/setlocale.js.map b/node_modules/locutus/php/strings/setlocale.js.map
deleted file mode 100644
index fcb505b..0000000
--- a/node_modules/locutus/php/strings/setlocale.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/setlocale.js"],"names":["module","exports","setlocale","category","locale","getenv","require","categ","cats","i","_copy","orig","RegExp","Date","newObj","_nplurals2a","n","_nplurals2b","$global","window","global","$locutus","php","locales","fr_CA","LC_TIME","x","en","str1","str2","an","al","ct","dg","gr","lw","pr","pu","sp","up","xd","CODESET","lower","upper","a","A","b","B","c","p","P","r","X","alt_digits","ERA","ERA_YEAR","ERA_D_T_FMT","ERA_D_FMT","ERA_T_FMT","int_curr_symbol","currency_symbol","mon_decimal_point","mon_thousands_sep","mon_grouping","positive_sign","negative_sign","int_frac_digits","frac_digits","p_cs_precedes","p_sep_by_space","n_cs_precedes","n_sep_by_space","p_sign_posn","n_sign_posn","decimal_point","thousands_sep","grouping","YESEXPR","NOEXPR","YESSTR","NOSTR","nplurals","en_US","LC_MONETARY","LC_NUMERIC","en_GB","en_AU","C","LC_CTYPE","LC_MESSAGES","fr","document","d","NS_XHTML","NS_XML","getElementsByTagNameNS","getAttributeNS","getElementsByTagName","lang","replace","localeCategories","Object","prototype","toString","call","length","push","join"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8BC,MAA9B,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAASC,QAAQ,gBAAR,CAAb;;AAEA,MAAIC,QAAQ,EAAZ;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,IAAI,CAAR;;AAEA,MAAIC,QAAQ,SAASA,KAAT,CAAgBC,IAAhB,EAAsB;AAChC,QAAIA,gBAAgBC,MAApB,EAA4B;AAC1B,aAAO,IAAIA,MAAJ,CAAWD,IAAX,CAAP;AACD,KAFD,MAEO,IAAIA,gBAAgBE,IAApB,EAA0B;AAC/B,aAAO,IAAIA,IAAJ,CAASF,IAAT,CAAP;AACD;AACD,QAAIG,SAAS,EAAb;AACA,SAAK,IAAIL,CAAT,IAAcE,IAAd,EAAoB;AAClB,UAAI,QAAOA,KAAKF,CAAL,CAAP,MAAmB,QAAvB,EAAiC;AAC/BK,eAAOL,CAAP,IAAYC,MAAMC,KAAKF,CAAL,CAAN,CAAZ;AACD,OAFD,MAEO;AACLK,eAAOL,CAAP,IAAYE,KAAKF,CAAL,CAAZ;AACD;AACF;AACD,WAAOK,MAAP;AACD,GAfD;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAIC,cAAc,SAAdA,WAAc,CAAUC,CAAV,EAAa;AAC7B;AACA,WAAOA,MAAM,CAAN,GAAU,CAAV,GAAc,CAArB;AACD,GAHD;AAIA,MAAIC,cAAc,SAAdA,WAAc,CAAUD,CAAV,EAAa;AAC7B;AACA,WAAOA,IAAI,CAAJ,GAAQ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zB,WAAKI,KAAL,IAAcc,SAASC,GAAT,CAAa8E,gBAA3B,EAA6C;AAC3C;AACA5F,aAAKkG,IAAL,CAAUnG,QAAQ,GAAR,GAAcc,SAASC,GAAT,CAAa8E,gBAAb,CAA8B7F,KAA9B,CAAxB;AACD;AACD,aAAOC,KAAKmG,IAAL,CAAU,GAAV,CAAP;AACD;AACD,WAAOtF,SAASC,GAAT,CAAa8E,gBAAb,CAA8BjG,QAA9B,CAAP;AACD;;AAED,MAAI,EAAEC,UAAUiB,SAASC,GAAT,CAAaC,OAAzB,CAAJ,EAAuC;AACrC;AACA,WAAO,KAAP;AACD;;AAED;AACA,MAAIpB,aAAa,QAAjB,EAA2B;AACzB,SAAKI,KAAL,IAAcc,SAASC,GAAT,CAAa8E,gBAA3B,EAA6C;AAC3C/E,eAASC,GAAT,CAAa8E,gBAAb,CAA8B7F,KAA9B,IAAuCH,MAAvC;AACD;AACF,GAJD,MAIO;AACLiB,aAASC,GAAT,CAAa8E,gBAAb,CAA8BjG,QAA9B,IAA0CC,MAA1C;AACD;;AAED,SAAOA,MAAP;AACD,CA1VD","file":"setlocale.js","sourcesContent":["module.exports = function setlocale (category, locale) {\n // discuss at: http://locutus.io/php/setlocale/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: Blues (http://hacks.bluesmoon.info/strftime/strftime.js)\n // original by: YUI Library (http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html)\n // note 1: Is extensible, but currently only implements locales en,\n // note 1: en_US, en_GB, en_AU, fr, and fr_CA for LC_TIME only; C for LC_CTYPE;\n // note 1: C and en for LC_MONETARY/LC_NUMERIC; en for LC_COLLATE\n // note 1: Uses global: locutus to store locale info\n // note 1: Consider using http://demo.icu-project.org/icu-bin/locexp as basis for localization (as in i18n_loc_set_default())\n // note 2: This function tries to establish the locale via the `window` global.\n // note 2: This feature will not work in Node and hence is Browser-only\n // example 1: setlocale('LC_ALL', 'en_US')\n // returns 1: 'en_US'\n\n var getenv = require('../info/getenv')\n\n var categ = ''\n var cats = []\n var i = 0\n\n var _copy = function _copy (orig) {\n if (orig instanceof RegExp) {\n return new RegExp(orig)\n } else if (orig instanceof Date) {\n return new Date(orig)\n }\n var newObj = {}\n for (var i in orig) {\n if (typeof orig[i] === 'object') {\n newObj[i] = _copy(orig[i])\n } else {\n newObj[i] = orig[i]\n }\n }\n return newObj\n }\n\n // Function usable by a ngettext implementation (apparently not an accessible part of setlocale(),\n // but locale-specific) See http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms\n // though amended with others from https://developer.mozilla.org/En/Localization_and_Plurals (new\n // categories noted with \"MDC\" below, though not sure of whether there is a convention for the\n // relative order of these newer groups as far as ngettext) The function name indicates the number\n // of plural forms (nplural) Need to look into http://cldr.unicode.org/ (maybe future JavaScript);\n // Dojo has some functions (under new BSD), including JSON conversions of LDML XML from CLDR:\n // http://bugs.dojotoolkit.org/browser/dojo/trunk/cldr and docs at\n // http://api.dojotoolkit.org/jsdoc/HEAD/dojo.cldr\n\n // var _nplurals1 = function (n) {\n // // e.g., Japanese\n // return 0\n // }\n var _nplurals2a = function (n) {\n // e.g., English\n return n !== 1 ? 1 : 0\n }\n var _nplurals2b = function (n) {\n // e.g., French\n return n > 1 ? 1 : 0\n }\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n // Reconcile Windows vs. *nix locale names?\n // Allow different priority orders of languages, esp. if implement gettext as in\n // LANGUAGE env. var.? (e.g., show German if French is not available)\n if (!$locutus.php.locales ||\n !$locutus.php.locales.fr_CA ||\n !$locutus.php.locales.fr_CA.LC_TIME ||\n !$locutus.php.locales.fr_CA.LC_TIME.x) {\n // Can add to the locales\n $locutus.php.locales = {}\n\n $locutus.php.locales.en = {\n 'LC_COLLATE': function (str1, str2) {\n // @todo: This one taken from strcmp, but need for other locales; we don't use localeCompare\n // since its locale is not settable\n return (str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1)\n },\n 'LC_CTYPE': {\n // Need to change any of these for English as opposed to C?\n an: /^[A-Za-z\\d]+$/g,\n al: /^[A-Za-z]+$/g,\n ct: /^[\\u0000-\\u001F\\u007F]+$/g,\n dg: /^[\\d]+$/g,\n gr: /^[\\u0021-\\u007E]+$/g,\n lw: /^[a-z]+$/g,\n pr: /^[\\u0020-\\u007E]+$/g,\n pu: /^[\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E]+$/g,\n sp: /^[\\f\\n\\r\\t\\v ]+$/g,\n up: /^[A-Z]+$/g,\n xd: /^[A-Fa-f\\d]+$/g,\n CODESET: 'UTF-8',\n // Used by sql_regcase\n lower: 'abcdefghijklmnopqrstuvwxyz',\n upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n },\n 'LC_TIME': {\n // Comments include nl_langinfo() constant equivalents and any\n // changes from Blues' implementation\n a: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n // ABDAY_\n A: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n // DAY_\n b: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n // ABMON_\n B: ['January', 'February', 'March', 'April', 'May', 'June', 'July',\n 'August', 'September', 'October',\n 'November', 'December'\n ],\n // MON_\n c: '%a %d %b %Y %r %Z',\n // D_T_FMT // changed %T to %r per results\n p: ['AM', 'PM'],\n // AM_STR/PM_STR\n P: ['am', 'pm'],\n // Not available in nl_langinfo()\n r: '%I:%M:%S %p',\n // T_FMT_AMPM (Fixed for all locales)\n x: '%m/%d/%Y',\n // D_FMT // switched order of %m and %d; changed %y to %Y (C uses %y)\n X: '%r',\n // T_FMT // changed from %T to %r (%T is default for C, not English US)\n // Following are from nl_langinfo() or http://www.cptec.inpe.br/sx4/sx4man2/g1ab02e/strftime.4.html\n alt_digits: '',\n // e.g., ordinal\n ERA: '',\n ERA_YEAR: '',\n ERA_D_T_FMT: '',\n ERA_D_FMT: '',\n ERA_T_FMT: ''\n },\n // Assuming distinction between numeric and monetary is thus:\n // See below for C locale\n 'LC_MONETARY': {\n // based on Windows \"english\" (English_United States.1252) locale\n int_curr_symbol: 'USD',\n currency_symbol: '$',\n mon_decimal_point: '.',\n mon_thousands_sep: ',',\n mon_grouping: [3],\n // use mon_thousands_sep; \"\" for no grouping; additional array members\n // indicate successive group lengths after first group\n // (e.g., if to be 1,23,456, could be [3, 2])\n positive_sign: '',\n negative_sign: '-',\n int_frac_digits: 2,\n // Fractional digits only for money defaults?\n frac_digits: 2,\n p_cs_precedes: 1,\n // positive currency symbol follows value = 0; precedes value = 1\n p_sep_by_space: 0,\n // 0: no space between curr. symbol and value; 1: space sep. them unless symb.\n // and sign are adjacent then space sep. them from value; 2: space sep. sign\n // and value unless symb. and sign are adjacent then space separates\n n_cs_precedes: 1,\n // see p_cs_precedes\n n_sep_by_space: 0,\n // see p_sep_by_space\n p_sign_posn: 3,\n // 0: parentheses surround quantity and curr. symbol; 1: sign precedes them;\n // 2: sign follows them; 3: sign immed. precedes curr. symbol; 4: sign immed.\n // succeeds curr. symbol\n n_sign_posn: 0 // see p_sign_posn\n },\n 'LC_NUMERIC': {\n // based on Windows \"english\" (English_United States.1252) locale\n decimal_point: '.',\n thousands_sep: ',',\n grouping: [3] // see mon_grouping, but for non-monetary values (use thousands_sep)\n },\n 'LC_MESSAGES': {\n YESEXPR: '^[yY].*',\n NOEXPR: '^[nN].*',\n YESSTR: '',\n NOSTR: ''\n },\n nplurals: _nplurals2a\n }\n $locutus.php.locales.en_US = _copy($locutus.php.locales.en)\n $locutus.php.locales.en_US.LC_TIME.c = '%a %d %b %Y %r %Z'\n $locutus.php.locales.en_US.LC_TIME.x = '%D'\n $locutus.php.locales.en_US.LC_TIME.X = '%r'\n // The following are based on *nix settings\n $locutus.php.locales.en_US.LC_MONETARY.int_curr_symbol = 'USD '\n $locutus.php.locales.en_US.LC_MONETARY.p_sign_posn = 1\n $locutus.php.locales.en_US.LC_MONETARY.n_sign_posn = 1\n $locutus.php.locales.en_US.LC_MONETARY.mon_grouping = [3, 3]\n $locutus.php.locales.en_US.LC_NUMERIC.thousands_sep = ''\n $locutus.php.locales.en_US.LC_NUMERIC.grouping = []\n\n $locutus.php.locales.en_GB = _copy($locutus.php.locales.en)\n $locutus.php.locales.en_GB.LC_TIME.r = '%l:%M:%S %P %Z'\n\n $locutus.php.locales.en_AU = _copy($locutus.php.locales.en_GB)\n // Assume C locale is like English (?) (We need C locale for LC_CTYPE)\n $locutus.php.locales.C = _copy($locutus.php.locales.en)\n $locutus.php.locales.C.LC_CTYPE.CODESET = 'ANSI_X3.4-1968'\n $locutus.php.locales.C.LC_MONETARY = {\n int_curr_symbol: '',\n currency_symbol: '',\n mon_decimal_point: '',\n mon_thousands_sep: '',\n mon_grouping: [],\n p_cs_precedes: 127,\n p_sep_by_space: 127,\n n_cs_precedes: 127,\n n_sep_by_space: 127,\n p_sign_posn: 127,\n n_sign_posn: 127,\n positive_sign: '',\n negative_sign: '',\n int_frac_digits: 127,\n frac_digits: 127\n }\n $locutus.php.locales.C.LC_NUMERIC = {\n decimal_point: '.',\n thousands_sep: '',\n grouping: []\n }\n // D_T_FMT\n $locutus.php.locales.C.LC_TIME.c = '%a %b %e %H:%M:%S %Y'\n // D_FMT\n $locutus.php.locales.C.LC_TIME.x = '%m/%d/%y'\n // T_FMT\n $locutus.php.locales.C.LC_TIME.X = '%H:%M:%S'\n $locutus.php.locales.C.LC_MESSAGES.YESEXPR = '^[yY]'\n $locutus.php.locales.C.LC_MESSAGES.NOEXPR = '^[nN]'\n\n $locutus.php.locales.fr = _copy($locutus.php.locales.en)\n $locutus.php.locales.fr.nplurals = _nplurals2b\n $locutus.php.locales.fr.LC_TIME.a = ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam']\n $locutus.php.locales.fr.LC_TIME.A = ['dimanche', 'lundi', 'mardi', 'mercredi',\n 'jeudi', 'vendredi', 'samedi']\n $locutus.php.locales.fr.LC_TIME.b = ['jan', 'f\\u00E9v', 'mar', 'avr', 'mai',\n 'jun', 'jui', 'ao\\u00FB', 'sep', 'oct',\n 'nov', 'd\\u00E9c'\n ]\n $locutus.php.locales.fr.LC_TIME.B = ['janvier', 'f\\u00E9vrier', 'mars',\n 'avril', 'mai', 'juin', 'juillet', 'ao\\u00FBt',\n 'septembre', 'octobre', 'novembre', 'd\\u00E9cembre'\n ]\n $locutus.php.locales.fr.LC_TIME.c = '%a %d %b %Y %T %Z'\n $locutus.php.locales.fr.LC_TIME.p = ['', '']\n $locutus.php.locales.fr.LC_TIME.P = ['', '']\n $locutus.php.locales.fr.LC_TIME.x = '%d.%m.%Y'\n $locutus.php.locales.fr.LC_TIME.X = '%T'\n\n $locutus.php.locales.fr_CA = _copy($locutus.php.locales.fr)\n $locutus.php.locales.fr_CA.LC_TIME.x = '%Y-%m-%d'\n }\n if (!$locutus.php.locale) {\n $locutus.php.locale = 'en_US'\n // Try to establish the locale via the `window` global\n if (typeof window !== 'undefined' && window.document) {\n var d = window.document\n var NS_XHTML = 'http://www.w3.org/1999/xhtml'\n var NS_XML = 'http://www.w3.org/XML/1998/namespace'\n if (d.getElementsByTagNameNS &&\n d.getElementsByTagNameNS(NS_XHTML, 'html')[0]) {\n if (d.getElementsByTagNameNS(NS_XHTML, 'html')[0].getAttributeNS &&\n d.getElementsByTagNameNS(NS_XHTML, 'html')[0].getAttributeNS(NS_XML, 'lang')) {\n $locutus.php.locale = d.getElementsByTagName(NS_XHTML, 'html')[0]\n .getAttributeNS(NS_XML, 'lang')\n } else if (d.getElementsByTagNameNS(NS_XHTML, 'html')[0].lang) {\n // XHTML 1.0 only\n $locutus.php.locale = d.getElementsByTagNameNS(NS_XHTML, 'html')[0].lang\n }\n } else if (d.getElementsByTagName('html')[0] &&\n d.getElementsByTagName('html')[0].lang) {\n $locutus.php.locale = d.getElementsByTagName('html')[0].lang\n }\n }\n }\n // PHP-style\n $locutus.php.locale = $locutus.php.locale.replace('-', '_')\n // @todo: locale if declared locale hasn't been defined\n if (!($locutus.php.locale in $locutus.php.locales)) {\n if ($locutus.php.locale.replace(/_[a-zA-Z]+$/, '') in $locutus.php.locales) {\n $locutus.php.locale = $locutus.php.locale.replace(/_[a-zA-Z]+$/, '')\n }\n }\n\n if (!$locutus.php.localeCategories) {\n $locutus.php.localeCategories = {\n 'LC_COLLATE': $locutus.php.locale,\n // for string comparison, see strcoll()\n 'LC_CTYPE': $locutus.php.locale,\n // for character classification and conversion, for example strtoupper()\n 'LC_MONETARY': $locutus.php.locale,\n // for localeconv()\n 'LC_NUMERIC': $locutus.php.locale,\n // for decimal separator (See also localeconv())\n 'LC_TIME': $locutus.php.locale,\n // for date and time formatting with strftime()\n // for system responses (available if PHP was compiled with libintl):\n 'LC_MESSAGES': $locutus.php.locale\n }\n }\n\n if (locale === null || locale === '') {\n locale = getenv(category) || getenv('LANG')\n } else if (Object.prototype.toString.call(locale) === '[object Array]') {\n for (i = 0; i < locale.length; i++) {\n if (!(locale[i] in $locutus.php.locales)) {\n if (i === locale.length - 1) {\n // none found\n return false\n }\n continue\n }\n locale = locale[i]\n break\n }\n }\n\n // Just get the locale\n if (locale === '0' || locale === 0) {\n if (category === 'LC_ALL') {\n for (categ in $locutus.php.localeCategories) {\n // Add \".UTF-8\" or allow \".@latint\", etc. to the end?\n cats.push(categ + '=' + $locutus.php.localeCategories[categ])\n }\n return cats.join(';')\n }\n return $locutus.php.localeCategories[category]\n }\n\n if (!(locale in $locutus.php.locales)) {\n // Locale not found\n return false\n }\n\n // Set and get locale\n if (category === 'LC_ALL') {\n for (categ in $locutus.php.localeCategories) {\n $locutus.php.localeCategories[categ] = locale\n }\n } else {\n $locutus.php.localeCategories[category] = locale\n }\n\n return locale\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sha1.js b/node_modules/locutus/php/strings/sha1.js
deleted file mode 100644
index 596b724..0000000
--- a/node_modules/locutus/php/strings/sha1.js
+++ /dev/null
@@ -1,151 +0,0 @@
-'use strict';
-
-module.exports = function sha1(str) {
- // discuss at: http://locutus.io/php/sha1/
- // original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // improved by: Michael White (http://getsprink.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // note 1: Keep in mind that in accordance with PHP, the whole string is buffered and then
- // note 1: hashed. If available, we'd recommend using Node's native crypto modules directly
- // note 1: in a steaming fashion for faster and more efficient hashing
- // example 1: sha1('Kevin van Zonneveld')
- // returns 1: '54916d2e62f65b3afa6e192e6a601cdbe5cb5897'
-
- var hash;
- try {
- var crypto = require('crypto');
- var sha1sum = crypto.createHash('sha1');
- sha1sum.update(str);
- hash = sha1sum.digest('hex');
- } catch (e) {
- hash = undefined;
- }
-
- if (hash !== undefined) {
- return hash;
- }
-
- var _rotLeft = function _rotLeft(n, s) {
- var t4 = n << s | n >>> 32 - s;
- return t4;
- };
-
- var _cvtHex = function _cvtHex(val) {
- var str = '';
- var i;
- var v;
-
- for (i = 7; i >= 0; i--) {
- v = val >>> i * 4 & 0x0f;
- str += v.toString(16);
- }
- return str;
- };
-
- var blockstart;
- var i, j;
- var W = new Array(80);
- var H0 = 0x67452301;
- var H1 = 0xEFCDAB89;
- var H2 = 0x98BADCFE;
- var H3 = 0x10325476;
- var H4 = 0xC3D2E1F0;
- var A, B, C, D, E;
- var temp;
-
- // utf8_encode
- str = unescape(encodeURIComponent(str));
- var strLen = str.length;
-
- var wordArray = [];
- for (i = 0; i < strLen - 3; i += 4) {
- j = str.charCodeAt(i) << 24 | str.charCodeAt(i + 1) << 16 | str.charCodeAt(i + 2) << 8 | str.charCodeAt(i + 3);
- wordArray.push(j);
- }
-
- switch (strLen % 4) {
- case 0:
- i = 0x080000000;
- break;
- case 1:
- i = str.charCodeAt(strLen - 1) << 24 | 0x0800000;
- break;
- case 2:
- i = str.charCodeAt(strLen - 2) << 24 | str.charCodeAt(strLen - 1) << 16 | 0x08000;
- break;
- case 3:
- i = str.charCodeAt(strLen - 3) << 24 | str.charCodeAt(strLen - 2) << 16 | str.charCodeAt(strLen - 1) << 8 | 0x80;
- break;
- }
-
- wordArray.push(i);
-
- while (wordArray.length % 16 !== 14) {
- wordArray.push(0);
- }
-
- wordArray.push(strLen >>> 29);
- wordArray.push(strLen << 3 & 0x0ffffffff);
-
- for (blockstart = 0; blockstart < wordArray.length; blockstart += 16) {
- for (i = 0; i < 16; i++) {
- W[i] = wordArray[blockstart + i];
- }
- for (i = 16; i <= 79; i++) {
- W[i] = _rotLeft(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
- }
-
- A = H0;
- B = H1;
- C = H2;
- D = H3;
- E = H4;
-
- for (i = 0; i <= 19; i++) {
- temp = _rotLeft(A, 5) + (B & C | ~B & D) + E + W[i] + 0x5A827999 & 0x0ffffffff;
- E = D;
- D = C;
- C = _rotLeft(B, 30);
- B = A;
- A = temp;
- }
-
- for (i = 20; i <= 39; i++) {
- temp = _rotLeft(A, 5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1 & 0x0ffffffff;
- E = D;
- D = C;
- C = _rotLeft(B, 30);
- B = A;
- A = temp;
- }
-
- for (i = 40; i <= 59; i++) {
- temp = _rotLeft(A, 5) + (B & C | B & D | C & D) + E + W[i] + 0x8F1BBCDC & 0x0ffffffff;
- E = D;
- D = C;
- C = _rotLeft(B, 30);
- B = A;
- A = temp;
- }
-
- for (i = 60; i <= 79; i++) {
- temp = _rotLeft(A, 5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6 & 0x0ffffffff;
- E = D;
- D = C;
- C = _rotLeft(B, 30);
- B = A;
- A = temp;
- }
-
- H0 = H0 + A & 0x0ffffffff;
- H1 = H1 + B & 0x0ffffffff;
- H2 = H2 + C & 0x0ffffffff;
- H3 = H3 + D & 0x0ffffffff;
- H4 = H4 + E & 0x0ffffffff;
- }
-
- temp = _cvtHex(H0) + _cvtHex(H1) + _cvtHex(H2) + _cvtHex(H3) + _cvtHex(H4);
- return temp.toLowerCase();
-};
-//# sourceMappingURL=sha1.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sha1.js.map b/node_modules/locutus/php/strings/sha1.js.map
deleted file mode 100644
index ed3baec..0000000
--- a/node_modules/locutus/php/strings/sha1.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/sha1.js"],"names":["module","exports","sha1","str","hash","crypto","require","sha1sum","createHash","update","digest","e","undefined","_rotLeft","n","s","t4","_cvtHex","val","i","v","toString","blockstart","j","W","Array","H0","H1","H2","H3","H4","A","B","C","D","E","temp","unescape","encodeURIComponent","strLen","length","wordArray","charCodeAt","push","toLowerCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAJ;AACA,MAAI;AACF,QAAIC,SAASC,QAAQ,QAAR,CAAb;AACA,QAAIC,UAAUF,OAAOG,UAAP,CAAkB,MAAlB,CAAd;AACAD,YAAQE,MAAR,CAAeN,GAAf;AACAC,WAAOG,QAAQG,MAAR,CAAe,KAAf,CAAP;AACD,GALD,CAKE,OAAOC,CAAP,EAAU;AACVP,WAAOQ,SAAP;AACD;;AAED,MAAIR,SAASQ,SAAb,EAAwB;AACtB,WAAOR,IAAP;AACD;;AAED,MAAIS,WAAW,SAAXA,QAAW,CAAUC,CAAV,EAAaC,CAAb,EAAgB;AAC7B,QAAIC,KAAMF,KAAKC,CAAN,GAAYD,MAAO,KAAKC,CAAjC;AACA,WAAOC,EAAP;AACD,GAHD;;AAKA,MAAIC,UAAU,SAAVA,OAAU,CAAUC,GAAV,EAAe;AAC3B,QAAIf,MAAM,EAAV;AACA,QAAIgB,CAAJ;AACA,QAAIC,CAAJ;;AAEA,SAAKD,IAAI,CAAT,EAAYA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AAIpB,SAASmB,CAAT,EAAY,EAAZ,CAAJ;AACAA,UAAID,CAAJ;AACAA,UAAIK,IAAJ;AACD;;AAEDV,SAAMA,KAAKK,CAAN,GAAW,WAAhB;AACAJ,SAAMA,KAAKK,CAAN,GAAW,WAAhB;AACAJ,SAAMA,KAAKK,CAAN,GAAW,WAAhB;AACAJ,SAAMA,KAAKK,CAAN,GAAW,WAAhB;AACAJ,SAAMA,KAAKK,CAAN,GAAW,WAAhB;AACD;;AAEDC,SAAOnB,QAAQS,EAAR,IAAcT,QAAQU,EAAR,CAAd,GAA4BV,QAAQW,EAAR,CAA5B,GAA0CX,QAAQY,EAAR,CAA1C,GAAwDZ,QAAQa,EAAR,CAA/D;AACA,SAAOM,KAAKQ,WAAL,EAAP;AACD,CAzJD","file":"sha1.js","sourcesContent":["module.exports = function sha1 (str) {\n // discuss at: http://locutus.io/php/sha1/\n // original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // improved by: Michael White (http://getsprink.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // note 1: Keep in mind that in accordance with PHP, the whole string is buffered and then\n // note 1: hashed. If available, we'd recommend using Node's native crypto modules directly\n // note 1: in a steaming fashion for faster and more efficient hashing\n // example 1: sha1('Kevin van Zonneveld')\n // returns 1: '54916d2e62f65b3afa6e192e6a601cdbe5cb5897'\n\n var hash\n try {\n var crypto = require('crypto')\n var sha1sum = crypto.createHash('sha1')\n sha1sum.update(str)\n hash = sha1sum.digest('hex')\n } catch (e) {\n hash = undefined\n }\n\n if (hash !== undefined) {\n return hash\n }\n\n var _rotLeft = function (n, s) {\n var t4 = (n << s) | (n >>> (32 - s))\n return t4\n }\n\n var _cvtHex = function (val) {\n var str = ''\n var i\n var v\n\n for (i = 7; i >= 0; i--) {\n v = (val >>> (i * 4)) & 0x0f\n str += v.toString(16)\n }\n return str\n }\n\n var blockstart\n var i, j\n var W = new Array(80)\n var H0 = 0x67452301\n var H1 = 0xEFCDAB89\n var H2 = 0x98BADCFE\n var H3 = 0x10325476\n var H4 = 0xC3D2E1F0\n var A, B, C, D, E\n var temp\n\n // utf8_encode\n str = unescape(encodeURIComponent(str))\n var strLen = str.length\n\n var wordArray = []\n for (i = 0; i < strLen - 3; i += 4) {\n j = str.charCodeAt(i) << 24 |\n str.charCodeAt(i + 1) << 16 |\n str.charCodeAt(i + 2) << 8 |\n str.charCodeAt(i + 3)\n wordArray.push(j)\n }\n\n switch (strLen % 4) {\n case 0:\n i = 0x080000000\n break\n case 1:\n i = str.charCodeAt(strLen - 1) << 24 | 0x0800000\n break\n case 2:\n i = str.charCodeAt(strLen - 2) << 24 | str.charCodeAt(strLen - 1) << 16 | 0x08000\n break\n case 3:\n i = str.charCodeAt(strLen - 3) << 24 |\n str.charCodeAt(strLen - 2) << 16 |\n str.charCodeAt(strLen - 1) <<\n 8 | 0x80\n break\n }\n\n wordArray.push(i)\n\n while ((wordArray.length % 16) !== 14) {\n wordArray.push(0)\n }\n\n wordArray.push(strLen >>> 29)\n wordArray.push((strLen << 3) & 0x0ffffffff)\n\n for (blockstart = 0; blockstart < wordArray.length; blockstart += 16) {\n for (i = 0; i < 16; i++) {\n W[i] = wordArray[blockstart + i]\n }\n for (i = 16; i <= 79; i++) {\n W[i] = _rotLeft(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1)\n }\n\n A = H0\n B = H1\n C = H2\n D = H3\n E = H4\n\n for (i = 0; i <= 19; i++) {\n temp = (_rotLeft(A, 5) + ((B & C) | (~B & D)) + E + W[i] + 0x5A827999) & 0x0ffffffff\n E = D\n D = C\n C = _rotLeft(B, 30)\n B = A\n A = temp\n }\n\n for (i = 20; i <= 39; i++) {\n temp = (_rotLeft(A, 5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff\n E = D\n D = C\n C = _rotLeft(B, 30)\n B = A\n A = temp\n }\n\n for (i = 40; i <= 59; i++) {\n temp = (_rotLeft(A, 5) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff\n E = D\n D = C\n C = _rotLeft(B, 30)\n B = A\n A = temp\n }\n\n for (i = 60; i <= 79; i++) {\n temp = (_rotLeft(A, 5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6) & 0x0ffffffff\n E = D\n D = C\n C = _rotLeft(B, 30)\n B = A\n A = temp\n }\n\n H0 = (H0 + A) & 0x0ffffffff\n H1 = (H1 + B) & 0x0ffffffff\n H2 = (H2 + C) & 0x0ffffffff\n H3 = (H3 + D) & 0x0ffffffff\n H4 = (H4 + E) & 0x0ffffffff\n }\n\n temp = _cvtHex(H0) + _cvtHex(H1) + _cvtHex(H2) + _cvtHex(H3) + _cvtHex(H4)\n return temp.toLowerCase()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sha1_file.js b/node_modules/locutus/php/strings/sha1_file.js
deleted file mode 100644
index 4cb1035..0000000
--- a/node_modules/locutus/php/strings/sha1_file.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function sha1_file(str_filename) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/sha1_file/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // note 1: Relies on file_get_contents which does not work in the browser, so Node only.
- // note 2: Keep in mind that in accordance with PHP, the whole file is buffered and then
- // note 2: hashed. We'd recommend Node's native crypto modules for faster and more
- // note 2: efficient hashing
- // example 1: sha1_file('test/never-change.txt')
- // returns 1: '0ea65a1f4b4d69712affc58240932f3eb8a2af66'
-
- var fileGetContents = require('../filesystem/file_get_contents');
- var sha1 = require('../strings/sha1');
- var buf = fileGetContents(str_filename);
-
- if (buf === false) {
- return false;
- }
-
- return sha1(buf);
-};
-//# sourceMappingURL=sha1_file.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sha1_file.js.map b/node_modules/locutus/php/strings/sha1_file.js.map
deleted file mode 100644
index cf5bcb8..0000000
--- a/node_modules/locutus/php/strings/sha1_file.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/sha1_file.js"],"names":["module","exports","sha1_file","str_filename","fileGetContents","require","sha1","buf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,YAApB,EAAkC;AAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,kBAAkBC,QAAQ,iCAAR,CAAtB;AACA,MAAIC,OAAOD,QAAQ,iBAAR,CAAX;AACA,MAAIE,MAAMH,gBAAgBD,YAAhB,CAAV;;AAEA,MAAII,QAAQ,KAAZ,EAAmB;AACjB,WAAO,KAAP;AACD;;AAED,SAAOD,KAAKC,GAAL,CAAP;AACD,CAnBD","file":"sha1_file.js","sourcesContent":["module.exports = function sha1_file (str_filename) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/sha1_file/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // note 1: Relies on file_get_contents which does not work in the browser, so Node only.\n // note 2: Keep in mind that in accordance with PHP, the whole file is buffered and then\n // note 2: hashed. We'd recommend Node's native crypto modules for faster and more\n // note 2: efficient hashing\n // example 1: sha1_file('test/never-change.txt')\n // returns 1: '0ea65a1f4b4d69712affc58240932f3eb8a2af66'\n\n var fileGetContents = require('../filesystem/file_get_contents')\n var sha1 = require('../strings/sha1')\n var buf = fileGetContents(str_filename)\n\n if (buf === false) {\n return false\n }\n\n return sha1(buf)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/similar_text.js b/node_modules/locutus/php/strings/similar_text.js
deleted file mode 100644
index 964182b..0000000
--- a/node_modules/locutus/php/strings/similar_text.js
+++ /dev/null
@@ -1,63 +0,0 @@
-'use strict';
-
-module.exports = function similar_text(first, second, percent) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/similar_text/
- // original by: Rafał Kukawski (http://blog.kukawski.pl)
- // bugfixed by: Chris McMacken
- // bugfixed by: Jarkko Rantavuori original by findings in stackoverflow (http://stackoverflow.com/questions/14136349/how-does-similar-text-work)
- // improved by: Markus Padourek (taken from http://www.kevinhq.com/2012/06/php-similartext-function-in-javascript_16.html)
- // example 1: similar_text('Hello World!', 'Hello locutus!')
- // returns 1: 8
- // example 2: similar_text('Hello World!', null)
- // returns 2: 0
-
- if (first === null || second === null || typeof first === 'undefined' || typeof second === 'undefined') {
- return 0;
- }
-
- first += '';
- second += '';
-
- var pos1 = 0;
- var pos2 = 0;
- var max = 0;
- var firstLength = first.length;
- var secondLength = second.length;
- var p;
- var q;
- var l;
- var sum;
-
- for (p = 0; p < firstLength; p++) {
- for (q = 0; q < secondLength; q++) {
- for (l = 0; p + l < firstLength && q + l < secondLength && first.charAt(p + l) === second.charAt(q + l); l++) {// eslint-disable-line max-len
- // @todo: ^-- break up this crazy for loop and put the logic in its body
- }
- if (l > max) {
- max = l;
- pos1 = p;
- pos2 = q;
- }
- }
- }
-
- sum = max;
-
- if (sum) {
- if (pos1 && pos2) {
- sum += similar_text(first.substr(0, pos1), second.substr(0, pos2));
- }
-
- if (pos1 + max < firstLength && pos2 + max < secondLength) {
- sum += similar_text(first.substr(pos1 + max, firstLength - pos1 - max), second.substr(pos2 + max, secondLength - pos2 - max));
- }
- }
-
- if (!percent) {
- return sum;
- }
-
- return sum * 200 / (firstLength + secondLength);
-};
-//# sourceMappingURL=similar_text.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/similar_text.js.map b/node_modules/locutus/php/strings/similar_text.js.map
deleted file mode 100644
index 056a174..0000000
--- a/node_modules/locutus/php/strings/similar_text.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/similar_text.js"],"names":["module","exports","similar_text","first","second","percent","pos1","pos2","max","firstLength","length","secondLength","p","q","l","sum","charAt","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,MAA9B,EAAsCC,OAAtC,EAA+C;AAAE;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AOb,aACLC,MAAMc,MAAN,CAAaX,OAAOE,GAApB,EAAyBC,cAAcH,IAAd,GAAqBE,GAA9C,CADK,EAELJ,OAAOa,MAAP,CAAcV,OAAOC,GAArB,EACAG,eAAeJ,IAAf,GAAsBC,GADtB,CAFK,CAAP;AAID;AACF;;AAED,MAAI,CAACH,OAAL,EAAc;AACZ,WAAOU,GAAP;AACD;;AAED,SAAQA,MAAM,GAAP,IAAeN,cAAcE,YAA7B,CAAP;AACD,CAhED","file":"similar_text.js","sourcesContent":["module.exports = function similar_text (first, second, percent) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/similar_text/\n // original by: Rafał Kukawski (http://blog.kukawski.pl)\n // bugfixed by: Chris McMacken\n // bugfixed by: Jarkko Rantavuori original by findings in stackoverflow (http://stackoverflow.com/questions/14136349/how-does-similar-text-work)\n // improved by: Markus Padourek (taken from http://www.kevinhq.com/2012/06/php-similartext-function-in-javascript_16.html)\n // example 1: similar_text('Hello World!', 'Hello locutus!')\n // returns 1: 8\n // example 2: similar_text('Hello World!', null)\n // returns 2: 0\n\n if (first === null ||\n second === null ||\n typeof first === 'undefined' ||\n typeof second === 'undefined') {\n return 0\n }\n\n first += ''\n second += ''\n\n var pos1 = 0\n var pos2 = 0\n var max = 0\n var firstLength = first.length\n var secondLength = second.length\n var p\n var q\n var l\n var sum\n\n for (p = 0; p < firstLength; p++) {\n for (q = 0; q < secondLength; q++) {\n for (l = 0; (p + l < firstLength) && (q + l < secondLength) && (first.charAt(p + l) === second.charAt(q + l)); l++) { // eslint-disable-line max-len\n // @todo: ^-- break up this crazy for loop and put the logic in its body\n }\n if (l > max) {\n max = l\n pos1 = p\n pos2 = q\n }\n }\n }\n\n sum = max\n\n if (sum) {\n if (pos1 && pos2) {\n sum += similar_text(first.substr(0, pos1), second.substr(0, pos2))\n }\n\n if ((pos1 + max < firstLength) && (pos2 + max < secondLength)) {\n sum += similar_text(\n first.substr(pos1 + max, firstLength - pos1 - max),\n second.substr(pos2 + max,\n secondLength - pos2 - max))\n }\n }\n\n if (!percent) {\n return sum\n }\n\n return (sum * 200) / (firstLength + secondLength)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/soundex.js b/node_modules/locutus/php/strings/soundex.js
deleted file mode 100644
index e9207c1..0000000
--- a/node_modules/locutus/php/strings/soundex.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-module.exports = function soundex(str) {
- // discuss at: http://locutus.io/php/soundex/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // original by: Arnout Kazemier (http://www.3rd-Eden.com)
- // improved by: Jack
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // revised by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: soundex('Kevin')
- // returns 1: 'K150'
- // example 2: soundex('Ellery')
- // returns 2: 'E460'
- // example 3: soundex('Euler')
- // returns 3: 'E460'
-
- str = (str + '').toUpperCase();
- if (!str) {
- return '';
- }
-
- var sdx = [0, 0, 0, 0];
- var m = {
- B: 1,
- F: 1,
- P: 1,
- V: 1,
- C: 2,
- G: 2,
- J: 2,
- K: 2,
- Q: 2,
- S: 2,
- X: 2,
- Z: 2,
- D: 3,
- T: 3,
- L: 4,
- M: 5,
- N: 5,
- R: 6
- };
- var i = 0;
- var j;
- var s = 0;
- var c;
- var p;
-
- while ((c = str.charAt(i++)) && s < 4) {
- if (j = m[c]) {
- if (j !== p) {
- sdx[s++] = p = j;
- }
- } else {
- s += i === 1;
- p = 0;
- }
- }
-
- sdx[0] = str.charAt(0);
-
- return sdx.join('');
-};
-//# sourceMappingURL=soundex.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/soundex.js.map b/node_modules/locutus/php/strings/soundex.js.map
deleted file mode 100644
index a63cae7..0000000
--- a/node_modules/locutus/php/strings/soundex.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/soundex.js"],"names":["module","exports","soundex","str","toUpperCase","sdx","m","B","F","P","V","C","G","J","K","Q","S","X","Z","D","T","L","M","N","R","i","j","s","c","p","charAt","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,QAAM,CAACA,MAAM,EAAP,EAAWC,WAAX,EAAN;AACA,MAAI,CAACD,GAAL,EAAU;AACR,WAAO,EAAP;AACD;;AAED,MAAIE,MAAM,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,CAAV;AACA,MAAIC,IAAI;AACNC,OAAG,CADG;AAENC,OAAG,CAFG;AAGNC,OAAG,CAHG;AAINC,OAAG,CAJG;AAKNC,OAAG,CALG;AAMNC,OAAG,CANG;AAONC,OAAG,CAPG;AAQNC,OAAG,CARG;AASNC,OAAG,CATG;AAUNC,OAAG,CAVG;AAWNC,OAAG,CAXG;AAYNC,OAAG,CAZG;AAaNC,OAAG,CAbG;AAcNC,OAAG,CAdG;AAeNC,OAAG,CAfG;AAgBNC,OAAG,CAhBG;AAiBNC,OAAG,CAjBG;AAkBNC,OAAG;AAlBG,GAAR;AAoBA,MAAIC,IAAI,CAAR;AACA,MAAIC,CAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;;AAEA,SAAO,CAACD,IAAIzB,IAAI2B,MAAJ,CAAWL,GAAX,CAAL,KAAyBE,IAAI,CAApC,EAAuC;AACrC,QAAKD,IAAIpB,EAAEsB,CAAF,CAAT,EAAgB;AACd,UAAIF,MAAMG,CAAV,EAAa;AACXxB,YAAIsB,GAAJ,IAAWE,IAAIH,CAAf;AACD;AACF,KAJD,MAIO;AACLC,WAAKF,MAAM,CAAX;AACAI,UAAI,CAAJ;AACD;AACF;;AAEDxB,MAAI,CAAJ,IAASF,IAAI2B,MAAJ,CAAW,CAAX,CAAT;;AAEA,SAAOzB,IAAI0B,IAAJ,CAAS,EAAT,CAAP;AACD,CA/DD","file":"soundex.js","sourcesContent":["module.exports = function soundex (str) {\n // discuss at: http://locutus.io/php/soundex/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // original by: Arnout Kazemier (http://www.3rd-Eden.com)\n // improved by: Jack\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // revised by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: soundex('Kevin')\n // returns 1: 'K150'\n // example 2: soundex('Ellery')\n // returns 2: 'E460'\n // example 3: soundex('Euler')\n // returns 3: 'E460'\n\n str = (str + '').toUpperCase()\n if (!str) {\n return ''\n }\n\n var sdx = [0, 0, 0, 0]\n var m = {\n B: 1,\n F: 1,\n P: 1,\n V: 1,\n C: 2,\n G: 2,\n J: 2,\n K: 2,\n Q: 2,\n S: 2,\n X: 2,\n Z: 2,\n D: 3,\n T: 3,\n L: 4,\n M: 5,\n N: 5,\n R: 6\n }\n var i = 0\n var j\n var s = 0\n var c\n var p\n\n while ((c = str.charAt(i++)) && s < 4) {\n if ((j = m[c])) {\n if (j !== p) {\n sdx[s++] = p = j\n }\n } else {\n s += i === 1\n p = 0\n }\n }\n\n sdx[0] = str.charAt(0)\n\n return sdx.join('')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/split.js b/node_modules/locutus/php/strings/split.js
deleted file mode 100644
index fdd4b33..0000000
--- a/node_modules/locutus/php/strings/split.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function split(delimiter, string) {
- // discuss at: http://locutus.io/php/split/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: split(' ', 'Kevin van Zonneveld')
- // returns 1: ['Kevin', 'van', 'Zonneveld']
-
- var explode = require('../strings/explode');
- return explode(delimiter, string);
-};
-//# sourceMappingURL=split.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/split.js.map b/node_modules/locutus/php/strings/split.js.map
deleted file mode 100644
index 144db5e..0000000
--- a/node_modules/locutus/php/strings/split.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/split.js"],"names":["module","exports","split","delimiter","string","explode","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,SAAhB,EAA2BC,MAA3B,EAAmC;AAClD;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,oBAAR,CAAd;AACA,SAAOD,QAAQF,SAAR,EAAmBC,MAAnB,CAAP;AACD,CARD","file":"split.js","sourcesContent":["module.exports = function split (delimiter, string) {\n // discuss at: http://locutus.io/php/split/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: split(' ', 'Kevin van Zonneveld')\n // returns 1: ['Kevin', 'van', 'Zonneveld']\n\n var explode = require('../strings/explode')\n return explode(delimiter, string)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sprintf.js b/node_modules/locutus/php/strings/sprintf.js
deleted file mode 100644
index 103b8e3..0000000
--- a/node_modules/locutus/php/strings/sprintf.js
+++ /dev/null
@@ -1,193 +0,0 @@
-'use strict';
-
-module.exports = function sprintf() {
- // discuss at: http://locutus.io/php/sprintf/
- // original by: Ash Searle (http://hexmen.com/blog/)
- // improved by: Michael White (http://getsprink.com)
- // improved by: Jack
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Dj
- // improved by: Allidylls
- // input by: Paulo Freitas
- // input by: Brett Zamir (http://brett-zamir.me)
- // improved by: Rafał Kukawski (http://kukawski.pl)
- // example 1: sprintf("%01.2f", 123.1)
- // returns 1: '123.10'
- // example 2: sprintf("[%10s]", 'monkey')
- // returns 2: '[ monkey]'
- // example 3: sprintf("[%'#10s]", 'monkey')
- // returns 3: '[####monkey]'
- // example 4: sprintf("%d", 123456789012345)
- // returns 4: '123456789012345'
- // example 5: sprintf('%-03s', 'E')
- // returns 5: 'E00'
- // example 6: sprintf('%+010d', 9)
- // returns 6: '+000000009'
- // example 7: sprintf('%+0\'@10d', 9)
- // returns 7: '@@@@@@@@+9'
- // example 8: sprintf('%.f', 3.14)
- // returns 8: '3.140000'
- // example 9: sprintf('%% %2$d', 1, 2)
- // returns 9: '% 2'
-
- var regex = /%%|%(?:(\d+)\$)?((?:[-+#0 ]|'[\s\S])*)(\d+)?(?:\.(\d*))?([\s\S])/g;
- var args = arguments;
- var i = 0;
- var format = args[i++];
-
- var _pad = function _pad(str, len, chr, leftJustify) {
- if (!chr) {
- chr = ' ';
- }
- var padding = str.length >= len ? '' : new Array(1 + len - str.length >>> 0).join(chr);
- return leftJustify ? str + padding : padding + str;
- };
-
- var justify = function justify(value, prefix, leftJustify, minWidth, padChar) {
- var diff = minWidth - value.length;
- if (diff > 0) {
- // when padding with zeros
- // on the left side
- // keep sign (+ or -) in front
- if (!leftJustify && padChar === '0') {
- value = [value.slice(0, prefix.length), _pad('', diff, '0', true), value.slice(prefix.length)].join('');
- } else {
- value = _pad(value, minWidth, padChar, leftJustify);
- }
- }
- return value;
- };
-
- var _formatBaseX = function _formatBaseX(value, base, leftJustify, minWidth, precision, padChar) {
- // Note: casts negative numbers to positive ones
- var number = value >>> 0;
- value = _pad(number.toString(base), precision || 0, '0', false);
- return justify(value, '', leftJustify, minWidth, padChar);
- };
-
- // _formatString()
- var _formatString = function _formatString(value, leftJustify, minWidth, precision, customPadChar) {
- if (precision !== null && precision !== undefined) {
- value = value.slice(0, precision);
- }
- return justify(value, '', leftJustify, minWidth, customPadChar);
- };
-
- // doFormat()
- var doFormat = function doFormat(substring, argIndex, modifiers, minWidth, precision, specifier) {
- var number, prefix, method, textTransform, value;
-
- if (substring === '%%') {
- return '%';
- }
-
- // parse modifiers
- var padChar = ' '; // pad with spaces by default
- var leftJustify = false;
- var positiveNumberPrefix = '';
- var j, l;
-
- for (j = 0, l = modifiers.length; j < l; j++) {
- switch (modifiers.charAt(j)) {
- case ' ':
- case '0':
- padChar = modifiers.charAt(j);
- break;
- case '+':
- positiveNumberPrefix = '+';
- break;
- case '-':
- leftJustify = true;
- break;
- case "'":
- if (j + 1 < l) {
- padChar = modifiers.charAt(j + 1);
- j++;
- }
- break;
- }
- }
-
- if (!minWidth) {
- minWidth = 0;
- } else {
- minWidth = +minWidth;
- }
-
- if (!isFinite(minWidth)) {
- throw new Error('Width must be finite');
- }
-
- if (!precision) {
- precision = specifier === 'd' ? 0 : 'fFeE'.indexOf(specifier) > -1 ? 6 : undefined;
- } else {
- precision = +precision;
- }
-
- if (argIndex && +argIndex === 0) {
- throw new Error('Argument number must be greater than zero');
- }
-
- if (argIndex && +argIndex >= args.length) {
- throw new Error('Too few arguments');
- }
-
- value = argIndex ? args[+argIndex] : args[i++];
-
- switch (specifier) {
- case '%':
- return '%';
- case 's':
- return _formatString(value + '', leftJustify, minWidth, precision, padChar);
- case 'c':
- return _formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, padChar);
- case 'b':
- return _formatBaseX(value, 2, leftJustify, minWidth, precision, padChar);
- case 'o':
- return _formatBaseX(value, 8, leftJustify, minWidth, precision, padChar);
- case 'x':
- return _formatBaseX(value, 16, leftJustify, minWidth, precision, padChar);
- case 'X':
- return _formatBaseX(value, 16, leftJustify, minWidth, precision, padChar).toUpperCase();
- case 'u':
- return _formatBaseX(value, 10, leftJustify, minWidth, precision, padChar);
- case 'i':
- case 'd':
- number = +value || 0;
- // Plain Math.round doesn't just truncate
- number = Math.round(number - number % 1);
- prefix = number < 0 ? '-' : positiveNumberPrefix;
- value = prefix + _pad(String(Math.abs(number)), precision, '0', false);
-
- if (leftJustify && padChar === '0') {
- // can't right-pad 0s on integers
- padChar = ' ';
- }
- return justify(value, prefix, leftJustify, minWidth, padChar);
- case 'e':
- case 'E':
- case 'f': // @todo: Should handle locales (as per setlocale)
- case 'F':
- case 'g':
- case 'G':
- number = +value;
- prefix = number < 0 ? '-' : positiveNumberPrefix;
- method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(specifier.toLowerCase())];
- textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(specifier) % 2];
- value = prefix + Math.abs(number)[method](precision);
- return justify(value, prefix, leftJustify, minWidth, padChar)[textTransform]();
- default:
- // unknown specifier, consume that char and return empty
- return '';
- }
- };
-
- try {
- return format.replace(regex, doFormat);
- } catch (err) {
- return false;
- }
-};
-//# sourceMappingURL=sprintf.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sprintf.js.map b/node_modules/locutus/php/strings/sprintf.js.map
deleted file mode 100644
index 1a753d8..0000000
--- a/node_modules/locutus/php/strings/sprintf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/sprintf.js"],"names":["module","exports","sprintf","regex","args","arguments","i","format","_pad","str","len","chr","leftJustify","padding","length","Array","join","justify","value","prefix","minWidth","padChar","diff","slice","_formatBaseX","base","precision","number","toString","_formatString","customPadChar","undefined","doFormat","substring","argIndex","modifiers","specifier","method","textTransform","positiveNumberPrefix","j","l","charAt","isFinite","Error","indexOf","String","fromCharCode","toUpperCase","Math","round","abs","toLowerCase","replace","err"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,GAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,QAAQ,mEAAZ;AACA,MAAIC,OAAOC,SAAX;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,SAASH,KAAKE,GAAL,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,iBAASQ,SAAS,CAAT,GAAa,GAAb,GAAmBY,oBAA5B;AACAF,iBAAS,CAAC,eAAD,EAAkB,SAAlB,EAA6B,aAA7B,EAA4C,MAAMQ,OAAN,CAAcT,UAAUgB,WAAV,EAAd,CAA5C,CAAT;AACAd,wBAAgB,CAAC,UAAD,EAAa,aAAb,EAA4B,SAASO,OAAT,CAAiBT,SAAjB,IAA8B,CAA1D,CAAhB;AACAlB,gBAAQC,SAAS8B,KAAKE,GAAL,CAASxB,MAAT,EAAiBU,MAAjB,EAAyBX,SAAzB,CAAjB;AACA,eAAOT,QAAQC,KAAR,EAAeC,MAAf,EAAuBP,WAAvB,EAAoCQ,QAApC,EAA8CC,OAA9C,EAAuDiB,aAAvD,GAAP;AACF;AACE;AACA,eAAO,EAAP;AA7CJ;AA+CD,GA3GD;;AA6GA,MAAI;AACF,WAAO/B,OAAO8C,OAAP,CAAelD,KAAf,EAAsB6B,QAAtB,CAAP;AACD,GAFD,CAEE,OAAOsB,GAAP,EAAY;AACZ,WAAO,KAAP;AACD;AACF,CAlMD","file":"sprintf.js","sourcesContent":["module.exports = function sprintf () {\n // discuss at: http://locutus.io/php/sprintf/\n // original by: Ash Searle (http://hexmen.com/blog/)\n // improved by: Michael White (http://getsprink.com)\n // improved by: Jack\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Dj\n // improved by: Allidylls\n // input by: Paulo Freitas\n // input by: Brett Zamir (http://brett-zamir.me)\n // improved by: Rafał Kukawski (http://kukawski.pl)\n // example 1: sprintf(\"%01.2f\", 123.1)\n // returns 1: '123.10'\n // example 2: sprintf(\"[%10s]\", 'monkey')\n // returns 2: '[ monkey]'\n // example 3: sprintf(\"[%'#10s]\", 'monkey')\n // returns 3: '[####monkey]'\n // example 4: sprintf(\"%d\", 123456789012345)\n // returns 4: '123456789012345'\n // example 5: sprintf('%-03s', 'E')\n // returns 5: 'E00'\n // example 6: sprintf('%+010d', 9)\n // returns 6: '+000000009'\n // example 7: sprintf('%+0\\'@10d', 9)\n // returns 7: '@@@@@@@@+9'\n // example 8: sprintf('%.f', 3.14)\n // returns 8: '3.140000'\n // example 9: sprintf('%% %2$d', 1, 2)\n // returns 9: '% 2'\n\n var regex = /%%|%(?:(\\d+)\\$)?((?:[-+#0 ]|'[\\s\\S])*)(\\d+)?(?:\\.(\\d*))?([\\s\\S])/g\n var args = arguments\n var i = 0\n var format = args[i++]\n\n var _pad = function (str, len, chr, leftJustify) {\n if (!chr) {\n chr = ' '\n }\n var padding = (str.length >= len) ? '' : new Array(1 + len - str.length >>> 0).join(chr)\n return leftJustify ? str + padding : padding + str\n }\n\n var justify = function (value, prefix, leftJustify, minWidth, padChar) {\n var diff = minWidth - value.length\n if (diff > 0) {\n // when padding with zeros\n // on the left side\n // keep sign (+ or -) in front\n if (!leftJustify && padChar === '0') {\n value = [\n value.slice(0, prefix.length),\n _pad('', diff, '0', true),\n value.slice(prefix.length)\n ].join('')\n } else {\n value = _pad(value, minWidth, padChar, leftJustify)\n }\n }\n return value\n }\n\n var _formatBaseX = function (value, base, leftJustify, minWidth, precision, padChar) {\n // Note: casts negative numbers to positive ones\n var number = value >>> 0\n value = _pad(number.toString(base), precision || 0, '0', false)\n return justify(value, '', leftJustify, minWidth, padChar)\n }\n\n // _formatString()\n var _formatString = function (value, leftJustify, minWidth, precision, customPadChar) {\n if (precision !== null && precision !== undefined) {\n value = value.slice(0, precision)\n }\n return justify(value, '', leftJustify, minWidth, customPadChar)\n }\n\n // doFormat()\n var doFormat = function (substring, argIndex, modifiers, minWidth, precision, specifier) {\n var number, prefix, method, textTransform, value\n\n if (substring === '%%') {\n return '%'\n }\n\n // parse modifiers\n var padChar = ' ' // pad with spaces by default\n var leftJustify = false\n var positiveNumberPrefix = ''\n var j, l\n\n for (j = 0, l = modifiers.length; j < l; j++) {\n switch (modifiers.charAt(j)) {\n case ' ':\n case '0':\n padChar = modifiers.charAt(j)\n break\n case '+':\n positiveNumberPrefix = '+'\n break\n case '-':\n leftJustify = true\n break\n case \"'\":\n if (j + 1 < l) {\n padChar = modifiers.charAt(j + 1)\n j++\n }\n break\n }\n }\n\n if (!minWidth) {\n minWidth = 0\n } else {\n minWidth = +minWidth\n }\n\n if (!isFinite(minWidth)) {\n throw new Error('Width must be finite')\n }\n\n if (!precision) {\n precision = (specifier === 'd') ? 0 : 'fFeE'.indexOf(specifier) > -1 ? 6 : undefined\n } else {\n precision = +precision\n }\n\n if (argIndex && +argIndex === 0) {\n throw new Error('Argument number must be greater than zero')\n }\n\n if (argIndex && +argIndex >= args.length) {\n throw new Error('Too few arguments')\n }\n\n value = argIndex ? args[+argIndex] : args[i++]\n\n switch (specifier) {\n case '%':\n return '%'\n case 's':\n return _formatString(value + '', leftJustify, minWidth, precision, padChar)\n case 'c':\n return _formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, padChar)\n case 'b':\n return _formatBaseX(value, 2, leftJustify, minWidth, precision, padChar)\n case 'o':\n return _formatBaseX(value, 8, leftJustify, minWidth, precision, padChar)\n case 'x':\n return _formatBaseX(value, 16, leftJustify, minWidth, precision, padChar)\n case 'X':\n return _formatBaseX(value, 16, leftJustify, minWidth, precision, padChar)\n .toUpperCase()\n case 'u':\n return _formatBaseX(value, 10, leftJustify, minWidth, precision, padChar)\n case 'i':\n case 'd':\n number = +value || 0\n // Plain Math.round doesn't just truncate\n number = Math.round(number - number % 1)\n prefix = number < 0 ? '-' : positiveNumberPrefix\n value = prefix + _pad(String(Math.abs(number)), precision, '0', false)\n\n if (leftJustify && padChar === '0') {\n // can't right-pad 0s on integers\n padChar = ' '\n }\n return justify(value, prefix, leftJustify, minWidth, padChar)\n case 'e':\n case 'E':\n case 'f': // @todo: Should handle locales (as per setlocale)\n case 'F':\n case 'g':\n case 'G':\n number = +value\n prefix = number < 0 ? '-' : positiveNumberPrefix\n method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(specifier.toLowerCase())]\n textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(specifier) % 2]\n value = prefix + Math.abs(number)[method](precision)\n return justify(value, prefix, leftJustify, minWidth, padChar)[textTransform]()\n default:\n // unknown specifier, consume that char and return empty\n return ''\n }\n }\n\n try {\n return format.replace(regex, doFormat)\n } catch (err) {\n return false\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sscanf.js b/node_modules/locutus/php/strings/sscanf.js
deleted file mode 100644
index 32fd585..0000000
--- a/node_modules/locutus/php/strings/sscanf.js
+++ /dev/null
@@ -1,268 +0,0 @@
-'use strict';
-
-module.exports = function sscanf(str, format) {
- // discuss at: http://locutus.io/php/sscanf/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: sscanf('SN/2350001', 'SN/%d')
- // returns 1: [2350001]
- // example 2: var myVar = {}
- // example 2: sscanf('SN/2350001', 'SN/%d', myVar)
- // example 2: var $result = myVar.value
- // returns 2: 2350001
- // example 3: sscanf("10--20", "%2$d--%1$d") // Must escape '$' in PHP, but not JS
- // returns 3: [20, 10]
-
- var retArr = [];
- var _NWS = /\S/;
- var args = arguments;
- var digit;
-
- var _setExtraConversionSpecs = function _setExtraConversionSpecs(offset) {
- // Since a mismatched character sets us off track from future
- // legitimate finds, we just scan
- // to the end for any other conversion specifications (besides a percent literal),
- // setting them to null
- // sscanf seems to disallow all conversion specification components (of sprintf)
- // except for type specifiers
- // Do not allow % in last char. class
- // var matches = format.match(/%[+-]?([ 0]|'.)?-?\d*(\.\d+)?[bcdeufFosxX]/g);
- // Do not allow % in last char. class:
- var matches = format.slice(offset).match(/%[cdeEufgosxX]/g);
- // b, F,G give errors in PHP, but 'g', though also disallowed, doesn't
- if (matches) {
- var lgth = matches.length;
- while (lgth--) {
- retArr.push(null);
- }
- }
- return _finish();
- };
-
- var _finish = function _finish() {
- if (args.length === 2) {
- return retArr;
- }
- for (var i = 0; i < retArr.length; ++i) {
- args[i + 2].value = retArr[i];
- }
- return i;
- };
-
- var _addNext = function _addNext(j, regex, cb) {
- if (assign) {
- var remaining = str.slice(j);
- var check = width ? remaining.substr(0, width) : remaining;
- var match = regex.exec(check);
- // @todo: Make this more readable
- var key = digit !== undefined ? digit : retArr.length;
- var testNull = retArr[key] = match ? cb ? cb.apply(null, match) : match[0] : null;
- if (testNull === null) {
- throw new Error('No match in string');
- }
- return j + match[0].length;
- }
- return j;
- };
-
- if (arguments.length < 2) {
- throw new Error('Not enough arguments passed to sscanf');
- }
-
- // PROCESS
- for (var i = 0, j = 0; i < format.length; i++) {
- var width = 0;
- var assign = true;
-
- if (format.charAt(i) === '%') {
- if (format.charAt(i + 1) === '%') {
- if (str.charAt(j) === '%') {
- // a matched percent literal
- // skip beyond duplicated percent
- ++i;
- ++j;
- continue;
- }
- // Format indicated a percent literal, but not actually present
- return _setExtraConversionSpecs(i + 2);
- }
-
- // CHARACTER FOLLOWING PERCENT IS NOT A PERCENT
-
- // We need 'g' set to get lastIndex
- var prePattern = new RegExp('^(?:(\\d+)\\$)?(\\*)?(\\d*)([hlL]?)', 'g');
-
- var preConvs = prePattern.exec(format.slice(i + 1));
-
- var tmpDigit = digit;
- if (tmpDigit && preConvs[1] === undefined) {
- var msg = 'All groups in sscanf() must be expressed as numeric if ';
- msg += 'any have already been used';
- throw new Error(msg);
- }
- digit = preConvs[1] ? parseInt(preConvs[1], 10) - 1 : undefined;
-
- assign = !preConvs[2];
- width = parseInt(preConvs[3], 10);
- var sizeCode = preConvs[4];
- i += prePattern.lastIndex;
-
- // @todo: Does PHP do anything with these? Seems not to matter
- if (sizeCode) {
- // This would need to be processed later
- switch (sizeCode) {
- case 'h':
- case 'l':
- case 'L':
- // Treats subsequent as short int (for d,i,n) or unsigned short int (for o,u,x)
- // Treats subsequent as long int (for d,i,n), or unsigned long int (for o,u,x);
- // or as double (for e,f,g) instead of float or wchar_t instead of char
- // Treats subsequent as long double (for e,f,g)
- break;
- default:
- throw new Error('Unexpected size specifier in sscanf()!');
- }
- }
- // PROCESS CHARACTER
- try {
- // For detailed explanations, see http://web.archive.org/web/20031128125047/http://www.uwm.edu/cgi-bin/IMT/wwwman?topic=scanf%283%29&msection=
- // Also http://www.mathworks.com/access/helpdesk/help/techdoc/ref/sscanf.html
- // p, S, C arguments in C function not available
- // DOCUMENTED UNDER SSCANF
- switch (format.charAt(i + 1)) {
- case 'F':
- // Not supported in PHP sscanf; the argument is treated as a float, and
- // presented as a floating-point number (non-locale aware)
- // sscanf doesn't support locales, so no need for two (see %f)
- break;
- case 'g':
- // Not supported in PHP sscanf; shorter of %e and %f
- // Irrelevant to input conversion
- break;
- case 'G':
- // Not supported in PHP sscanf; shorter of %E and %f
- // Irrelevant to input conversion
- break;
- case 'b':
- // Not supported in PHP sscanf; the argument is treated as an integer,
- // and presented as a binary number
- // Not supported - couldn't distinguish from other integers
- break;
- case 'i':
- // Integer with base detection (Equivalent of 'd', but base 0 instead of 10)
- var pattern = /([+-])?(?:(?:0x([\da-fA-F]+))|(?:0([0-7]+))|(\d+))/;
- j = _addNext(j, pattern, function (num, sign, hex, oct, dec) {
- return hex ? parseInt(num, 16) : oct ? parseInt(num, 8) : parseInt(num, 10);
- });
- break;
- case 'n':
- // Number of characters processed so far
- retArr[digit !== undefined ? digit : retArr.length - 1] = j;
- break;
- // DOCUMENTED UNDER SPRINTF
- case 'c':
- // Get character; suppresses skipping over whitespace!
- // (but shouldn't be whitespace in format anyways, so no difference here)
- // Non-greedy match
- j = _addNext(j, new RegExp('.{1,' + (width || 1) + '}'));
- break;
- case 'D':
- case 'd':
- // sscanf documented decimal number; equivalent of 'd';
- // Optionally signed decimal integer
- j = _addNext(j, /([+-])?(?:0*)(\d+)/, function (num, sign, dec) {
- // Ignores initial zeroes, unlike %i and parseInt()
- var decInt = parseInt((sign || '') + dec, 10);
- if (decInt < 0) {
- // PHP also won't allow less than -2147483648
- // integer overflow with negative
- return decInt < -2147483648 ? -2147483648 : decInt;
- } else {
- // PHP also won't allow greater than -2147483647
- return decInt < 2147483647 ? decInt : 2147483647;
- }
- });
- break;
- case 'f':
- case 'E':
- case 'e':
- // Although sscanf doesn't support locales,
- // this is used instead of '%F'; seems to be same as %e
- // These don't discriminate here as both allow exponential float of either case
- j = _addNext(j, /([+-])?(?:0*)(\d*\.?\d*(?:[eE]?\d+)?)/, function (num, sign, dec) {
- if (dec === '.') {
- return null;
- }
- // Ignores initial zeroes, unlike %i and parseFloat()
- return parseFloat((sign || '') + dec);
- });
- break;
- case 'u':
- // unsigned decimal integer
- // We won't deal with integer overflows due to signs
- j = _addNext(j, /([+-])?(?:0*)(\d+)/, function (num, sign, dec) {
- // Ignores initial zeroes, unlike %i and parseInt()
- var decInt = parseInt(dec, 10);
- if (sign === '-') {
- // PHP also won't allow greater than 4294967295
- // integer overflow with negative
- return 4294967296 - decInt;
- } else {
- return decInt < 4294967295 ? decInt : 4294967295;
- }
- });
- break;
- case 'o':
- // Octal integer // @todo: add overflows as above?
- j = _addNext(j, /([+-])?(?:0([0-7]+))/, function (num, sign, oct) {
- return parseInt(num, 8);
- });
- break;
- case 's':
- // Greedy match
- j = _addNext(j, /\S+/);
- break;
- case 'X':
- case 'x':
- // Same as 'x'?
- // @todo: add overflows as above?
- // Initial 0x not necessary here
- j = _addNext(j, /([+-])?(?:(?:0x)?([\da-fA-F]+))/, function (num, sign, hex) {
- return parseInt(num, 16);
- });
- break;
- case '':
- // If no character left in expression
- throw new Error('Missing character after percent mark in sscanf() format argument');
- default:
- throw new Error('Unrecognized character after percent mark in sscanf() format argument');
- }
- } catch (e) {
- if (e === 'No match in string') {
- // Allow us to exit
- return _setExtraConversionSpecs(i + 2);
- }
- // Calculate skipping beyond initial percent too
- }
- ++i;
- } else if (format.charAt(i) !== str.charAt(j)) {
- // @todo: Double-check i whitespace ignored in string and/or formats
- _NWS.lastIndex = 0;
- if (_NWS.test(str.charAt(j)) || str.charAt(j) === '') {
- // Whitespace doesn't need to be an exact match)
- return _setExtraConversionSpecs(i + 1);
- } else {
- // Adjust strings when encounter non-matching whitespace,
- // so they align in future checks above
- // Ok to replace with j++;?
- str = str.slice(0, j) + str.slice(j + 1);
- i--;
- }
- } else {
- j++;
- }
- }
-
- // POST-PROCESSING
- return _finish();
-};
-//# sourceMappingURL=sscanf.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/sscanf.js.map b/node_modules/locutus/php/strings/sscanf.js.map
deleted file mode 100644
index 1c44a6f..0000000
--- a/node_modules/locutus/php/strings/sscanf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/sscanf.js"],"names":["module","exports","sscanf","str","format","retArr","_NWS","args","arguments","digit","_setExtraConversionSpecs","offset","matches","slice","match","lgth","length","push","_finish","i","value","_addNext","j","regex","cb","assign","remaining","check","width","substr","exec","key","undefined","testNull","apply","Error","charAt","prePattern","RegExp","preConvs","tmpDigit","msg","parseInt","sizeCode","lastIndex","pattern","num","sign","hex","oct","dec","decInt","parseFloat","e","test"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,GAAjB,EAAsBC,MAAtB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAO,IAAX;AACA,MAAIC,OAAOC,SAAX;AACA,MAAIC,KAAJ;;AAEA,MAAIC,2BAA2B,SAA3BA,wBAA2B,CAAUC,MAAV,EAAkB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAIC,UAAUR,OAAOS,KAAP,CAAaF,MAAb,EAAqBG,KAArB,CAA2B,iBAA3B,CAAd;AACA;AACA,QAAIF,OAAJ,EAAa;AACX,UAAIG,OAAOH,QAAQI,MAAnB;AACA,aAAOD,MAAP,EAAe;AACbV,eAAOY,IAAP,CAAY,IAAZ;AACD;AACF;AACD,WAAOC,SAAP;AACD,GAnBD;;AAqBA,MAAIA,UAAU,SAAVA,OAAU,GAAY;AACxB,QAAIX,KAAKS,MA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AO3C,yBAAyBS,IAAI,CAA7B,CAAP;AACD;AACD;AACD;AACD,QAAEA,CAAF;AACD,KA5KD,MA4KO,IAAIf,OAAOgC,MAAP,CAAcjB,CAAd,MAAqBhB,IAAIiC,MAAJ,CAAWd,CAAX,CAAzB,EAAwC;AAC3C;AACFhB,WAAKsC,SAAL,GAAiB,CAAjB;AACA,UAAKtC,IAAD,CACDgD,IADC,CACInD,IAAIiC,MAAJ,CAAWd,CAAX,CADJ,KACsBnB,IAAIiC,MAAJ,CAAWd,CAAX,MAAkB,EAD5C,EACgD;AAC9C;AACA,eAAOZ,yBAAyBS,IAAI,CAA7B,CAAP;AACD,OAJD,MAIO;AACL;AACA;AACA;AACAhB,cAAMA,IAAIU,KAAJ,CAAU,CAAV,EAAaS,CAAb,IAAkBnB,IAAIU,KAAJ,CAAUS,IAAI,CAAd,CAAxB;AACAH;AACD;AACF,KAdM,MAcA;AACLG;AACD;AACF;;AAED;AACA,SAAOJ,SAAP;AACD,CAhRD","file":"sscanf.js","sourcesContent":["module.exports = function sscanf (str, format) {\n // discuss at: http://locutus.io/php/sscanf/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: sscanf('SN/2350001', 'SN/%d')\n // returns 1: [2350001]\n // example 2: var myVar = {}\n // example 2: sscanf('SN/2350001', 'SN/%d', myVar)\n // example 2: var $result = myVar.value\n // returns 2: 2350001\n // example 3: sscanf(\"10--20\", \"%2$d--%1$d\") // Must escape '$' in PHP, but not JS\n // returns 3: [20, 10]\n\n var retArr = []\n var _NWS = /\\S/\n var args = arguments\n var digit\n\n var _setExtraConversionSpecs = function (offset) {\n // Since a mismatched character sets us off track from future\n // legitimate finds, we just scan\n // to the end for any other conversion specifications (besides a percent literal),\n // setting them to null\n // sscanf seems to disallow all conversion specification components (of sprintf)\n // except for type specifiers\n // Do not allow % in last char. class\n // var matches = format.match(/%[+-]?([ 0]|'.)?-?\\d*(\\.\\d+)?[bcdeufFosxX]/g);\n // Do not allow % in last char. class:\n var matches = format.slice(offset).match(/%[cdeEufgosxX]/g)\n // b, F,G give errors in PHP, but 'g', though also disallowed, doesn't\n if (matches) {\n var lgth = matches.length\n while (lgth--) {\n retArr.push(null)\n }\n }\n return _finish()\n }\n\n var _finish = function () {\n if (args.length === 2) {\n return retArr\n }\n for (var i = 0; i < retArr.length; ++i) {\n args[i + 2].value = retArr[i]\n }\n return i\n }\n\n var _addNext = function (j, regex, cb) {\n if (assign) {\n var remaining = str.slice(j)\n var check = width ? remaining.substr(0, width) : remaining\n var match = regex.exec(check)\n // @todo: Make this more readable\n var key = digit !== undefined\n ? digit\n : retArr.length\n var testNull = retArr[key] = match\n ? (cb\n ? cb.apply(null, match)\n : match[0])\n : null\n if (testNull === null) {\n throw new Error('No match in string')\n }\n return j + match[0].length\n }\n return j\n }\n\n if (arguments.length < 2) {\n throw new Error('Not enough arguments passed to sscanf')\n }\n\n // PROCESS\n for (var i = 0, j = 0; i < format.length; i++) {\n var width = 0\n var assign = true\n\n if (format.charAt(i) === '%') {\n if (format.charAt(i + 1) === '%') {\n if (str.charAt(j) === '%') {\n // a matched percent literal\n // skip beyond duplicated percent\n ++i\n ++j\n continue\n }\n // Format indicated a percent literal, but not actually present\n return _setExtraConversionSpecs(i + 2)\n }\n\n // CHARACTER FOLLOWING PERCENT IS NOT A PERCENT\n\n // We need 'g' set to get lastIndex\n var prePattern = new RegExp('^(?:(\\\\d+)\\\\$)?(\\\\*)?(\\\\d*)([hlL]?)', 'g')\n\n var preConvs = prePattern.exec(format.slice(i + 1))\n\n var tmpDigit = digit\n if (tmpDigit && preConvs[1] === undefined) {\n var msg = 'All groups in sscanf() must be expressed as numeric if '\n msg += 'any have already been used'\n throw new Error(msg)\n }\n digit = preConvs[1] ? parseInt(preConvs[1], 10) - 1 : undefined\n\n assign = !preConvs[2]\n width = parseInt(preConvs[3], 10)\n var sizeCode = preConvs[4]\n i += prePattern.lastIndex\n\n // @todo: Does PHP do anything with these? Seems not to matter\n if (sizeCode) {\n // This would need to be processed later\n switch (sizeCode) {\n case 'h':\n case 'l':\n case 'L':\n // Treats subsequent as short int (for d,i,n) or unsigned short int (for o,u,x)\n // Treats subsequent as long int (for d,i,n), or unsigned long int (for o,u,x);\n // or as double (for e,f,g) instead of float or wchar_t instead of char\n // Treats subsequent as long double (for e,f,g)\n break\n default:\n throw new Error('Unexpected size specifier in sscanf()!')\n }\n }\n // PROCESS CHARACTER\n try {\n // For detailed explanations, see http://web.archive.org/web/20031128125047/http://www.uwm.edu/cgi-bin/IMT/wwwman?topic=scanf%283%29&msection=\n // Also http://www.mathworks.com/access/helpdesk/help/techdoc/ref/sscanf.html\n // p, S, C arguments in C function not available\n // DOCUMENTED UNDER SSCANF\n switch (format.charAt(i + 1)) {\n case 'F':\n // Not supported in PHP sscanf; the argument is treated as a float, and\n // presented as a floating-point number (non-locale aware)\n // sscanf doesn't support locales, so no need for two (see %f)\n break\n case 'g':\n // Not supported in PHP sscanf; shorter of %e and %f\n // Irrelevant to input conversion\n break\n case 'G':\n // Not supported in PHP sscanf; shorter of %E and %f\n // Irrelevant to input conversion\n break\n case 'b':\n // Not supported in PHP sscanf; the argument is treated as an integer,\n // and presented as a binary number\n // Not supported - couldn't distinguish from other integers\n break\n case 'i':\n // Integer with base detection (Equivalent of 'd', but base 0 instead of 10)\n var pattern = /([+-])?(?:(?:0x([\\da-fA-F]+))|(?:0([0-7]+))|(\\d+))/\n j = _addNext(j, pattern, function (num, sign, hex,\n oct, dec) {\n return hex ? parseInt(num, 16) : oct ? parseInt(num, 8) : parseInt(num, 10)\n })\n break\n case 'n':\n // Number of characters processed so far\n retArr[digit !== undefined ? digit : retArr.length - 1] = j\n break\n // DOCUMENTED UNDER SPRINTF\n case 'c':\n // Get character; suppresses skipping over whitespace!\n // (but shouldn't be whitespace in format anyways, so no difference here)\n // Non-greedy match\n j = _addNext(j, new RegExp('.{1,' + (width || 1) + '}'))\n break\n case 'D':\n case 'd':\n // sscanf documented decimal number; equivalent of 'd';\n // Optionally signed decimal integer\n j = _addNext(j, /([+-])?(?:0*)(\\d+)/, function (num, sign, dec) {\n // Ignores initial zeroes, unlike %i and parseInt()\n var decInt = parseInt((sign || '') + dec, 10)\n if (decInt < 0) {\n // PHP also won't allow less than -2147483648\n // integer overflow with negative\n return decInt < -2147483648 ? -2147483648 : decInt\n } else {\n // PHP also won't allow greater than -2147483647\n return decInt < 2147483647 ? decInt : 2147483647\n }\n })\n break\n case 'f':\n case 'E':\n case 'e':\n // Although sscanf doesn't support locales,\n // this is used instead of '%F'; seems to be same as %e\n // These don't discriminate here as both allow exponential float of either case\n j = _addNext(j, /([+-])?(?:0*)(\\d*\\.?\\d*(?:[eE]?\\d+)?)/, function (num, sign, dec) {\n if (dec === '.') {\n return null\n }\n // Ignores initial zeroes, unlike %i and parseFloat()\n return parseFloat((sign || '') + dec)\n })\n break\n case 'u':\n // unsigned decimal integer\n // We won't deal with integer overflows due to signs\n j = _addNext(j, /([+-])?(?:0*)(\\d+)/, function (num, sign, dec) {\n // Ignores initial zeroes, unlike %i and parseInt()\n var decInt = parseInt(dec, 10)\n if (sign === '-') {\n // PHP also won't allow greater than 4294967295\n // integer overflow with negative\n return 4294967296 - decInt\n } else {\n return decInt < 4294967295 ? decInt : 4294967295\n }\n })\n break\n case 'o':\n // Octal integer // @todo: add overflows as above?\n j = _addNext(j, /([+-])?(?:0([0-7]+))/, function (num, sign, oct) {\n return parseInt(num, 8)\n })\n break\n case 's':\n // Greedy match\n j = _addNext(j, /\\S+/)\n break\n case 'X':\n case 'x':\n // Same as 'x'?\n // @todo: add overflows as above?\n // Initial 0x not necessary here\n j = _addNext(j, /([+-])?(?:(?:0x)?([\\da-fA-F]+))/, function (num, sign, hex) {\n return parseInt(num, 16)\n })\n break\n case '':\n // If no character left in expression\n throw new Error('Missing character after percent mark in sscanf() format argument')\n default:\n throw new Error('Unrecognized character after percent mark in sscanf() format argument')\n }\n } catch (e) {\n if (e === 'No match in string') {\n // Allow us to exit\n return _setExtraConversionSpecs(i + 2)\n }\n // Calculate skipping beyond initial percent too\n }\n ++i\n } else if (format.charAt(i) !== str.charAt(j)) {\n // @todo: Double-check i whitespace ignored in string and/or formats\n _NWS.lastIndex = 0\n if ((_NWS)\n .test(str.charAt(j)) || str.charAt(j) === '') {\n // Whitespace doesn't need to be an exact match)\n return _setExtraConversionSpecs(i + 1)\n } else {\n // Adjust strings when encounter non-matching whitespace,\n // so they align in future checks above\n // Ok to replace with j++;?\n str = str.slice(0, j) + str.slice(j + 1)\n i--\n }\n } else {\n j++\n }\n }\n\n // POST-PROCESSING\n return _finish()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_getcsv.js b/node_modules/locutus/php/strings/str_getcsv.js
deleted file mode 100644
index c0c5333..0000000
--- a/node_modules/locutus/php/strings/str_getcsv.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-module.exports = function str_getcsv(input, delimiter, enclosure, escape) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_getcsv/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: str_getcsv('"abc","def","ghi"')
- // returns 1: ['abc', 'def', 'ghi']
- // example 2: str_getcsv('"row2""cell1","row2cell2","row2cell3"', null, null, '"')
- // returns 2: ['row2"cell1', 'row2cell2', 'row2cell3']
-
- /*
- // These test cases allowing for missing delimiters are not currently supported
- str_getcsv('"row2""cell1",row2cell2,row2cell3', null, null, '"');
- ['row2"cell1', 'row2cell2', 'row2cell3']
- str_getcsv('row1cell1,"row1,cell2",row1cell3', null, null, '"');
- ['row1cell1', 'row1,cell2', 'row1cell3']
- str_getcsv('"row2""cell1",row2cell2,"row2""""cell3"');
- ['row2"cell1', 'row2cell2', 'row2""cell3']
- str_getcsv('row1cell1,"row1,cell2","row1"",""cell3"', null, null, '"');
- ['row1cell1', 'row1,cell2', 'row1","cell3'];
- Should also test newlines within
- */
-
- var i;
- var inpLen;
- var output = [];
- var _backwards = function _backwards(str) {
- // We need to go backwards to simulate negative look-behind (don't split on
- // an escaped enclosure even if followed by the delimiter and another enclosure mark)
- return str.split('').reverse().join('');
- };
- var _pq = function _pq(str) {
- // preg_quote()
- return String(str).replace(/([\\.+*?[^\]$(){}=!<>|:])/g, '\\$1');
- };
-
- delimiter = delimiter || ',';
- enclosure = enclosure || '"';
- escape = escape || '\\';
- var pqEnc = _pq(enclosure);
- var pqEsc = _pq(escape);
-
- input = input.replace(new RegExp('^\\s*' + pqEnc), '').replace(new RegExp(pqEnc + '\\s*$'), '');
-
- // PHP behavior may differ by including whitespace even outside of the enclosure
- input = _backwards(input).split(new RegExp(pqEnc + '\\s*' + _pq(delimiter) + '\\s*' + pqEnc + '(?!' + pqEsc + ')', 'g')).reverse();
-
- for (i = 0, inpLen = input.length; i < inpLen; i++) {
- output.push(_backwards(input[i]).replace(new RegExp(pqEsc + pqEnc, 'g'), enclosure));
- }
-
- return output;
-};
-//# sourceMappingURL=str_getcsv.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_getcsv.js.map b/node_modules/locutus/php/strings/str_getcsv.js.map
deleted file mode 100644
index 55aee39..0000000
--- a/node_modules/locutus/php/strings/str_getcsv.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_getcsv.js"],"names":["module","exports","str_getcsv","input","delimiter","enclosure","escape","i","inpLen","output","_backwards","str","split","reverse","join","_pq","String","replace","pqEnc","pqEsc","RegExp","length","push"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,SAA5B,EAAuCC,SAAvC,EAAkDC,MAAlD,EAA0D;AAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;AAiBA,MAAIC,CAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,aAAa,SAAbA,UAAa,CAAUC,GAAV,EAAe;AAC9B;AACA;AACA,WAAOA,IAAIC,KAAJ,CAAU,EAAV,EAAcC,OAAd,GAAwBC,IAAxB,CAA6B,EAA7B,CAAP;AACD,GAJD;AAKA,MAAIC,MAAM,SAANA,GAAM,CAAUJ,GAAV,EAAe;AACvB;AACA,WAAOK,OAAOL,GAAP,EAAYM,OAAZ,CAAoB,4BAApB,EAAkD,MAAlD,CAAP;AACD,GAHD;;AAKAb,cAAYA,aAAa,GAAzB;AACAC,cAAYA,aAAa,GAAzB;AACAC,WAASA,UAAU,IAAnB;AACA,MAAIY,QAAQH,IAAIV,SAAJ,CAAZ;AACA,MAAIc,QAAQJ,IAAIT,MAAJ,CAAZ;;AAEAH,UAAQA,MACLc,OADK,CACG,IAAIG,MAAJ,CAAW,UAAUF,KAArB,CADH,EACgC,EADhC,EAELD,OAFK,CAEG,IAAIG,MAAJ,CAAWF,QAAQ,OAAnB,CAFH,EAEgC,EAFhC,CAAR;;AAIA;AACAf,UAAQO,WAAWP,KAAX,EACLS,KADK,CACC,IAAIQ,MAAJ,CAAWF,QAAQ,MAAR,GAAiBH,IAAIX,SAAJ,CAAjB,GAAkC,MAAlC,GAA2Cc,KAA3C,GAAmD,KAAnD,GAA2DC,KAA3D,GAAmE,GAA9E,EAAmF,GAAnF,CADD,EAELN,OAFK,EAAR;;AAIA,OAAKN,IAAI,CAAJ,EAAOC,SAASL,MAAMkB,MAA3B,EAAmCd,IAAIC,MAAvC,EAA+CD,GAA/C,EAAoD;AAClDE,WAAOa,IAAP,CAAYZ,WAAWP,MAAMI,CAAN,CAAX,EACTU,OADS,CACD,IAAIG,MAAJ,CAAWD,QAAQD,KAAnB,EAA0B,GAA1B,CADC,EAC+Bb,SAD/B,CAAZ;AAED;;AAED,SAAOI,MAAP;AACD,CA3DD","file":"str_getcsv.js","sourcesContent":["module.exports = function str_getcsv (input, delimiter, enclosure, escape) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_getcsv/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: str_getcsv('\"abc\",\"def\",\"ghi\"')\n // returns 1: ['abc', 'def', 'ghi']\n // example 2: str_getcsv('\"row2\"\"cell1\",\"row2cell2\",\"row2cell3\"', null, null, '\"')\n // returns 2: ['row2\"cell1', 'row2cell2', 'row2cell3']\n\n /*\n // These test cases allowing for missing delimiters are not currently supported\n str_getcsv('\"row2\"\"cell1\",row2cell2,row2cell3', null, null, '\"');\n ['row2\"cell1', 'row2cell2', 'row2cell3']\n\n str_getcsv('row1cell1,\"row1,cell2\",row1cell3', null, null, '\"');\n ['row1cell1', 'row1,cell2', 'row1cell3']\n\n str_getcsv('\"row2\"\"cell1\",row2cell2,\"row2\"\"\"\"cell3\"');\n ['row2\"cell1', 'row2cell2', 'row2\"\"cell3']\n\n str_getcsv('row1cell1,\"row1,cell2\",\"row1\"\",\"\"cell3\"', null, null, '\"');\n ['row1cell1', 'row1,cell2', 'row1\",\"cell3'];\n\n Should also test newlines within\n */\n\n var i\n var inpLen\n var output = []\n var _backwards = function (str) {\n // We need to go backwards to simulate negative look-behind (don't split on\n // an escaped enclosure even if followed by the delimiter and another enclosure mark)\n return str.split('').reverse().join('')\n }\n var _pq = function (str) {\n // preg_quote()\n return String(str).replace(/([\\\\.+*?[^\\]$(){}=!<>|:])/g, '\\\\$1')\n }\n\n delimiter = delimiter || ','\n enclosure = enclosure || '\"'\n escape = escape || '\\\\'\n var pqEnc = _pq(enclosure)\n var pqEsc = _pq(escape)\n\n input = input\n .replace(new RegExp('^\\\\s*' + pqEnc), '')\n .replace(new RegExp(pqEnc + '\\\\s*$'), '')\n\n // PHP behavior may differ by including whitespace even outside of the enclosure\n input = _backwards(input)\n .split(new RegExp(pqEnc + '\\\\s*' + _pq(delimiter) + '\\\\s*' + pqEnc + '(?!' + pqEsc + ')', 'g'))\n .reverse()\n\n for (i = 0, inpLen = input.length; i < inpLen; i++) {\n output.push(_backwards(input[i])\n .replace(new RegExp(pqEsc + pqEnc, 'g'), enclosure))\n }\n\n return output\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_ireplace.js b/node_modules/locutus/php/strings/str_ireplace.js
deleted file mode 100644
index 63694c3..0000000
--- a/node_modules/locutus/php/strings/str_ireplace.js
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function str_ireplace(search, replace, subject, countObj) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_ireplace/
- // original by: Glen Arason (http://CanadianDomainRegistry.ca)
- // note 1: Case-insensitive version of str_replace()
- // note 1: Compliant with PHP 5.0 str_ireplace() Full details at:
- // note 1: http://ca3.php.net/manual/en/function.str-ireplace.php
- // note 2: The countObj parameter (optional) if used must be passed in as a
- // note 2: object. The count will then be written by reference into it's `value` property
- // example 1: str_ireplace('M', 'e', 'name')
- // returns 1: 'naee'
- // example 2: var $countObj = {}
- // example 2: str_ireplace('M', 'e', 'name', $countObj)
- // example 2: var $result = $countObj.value
- // returns 2: 1
-
- var i = 0;
- var j = 0;
- var temp = '';
- var repl = '';
- var sl = 0;
- var fl = 0;
- var f = '';
- var r = '';
- var s = '';
- var ra = '';
- var otemp = '';
- var oi = '';
- var ofjl = '';
- var os = subject;
- var osa = Object.prototype.toString.call(os) === '[object Array]';
- // var sa = ''
-
- if ((typeof search === 'undefined' ? 'undefined' : _typeof(search)) === 'object') {
- temp = search;
- search = [];
- for (i = 0; i < temp.length; i += 1) {
- search[i] = temp[i].toLowerCase();
- }
- } else {
- search = search.toLowerCase();
- }
-
- if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) === 'object') {
- temp = subject;
- subject = [];
- for (i = 0; i < temp.length; i += 1) {
- subject[i] = temp[i].toLowerCase();
- }
- } else {
- subject = subject.toLowerCase();
- }
-
- if ((typeof search === 'undefined' ? 'undefined' : _typeof(search)) === 'object' && typeof replace === 'string') {
- temp = replace;
- replace = [];
- for (i = 0; i < search.length; i += 1) {
- replace[i] = temp;
- }
- }
-
- temp = '';
- f = [].concat(search);
- r = [].concat(replace);
- ra = Object.prototype.toString.call(r) === '[object Array]';
- s = subject;
- // sa = Object.prototype.toString.call(s) === '[object Array]'
- s = [].concat(s);
- os = [].concat(os);
-
- if (countObj) {
- countObj.value = 0;
- }
-
- for (i = 0, sl = s.length; i < sl; i++) {
- if (s[i] === '') {
- continue;
- }
- for (j = 0, fl = f.length; j < fl; j++) {
- temp = s[i] + '';
- repl = ra ? r[j] !== undefined ? r[j] : '' : r[0];
- s[i] = temp.split(f[j]).join(repl);
- otemp = os[i] + '';
- oi = temp.indexOf(f[j]);
- ofjl = f[j].length;
- if (oi >= 0) {
- os[i] = otemp.split(otemp.substr(oi, ofjl)).join(repl);
- }
-
- if (countObj) {
- countObj.value += temp.split(f[j]).length - 1;
- }
- }
- }
-
- return osa ? os : os[0];
-};
-//# sourceMappingURL=str_ireplace.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_ireplace.js.map b/node_modules/locutus/php/strings/str_ireplace.js.map
deleted file mode 100644
index 1e417d1..0000000
--- a/node_modules/locutus/php/strings/str_ireplace.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_ireplace.js"],"names":["module","exports","str_ireplace","search","replace","subject","countObj","i","j","temp","repl","sl","fl","f","r","s","ra","otemp","oi","ofjl","os","osa","Object","prototype","toString","call","length","toLowerCase","concat","value","undefined","split","join","indexOf","substr"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,OAA/B,EAAwCC,OAAxC,EAAiDC,QAAjD,EAA2D;AAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC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Ac;AACZA,iBAASuB,KAAT,IAAoBpB,KAAKsB,KAAL,CAAWlB,EAAEL,CAAF,CAAX,CAAD,CAAmBkB,MAAnB,GAA4B,CAA/C;AACD;AACF;AACF;;AAED,SAAOL,MAAMD,EAAN,GAAWA,GAAG,CAAH,CAAlB;AACD,CA/FD","file":"str_ireplace.js","sourcesContent":["module.exports = function str_ireplace (search, replace, subject, countObj) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_ireplace/\n // original by: Glen Arason (http://CanadianDomainRegistry.ca)\n // note 1: Case-insensitive version of str_replace()\n // note 1: Compliant with PHP 5.0 str_ireplace() Full details at:\n // note 1: http://ca3.php.net/manual/en/function.str-ireplace.php\n // note 2: The countObj parameter (optional) if used must be passed in as a\n // note 2: object. The count will then be written by reference into it's `value` property\n // example 1: str_ireplace('M', 'e', 'name')\n // returns 1: 'naee'\n // example 2: var $countObj = {}\n // example 2: str_ireplace('M', 'e', 'name', $countObj)\n // example 2: var $result = $countObj.value\n // returns 2: 1\n\n var i = 0\n var j = 0\n var temp = ''\n var repl = ''\n var sl = 0\n var fl = 0\n var f = ''\n var r = ''\n var s = ''\n var ra = ''\n var otemp = ''\n var oi = ''\n var ofjl = ''\n var os = subject\n var osa = Object.prototype.toString.call(os) === '[object Array]'\n // var sa = ''\n\n if (typeof (search) === 'object') {\n temp = search\n search = []\n for (i = 0; i < temp.length; i += 1) {\n search[i] = temp[i].toLowerCase()\n }\n } else {\n search = search.toLowerCase()\n }\n\n if (typeof (subject) === 'object') {\n temp = subject\n subject = []\n for (i = 0; i < temp.length; i += 1) {\n subject[i] = temp[i].toLowerCase()\n }\n } else {\n subject = subject.toLowerCase()\n }\n\n if (typeof (search) === 'object' && typeof (replace) === 'string') {\n temp = replace\n replace = []\n for (i = 0; i < search.length; i += 1) {\n replace[i] = temp\n }\n }\n\n temp = ''\n f = [].concat(search)\n r = [].concat(replace)\n ra = Object.prototype.toString.call(r) === '[object Array]'\n s = subject\n // sa = Object.prototype.toString.call(s) === '[object Array]'\n s = [].concat(s)\n os = [].concat(os)\n\n if (countObj) {\n countObj.value = 0\n }\n\n for (i = 0, sl = s.length; i < sl; i++) {\n if (s[i] === '') {\n continue\n }\n for (j = 0, fl = f.length; j < fl; j++) {\n temp = s[i] + ''\n repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]\n s[i] = (temp).split(f[j]).join(repl)\n otemp = os[i] + ''\n oi = temp.indexOf(f[j])\n ofjl = f[j].length\n if (oi >= 0) {\n os[i] = (otemp).split(otemp.substr(oi, ofjl)).join(repl)\n }\n\n if (countObj) {\n countObj.value += ((temp.split(f[j])).length - 1)\n }\n }\n }\n\n return osa ? os : os[0]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_pad.js b/node_modules/locutus/php/strings/str_pad.js
deleted file mode 100644
index a3afa23..0000000
--- a/node_modules/locutus/php/strings/str_pad.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-module.exports = function str_pad(input, padLength, padString, padType) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_pad/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Michael White (http://getsprink.com)
- // input by: Marco van Oort
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: str_pad('Kevin van Zonneveld', 30, '-=', 'STR_PAD_LEFT')
- // returns 1: '-=-=-=-=-=-Kevin van Zonneveld'
- // example 2: str_pad('Kevin van Zonneveld', 30, '-', 'STR_PAD_BOTH')
- // returns 2: '------Kevin van Zonneveld-----'
-
- var half = '';
- var padToGo;
-
- var _strPadRepeater = function _strPadRepeater(s, len) {
- var collect = '';
-
- while (collect.length < len) {
- collect += s;
- }
- collect = collect.substr(0, len);
-
- return collect;
- };
-
- input += '';
- padString = padString !== undefined ? padString : ' ';
-
- if (padType !== 'STR_PAD_LEFT' && padType !== 'STR_PAD_RIGHT' && padType !== 'STR_PAD_BOTH') {
- padType = 'STR_PAD_RIGHT';
- }
- if ((padToGo = padLength - input.length) > 0) {
- if (padType === 'STR_PAD_LEFT') {
- input = _strPadRepeater(padString, padToGo) + input;
- } else if (padType === 'STR_PAD_RIGHT') {
- input = input + _strPadRepeater(padString, padToGo);
- } else if (padType === 'STR_PAD_BOTH') {
- half = _strPadRepeater(padString, Math.ceil(padToGo / 2));
- input = half + input + half;
- input = input.substr(0, padLength);
- }
- }
-
- return input;
-};
-//# sourceMappingURL=str_pad.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_pad.js.map b/node_modules/locutus/php/strings/str_pad.js.map
deleted file mode 100644
index 7d64352..0000000
--- a/node_modules/locutus/php/strings/str_pad.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_pad.js"],"names":["module","exports","str_pad","input","padLength","padString","padType","half","padToGo","_strPadRepeater","s","len","collect","length","substr","undefined","Math","ceil"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,KAAlB,EAAyBC,SAAzB,EAAoCC,SAApC,EAA+CC,OAA/C,EAAwD;AAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAO,EAAX;AACA,MAAIC,OAAJ;;AAEA,MAAIC,kBAAkB,SAAlBA,eAAkB,CAAUC,CAAV,EAAaC,GAAb,EAAkB;AACtC,QAAIC,UAAU,EAAd;;AAEA,WAAOA,QAAQC,MAAR,GAAiBF,GAAxB,EAA6B;AAC3BC,iBAAWF,CAAX;AACD;AACDE,cAAUA,QAAQE,MAAR,CAAe,CAAf,EAAkBH,GAAlB,CAAV;;AAEA,WAAOC,OAAP;AACD,GATD;;AAWAT,WAAS,EAAT;AACAE,cAAYA,cAAcU,SAAd,GAA0BV,SAA1B,GAAsC,GAAlD;;AAEA,MAAIC,YAAY,cAAZ,IAA8BA,YAAY,eAA1C,IAA6DA,YAAY,cAA7E,EAA6F;AAC3FA,cAAU,eAAV;AACD;AACD,MAAI,CAACE,UAAUJ,YAAYD,MAAMU,MAA7B,IAAuC,CAA3C,EAA8C;AAC5C,QAAIP,YAAY,cAAhB,EAAgC;AAC9BH,cAAQM,gBAAgBJ,SAAhB,EAA2BG,OAA3B,IAAsCL,KAA9C;AACD,KAFD,MAEO,IAAIG,YAAY,eAAhB,EAAiC;AACtCH,cAAQA,QAAQM,gBAAgBJ,SAAhB,EAA2BG,OAA3B,CAAhB;AACD,KAFM,MAEA,IAAIF,YAAY,cAAhB,EAAgC;AACrCC,aAAOE,gBAAgBJ,SAAhB,EAA2BW,KAAKC,IAAL,CAAUT,UAAU,CAApB,CAA3B,CAAP;AACAL,cAAQI,OAAOJ,KAAP,GAAeI,IAAvB;AACAJ,cAAQA,MAAMW,MAAN,CAAa,CAAb,EAAgBV,SAAhB,CAAR;AACD;AACF;;AAED,SAAOD,KAAP;AACD,CA5CD","file":"str_pad.js","sourcesContent":["module.exports = function str_pad (input, padLength, padString, padType) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_pad/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Michael White (http://getsprink.com)\n // input by: Marco van Oort\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: str_pad('Kevin van Zonneveld', 30, '-=', 'STR_PAD_LEFT')\n // returns 1: '-=-=-=-=-=-Kevin van Zonneveld'\n // example 2: str_pad('Kevin van Zonneveld', 30, '-', 'STR_PAD_BOTH')\n // returns 2: '------Kevin van Zonneveld-----'\n\n var half = ''\n var padToGo\n\n var _strPadRepeater = function (s, len) {\n var collect = ''\n\n while (collect.length < len) {\n collect += s\n }\n collect = collect.substr(0, len)\n\n return collect\n }\n\n input += ''\n padString = padString !== undefined ? padString : ' '\n\n if (padType !== 'STR_PAD_LEFT' && padType !== 'STR_PAD_RIGHT' && padType !== 'STR_PAD_BOTH') {\n padType = 'STR_PAD_RIGHT'\n }\n if ((padToGo = padLength - input.length) > 0) {\n if (padType === 'STR_PAD_LEFT') {\n input = _strPadRepeater(padString, padToGo) + input\n } else if (padType === 'STR_PAD_RIGHT') {\n input = input + _strPadRepeater(padString, padToGo)\n } else if (padType === 'STR_PAD_BOTH') {\n half = _strPadRepeater(padString, Math.ceil(padToGo / 2))\n input = half + input + half\n input = input.substr(0, padLength)\n }\n }\n\n return input\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_repeat.js b/node_modules/locutus/php/strings/str_repeat.js
deleted file mode 100644
index b8df8a7..0000000
--- a/node_modules/locutus/php/strings/str_repeat.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function str_repeat(input, multiplier) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_repeat/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // improved by: Ian Carter (http://euona.com/)
- // example 1: str_repeat('-=', 10)
- // returns 1: '-=-=-=-=-=-=-=-=-=-='
-
- var y = '';
- while (true) {
- if (multiplier & 1) {
- y += input;
- }
- multiplier >>= 1;
- if (multiplier) {
- input += input;
- } else {
- break;
- }
- }
- return y;
-};
-//# sourceMappingURL=str_repeat.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_repeat.js.map b/node_modules/locutus/php/strings/str_repeat.js.map
deleted file mode 100644
index 773b6b0..0000000
--- a/node_modules/locutus/php/strings/str_repeat.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_repeat.js"],"names":["module","exports","str_repeat","input","multiplier","y"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,UAA5B,EAAwC;AAAE;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,EAAR;AACA,SAAO,IAAP,EAAa;AACX,QAAID,aAAa,CAAjB,EAAoB;AAClBC,WAAKF,KAAL;AACD;AACDC,mBAAe,CAAf;AACA,QAAIA,UAAJ,EAAgB;AACdD,eAASA,KAAT;AACD,KAFD,MAEO;AACL;AACD;AACF;AACD,SAAOE,CAAP;AACD,CArBD","file":"str_repeat.js","sourcesContent":["module.exports = function str_repeat (input, multiplier) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_repeat/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // improved by: Ian Carter (http://euona.com/)\n // example 1: str_repeat('-=', 10)\n // returns 1: '-=-=-=-=-=-=-=-=-=-='\n\n var y = ''\n while (true) {\n if (multiplier & 1) {\n y += input\n }\n multiplier >>= 1\n if (multiplier) {\n input += input\n } else {\n break\n }\n }\n return y\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_replace.js b/node_modules/locutus/php/strings/str_replace.js
deleted file mode 100644
index 2ced641..0000000
--- a/node_modules/locutus/php/strings/str_replace.js
+++ /dev/null
@@ -1,85 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function str_replace(search, replace, subject, countObj) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_replace/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Gabriel Paderni
- // improved by: Philip Peterson
- // improved by: Simon Willison (http://simonwillison.net)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // bugfixed by: Anton Ongson
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Oleg Eremeev
- // bugfixed by: Glen Arason (http://CanadianDomainRegistry.ca)
- // bugfixed by: Glen Arason (http://CanadianDomainRegistry.ca)
- // input by: Onno Marsman (https://twitter.com/onnomarsman)
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Oleg Eremeev
- // note 1: The countObj parameter (optional) if used must be passed in as a
- // note 1: object. The count will then be written by reference into it's `value` property
- // example 1: str_replace(' ', '.', 'Kevin van Zonneveld')
- // returns 1: 'Kevin.van.Zonneveld'
- // example 2: str_replace(['{name}', 'l'], ['hello', 'm'], '{name}, lars')
- // returns 2: 'hemmo, mars'
- // example 3: str_replace(Array('S','F'),'x','ASDFASDF')
- // returns 3: 'AxDxAxDx'
- // example 4: var countObj = {}
- // example 4: str_replace(['A','D'], ['x','y'] , 'ASDFASDF' , countObj)
- // example 4: var $result = countObj.value
- // returns 4: 4
-
- var i = 0;
- var j = 0;
- var temp = '';
- var repl = '';
- var sl = 0;
- var fl = 0;
- var f = [].concat(search);
- var r = [].concat(replace);
- var s = subject;
- var ra = Object.prototype.toString.call(r) === '[object Array]';
- var sa = Object.prototype.toString.call(s) === '[object Array]';
- s = [].concat(s);
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- if ((typeof search === 'undefined' ? 'undefined' : _typeof(search)) === 'object' && typeof replace === 'string') {
- temp = replace;
- replace = [];
- for (i = 0; i < search.length; i += 1) {
- replace[i] = temp;
- }
- temp = '';
- r = [].concat(replace);
- ra = Object.prototype.toString.call(r) === '[object Array]';
- }
-
- if (typeof countObj !== 'undefined') {
- countObj.value = 0;
- }
-
- for (i = 0, sl = s.length; i < sl; i++) {
- if (s[i] === '') {
- continue;
- }
- for (j = 0, fl = f.length; j < fl; j++) {
- temp = s[i] + '';
- repl = ra ? r[j] !== undefined ? r[j] : '' : r[0];
- s[i] = temp.split(f[j]).join(repl);
- if (typeof countObj !== 'undefined') {
- countObj.value += temp.split(f[j]).length - 1;
- }
- }
- }
- return sa ? s : s[0];
-};
-//# sourceMappingURL=str_replace.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_replace.js.map b/node_modules/locutus/php/strings/str_replace.js.map
deleted file mode 100644
index bcb40d7..0000000
--- a/node_modules/locutus/php/strings/str_replace.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_replace.js"],"names":["module","exports","str_replace","search","replace","subject","countObj","i","j","temp","repl","sl","fl","f","concat","r","s","ra","Object","prototype","toString","call","sa","$global","window","global","$locutus","php","length","value","undefined","split","join"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,MAAtB,EAA8BC,OAA9B,EAAuCC,OAAvC,EAAgDC,QAAhD,EAA0D;AAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,IAAI,GAAGC,MAAH,CAAUX,MAAV,CAAR;AACA,MAAIY,IAAI,GAAGD,MAAH,CAAUV,OAAV,CAAR;AACA,MAAIY,IAAIX,OAAR;AACA,MAAIY,KAAKC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BN,CAA/B,MAAsC,gBAA/C;AACA,MAAIO,KAAKJ,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BL,CAA/B,MAAsC,gBAA/C;AACAA,MAAI,GAAGF,MAAH,CAAUE,CAAV,CAAJ;;AAEA,MAAIO,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,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F;AACD,SAAON,KAAKN,CAAL,GAASA,EAAE,CAAF,CAAhB;AACD,CA9ED","file":"str_replace.js","sourcesContent":["module.exports = function str_replace (search, replace, subject, countObj) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_replace/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Gabriel Paderni\n // improved by: Philip Peterson\n // improved by: Simon Willison (http://simonwillison.net)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // bugfixed by: Anton Ongson\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Oleg Eremeev\n // bugfixed by: Glen Arason (http://CanadianDomainRegistry.ca)\n // bugfixed by: Glen Arason (http://CanadianDomainRegistry.ca)\n // input by: Onno Marsman (https://twitter.com/onnomarsman)\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Oleg Eremeev\n // note 1: The countObj parameter (optional) if used must be passed in as a\n // note 1: object. The count will then be written by reference into it's `value` property\n // example 1: str_replace(' ', '.', 'Kevin van Zonneveld')\n // returns 1: 'Kevin.van.Zonneveld'\n // example 2: str_replace(['{name}', 'l'], ['hello', 'm'], '{name}, lars')\n // returns 2: 'hemmo, mars'\n // example 3: str_replace(Array('S','F'),'x','ASDFASDF')\n // returns 3: 'AxDxAxDx'\n // example 4: var countObj = {}\n // example 4: str_replace(['A','D'], ['x','y'] , 'ASDFASDF' , countObj)\n // example 4: var $result = countObj.value\n // returns 4: 4\n\n var i = 0\n var j = 0\n var temp = ''\n var repl = ''\n var sl = 0\n var fl = 0\n var f = [].concat(search)\n var r = [].concat(replace)\n var s = subject\n var ra = Object.prototype.toString.call(r) === '[object Array]'\n var sa = Object.prototype.toString.call(s) === '[object Array]'\n s = [].concat(s)\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n if (typeof (search) === 'object' && typeof (replace) === 'string') {\n temp = replace\n replace = []\n for (i = 0; i < search.length; i += 1) {\n replace[i] = temp\n }\n temp = ''\n r = [].concat(replace)\n ra = Object.prototype.toString.call(r) === '[object Array]'\n }\n\n if (typeof countObj !== 'undefined') {\n countObj.value = 0\n }\n\n for (i = 0, sl = s.length; i < sl; i++) {\n if (s[i] === '') {\n continue\n }\n for (j = 0, fl = f.length; j < fl; j++) {\n temp = s[i] + ''\n repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]\n s[i] = (temp).split(f[j]).join(repl)\n if (typeof countObj !== 'undefined') {\n countObj.value += ((temp.split(f[j])).length - 1)\n }\n }\n }\n return sa ? s : s[0]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_rot13.js b/node_modules/locutus/php/strings/str_rot13.js
deleted file mode 100644
index 3c378c9..0000000
--- a/node_modules/locutus/php/strings/str_rot13.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = function str_rot13(str) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_rot13/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // improved by: Ates Goral (http://magnetiq.com)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: str_rot13('Kevin van Zonneveld')
- // returns 1: 'Xriva ina Mbaariryq'
- // example 2: str_rot13('Xriva ina Mbaariryq')
- // returns 2: 'Kevin van Zonneveld'
- // example 3: str_rot13(33)
- // returns 3: '33'
-
- return (str + '').replace(/[a-z]/gi, function (s) {
- return String.fromCharCode(s.charCodeAt(0) + (s.toLowerCase() < 'n' ? 13 : -13));
- });
-};
-//# sourceMappingURL=str_rot13.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_rot13.js.map b/node_modules/locutus/php/strings/str_rot13.js.map
deleted file mode 100644
index ea71871..0000000
--- a/node_modules/locutus/php/strings/str_rot13.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_rot13.js"],"names":["module","exports","str_rot13","str","replace","s","String","fromCharCode","charCodeAt","toLowerCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyB;AAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,OADI,CACI,SADJ,EACe,UAAUC,CAAV,EAAa;AAC/B,WAAOC,OAAOC,YAAP,CAAoBF,EAAEG,UAAF,CAAa,CAAb,KAAmBH,EAAEI,WAAF,KAAkB,GAAlB,GAAwB,EAAxB,GAA6B,CAAC,EAAjD,CAApB,CAAP;AACD,GAHI,CAAP;AAID,CAjBD","file":"str_rot13.js","sourcesContent":["module.exports = function str_rot13 (str) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_rot13/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // improved by: Ates Goral (http://magnetiq.com)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: str_rot13('Kevin van Zonneveld')\n // returns 1: 'Xriva ina Mbaariryq'\n // example 2: str_rot13('Xriva ina Mbaariryq')\n // returns 2: 'Kevin van Zonneveld'\n // example 3: str_rot13(33)\n // returns 3: '33'\n\n return (str + '')\n .replace(/[a-z]/gi, function (s) {\n return String.fromCharCode(s.charCodeAt(0) + (s.toLowerCase() < 'n' ? 13 : -13))\n })\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_shuffle.js b/node_modules/locutus/php/strings/str_shuffle.js
deleted file mode 100644
index ce204ba..0000000
--- a/node_modules/locutus/php/strings/str_shuffle.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function str_shuffle(str) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_shuffle/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $shuffled = str_shuffle("abcdef")
- // example 1: var $result = $shuffled.length
- // returns 1: 6
-
- if (arguments.length === 0) {
- throw new Error('Wrong parameter count for str_shuffle()');
- }
-
- if (str === null) {
- return '';
- }
-
- str += '';
-
- var newStr = '';
- var rand;
- var i = str.length;
-
- while (i) {
- rand = Math.floor(Math.random() * i);
- newStr += str.charAt(rand);
- str = str.substring(0, rand) + str.substr(rand + 1);
- i--;
- }
-
- return newStr;
-};
-//# sourceMappingURL=str_shuffle.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_shuffle.js.map b/node_modules/locutus/php/strings/str_shuffle.js.map
deleted file mode 100644
index a185077..0000000
--- a/node_modules/locutus/php/strings/str_shuffle.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_shuffle.js"],"names":["module","exports","str_shuffle","str","arguments","length","Error","newStr","rand","i","Math","floor","random","charAt","substring","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,GAAtB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,MAAV,KAAqB,CAAzB,EAA4B;AAC1B,UAAM,IAAIC,KAAJ,CAAU,yCAAV,CAAN;AACD;;AAED,MAAIH,QAAQ,IAAZ,EAAkB;AAChB,WAAO,EAAP;AACD;;AAEDA,SAAO,EAAP;;AAEA,MAAII,SAAS,EAAb;AACA,MAAIC,IAAJ;AACA,MAAIC,IAAIN,IAAIE,MAAZ;;AAEA,SAAOI,CAAP,EAAU;AACRD,WAAOE,KAAKC,KAAL,CAAWD,KAAKE,MAAL,KAAgBH,CAA3B,CAAP;AACAF,cAAUJ,IAAIU,MAAJ,CAAWL,IAAX,CAAV;AACAL,UAAMA,IAAIW,SAAJ,CAAc,CAAd,EAAiBN,IAAjB,IAAyBL,IAAIY,MAAJ,CAAWP,OAAO,CAAlB,CAA/B;AACAC;AACD;;AAED,SAAOF,MAAP;AACD,CA7BD","file":"str_shuffle.js","sourcesContent":["module.exports = function str_shuffle (str) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_shuffle/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $shuffled = str_shuffle(\"abcdef\")\n // example 1: var $result = $shuffled.length\n // returns 1: 6\n\n if (arguments.length === 0) {\n throw new Error('Wrong parameter count for str_shuffle()')\n }\n\n if (str === null) {\n return ''\n }\n\n str += ''\n\n var newStr = ''\n var rand\n var i = str.length\n\n while (i) {\n rand = Math.floor(Math.random() * i)\n newStr += str.charAt(rand)\n str = str.substring(0, rand) + str.substr(rand + 1)\n i--\n }\n\n return newStr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_split.js b/node_modules/locutus/php/strings/str_split.js
deleted file mode 100644
index 08177e1..0000000
--- a/node_modules/locutus/php/strings/str_split.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-module.exports = function str_split(string, splitLength) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_split/
- // original by: Martijn Wieringa
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Theriault (https://github.com/Theriault)
- // revised by: Rafał Kukawski (http://blog.kukawski.pl)
- // input by: Bjorn Roesbeke (http://www.bjornroesbeke.be/)
- // example 1: str_split('Hello Friend', 3)
- // returns 1: ['Hel', 'lo ', 'Fri', 'end']
-
- if (splitLength === null) {
- splitLength = 1;
- }
- if (string === null || splitLength < 1) {
- return false;
- }
-
- string += '';
- var chunks = [];
- var pos = 0;
- var len = string.length;
-
- while (pos < len) {
- chunks.push(string.slice(pos, pos += splitLength));
- }
-
- return chunks;
-};
-//# sourceMappingURL=str_split.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_split.js.map b/node_modules/locutus/php/strings/str_split.js.map
deleted file mode 100644
index a7f5b49..0000000
--- a/node_modules/locutus/php/strings/str_split.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_split.js"],"names":["module","exports","str_split","string","splitLength","chunks","pos","len","length","push","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,MAApB,EAA4BC,WAA5B,EAAyC;AAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,gBAAgB,IAApB,EAA0B;AACxBA,kBAAc,CAAd;AACD;AACD,MAAID,WAAW,IAAX,IAAmBC,cAAc,CAArC,EAAwC;AACtC,WAAO,KAAP;AACD;;AAEDD,YAAU,EAAV;AACA,MAAIE,SAAS,EAAb;AACA,MAAIC,MAAM,CAAV;AACA,MAAIC,MAAMJ,OAAOK,MAAjB;;AAEA,SAAOF,MAAMC,GAAb,EAAkB;AAChBF,WAAOI,IAAP,CAAYN,OAAOO,KAAP,CAAaJ,GAAb,EAAkBA,OAAOF,WAAzB,CAAZ;AACD;;AAED,SAAOC,MAAP;AACD,CA5BD","file":"str_split.js","sourcesContent":["module.exports = function str_split (string, splitLength) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_split/\n // original by: Martijn Wieringa\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: Theriault (https://github.com/Theriault)\n // revised by: Rafał Kukawski (http://blog.kukawski.pl)\n // input by: Bjorn Roesbeke (http://www.bjornroesbeke.be/)\n // example 1: str_split('Hello Friend', 3)\n // returns 1: ['Hel', 'lo ', 'Fri', 'end']\n\n if (splitLength === null) {\n splitLength = 1\n }\n if (string === null || splitLength < 1) {\n return false\n }\n\n string += ''\n var chunks = []\n var pos = 0\n var len = string.length\n\n while (pos < len) {\n chunks.push(string.slice(pos, pos += splitLength))\n }\n\n return chunks\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_word_count.js b/node_modules/locutus/php/strings/str_word_count.js
deleted file mode 100644
index c6179a2..0000000
--- a/node_modules/locutus/php/strings/str_word_count.js
+++ /dev/null
@@ -1,117 +0,0 @@
-'use strict';
-
-module.exports = function str_word_count(str, format, charlist) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/str_word_count/
- // original by: Ole Vrijenhoek
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: Bug?
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: str_word_count("Hello fri3nd, you're\r\n looking good today!", 1)
- // returns 1: ['Hello', 'fri', 'nd', "you're", 'looking', 'good', 'today']
- // example 2: str_word_count("Hello fri3nd, you're\r\n looking good today!", 2)
- // returns 2: {0: 'Hello', 6: 'fri', 10: 'nd', 14: "you're", 29: 'looking', 46: 'good', 51: 'today'}
- // example 3: str_word_count("Hello fri3nd, you're\r\n looking good today!", 1, '\u00e0\u00e1\u00e3\u00e73')
- // returns 3: ['Hello', 'fri3nd', "you're", 'looking', 'good', 'today']
- // example 4: str_word_count('hey', 2)
- // returns 4: {0: 'hey'}
-
- var ctypeAlpha = require('../ctype/ctype_alpha');
- var len = str.length;
- var cl = charlist && charlist.length;
- var chr = '';
- var tmpStr = '';
- var i = 0;
- var c = '';
- var wArr = [];
- var wC = 0;
- var assoc = {};
- var aC = 0;
- var reg = '';
- var match = false;
-
- var _pregQuote = function _pregQuote(str) {
- return (str + '').replace(/([\\.+*?[^\]$(){}=!<>|:])/g, '\\$1');
- };
- var _getWholeChar = function _getWholeChar(str, i) {
- // Use for rare cases of non-BMP characters
- var code = str.charCodeAt(i);
- if (code < 0xD800 || code > 0xDFFF) {
- return str.charAt(i);
- }
- if (code >= 0xD800 && code <= 0xDBFF) {
- // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single
- // characters)
- if (str.length <= i + 1) {
- throw new Error('High surrogate without following low surrogate');
- }
- var next = str.charCodeAt(i + 1);
- if (next < 0xDC00 || next > 0xDFFF) {
- throw new Error('High surrogate without following low surrogate');
- }
- return str.charAt(i) + str.charAt(i + 1);
- }
- // Low surrogate (0xDC00 <= code && code <= 0xDFFF)
- if (i === 0) {
- throw new Error('Low surrogate without preceding high surrogate');
- }
- var prev = str.charCodeAt(i - 1);
- if (prev < 0xD800 || prev > 0xDBFF) {
- // (could change last hex to 0xDB7F to treat high private surrogates as single characters)
- throw new Error('Low surrogate without preceding high surrogate');
- }
- // We can pass over low surrogates now as the second component in a pair which we have already
- // processed
- return false;
- };
-
- if (cl) {
- reg = '^(' + _pregQuote(_getWholeChar(charlist, 0));
- for (i = 1; i < cl; i++) {
- if ((chr = _getWholeChar(charlist, i)) === false) {
- continue;
- }
- reg += '|' + _pregQuote(chr);
- }
- reg += ')$';
- reg = new RegExp(reg);
- }
-
- for (i = 0; i < len; i++) {
- if ((c = _getWholeChar(str, i)) === false) {
- continue;
- }
- // No hyphen at beginning or end unless allowed in charlist (or locale)
- // No apostrophe at beginning unless allowed in charlist (or locale)
- // @todo: Make this more readable
- match = ctypeAlpha(c) || reg && c.search(reg) !== -1 || i !== 0 && i !== len - 1 && c === '-' || i !== 0 && c === "'";
- if (match) {
- if (tmpStr === '' && format === 2) {
- aC = i;
- }
- tmpStr = tmpStr + c;
- }
- if (i === len - 1 || !match && tmpStr !== '') {
- if (format !== 2) {
- wArr[wArr.length] = tmpStr;
- } else {
- assoc[aC] = tmpStr;
- }
- tmpStr = '';
- wC++;
- }
- }
-
- if (!format) {
- return wC;
- } else if (format === 1) {
- return wArr;
- } else if (format === 2) {
- return assoc;
- }
-
- throw new Error('You have supplied an incorrect format');
-};
-//# sourceMappingURL=str_word_count.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/str_word_count.js.map b/node_modules/locutus/php/strings/str_word_count.js.map
deleted file mode 100644
index 9c959e8..0000000
--- a/node_modules/locutus/php/strings/str_word_count.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/str_word_count.js"],"names":["module","exports","str_word_count","str","format","charlist","ctypeAlpha","require","len","length","cl","chr","tmpStr","i","c","wArr","wC","assoc","aC","reg","match","_pregQuote","replace","_getWholeChar","code","charCodeAt","charAt","Error","next","prev","RegExp","search"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,GAAzB,EAA8BC,MAA9B,EAAsCC,QAAtC,EAAgD;AAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,aAAaC,QAAQ,sBAAR,CAAjB;AACA,MAAIC,MAAML,IAAIM,MAAd;AACA,MAAIC,KAAKL,YAAYA,SAASI,MAA9B;AACA,MAAIE,MAAM,EAAV;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,EAAR;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,QAAQ,EAAZ;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,QAAQ,KAAZ;;AAEA,MAAIC,aAAa,SAAbA,UAAa,CAAUlB,GAAV,EAAe;AAC9B,WAAO,CAACA,MAAM,EAAP,EAAWmB,OAAX,CAAmB,4BAAnB,EAAiD,MAAjD,CAAP;AACD,GAFD;AAGA,MAAIC,gBAAgB,SAAhBA,aAAgB,CAAUpB,GAAV,EAAeU,CAAf,EAAkB;AACpC;AACA,QAAIW,OAAOrB,IAAIsB,UAAJ,CAAeZ,CAAf,CAAX;AACA,QAAIW,OAAO,MAAP,IAAiBA,OAAO,MAA5B,EAAoC;AAClC,aAAOrB,IAAIuB,MAAJ,CAAWb,CAAX,CAAP;AACD;AACD,QAAIW,QAAQ,MAAR,IAAkBA,QAAQ,MAA9B,EAAsC;AACpC;AACA;AACA,UA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,KACLK,OAAOL,EAAEiB,MAAF,CAASZ,GAAT,MAAkB,CAAC,CADrB,IAEJN,MAAM,CAAN,IAAWA,MAAML,MAAM,CAAxB,IAA8BM,MAAM,GAF/B,IAGLD,MAAM,CAAN,IAAWC,MAAM,GAHpB;AAIA,QAAIM,KAAJ,EAAW;AACT,UAAIR,WAAW,EAAX,IAAiBR,WAAW,CAAhC,EAAmC;AACjCc,aAAKL,CAAL;AACD;AACDD,eAASA,SAASE,CAAlB;AACD;AACD,QAAID,MAAML,MAAM,CAAZ,IAAiB,CAACY,KAAD,IAAUR,WAAW,EAA1C,EAA8C;AAC5C,UAAIR,WAAW,CAAf,EAAkB;AAChBW,aAAKA,KAAKN,MAAV,IAAoBG,MAApB;AACD,OAFD,MAEO;AACLK,cAAMC,EAAN,IAAYN,MAAZ;AACD;AACDA,eAAS,EAAT;AACAI;AACD;AACF;;AAED,MAAI,CAACZ,MAAL,EAAa;AACX,WAAOY,EAAP;AACD,GAFD,MAEO,IAAIZ,WAAW,CAAf,EAAkB;AACvB,WAAOW,IAAP;AACD,GAFM,MAEA,IAAIX,WAAW,CAAf,EAAkB;AACvB,WAAOa,KAAP;AACD;;AAED,QAAM,IAAIU,KAAJ,CAAU,uCAAV,CAAN;AACD,CAnHD","file":"str_word_count.js","sourcesContent":["module.exports = function str_word_count (str, format, charlist) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/str_word_count/\n // original by: Ole Vrijenhoek\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: Bug?\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: str_word_count(\"Hello fri3nd, you're\\r\\n looking good today!\", 1)\n // returns 1: ['Hello', 'fri', 'nd', \"you're\", 'looking', 'good', 'today']\n // example 2: str_word_count(\"Hello fri3nd, you're\\r\\n looking good today!\", 2)\n // returns 2: {0: 'Hello', 6: 'fri', 10: 'nd', 14: \"you're\", 29: 'looking', 46: 'good', 51: 'today'}\n // example 3: str_word_count(\"Hello fri3nd, you're\\r\\n looking good today!\", 1, '\\u00e0\\u00e1\\u00e3\\u00e73')\n // returns 3: ['Hello', 'fri3nd', \"you're\", 'looking', 'good', 'today']\n // example 4: str_word_count('hey', 2)\n // returns 4: {0: 'hey'}\n\n var ctypeAlpha = require('../ctype/ctype_alpha')\n var len = str.length\n var cl = charlist && charlist.length\n var chr = ''\n var tmpStr = ''\n var i = 0\n var c = ''\n var wArr = []\n var wC = 0\n var assoc = {}\n var aC = 0\n var reg = ''\n var match = false\n\n var _pregQuote = function (str) {\n return (str + '').replace(/([\\\\.+*?[^\\]$(){}=!<>|:])/g, '\\\\$1')\n }\n var _getWholeChar = function (str, i) {\n // Use for rare cases of non-BMP characters\n var code = str.charCodeAt(i)\n if (code < 0xD800 || code > 0xDFFF) {\n return str.charAt(i)\n }\n if (code >= 0xD800 && code <= 0xDBFF) {\n // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single\n // characters)\n if (str.length <= (i + 1)) {\n throw new Error('High surrogate without following low surrogate')\n }\n var next = str.charCodeAt(i + 1)\n if (next < 0xDC00 || next > 0xDFFF) {\n throw new Error('High surrogate without following low surrogate')\n }\n return str.charAt(i) + str.charAt(i + 1)\n }\n // Low surrogate (0xDC00 <= code && code <= 0xDFFF)\n if (i === 0) {\n throw new Error('Low surrogate without preceding high surrogate')\n }\n var prev = str.charCodeAt(i - 1)\n if (prev < 0xD800 || prev > 0xDBFF) {\n // (could change last hex to 0xDB7F to treat high private surrogates as single characters)\n throw new Error('Low surrogate without preceding high surrogate')\n }\n // We can pass over low surrogates now as the second component in a pair which we have already\n // processed\n return false\n }\n\n if (cl) {\n reg = '^(' + _pregQuote(_getWholeChar(charlist, 0))\n for (i = 1; i < cl; i++) {\n if ((chr = _getWholeChar(charlist, i)) === false) {\n continue\n }\n reg += '|' + _pregQuote(chr)\n }\n reg += ')$'\n reg = new RegExp(reg)\n }\n\n for (i = 0; i < len; i++) {\n if ((c = _getWholeChar(str, i)) === false) {\n continue\n }\n // No hyphen at beginning or end unless allowed in charlist (or locale)\n // No apostrophe at beginning unless allowed in charlist (or locale)\n // @todo: Make this more readable\n match = ctypeAlpha(c) ||\n (reg && c.search(reg) !== -1) ||\n ((i !== 0 && i !== len - 1) && c === '-') ||\n (i !== 0 && c === \"'\")\n if (match) {\n if (tmpStr === '' && format === 2) {\n aC = i\n }\n tmpStr = tmpStr + c\n }\n if (i === len - 1 || !match && tmpStr !== '') {\n if (format !== 2) {\n wArr[wArr.length] = tmpStr\n } else {\n assoc[aC] = tmpStr\n }\n tmpStr = ''\n wC++\n }\n }\n\n if (!format) {\n return wC\n } else if (format === 1) {\n return wArr\n } else if (format === 2) {\n return assoc\n }\n\n throw new Error('You have supplied an incorrect format')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcasecmp.js b/node_modules/locutus/php/strings/strcasecmp.js
deleted file mode 100644
index 624a035..0000000
--- a/node_modules/locutus/php/strings/strcasecmp.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = function strcasecmp(fString1, fString2) {
- // discuss at: http://locutus.io/php/strcasecmp/
- // original by: Martijn Wieringa
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: strcasecmp('Hello', 'hello')
- // returns 1: 0
-
- var string1 = (fString1 + '').toLowerCase();
- var string2 = (fString2 + '').toLowerCase();
-
- if (string1 > string2) {
- return 1;
- } else if (string1 === string2) {
- return 0;
- }
-
- return -1;
-};
-//# sourceMappingURL=strcasecmp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcasecmp.js.map b/node_modules/locutus/php/strings/strcasecmp.js.map
deleted file mode 100644
index 8d79eaa..0000000
--- a/node_modules/locutus/php/strings/strcasecmp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strcasecmp.js"],"names":["module","exports","strcasecmp","fString1","fString2","string1","toLowerCase","string2"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,QAArB,EAA+BC,QAA/B,EAAyC;AACxD;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAU,CAACF,WAAW,EAAZ,EAAgBG,WAAhB,EAAd;AACA,MAAIC,UAAU,CAACH,WAAW,EAAZ,EAAgBE,WAAhB,EAAd;;AAEA,MAAID,UAAUE,OAAd,EAAuB;AACrB,WAAO,CAAP;AACD,GAFD,MAEO,IAAIF,YAAYE,OAAhB,EAAyB;AAC9B,WAAO,CAAP;AACD;;AAED,SAAO,CAAC,CAAR;AACD,CAjBD","file":"strcasecmp.js","sourcesContent":["module.exports = function strcasecmp (fString1, fString2) {\n // discuss at: http://locutus.io/php/strcasecmp/\n // original by: Martijn Wieringa\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: strcasecmp('Hello', 'hello')\n // returns 1: 0\n\n var string1 = (fString1 + '').toLowerCase()\n var string2 = (fString2 + '').toLowerCase()\n\n if (string1 > string2) {\n return 1\n } else if (string1 === string2) {\n return 0\n }\n\n return -1\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strchr.js b/node_modules/locutus/php/strings/strchr.js
deleted file mode 100644
index 5ba1644..0000000
--- a/node_modules/locutus/php/strings/strchr.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function strchr(haystack, needle, bool) {
- // discuss at: http://locutus.io/php/strchr/
- // original by: Philip Peterson
- // example 1: strchr('Kevin van Zonneveld', 'van')
- // returns 1: 'van Zonneveld'
- // example 2: strchr('Kevin van Zonneveld', 'van', true)
- // returns 2: 'Kevin '
-
- var strstr = require('../strings/strstr');
- return strstr(haystack, needle, bool);
-};
-//# sourceMappingURL=strchr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strchr.js.map b/node_modules/locutus/php/strings/strchr.js.map
deleted file mode 100644
index a8b6f65..0000000
--- a/node_modules/locutus/php/strings/strchr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strchr.js"],"names":["module","exports","strchr","haystack","needle","bool","strstr","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,MAA3B,EAAmCC,IAAnC,EAAyC;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAASC,QAAQ,mBAAR,CAAb;AACA,SAAOD,OAAOH,QAAP,EAAiBC,MAAjB,EAAyBC,IAAzB,CAAP;AACD,CAVD","file":"strchr.js","sourcesContent":["module.exports = function strchr (haystack, needle, bool) {\n // discuss at: http://locutus.io/php/strchr/\n // original by: Philip Peterson\n // example 1: strchr('Kevin van Zonneveld', 'van')\n // returns 1: 'van Zonneveld'\n // example 2: strchr('Kevin van Zonneveld', 'van', true)\n // returns 2: 'Kevin '\n\n var strstr = require('../strings/strstr')\n return strstr(haystack, needle, bool)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcmp.js b/node_modules/locutus/php/strings/strcmp.js
deleted file mode 100644
index 1d58211..0000000
--- a/node_modules/locutus/php/strings/strcmp.js
+++ /dev/null
@@ -1,16 +0,0 @@
-"use strict";
-
-module.exports = function strcmp(str1, str2) {
- // discuss at: http://locutus.io/php/strcmp/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // input by: Steve Hilder
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // revised by: gorthaur
- // example 1: strcmp( 'waldo', 'owald' )
- // returns 1: 1
- // example 2: strcmp( 'owald', 'waldo' )
- // returns 2: -1
-
- return str1 === str2 ? 0 : str1 > str2 ? 1 : -1;
-};
-//# sourceMappingURL=strcmp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcmp.js.map b/node_modules/locutus/php/strings/strcmp.js.map
deleted file mode 100644
index f767ffd..0000000
--- a/node_modules/locutus/php/strings/strcmp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strcmp.js"],"names":["module","exports","strcmp","str1","str2"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,IAAjB,EAAuBC,IAAvB,EAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASD,SAASC,IAAV,GAAkB,CAAlB,GAAwBD,OAAOC,IAAR,GAAgB,CAAhB,GAAoB,CAAC,CAApD;AACD,CAZD","file":"strcmp.js","sourcesContent":["module.exports = function strcmp (str1, str2) {\n // discuss at: http://locutus.io/php/strcmp/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // input by: Steve Hilder\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // revised by: gorthaur\n // example 1: strcmp( 'waldo', 'owald' )\n // returns 1: 1\n // example 2: strcmp( 'owald', 'waldo' )\n // returns 2: -1\n\n return ((str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcoll.js b/node_modules/locutus/php/strings/strcoll.js
deleted file mode 100644
index f175527..0000000
--- a/node_modules/locutus/php/strings/strcoll.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-module.exports = function strcoll(str1, str2) {
- // discuss at: http://locutus.io/php/strcoll/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: strcoll('a', 'b')
- // returns 1: -1
-
- var setlocale = require('../strings/setlocale');
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- setlocale('LC_ALL', 0); // ensure setup of localization variables takes place
-
- var cmp = $locutus.php.locales[$locutus.php.localeCategories.LC_COLLATE].LC_COLLATE;
-
- return cmp(str1, str2);
-};
-//# sourceMappingURL=strcoll.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcoll.js.map b/node_modules/locutus/php/strings/strcoll.js.map
deleted file mode 100644
index 5ea9929..0000000
--- a/node_modules/locutus/php/strings/strcoll.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strcoll.js"],"names":["module","exports","strcoll","str1","str2","setlocale","require","$global","window","global","$locutus","php","cmp","locales","localeCategories","LC_COLLATE"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,IAAlB,EAAwBC,IAAxB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEAN,YAAU,QAAV,EAAoB,CAApB,EAd6C,CActB;;AAEvB,MAAIO,MAAMF,SAASC,GAAT,CAAaE,OAAb,CAAqBH,SAASC,GAAT,CAAaG,gBAAb,CAA8BC,UAAnD,EAA+DA,UAAzE;;AAEA,SAAOH,IAAIT,IAAJ,EAAUC,IAAV,CAAP;AACD,CAnBD","file":"strcoll.js","sourcesContent":["module.exports = function strcoll (str1, str2) {\n // discuss at: http://locutus.io/php/strcoll/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: strcoll('a', 'b')\n // returns 1: -1\n\n var setlocale = require('../strings/setlocale')\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n setlocale('LC_ALL', 0) // ensure setup of localization variables takes place\n\n var cmp = $locutus.php.locales[$locutus.php.localeCategories.LC_COLLATE].LC_COLLATE\n\n return cmp(str1, str2)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcspn.js b/node_modules/locutus/php/strings/strcspn.js
deleted file mode 100644
index 5587348..0000000
--- a/node_modules/locutus/php/strings/strcspn.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = function strcspn(str, mask, start, length) {
- // discuss at: http://locutus.io/php/strcspn/
- // original by: Brett Zamir (http://brett-zamir.me)
- // revised by: Theriault
- // example 1: strcspn('abcdefg123', '1234567890')
- // returns 1: 7
- // example 2: strcspn('123abc', '1234567890')
- // returns 2: 0
- // example 3: strcspn('abcdefg123', '1234567890', 1)
- // returns 3: 6
- // example 4: strcspn('abcdefg123', '1234567890', -6, -5)
- // returns 4: 1
-
- start = start || 0;
- length = typeof length === 'undefined' ? str.length : length || 0;
- if (start < 0) start = str.length + start;
- if (length < 0) length = str.length - start + length;
- if (start < 0 || start >= str.length || length <= 0 || e >= str.length) return 0;
- var e = Math.min(str.length, start + length);
- for (var i = start, lgth = 0; i < e; i++) {
- if (mask.indexOf(str.charAt(i)) !== -1) {
- break;
- }
- ++lgth;
- }
- return lgth;
-};
-//# sourceMappingURL=strcspn.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strcspn.js.map b/node_modules/locutus/php/strings/strcspn.js.map
deleted file mode 100644
index 352182d..0000000
--- a/node_modules/locutus/php/strings/strcspn.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strcspn.js"],"names":["module","exports","strcspn","str","mask","start","length","e","Math","min","i","lgth","indexOf","charAt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuBC,IAAvB,EAA6BC,KAA7B,EAAoCC,MAApC,EAA4C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAD,UAAQA,SAAS,CAAjB;AACAC,WAAS,OAAOA,MAAP,KAAkB,WAAlB,GAAgCH,IAAIG,MAApC,GAA8CA,UAAU,CAAjE;AACA,MAAID,QAAQ,CAAZ,EAAeA,QAAQF,IAAIG,MAAJ,GAAaD,KAArB;AACf,MAAIC,SAAS,CAAb,EAAgBA,SAASH,IAAIG,MAAJ,GAAaD,KAAb,GAAqBC,MAA9B;AAChB,MAAID,QAAQ,CAAR,IAAaA,SAASF,IAAIG,MAA1B,IAAoCA,UAAU,CAA9C,IAAmDC,KAAKJ,IAAIG,MAAhE,EAAwE,OAAO,CAAP;AACxE,MAAIC,IAAIC,KAAKC,GAAL,CAASN,IAAIG,MAAb,EAAqBD,QAAQC,MAA7B,CAAR;AACA,OAAK,IAAII,IAAIL,KAAR,EAAeM,OAAO,CAA3B,EAA8BD,IAAIH,CAAlC,EAAqCG,GAArC,EAA0C;AACxC,QAAIN,KAAKQ,OAAL,CAAaT,IAAIU,MAAJ,CAAWH,CAAX,CAAb,MAAgC,CAAC,CAArC,EAAwC;AACtC;AACD;AACD,MAAEC,IAAF;AACD;AACD,SAAOA,IAAP;AACD,CA1BD","file":"strcspn.js","sourcesContent":["module.exports = function strcspn (str, mask, start, length) {\n // discuss at: http://locutus.io/php/strcspn/\n // original by: Brett Zamir (http://brett-zamir.me)\n // revised by: Theriault\n // example 1: strcspn('abcdefg123', '1234567890')\n // returns 1: 7\n // example 2: strcspn('123abc', '1234567890')\n // returns 2: 0\n // example 3: strcspn('abcdefg123', '1234567890', 1)\n // returns 3: 6\n // example 4: strcspn('abcdefg123', '1234567890', -6, -5)\n // returns 4: 1\n\n start = start || 0\n length = typeof length === 'undefined' ? str.length : (length || 0)\n if (start < 0) start = str.length + start\n if (length < 0) length = str.length - start + length\n if (start < 0 || start >= str.length || length <= 0 || e >= str.length) return 0\n var e = Math.min(str.length, start + length)\n for (var i = start, lgth = 0; i < e; i++) {\n if (mask.indexOf(str.charAt(i)) !== -1) {\n break\n }\n ++lgth\n }\n return lgth\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strip_tags.js b/node_modules/locutus/php/strings/strip_tags.js
deleted file mode 100644
index cc7b22d..0000000
--- a/node_modules/locutus/php/strings/strip_tags.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict';
-
-module.exports = function strip_tags(input, allowed) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/strip_tags/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Luke Godfrey
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Pul
- // input by: Alex
- // input by: Marc Palau
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Bobby Drake
- // input by: Evertjan Garretsen
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Eric Nagel
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Tomasz Wesolowski
- // bugfixed by: Tymon Sturgeon (https://scryptonite.com)
- // bugfixed by: Tim de Koning (https://www.kingsquare.nl)
- // revised by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: strip_tags('<p>Kevin</p> <br /><b>van</b> <i>Zonneveld</i>', '<i><b>')
- // returns 1: 'Kevin <b>van</b> <i>Zonneveld</i>'
- // example 2: strip_tags('<p>Kevin <img src="someimage.png" onmouseover="someFunction()">van <i>Zonneveld</i></p>', '<p>')
- // returns 2: '<p>Kevin van Zonneveld</p>'
- // example 3: strip_tags("<a href='http://kvz.io'>Kevin van Zonneveld</a>", "<a>")
- // returns 3: "<a href='http://kvz.io'>Kevin van Zonneveld</a>"
- // example 4: strip_tags('1 < 5 5 > 1')
- // returns 4: '1 < 5 5 > 1'
- // example 5: strip_tags('1 <br/> 1')
- // returns 5: '1 1'
- // example 6: strip_tags('1 <br/> 1', '<br>')
- // returns 6: '1 <br/> 1'
- // example 7: strip_tags('1 <br/> 1', '<br><br/>')
- // returns 7: '1 <br/> 1'
- // example 8: strip_tags('<i>hello</i> <<foo>script>world<</foo>/script>')
- // returns 8: 'hello world'
- // example 9: strip_tags(4)
- // returns 9: '4'
-
- var _phpCastString = require('../_helpers/_phpCastString');
-
- // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
- allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('');
-
- var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;
- var commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
-
- var after = _phpCastString(input);
- // recursively remove tags to ensure that the returned string doesn't contain forbidden tags after previous passes (e.g. '<<bait/>switch/>')
- while (true) {
- var before = after;
- after = before.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {
- return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
- });
-
- // return once no more tags are removed
- if (before === after) {
- return after;
- }
- }
-};
-//# sourceMappingURL=strip_tags.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strip_tags.js.map b/node_modules/locutus/php/strings/strip_tags.js.map
deleted file mode 100644
index 834fe58..0000000
--- a/node_modules/locutus/php/strings/strip_tags.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strip_tags.js"],"names":["module","exports","strip_tags","input","allowed","_phpCastString","require","toLowerCase","match","join","tags","commentsAndPhpTags","after","before","replace","$0","$1","indexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,OAA5B,EAAqC;AAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,iBAAiBC,QAAQ,4BAAR,CAArB;;AAEA;AACAF,YAAU,CAAC,CAAC,CAACA,WAAW,EAAZ,IAAkB,EAAnB,EAAuBG,WAAvB,GAAqCC,KAArC,CAA2C,mBAA3C,KAAmE,EAApE,EAAwEC,IAAxE,CAA6E,EAA7E,CAAV;;AAEA,MAAIC,OAAO,gCAAX;AACA,MAAIC,qBAAqB,0CAAzB;;AAEA,MAAIC,QAAQP,eAAeF,KAAf,CAAZ;AACA;AACA,SAAO,IAAP,EAAa;AACX,QAAIU,SAASD,KAAb;AACAA,YAAQC,OAAOC,OAAP,CAAeH,kBAAf,EAAmC,EAAnC,EAAuCG,OAAvC,CAA+CJ,IAA/C,EAAqD,UAAUK,EAAV,EAAcC,EAAd,EAAkB;AAC7E,aAAOZ,QAAQa,OAAR,CAAgB,MAAMD,GAAGT,WAAH,EAAN,GAAyB,GAAzC,IAAgD,CAAC,CAAjD,GAAqDQ,EAArD,GAA0D,EAAjE;AACD,KAFO,CAAR;;AAIA;AACA,QAAIF,WAAWD,KAAf,EAAsB;AACpB,aAAOA,KAAP;AACD;AACF;AACF,CA7DD","file":"strip_tags.js","sourcesContent":["module.exports = function strip_tags (input, allowed) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/strip_tags/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Luke Godfrey\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Pul\n // input by: Alex\n // input by: Marc Palau\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Bobby Drake\n // input by: Evertjan Garretsen\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Eric Nagel\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Tomasz Wesolowski\n // bugfixed by: Tymon Sturgeon (https://scryptonite.com)\n // bugfixed by: Tim de Koning (https://www.kingsquare.nl)\n // revised by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: strip_tags('<p>Kevin</p> <br /><b>van</b> <i>Zonneveld</i>', '<i><b>')\n // returns 1: 'Kevin <b>van</b> <i>Zonneveld</i>'\n // example 2: strip_tags('<p>Kevin <img src=\"someimage.png\" onmouseover=\"someFunction()\">van <i>Zonneveld</i></p>', '<p>')\n // returns 2: '<p>Kevin van Zonneveld</p>'\n // example 3: strip_tags(\"<a href='http://kvz.io'>Kevin van Zonneveld</a>\", \"<a>\")\n // returns 3: \"<a href='http://kvz.io'>Kevin van Zonneveld</a>\"\n // example 4: strip_tags('1 < 5 5 > 1')\n // returns 4: '1 < 5 5 > 1'\n // example 5: strip_tags('1 <br/> 1')\n // returns 5: '1 1'\n // example 6: strip_tags('1 <br/> 1', '<br>')\n // returns 6: '1 <br/> 1'\n // example 7: strip_tags('1 <br/> 1', '<br><br/>')\n // returns 7: '1 <br/> 1'\n // example 8: strip_tags('<i>hello</i> <<foo>script>world<</foo>/script>')\n // returns 8: 'hello world'\n // example 9: strip_tags(4)\n // returns 9: '4'\n\n var _phpCastString = require('../_helpers/_phpCastString')\n\n // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)\n allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('')\n\n var tags = /<\\/?([a-z][a-z0-9]*)\\b[^>]*>/gi\n var commentsAndPhpTags = /<!--[\\s\\S]*?-->|<\\?(?:php)?[\\s\\S]*?\\?>/gi\n\n var after = _phpCastString(input)\n // recursively remove tags to ensure that the returned string doesn't contain forbidden tags after previous passes (e.g. '<<bait/>switch/>')\n while (true) {\n var before = after\n after = before.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {\n return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''\n })\n\n // return once no more tags are removed\n if (before === after) {\n return after\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/stripos.js b/node_modules/locutus/php/strings/stripos.js
deleted file mode 100644
index 839350e..0000000
--- a/node_modules/locutus/php/strings/stripos.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = function stripos(fHaystack, fNeedle, fOffset) {
- // discuss at: http://locutus.io/php/stripos/
- // original by: Martijn Wieringa
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: stripos('ABC', 'a')
- // returns 1: 0
-
- var haystack = (fHaystack + '').toLowerCase();
- var needle = (fNeedle + '').toLowerCase();
- var index = 0;
-
- if ((index = haystack.indexOf(needle, fOffset)) !== -1) {
- return index;
- }
-
- return false;
-};
-//# sourceMappingURL=stripos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/stripos.js.map b/node_modules/locutus/php/strings/stripos.js.map
deleted file mode 100644
index b254e0d..0000000
--- a/node_modules/locutus/php/strings/stripos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/stripos.js"],"names":["module","exports","stripos","fHaystack","fNeedle","fOffset","haystack","toLowerCase","needle","index","indexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,SAAlB,EAA6BC,OAA7B,EAAsCC,OAAtC,EAA+C;AAC9D;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAW,CAACH,YAAY,EAAb,EAAiBI,WAAjB,EAAf;AACA,MAAIC,SAAS,CAACJ,UAAU,EAAX,EAAeG,WAAf,EAAb;AACA,MAAIE,QAAQ,CAAZ;;AAEA,MAAI,CAACA,QAAQH,SAASI,OAAT,CAAiBF,MAAjB,EAAyBH,OAAzB,CAAT,MAAgD,CAAC,CAArD,EAAwD;AACtD,WAAOI,KAAP;AACD;;AAED,SAAO,KAAP;AACD,CAhBD","file":"stripos.js","sourcesContent":["module.exports = function stripos (fHaystack, fNeedle, fOffset) {\n // discuss at: http://locutus.io/php/stripos/\n // original by: Martijn Wieringa\n // revised by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: stripos('ABC', 'a')\n // returns 1: 0\n\n var haystack = (fHaystack + '').toLowerCase()\n var needle = (fNeedle + '').toLowerCase()\n var index = 0\n\n if ((index = haystack.indexOf(needle, fOffset)) !== -1) {\n return index\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/stripslashes.js b/node_modules/locutus/php/strings/stripslashes.js
deleted file mode 100644
index ca88849..0000000
--- a/node_modules/locutus/php/strings/stripslashes.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-module.exports = function stripslashes(str) {
- // discuss at: http://locutus.io/php/stripslashes/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Ates Goral (http://magnetiq.com)
- // improved by: marrtins
- // improved by: rezna
- // fixed by: Mick@el
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: Rick Waldron
- // input by: Brant Messenger (http://www.brantmessenger.com/)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // example 1: stripslashes('Kevin\'s code')
- // returns 1: "Kevin's code"
- // example 2: stripslashes('Kevin\\\'s code')
- // returns 2: "Kevin\'s code"
-
- return (str + '').replace(/\\(.?)/g, function (s, n1) {
- switch (n1) {
- case '\\':
- return '\\';
- case '0':
- return '\0';
- case '':
- return '';
- default:
- return n1;
- }
- });
-};
-//# sourceMappingURL=stripslashes.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/stripslashes.js.map b/node_modules/locutus/php/strings/stripslashes.js.map
deleted file mode 100644
index baaf08b..0000000
--- a/node_modules/locutus/php/strings/stripslashes.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/stripslashes.js"],"names":["module","exports","stripslashes","str","replace","s","n1"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,GAAvB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,OADI,CACI,SADJ,EACe,UAAUC,CAAV,EAAaC,EAAb,EAAiB;AACnC,YAAQA,EAAR;AACE,WAAK,IAAL;AACE,eAAO,IAAP;AACF,WAAK,GAAL;AACE,eAAO,IAAP;AACF,WAAK,EAAL;AACE,eAAO,EAAP;AACF;AACE,eAAOA,EAAP;AARJ;AAUD,GAZI,CAAP;AAaD,CA9BD","file":"stripslashes.js","sourcesContent":["module.exports = function stripslashes (str) {\n // discuss at: http://locutus.io/php/stripslashes/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Ates Goral (http://magnetiq.com)\n // improved by: marrtins\n // improved by: rezna\n // fixed by: Mick@el\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: Rick Waldron\n // input by: Brant Messenger (http://www.brantmessenger.com/)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // example 1: stripslashes('Kevin\\'s code')\n // returns 1: \"Kevin's code\"\n // example 2: stripslashes('Kevin\\\\\\'s code')\n // returns 2: \"Kevin\\'s code\"\n\n return (str + '')\n .replace(/\\\\(.?)/g, function (s, n1) {\n switch (n1) {\n case '\\\\':\n return '\\\\'\n case '0':\n return '\\u0000'\n case '':\n return ''\n default:\n return n1\n }\n })\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/stristr.js b/node_modules/locutus/php/strings/stristr.js
deleted file mode 100644
index 26e3704..0000000
--- a/node_modules/locutus/php/strings/stristr.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-module.exports = function stristr(haystack, needle, bool) {
- // discuss at: http://locutus.io/php/stristr/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: stristr('Kevin van Zonneveld', 'Van')
- // returns 1: 'van Zonneveld'
- // example 2: stristr('Kevin van Zonneveld', 'VAN', true)
- // returns 2: 'Kevin '
-
- var pos = 0;
-
- haystack += '';
- pos = haystack.toLowerCase().indexOf((needle + '').toLowerCase());
- if (pos === -1) {
- return false;
- } else {
- if (bool) {
- return haystack.substr(0, pos);
- } else {
- return haystack.slice(pos);
- }
- }
-};
-//# sourceMappingURL=stristr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/stristr.js.map b/node_modules/locutus/php/strings/stristr.js.map
deleted file mode 100644
index 3231c61..0000000
--- a/node_modules/locutus/php/strings/stristr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/stristr.js"],"names":["module","exports","stristr","haystack","needle","bool","pos","toLowerCase","indexOf","substr","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4BC,MAA5B,EAAoCC,IAApC,EAA0C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,CAAV;;AAEAH,cAAY,EAAZ;AACAG,QAAMH,SAASI,WAAT,GACHC,OADG,CACK,CAACJ,SAAS,EAAV,EACNG,WADM,EADL,CAAN;AAGA,MAAID,QAAQ,CAAC,CAAb,EAAgB;AACd,WAAO,KAAP;AACD,GAFD,MAEO;AACL,QAAID,IAAJ,EAAU;AACR,aAAOF,SAASM,MAAT,CAAgB,CAAhB,EAAmBH,GAAnB,CAAP;AACD,KAFD,MAEO;AACL,aAAOH,SAASO,KAAT,CAAeJ,GAAf,CAAP;AACD;AACF;AACF,CAxBD","file":"stristr.js","sourcesContent":["module.exports = function stristr (haystack, needle, bool) {\n // discuss at: http://locutus.io/php/stristr/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: stristr('Kevin van Zonneveld', 'Van')\n // returns 1: 'van Zonneveld'\n // example 2: stristr('Kevin van Zonneveld', 'VAN', true)\n // returns 2: 'Kevin '\n\n var pos = 0\n\n haystack += ''\n pos = haystack.toLowerCase()\n .indexOf((needle + '')\n .toLowerCase())\n if (pos === -1) {\n return false\n } else {\n if (bool) {\n return haystack.substr(0, pos)\n } else {\n return haystack.slice(pos)\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strlen.js b/node_modules/locutus/php/strings/strlen.js
deleted file mode 100644
index 7c664d2..0000000
--- a/node_modules/locutus/php/strings/strlen.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-
-module.exports = function strlen(string) {
- // discuss at: http://locutus.io/php/strlen/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Sakimori
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Kirk Strobeck
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Brett Zamir (http://brett-zamir.me)
- // note 1: May look like overkill, but in order to be truly faithful to handling all Unicode
- // note 1: characters and to this function in PHP which does not count the number of bytes
- // note 1: but counts the number of characters, something like this is really necessary.
- // example 1: strlen('Kevin van Zonneveld')
- // returns 1: 19
- // example 2: ini_set('unicode.semantics', 'on')
- // example 2: strlen('A\ud87e\udc04Z')
- // returns 2: 3
-
- var str = string + '';
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('unicode.semantics') : undefined) || 'off';
- if (iniVal === 'off') {
- return str.length;
- }
-
- var i = 0;
- var lgth = 0;
-
- var getWholeChar = function getWholeChar(str, i) {
- var code = str.charCodeAt(i);
- var next = '';
- var prev = '';
- if (code >= 0xD800 && code <= 0xDBFF) {
- // High surrogate (could change last hex to 0xDB7F to
- // treat high private surrogates as single characters)
- if (str.length <= i + 1) {
- throw new Error('High surrogate without following low surrogate');
- }
- next = str.charCodeAt(i + 1);
- if (next < 0xDC00 || next > 0xDFFF) {
- throw new Error('High surrogate without following low surrogate');
- }
- return str.charAt(i) + str.charAt(i + 1);
- } else if (code >= 0xDC00 && code <= 0xDFFF) {
- // Low surrogate
- if (i === 0) {
- throw new Error('Low surrogate without preceding high surrogate');
- }
- prev = str.charCodeAt(i - 1);
- if (prev < 0xD800 || prev > 0xDBFF) {
- // (could change last hex to 0xDB7F to treat high private surrogates
- // as single characters)
- throw new Error('Low surrogate without preceding high surrogate');
- }
- // We can pass over low surrogates now as the second
- // component in a pair which we have already processed
- return false;
- }
- return str.charAt(i);
- };
-
- for (i = 0, lgth = 0; i < str.length; i++) {
- if (getWholeChar(str, i) === false) {
- continue;
- }
- // Adapt this line at the top of any loop, passing in the whole string and
- // the current iteration and returning a variable to represent the individual character;
- // purpose is to treat the first part of a surrogate pair as the whole character and then
- // ignore the second part
- lgth++;
- }
-
- return lgth;
-};
-//# sourceMappingURL=strlen.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strlen.js.map b/node_modules/locutus/php/strings/strlen.js.map
deleted file mode 100644
index edbe807..0000000
--- a/node_modules/locutus/php/strings/strlen.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strlen.js"],"names":["module","exports","strlen","string","str","iniVal","require","undefined","length","i","lgth","getWholeChar","code","charCodeAt","next","prev","Error","charAt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAMD,SAAS,EAAnB;;AAEA,MAAIE,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,mBAA3B,CAAjC,GAAmFC,SAApF,KAAkG,KAA/G;AACA,MAAIF,WAAW,KAAf,EAAsB;AACpB,WAAOD,IAAII,MAAX;AACD;;AAED,MAAIC,IAAI,CAAR;AACA,MAAIC,OAAO,CAAX;;AAEA,MAAIC,eAAe,SAAfA,YAAe,CAAUP,GAAV,EAAeK,CAAf,EAAkB;AACnC,QAAIG,OAAOR,IAAIS,UAAJ,CAAeJ,CAAf,CAAX;AACA,QAAIK,OAAO,EAAX;AACA,QAAIC,OAAO,EAAX;AACA,QAAIH,QAAQ,MAAR,IAAkBA,QAAQ,MAA9B,EAAsC;AACpC;AACA;AACA,UAAIR,IAAII,MAAJ,IAAeC,IAAI,CAAvB,EAA2B;AACzB,cAAM,IAAIO,KAAJ,CAAU,gDAAV,CAAN;AACD;AACDF,aAAOV,IAAIS,UAAJ,CAAeJ,IAAI,CAAnB,CAAP;AACA,UAAIK,OAAO,MAAP,IAAiBA,OAAO,MAA5B,EAAoC;AAClC,cAAM,IAAIE,KAAJ,CAAU,gDAAV,CAAN;AACD;AACD,aAAOZ,IAAIa,MAAJ,CAAWR,CAAX,IAAgBL,IAAIa,MAAJ,CAAWR,IAAI,CAAf,CAAvB;AACD,KAXD,MAWO,IAAIG,QAAQ,MAAR,IAAkBA,QAAQ,MAA9B,EAAsC;AAC3C;AACA,UAAIH,MAAM,CAAV,EAAa;AACX,cAAM,IAAIO,KAAJ,CAAU,gDAAV,CAAN;AACD;AACDD,aAAOX,IAAIS,UAAJ,CAAeJ,IAAI,CAAnB,CAAP;AACA,UAAIM,OAAO,MAAP,IAAiBA,OAAO,MAA5B,EAAoC;AAClC;AACA;AACA,cAAM,IAAIC,KAAJ,CAAU,gDAAV,CAAN;AACD;AACD;AACA;AACA,aAAO,KAAP;AACD;AACD,WAAOZ,IAAIa,MAAJ,CAAWR,CAAX,CAAP;AACD,GA/BD;;AAiCA,OAAKA,IAAI,CAAJ,EAAOC,OAAO,CAAnB,EAAsBD,IAAIL,IAAII,MAA9B,EAAsCC,GAAtC,EAA2C;AACzC,QAAKE,aAAaP,GAAb,EAAkBK,CAAlB,CAAD,KAA2B,KAA/B,EAAsC;AACpC;AACD;AACD;AACA;AACA;AACA;AACAC;AACD;;AAED,SAAOA,IAAP;AACD,CAxED","file":"strlen.js","sourcesContent":["module.exports = function strlen (string) {\n // discuss at: http://locutus.io/php/strlen/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Sakimori\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Kirk Strobeck\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: Brett Zamir (http://brett-zamir.me)\n // note 1: May look like overkill, but in order to be truly faithful to handling all Unicode\n // note 1: characters and to this function in PHP which does not count the number of bytes\n // note 1: but counts the number of characters, something like this is really necessary.\n // example 1: strlen('Kevin van Zonneveld')\n // returns 1: 19\n // example 2: ini_set('unicode.semantics', 'on')\n // example 2: strlen('A\\ud87e\\udc04Z')\n // returns 2: 3\n\n var str = string + ''\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('unicode.semantics') : undefined) || 'off'\n if (iniVal === 'off') {\n return str.length\n }\n\n var i = 0\n var lgth = 0\n\n var getWholeChar = function (str, i) {\n var code = str.charCodeAt(i)\n var next = ''\n var prev = ''\n if (code >= 0xD800 && code <= 0xDBFF) {\n // High surrogate (could change last hex to 0xDB7F to\n // treat high private surrogates as single characters)\n if (str.length <= (i + 1)) {\n throw new Error('High surrogate without following low surrogate')\n }\n next = str.charCodeAt(i + 1)\n if (next < 0xDC00 || next > 0xDFFF) {\n throw new Error('High surrogate without following low surrogate')\n }\n return str.charAt(i) + str.charAt(i + 1)\n } else if (code >= 0xDC00 && code <= 0xDFFF) {\n // Low surrogate\n if (i === 0) {\n throw new Error('Low surrogate without preceding high surrogate')\n }\n prev = str.charCodeAt(i - 1)\n if (prev < 0xD800 || prev > 0xDBFF) {\n // (could change last hex to 0xDB7F to treat high private surrogates\n // as single characters)\n throw new Error('Low surrogate without preceding high surrogate')\n }\n // We can pass over low surrogates now as the second\n // component in a pair which we have already processed\n return false\n }\n return str.charAt(i)\n }\n\n for (i = 0, lgth = 0; i < str.length; i++) {\n if ((getWholeChar(str, i)) === false) {\n continue\n }\n // Adapt this line at the top of any loop, passing in the whole string and\n // the current iteration and returning a variable to represent the individual character;\n // purpose is to treat the first part of a surrogate pair as the whole character and then\n // ignore the second part\n lgth++\n }\n\n return lgth\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strnatcasecmp.js b/node_modules/locutus/php/strings/strnatcasecmp.js
deleted file mode 100644
index 5c7437a..0000000
--- a/node_modules/locutus/php/strings/strnatcasecmp.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-module.exports = function strnatcasecmp(a, b) {
- // discuss at: http://locutus.io/php/strnatcasecmp/
- // original by: Martin Pool
- // reimplemented by: Pierre-Luc Paour
- // reimplemented by: Kristof Coomans (SCK-CEN (Belgian Nucleair Research Centre))
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // input by: Devan Penner-Woelk
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // reimplemented by: Rafał Kukawski
- // example 1: strnatcasecmp(10, 1)
- // returns 1: 1
- // example 2: strnatcasecmp('1', '10')
- // returns 2: -1
-
- var strnatcmp = require('../strings/strnatcmp');
- var _phpCastString = require('../_helpers/_phpCastString');
-
- if (arguments.length !== 2) {
- return null;
- }
-
- return strnatcmp(_phpCastString(a).toLowerCase(), _phpCastString(b).toLowerCase());
-};
-//# sourceMappingURL=strnatcasecmp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strnatcasecmp.js.map b/node_modules/locutus/php/strings/strnatcasecmp.js.map
deleted file mode 100644
index 3b42010..0000000
--- a/node_modules/locutus/php/strings/strnatcasecmp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strnatcasecmp.js"],"names":["module","exports","strnatcasecmp","a","b","strnatcmp","require","_phpCastString","arguments","length","toLowerCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,CAAxB,EAA2BC,CAA3B,EAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAIC,iBAAiBD,QAAQ,4BAAR,CAArB;;AAEA,MAAIE,UAAUC,MAAV,KAAqB,CAAzB,EAA4B;AAC1B,WAAO,IAAP;AACD;;AAED,SAAOJ,UAAUE,eAAeJ,CAAf,EAAkBO,WAAlB,EAAV,EAA2CH,eAAeH,CAAf,EAAkBM,WAAlB,EAA3C,CAAP;AACD,CAvBD","file":"strnatcasecmp.js","sourcesContent":["module.exports = function strnatcasecmp (a, b) {\n // discuss at: http://locutus.io/php/strnatcasecmp/\n // original by: Martin Pool\n // reimplemented by: Pierre-Luc Paour\n // reimplemented by: Kristof Coomans (SCK-CEN (Belgian Nucleair Research Centre))\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // input by: Devan Penner-Woelk\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // reimplemented by: Rafał Kukawski\n // example 1: strnatcasecmp(10, 1)\n // returns 1: 1\n // example 2: strnatcasecmp('1', '10')\n // returns 2: -1\n\n var strnatcmp = require('../strings/strnatcmp')\n var _phpCastString = require('../_helpers/_phpCastString')\n\n if (arguments.length !== 2) {\n return null\n }\n\n return strnatcmp(_phpCastString(a).toLowerCase(), _phpCastString(b).toLowerCase())\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strnatcmp.js b/node_modules/locutus/php/strings/strnatcmp.js
deleted file mode 100644
index af2875c..0000000
--- a/node_modules/locutus/php/strings/strnatcmp.js
+++ /dev/null
@@ -1,119 +0,0 @@
-'use strict';
-
-module.exports = function strnatcmp(a, b) {
- // discuss at: http://locutus.io/php/strnatcmp/
- // original by: Martijn Wieringa
- // improved by: Michael White (http://getsprink.com)
- // improved by: Jack
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // reimplemented by: Rafał Kukawski
- // example 1: strnatcmp('abc', 'abc')
- // returns 1: 0
- // example 2: strnatcmp('a', 'b')
- // returns 2: -1
- // example 3: strnatcmp('10', '1')
- // returns 3: 1
- // example 4: strnatcmp('0000abc', '0abc')
- // returns 4: 0
- // example 5: strnatcmp('1239', '12345')
- // returns 5: -1
- // example 6: strnatcmp('t01239', 't012345')
- // returns 6: 1
- // example 7: strnatcmp('0A', '5N')
- // returns 7: -1
-
- var _phpCastString = require('../_helpers/_phpCastString');
-
- var leadingZeros = /^0+(?=\d)/;
- var whitespace = /^\s/;
- var digit = /^\d/;
-
- if (arguments.length !== 2) {
- return null;
- }
-
- a = _phpCastString(a);
- b = _phpCastString(b);
-
- if (!a.length || !b.length) {
- return a.length - b.length;
- }
-
- var i = 0;
- var j = 0;
-
- a = a.replace(leadingZeros, '');
- b = b.replace(leadingZeros, '');
-
- while (i < a.length && j < b.length) {
- // skip consecutive whitespace
- while (whitespace.test(a.charAt(i))) {
- i++;
- }while (whitespace.test(b.charAt(j))) {
- j++;
- }var ac = a.charAt(i);
- var bc = b.charAt(j);
- var aIsDigit = digit.test(ac);
- var bIsDigit = digit.test(bc);
-
- if (aIsDigit && bIsDigit) {
- var bias = 0;
- var fractional = ac === '0' || bc === '0';
-
- do {
- if (!aIsDigit) {
- return -1;
- } else if (!bIsDigit) {
- return 1;
- } else if (ac < bc) {
- if (!bias) {
- bias = -1;
- }
-
- if (fractional) {
- return -1;
- }
- } else if (ac > bc) {
- if (!bias) {
- bias = 1;
- }
-
- if (fractional) {
- return 1;
- }
- }
-
- ac = a.charAt(++i);
- bc = b.charAt(++j);
-
- aIsDigit = digit.test(ac);
- bIsDigit = digit.test(bc);
- } while (aIsDigit || bIsDigit);
-
- if (!fractional && bias) {
- return bias;
- }
-
- continue;
- }
-
- if (!ac || !bc) {
- continue;
- } else if (ac < bc) {
- return -1;
- } else if (ac > bc) {
- return 1;
- }
-
- i++;
- j++;
- }
-
- var iBeforeStrEnd = i < a.length;
- var jBeforeStrEnd = j < b.length;
-
- // Check which string ended first
- // return -1 if a, 1 if b, 0 otherwise
- return (iBeforeStrEnd > jBeforeStrEnd) - (iBeforeStrEnd < jBeforeStrEnd);
-};
-//# sourceMappingURL=strnatcmp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strnatcmp.js.map b/node_modules/locutus/php/strings/strnatcmp.js.map
deleted file mode 100644
index 01c9166..0000000
--- a/node_modules/locutus/php/strings/strnatcmp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strnatcmp.js"],"names":["module","exports","strnatcmp","a","b","_phpCastString","require","leadingZeros","whitespace","digit","arguments","length","i","j","replace","test","charAt","ac","bc","aIsDigit","bIsDigit","bias","fractional","iBeforeStrEnd","jBeforeStrEnd"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,CAApB,EAAuBC,CAAvB,EAA0B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,iBAAiBC,QAAQ,4BAAR,CAArB;;AAEA,MAAIC,eAAe,WAAnB;AACA,MAAIC,aAAa,KAAjB;AACA,MAAIC,QAAQ,KAAZ;;AAEA,MAAIC,UAAUC,MAAV,KAAqB,CAAzB,EAA4B;AAC1B,WAAO,IAAP;AACD;;AAEDR,MAAIE,eAAeF,CAAf,CAAJ;AACAC,MAAIC,eAAeD,CAAf,CAAJ;;AAEA,MAAI,CAACD,EAAEQ,MAAH,IAAa,CAACP,EAAEO,MAApB,EAA4B;AAC1B,WAAOR,EAAEQ,MAAF,GAAWP,EAAEO,MAApB;AACD;;AAED,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;;AAEAV,MAAIA,EAAEW,OAAF,CAAUP,YAAV,EAAwB,EAAxB,CAAJ;AACAH,MAAIA,EAAEU,OAAF,CAAUP,YAAV,EAAwB,EAAxB,CAAJ;;AAEA,SAAOK,IAAIT,EAAEQ,MAAN,IAAgBE,IAAIT,EAAEO,MAA7B,EAAqC;AACnC;AACA,WAAOH,WAAWO,IAAX,CAAgBZ,EAAEa,MAAF,CAAS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AO,CAACC,EAAZ,EAAgB;AACd;AACD,KAFD,MAEO,IAAID,KAAKC,EAAT,EAAa;AAClB,aAAO,CAAC,CAAR;AACD,KAFM,MAEA,IAAID,KAAKC,EAAT,EAAa;AAClB,aAAO,CAAP;AACD;;AAEDN;AACAC;AACD;;AAED,MAAIU,gBAAgBX,IAAIT,EAAEQ,MAA1B;AACA,MAAIa,gBAAgBX,IAAIT,EAAEO,MAA1B;;AAEA;AACA;AACA,SAAO,CAACY,gBAAgBC,aAAjB,KAAmCD,gBAAgBC,aAAnD,CAAP;AACD,CAlHD","file":"strnatcmp.js","sourcesContent":["module.exports = function strnatcmp (a, b) {\n // discuss at: http://locutus.io/php/strnatcmp/\n // original by: Martijn Wieringa\n // improved by: Michael White (http://getsprink.com)\n // improved by: Jack\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // reimplemented by: Rafał Kukawski\n // example 1: strnatcmp('abc', 'abc')\n // returns 1: 0\n // example 2: strnatcmp('a', 'b')\n // returns 2: -1\n // example 3: strnatcmp('10', '1')\n // returns 3: 1\n // example 4: strnatcmp('0000abc', '0abc')\n // returns 4: 0\n // example 5: strnatcmp('1239', '12345')\n // returns 5: -1\n // example 6: strnatcmp('t01239', 't012345')\n // returns 6: 1\n // example 7: strnatcmp('0A', '5N')\n // returns 7: -1\n\n var _phpCastString = require('../_helpers/_phpCastString')\n\n var leadingZeros = /^0+(?=\\d)/\n var whitespace = /^\\s/\n var digit = /^\\d/\n\n if (arguments.length !== 2) {\n return null\n }\n\n a = _phpCastString(a)\n b = _phpCastString(b)\n\n if (!a.length || !b.length) {\n return a.length - b.length\n }\n\n var i = 0\n var j = 0\n\n a = a.replace(leadingZeros, '')\n b = b.replace(leadingZeros, '')\n\n while (i < a.length && j < b.length) {\n // skip consecutive whitespace\n while (whitespace.test(a.charAt(i))) i++\n while (whitespace.test(b.charAt(j))) j++\n\n var ac = a.charAt(i)\n var bc = b.charAt(j)\n var aIsDigit = digit.test(ac)\n var bIsDigit = digit.test(bc)\n\n if (aIsDigit && bIsDigit) {\n var bias = 0\n var fractional = ac === '0' || bc === '0'\n\n do {\n if (!aIsDigit) {\n return -1\n } else if (!bIsDigit) {\n return 1\n } else if (ac < bc) {\n if (!bias) {\n bias = -1\n }\n\n if (fractional) {\n return -1\n }\n } else if (ac > bc) {\n if (!bias) {\n bias = 1\n }\n\n if (fractional) {\n return 1\n }\n }\n\n ac = a.charAt(++i)\n bc = b.charAt(++j)\n\n aIsDigit = digit.test(ac)\n bIsDigit = digit.test(bc)\n } while (aIsDigit || bIsDigit)\n\n if (!fractional && bias) {\n return bias\n }\n\n continue\n }\n\n if (!ac || !bc) {\n continue\n } else if (ac < bc) {\n return -1\n } else if (ac > bc) {\n return 1\n }\n\n i++\n j++\n }\n\n var iBeforeStrEnd = i < a.length\n var jBeforeStrEnd = j < b.length\n\n // Check which string ended first\n // return -1 if a, 1 if b, 0 otherwise\n return (iBeforeStrEnd > jBeforeStrEnd) - (iBeforeStrEnd < jBeforeStrEnd)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strncasecmp.js b/node_modules/locutus/php/strings/strncasecmp.js
deleted file mode 100644
index 8a4b912..0000000
--- a/node_modules/locutus/php/strings/strncasecmp.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-module.exports = function strncasecmp(argStr1, argStr2, len) {
- // discuss at: http://locutus.io/php/strncasecmp/
- // original by: Saulo Vallory
- // input by: Nate
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // note 1: Returns < 0 if str1 is less than str2 ; > 0
- // note 1: if str1 is greater than str2, and 0 if they are equal.
- // example 1: strncasecmp('Price 12.9', 'Price 12.15', 2)
- // returns 1: 0
- // example 2: strncasecmp('Price 12.09', 'Price 12.15', 10)
- // returns 2: -1
- // example 3: strncasecmp('Price 12.90', 'Price 12.15', 30)
- // returns 3: 8
- // example 4: strncasecmp('Version 12.9', 'Version 12.15', 20)
- // returns 4: 8
- // example 5: strncasecmp('Version 12.15', 'Version 12.9', 20)
- // returns 5: -8
-
- var diff;
- var i = 0;
- var str1 = (argStr1 + '').toLowerCase().substr(0, len);
- var str2 = (argStr2 + '').toLowerCase().substr(0, len);
-
- if (str1.length !== str2.length) {
- if (str1.length < str2.length) {
- len = str1.length;
- if (str2.substr(0, str1.length) === str1) {
- // return the difference of chars
- return str1.length - str2.length;
- }
- } else {
- len = str2.length;
- // str1 is longer than str2
- if (str1.substr(0, str2.length) === str2) {
- // return the difference of chars
- return str1.length - str2.length;
- }
- }
- } else {
- // Avoids trying to get a char that does not exist
- len = str1.length;
- }
-
- for (diff = 0, i = 0; i < len; i++) {
- diff = str1.charCodeAt(i) - str2.charCodeAt(i);
- if (diff !== 0) {
- return diff;
- }
- }
-
- return 0;
-};
-//# sourceMappingURL=strncasecmp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strncasecmp.js.map b/node_modules/locutus/php/strings/strncasecmp.js.map
deleted file mode 100644
index 158e143..0000000
--- a/node_modules/locutus/php/strings/strncasecmp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strncasecmp.js"],"names":["module","exports","strncasecmp","argStr1","argStr2","len","diff","i","str1","toLowerCase","substr","str2","length","charCodeAt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,OAAtB,EAA+BC,OAA/B,EAAwCC,GAAxC,EAA6C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,OAAO,CAACL,UAAU,EAAX,EAAeM,WAAf,GAA6BC,MAA7B,CAAoC,CAApC,EAAuCL,GAAvC,CAAX;AACA,MAAIM,OAAO,CAACP,UAAU,EAAX,EAAeK,WAAf,GAA6BC,MAA7B,CAAoC,CAApC,EAAuCL,GAAvC,CAAX;;AAEA,MAAIG,KAAKI,MAAL,KAAgBD,KAAKC,MAAzB,EAAiC;AAC/B,QAAIJ,KAAKI,MAAL,GAAcD,KAAKC,MAAvB,EAA+B;AAC7BP,YAAMG,KAAKI,MAAX;AACA,UAAID,KAAKD,MAAL,CAAY,CAAZ,EAAeF,KAAKI,MAApB,MAAgCJ,IAApC,EAA0C;AACxC;AACA,eAAOA,KAAKI,MAAL,GAAcD,KAAKC,MAA1B;AACD;AACF,KAND,MAMO;AACLP,YAAMM,KAAKC,MAAX;AACA;AACA,UAAIJ,KAAKE,MAAL,CAAY,CAAZ,EAAeC,KAAKC,MAApB,MAAgCD,IAApC,EAA0C;AACxC;AACA,eAAOH,KAAKI,MAAL,GAAcD,KAAKC,MAA1B;AACD;AACF;AACF,GAfD,MAeO;AACL;AACAP,UAAMG,KAAKI,MAAX;AACD;;AAED,OAAKN,OAAO,CAAP,EAAUC,IAAI,CAAnB,EAAsBA,IAAIF,GAA1B,EAA+BE,GAA/B,EAAoC;AAClCD,WAAOE,KAAKK,UAAL,CAAgBN,CAAhB,IAAqBI,KAAKE,UAAL,CAAgBN,CAAhB,CAA5B;AACA,QAAID,SAAS,CAAb,EAAgB;AACd,aAAOA,IAAP;AACD;AACF;;AAED,SAAO,CAAP;AACD,CAnDD","file":"strncasecmp.js","sourcesContent":["module.exports = function strncasecmp (argStr1, argStr2, len) {\n // discuss at: http://locutus.io/php/strncasecmp/\n // original by: Saulo Vallory\n // input by: Nate\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // note 1: Returns < 0 if str1 is less than str2 ; > 0\n // note 1: if str1 is greater than str2, and 0 if they are equal.\n // example 1: strncasecmp('Price 12.9', 'Price 12.15', 2)\n // returns 1: 0\n // example 2: strncasecmp('Price 12.09', 'Price 12.15', 10)\n // returns 2: -1\n // example 3: strncasecmp('Price 12.90', 'Price 12.15', 30)\n // returns 3: 8\n // example 4: strncasecmp('Version 12.9', 'Version 12.15', 20)\n // returns 4: 8\n // example 5: strncasecmp('Version 12.15', 'Version 12.9', 20)\n // returns 5: -8\n\n var diff\n var i = 0\n var str1 = (argStr1 + '').toLowerCase().substr(0, len)\n var str2 = (argStr2 + '').toLowerCase().substr(0, len)\n\n if (str1.length !== str2.length) {\n if (str1.length < str2.length) {\n len = str1.length\n if (str2.substr(0, str1.length) === str1) {\n // return the difference of chars\n return str1.length - str2.length\n }\n } else {\n len = str2.length\n // str1 is longer than str2\n if (str1.substr(0, str2.length) === str2) {\n // return the difference of chars\n return str1.length - str2.length\n }\n }\n } else {\n // Avoids trying to get a char that does not exist\n len = str1.length\n }\n\n for (diff = 0, i = 0; i < len; i++) {\n diff = str1.charCodeAt(i) - str2.charCodeAt(i)\n if (diff !== 0) {\n return diff\n }\n }\n\n return 0\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strncmp.js b/node_modules/locutus/php/strings/strncmp.js
deleted file mode 100644
index 7bc44ac..0000000
--- a/node_modules/locutus/php/strings/strncmp.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = function strncmp(str1, str2, lgth) {
- // discuss at: http://locutus.io/php/strncmp/
- // original by: Waldo Malqui Silva (http://waldo.malqui.info)
- // input by: Steve Hilder
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // revised by: gorthaur
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // example 1: strncmp('aaa', 'aab', 2)
- // returns 1: 0
- // example 2: strncmp('aaa', 'aab', 3 )
- // returns 2: -1
-
- var s1 = (str1 + '').substr(0, lgth);
- var s2 = (str2 + '').substr(0, lgth);
-
- return s1 === s2 ? 0 : s1 > s2 ? 1 : -1;
-};
-//# sourceMappingURL=strncmp.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strncmp.js.map b/node_modules/locutus/php/strings/strncmp.js.map
deleted file mode 100644
index bda6178..0000000
--- a/node_modules/locutus/php/strings/strncmp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strncmp.js"],"names":["module","exports","strncmp","str1","str2","lgth","s1","substr","s2"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,IAAlB,EAAwBC,IAAxB,EAA8BC,IAA9B,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAK,CAACH,OAAO,EAAR,EACNI,MADM,CACC,CADD,EACIF,IADJ,CAAT;AAEA,MAAIG,KAAK,CAACJ,OAAO,EAAR,EACNG,MADM,CACC,CADD,EACIF,IADJ,CAAT;;AAGA,SAASC,OAAOE,EAAR,GAAc,CAAd,GAAoBF,KAAKE,EAAN,GAAY,CAAZ,GAAgB,CAAC,CAA5C;AACD,CAlBD","file":"strncmp.js","sourcesContent":["module.exports = function strncmp (str1, str2, lgth) {\n // discuss at: http://locutus.io/php/strncmp/\n // original by: Waldo Malqui Silva (http://waldo.malqui.info)\n // input by: Steve Hilder\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // revised by: gorthaur\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // example 1: strncmp('aaa', 'aab', 2)\n // returns 1: 0\n // example 2: strncmp('aaa', 'aab', 3 )\n // returns 2: -1\n\n var s1 = (str1 + '')\n .substr(0, lgth)\n var s2 = (str2 + '')\n .substr(0, lgth)\n\n return ((s1 === s2) ? 0 : ((s1 > s2) ? 1 : -1))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strpbrk.js b/node_modules/locutus/php/strings/strpbrk.js
deleted file mode 100644
index 338b4dd..0000000
--- a/node_modules/locutus/php/strings/strpbrk.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-
-module.exports = function strpbrk(haystack, charList) {
- // discuss at: http://locutus.io/php/strpbrk/
- // original by: Alfonso Jimenez (http://www.alfonsojimenez.com)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Christoph
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: strpbrk('This is a Simple text.', 'is')
- // returns 1: 'is is a Simple text.'
-
- for (var i = 0, len = haystack.length; i < len; ++i) {
- if (charList.indexOf(haystack.charAt(i)) >= 0) {
- return haystack.slice(i);
- }
- }
- return false;
-};
-//# sourceMappingURL=strpbrk.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strpbrk.js.map b/node_modules/locutus/php/strings/strpbrk.js.map
deleted file mode 100644
index 13e6be0..0000000
--- a/node_modules/locutus/php/strings/strpbrk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strpbrk.js"],"names":["module","exports","strpbrk","haystack","charList","i","len","length","indexOf","charAt","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4BC,QAA5B,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAK,IAAIC,IAAI,CAAR,EAAWC,MAAMH,SAASI,MAA/B,EAAuCF,IAAIC,GAA3C,EAAgD,EAAED,CAAlD,EAAqD;AACnD,QAAID,SAASI,OAAT,CAAiBL,SAASM,MAAT,CAAgBJ,CAAhB,CAAjB,KAAwC,CAA5C,EAA+C;AAC7C,aAAOF,SAASO,KAAT,CAAeL,CAAf,CAAP;AACD;AACF;AACD,SAAO,KAAP;AACD,CAfD","file":"strpbrk.js","sourcesContent":["module.exports = function strpbrk (haystack, charList) {\n // discuss at: http://locutus.io/php/strpbrk/\n // original by: Alfonso Jimenez (http://www.alfonsojimenez.com)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // revised by: Christoph\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: strpbrk('This is a Simple text.', 'is')\n // returns 1: 'is is a Simple text.'\n\n for (var i = 0, len = haystack.length; i < len; ++i) {\n if (charList.indexOf(haystack.charAt(i)) >= 0) {\n return haystack.slice(i)\n }\n }\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strpos.js b/node_modules/locutus/php/strings/strpos.js
deleted file mode 100644
index 257151b..0000000
--- a/node_modules/locutus/php/strings/strpos.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function strpos(haystack, needle, offset) {
- // discuss at: http://locutus.io/php/strpos/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Daniel Esteban
- // example 1: strpos('Kevin van Zonneveld', 'e', 5)
- // returns 1: 14
-
- var i = (haystack + '').indexOf(needle, offset || 0);
- return i === -1 ? false : i;
-};
-//# sourceMappingURL=strpos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strpos.js.map b/node_modules/locutus/php/strings/strpos.js.map
deleted file mode 100644
index 9e84ea6..0000000
--- a/node_modules/locutus/php/strings/strpos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strpos.js"],"names":["module","exports","strpos","haystack","needle","offset","i","indexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,MAA3B,EAAmCC,MAAnC,EAA2C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAACH,WAAW,EAAZ,EACLI,OADK,CACGH,MADH,EACYC,UAAU,CADtB,CAAR;AAEA,SAAOC,MAAM,CAAC,CAAP,GAAW,KAAX,GAAmBA,CAA1B;AACD,CAZD","file":"strpos.js","sourcesContent":["module.exports = function strpos (haystack, needle, offset) {\n // discuss at: http://locutus.io/php/strpos/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Daniel Esteban\n // example 1: strpos('Kevin van Zonneveld', 'e', 5)\n // returns 1: 14\n\n var i = (haystack + '')\n .indexOf(needle, (offset || 0))\n return i === -1 ? false : i\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strrchr.js b/node_modules/locutus/php/strings/strrchr.js
deleted file mode 100644
index 1262865..0000000
--- a/node_modules/locutus/php/strings/strrchr.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function strrchr(haystack, needle) {
- // discuss at: http://locutus.io/php/strrchr/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: Jason Wong (http://carrot.org/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: strrchr("Line 1\nLine 2\nLine 3", 10).substr(1)
- // returns 1: 'Line 3'
-
- var pos = 0;
-
- if (typeof needle !== 'string') {
- needle = String.fromCharCode(parseInt(needle, 10));
- }
- needle = needle.charAt(0);
- pos = haystack.lastIndexOf(needle);
- if (pos === -1) {
- return false;
- }
-
- return haystack.substr(pos);
-};
-//# sourceMappingURL=strrchr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strrchr.js.map b/node_modules/locutus/php/strings/strrchr.js.map
deleted file mode 100644
index 0814a12..0000000
--- a/node_modules/locutus/php/strings/strrchr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strrchr.js"],"names":["module","exports","strrchr","haystack","needle","pos","String","fromCharCode","parseInt","charAt","lastIndexOf","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4BC,MAA5B,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,CAAV;;AAEA,MAAI,OAAOD,MAAP,KAAkB,QAAtB,EAAgC;AAC9BA,aAASE,OAAOC,YAAP,CAAoBC,SAASJ,MAAT,EAAiB,EAAjB,CAApB,CAAT;AACD;AACDA,WAASA,OAAOK,MAAP,CAAc,CAAd,CAAT;AACAJ,QAAMF,SAASO,WAAT,CAAqBN,MAArB,CAAN;AACA,MAAIC,QAAQ,CAAC,CAAb,EAAgB;AACd,WAAO,KAAP;AACD;;AAED,SAAOF,SAASQ,MAAT,CAAgBN,GAAhB,CAAP;AACD,CApBD","file":"strrchr.js","sourcesContent":["module.exports = function strrchr (haystack, needle) {\n // discuss at: http://locutus.io/php/strrchr/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: Jason Wong (http://carrot.org/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: strrchr(\"Line 1\\nLine 2\\nLine 3\", 10).substr(1)\n // returns 1: 'Line 3'\n\n var pos = 0\n\n if (typeof needle !== 'string') {\n needle = String.fromCharCode(parseInt(needle, 10))\n }\n needle = needle.charAt(0)\n pos = haystack.lastIndexOf(needle)\n if (pos === -1) {\n return false\n }\n\n return haystack.substr(pos)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strrev.js b/node_modules/locutus/php/strings/strrev.js
deleted file mode 100644
index 0091a17..0000000
--- a/node_modules/locutus/php/strings/strrev.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-module.exports = function strrev(string) {
- // discuss at: http://locutus.io/php/strrev/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // example 1: strrev('Kevin van Zonneveld')
- // returns 1: 'dlevennoZ nav niveK'
- // example 2: strrev('a\u0301haB')
- // returns 2: 'Baha\u0301' // combining
- // example 3: strrev('A\uD87E\uDC04Z')
- // returns 3: 'Z\uD87E\uDC04A' // surrogates
- // test: 'skip-3'
-
- string = string + '';
-
- // Performance will be enhanced with the next two lines of code commented
- // out if you don't care about combining characters
- // Keep Unicode combining characters together with the character preceding
- // them and which they are modifying (as in PHP 6)
- // See http://unicode.org/reports/tr44/#Property_Table (Me+Mn)
- // We also add the low surrogate range at the beginning here so it will be
- // maintained with its preceding high surrogate
-
- var chars = ['\uDC00-\uDFFF', '\u0300-\u036F', '\u0483-\u0489', '\u0591-\u05BD', '\u05BF', '\u05C1', '\u05C2', '\u05C4', '\u05C5', '\u05C7', '\u0610-\u061A', '\u064B-\u065E', '\u0670', '\u06D6-\u06DC', '\u06DE-\u06E4', '\u06E7\u06E8', '\u06EA-\u06ED', '\u0711', '\u0730-\u074A', '\u07A6-\u07B0', '\u07EB-\u07F3', '\u0901-\u0903', '\u093C', '\u093E-\u094D', '\u0951-\u0954', '\u0962', '\u0963', '\u0981-\u0983', '\u09BC', '\u09BE-\u09C4', '\u09C7', '\u09C8', '\u09CB-\u09CD', '\u09D7', '\u09E2', '\u09E3', '\u0A01-\u0A03', '\u0A3C', '\u0A3E-\u0A42', '\u0A47', '\u0A48', '\u0A4B-\u0A4D', '\u0A51', '\u0A70', '\u0A71', '\u0A75', '\u0A81-\u0A83', '\u0ABC', '\u0ABE-\u0AC5', '\u0AC7-\u0AC9', '\u0ACB-\u0ACD', '\u0AE2', '\u0AE3', '\u0B01-\u0B03', '\u0B3C', '\u0B3E-\u0B44', '\u0B47', '\u0B48', '\u0B4B-\u0B4D', '\u0B56', '\u0B57', '\u0B62', '\u0B63', '\u0B82', '\u0BBE-\u0BC2', '\u0BC6-\u0BC8', '\u0BCA-\u0BCD', '\u0BD7', '\u0C01-\u0C03', '\u0C3E-\u0C44', '\u0C46-\u0C48', '\u0C4A-\u0C4D', '\u0C55', '\u0C56', '\u0C62', '\u0C63', '\u0C82', '\u0C83', '\u0CBC', '\u0CBE-\u0CC4', '\u0CC6-\u0CC8', '\u0CCA-\u0CCD', '\u0CD5', '\u0CD6', '\u0CE2', '\u0CE3', '\u0D02', '\u0D03', '\u0D3E-\u0D44', '\u0D46-\u0D48', '\u0D4A-\u0D4D', '\u0D57', '\u0D62', '\u0D63', '\u0D82', '\u0D83', '\u0DCA', '\u0DCF-\u0DD4', '\u0DD6', '\u0DD8-\u0DDF', '\u0DF2', '\u0DF3', '\u0E31', '\u0E34-\u0E3A', '\u0E47-\u0E4E', '\u0EB1', '\u0EB4-\u0EB9', '\u0EBB', '\u0EBC', '\u0EC8-\u0ECD', '\u0F18', '\u0F19', '\u0F35', '\u0F37', '\u0F39', '\u0F3E', '\u0F3F', '\u0F71-\u0F84', '\u0F86', '\u0F87', '\u0F90-\u0F97', '\u0F99-\u0FBC', '\u0FC6', '\u102B-\u103E', '\u1056-\u1059', '\u105E-\u1060', '\u1062-\u1064', '\u1067-\u106D', '\u1071-\u1074', '\u1082-\u108D', '\u108F', '\u135F', '\u1712-\u1714', '\u1732-\u1734', '\u1752', '\u1753', '\u1772', '\u1773', '\u17B6-\u17D3', '\u17DD', '\u180B-\u180D', '\u18A9', '\u1920-\u192B', '\u1930-\u193B', '\u19B0-\u19C0', '\u19C8', '\u19C9', '\u1A17-\u1A1B', '\u1B00-\u1B04', '\u1B34-\u1B44', '\u1B6B-\u1B73', '\u1B80-\u1B82', '\u1BA1-\u1BAA', '\u1C24-\u1C37', '\u1DC0-\u1DE6', '\u1DFE', '\u1DFF', '\u20D0-\u20F0', '\u2DE0-\u2DFF', '\u302A-\u302F', '\u3099', '\u309A', '\uA66F-\uA672', '\uA67C', '\uA67D', '\uA802', '\uA806', '\uA80B', '\uA823-\uA827', '\uA880', '\uA881', '\uA8B4-\uA8C4', '\uA926-\uA92D', '\uA947-\uA953', '\uAA29-\uAA36', '\uAA43', '\uAA4C', '\uAA4D', '\uFB1E', '\uFE00-\uFE0F', '\uFE20-\uFE26'];
-
- var graphemeExtend = new RegExp('(.)([' + chars.join('') + ']+)', 'g');
-
- // Temporarily reverse
- string = string.replace(graphemeExtend, '$2$1');
- return string.split('').reverse().join('');
-};
-//# sourceMappingURL=strrev.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strrev.js.map b/node_modules/locutus/php/strings/strrev.js.map
deleted file mode 100644
index 8518d1e..0000000
--- a/node_modules/locutus/php/strings/strrev.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strrev.js"],"names":["module","exports","strrev","string","chars","graphemeExtend","RegExp","join","replace","split","reverse"],"mappings":";;AAAAA,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KU,EAmKV,eAnKU,EAoKV,QApKU,EAqKV,QArKU,EAsKV,QAtKU,EAuKV,QAvKU,EAwKV,QAxKU,EAyKV,eAzKU,EA0KV,QA1KU,EA2KV,QA3KU,EA4KV,eA5KU,EA6KV,eA7KU,EA8KV,eA9KU,EA+KV,eA/KU,EAgLV,QAhLU,EAiLV,QAjLU,EAkLV,QAlLU,EAmLV,QAnLU,EAoLV,eApLU,EAqLV,eArLU,CAAZ;;AAwLA,MAAIC,iBAAiB,IAAIC,MAAJ,CAAW,UAAUF,MAAMG,IAAN,CAAW,EAAX,CAAV,GAA2B,KAAtC,EAA6C,GAA7C,CAArB;;AAEA;AACAJ,WAASA,OAAOK,OAAP,CAAeH,cAAf,EAA+B,MAA/B,CAAT;AACA,SAAOF,OAAOM,KAAP,CAAa,EAAb,EAAiBC,OAAjB,GAA2BH,IAA3B,CAAgC,EAAhC,CAAP;AACD,CApND","file":"strrev.js","sourcesContent":["module.exports = function strrev (string) {\n // discuss at: http://locutus.io/php/strrev/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // example 1: strrev('Kevin van Zonneveld')\n // returns 1: 'dlevennoZ nav niveK'\n // example 2: strrev('a\\u0301haB')\n // returns 2: 'Baha\\u0301' // combining\n // example 3: strrev('A\\uD87E\\uDC04Z')\n // returns 3: 'Z\\uD87E\\uDC04A' // surrogates\n // test: 'skip-3'\n\n string = string + ''\n\n // Performance will be enhanced with the next two lines of code commented\n // out if you don't care about combining characters\n // Keep Unicode combining characters together with the character preceding\n // them and which they are modifying (as in PHP 6)\n // See http://unicode.org/reports/tr44/#Property_Table (Me+Mn)\n // We also add the low surrogate range at the beginning here so it will be\n // maintained with its preceding high surrogate\n\n var chars = [\n '\\uDC00-\\uDFFF',\n '\\u0300-\\u036F',\n '\\u0483-\\u0489',\n '\\u0591-\\u05BD',\n '\\u05BF',\n '\\u05C1',\n '\\u05C2',\n '\\u05C4',\n '\\u05C5',\n '\\u05C7',\n '\\u0610-\\u061A',\n '\\u064B-\\u065E',\n '\\u0670',\n '\\u06D6-\\u06DC',\n '\\u06DE-\\u06E4',\n '\\u06E7\\u06E8',\n '\\u06EA-\\u06ED',\n '\\u0711',\n '\\u0730-\\u074A',\n '\\u07A6-\\u07B0',\n '\\u07EB-\\u07F3',\n '\\u0901-\\u0903',\n '\\u093C',\n '\\u093E-\\u094D',\n '\\u0951-\\u0954',\n '\\u0962',\n '\\u0963',\n '\\u0981-\\u0983',\n '\\u09BC',\n '\\u09BE-\\u09C4',\n '\\u09C7',\n '\\u09C8',\n '\\u09CB-\\u09CD',\n '\\u09D7',\n '\\u09E2',\n '\\u09E3',\n '\\u0A01-\\u0A03',\n '\\u0A3C',\n '\\u0A3E-\\u0A42',\n '\\u0A47',\n '\\u0A48',\n '\\u0A4B-\\u0A4D',\n '\\u0A51',\n '\\u0A70',\n '\\u0A71',\n '\\u0A75',\n '\\u0A81-\\u0A83',\n '\\u0ABC',\n '\\u0ABE-\\u0AC5',\n '\\u0AC7-\\u0AC9',\n '\\u0ACB-\\u0ACD',\n '\\u0AE2',\n '\\u0AE3',\n '\\u0B01-\\u0B03',\n '\\u0B3C',\n '\\u0B3E-\\u0B44',\n '\\u0B47',\n '\\u0B48',\n '\\u0B4B-\\u0B4D',\n '\\u0B56',\n '\\u0B57',\n '\\u0B62',\n '\\u0B63',\n '\\u0B82',\n '\\u0BBE-\\u0BC2',\n '\\u0BC6-\\u0BC8',\n '\\u0BCA-\\u0BCD',\n '\\u0BD7',\n '\\u0C01-\\u0C03',\n '\\u0C3E-\\u0C44',\n '\\u0C46-\\u0C48',\n '\\u0C4A-\\u0C4D',\n '\\u0C55',\n '\\u0C56',\n '\\u0C62',\n '\\u0C63',\n '\\u0C82',\n '\\u0C83',\n '\\u0CBC',\n '\\u0CBE-\\u0CC4',\n '\\u0CC6-\\u0CC8',\n '\\u0CCA-\\u0CCD',\n '\\u0CD5',\n '\\u0CD6',\n '\\u0CE2',\n '\\u0CE3',\n '\\u0D02',\n '\\u0D03',\n '\\u0D3E-\\u0D44',\n '\\u0D46-\\u0D48',\n '\\u0D4A-\\u0D4D',\n '\\u0D57',\n '\\u0D62',\n '\\u0D63',\n '\\u0D82',\n '\\u0D83',\n '\\u0DCA',\n '\\u0DCF-\\u0DD4',\n '\\u0DD6',\n '\\u0DD8-\\u0DDF',\n '\\u0DF2',\n '\\u0DF3',\n '\\u0E31',\n '\\u0E34-\\u0E3A',\n '\\u0E47-\\u0E4E',\n '\\u0EB1',\n '\\u0EB4-\\u0EB9',\n '\\u0EBB',\n '\\u0EBC',\n '\\u0EC8-\\u0ECD',\n '\\u0F18',\n '\\u0F19',\n '\\u0F35',\n '\\u0F37',\n '\\u0F39',\n '\\u0F3E',\n '\\u0F3F',\n '\\u0F71-\\u0F84',\n '\\u0F86',\n '\\u0F87',\n '\\u0F90-\\u0F97',\n '\\u0F99-\\u0FBC',\n '\\u0FC6',\n '\\u102B-\\u103E',\n '\\u1056-\\u1059',\n '\\u105E-\\u1060',\n '\\u1062-\\u1064',\n '\\u1067-\\u106D',\n '\\u1071-\\u1074',\n '\\u1082-\\u108D',\n '\\u108F',\n '\\u135F',\n '\\u1712-\\u1714',\n '\\u1732-\\u1734',\n '\\u1752',\n '\\u1753',\n '\\u1772',\n '\\u1773',\n '\\u17B6-\\u17D3',\n '\\u17DD',\n '\\u180B-\\u180D',\n '\\u18A9',\n '\\u1920-\\u192B',\n '\\u1930-\\u193B',\n '\\u19B0-\\u19C0',\n '\\u19C8',\n '\\u19C9',\n '\\u1A17-\\u1A1B',\n '\\u1B00-\\u1B04',\n '\\u1B34-\\u1B44',\n '\\u1B6B-\\u1B73',\n '\\u1B80-\\u1B82',\n '\\u1BA1-\\u1BAA',\n '\\u1C24-\\u1C37',\n '\\u1DC0-\\u1DE6',\n '\\u1DFE',\n '\\u1DFF',\n '\\u20D0-\\u20F0',\n '\\u2DE0-\\u2DFF',\n '\\u302A-\\u302F',\n '\\u3099',\n '\\u309A',\n '\\uA66F-\\uA672',\n '\\uA67C',\n '\\uA67D',\n '\\uA802',\n '\\uA806',\n '\\uA80B',\n '\\uA823-\\uA827',\n '\\uA880',\n '\\uA881',\n '\\uA8B4-\\uA8C4',\n '\\uA926-\\uA92D',\n '\\uA947-\\uA953',\n '\\uAA29-\\uAA36',\n '\\uAA43',\n '\\uAA4C',\n '\\uAA4D',\n '\\uFB1E',\n '\\uFE00-\\uFE0F',\n '\\uFE20-\\uFE26'\n ]\n\n var graphemeExtend = new RegExp('(.)([' + chars.join('') + ']+)', 'g')\n\n // Temporarily reverse\n string = string.replace(graphemeExtend, '$2$1')\n return string.split('').reverse().join('')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strripos.js b/node_modules/locutus/php/strings/strripos.js
deleted file mode 100644
index 03f60b8..0000000
--- a/node_modules/locutus/php/strings/strripos.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-module.exports = function strripos(haystack, needle, offset) {
- // discuss at: http://locutus.io/php/strripos/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: saulius
- // example 1: strripos('Kevin van Zonneveld', 'E')
- // returns 1: 16
-
- haystack = (haystack + '').toLowerCase();
- needle = (needle + '').toLowerCase();
-
- var i = -1;
- if (offset) {
- i = (haystack + '').slice(offset).lastIndexOf(needle); // strrpos' offset indicates starting point of range till end,
- // while lastIndexOf's optional 2nd argument indicates ending point of range from the beginning
- if (i !== -1) {
- i += offset;
- }
- } else {
- i = (haystack + '').lastIndexOf(needle);
- }
- return i >= 0 ? i : false;
-};
-//# sourceMappingURL=strripos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strripos.js.map b/node_modules/locutus/php/strings/strripos.js.map
deleted file mode 100644
index 323ab73..0000000
--- a/node_modules/locutus/php/strings/strripos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strripos.js"],"names":["module","exports","strripos","haystack","needle","offset","toLowerCase","i","slice","lastIndexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,QAAnB,EAA6BC,MAA7B,EAAqCC,MAArC,EAA6C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAF,aAAW,CAACA,WAAW,EAAZ,EACRG,WADQ,EAAX;AAEAF,WAAS,CAACA,SAAS,EAAV,EACNE,WADM,EAAT;;AAGA,MAAIC,IAAI,CAAC,CAAT;AACA,MAAIF,MAAJ,EAAY;AACVE,QAAI,CAACJ,WAAW,EAAZ,EACDK,KADC,CACKH,MADL,EAEDI,WAFC,CAEWL,MAFX,CAAJ,CADU,CAGa;AACvB;AACA,QAAIG,MAAM,CAAC,CAAX,EAAc;AACZA,WAAKF,MAAL;AACD;AACF,GARD,MAQO;AACLE,QAAI,CAACJ,WAAW,EAAZ,EACDM,WADC,CACWL,MADX,CAAJ;AAED;AACD,SAAOG,KAAK,CAAL,GAASA,CAAT,GAAa,KAApB;AACD,CA5BD","file":"strripos.js","sourcesContent":["module.exports = function strripos (haystack, needle, offset) {\n // discuss at: http://locutus.io/php/strripos/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: saulius\n // example 1: strripos('Kevin van Zonneveld', 'E')\n // returns 1: 16\n\n haystack = (haystack + '')\n .toLowerCase()\n needle = (needle + '')\n .toLowerCase()\n\n var i = -1\n if (offset) {\n i = (haystack + '')\n .slice(offset)\n .lastIndexOf(needle) // strrpos' offset indicates starting point of range till end,\n // while lastIndexOf's optional 2nd argument indicates ending point of range from the beginning\n if (i !== -1) {\n i += offset\n }\n } else {\n i = (haystack + '')\n .lastIndexOf(needle)\n }\n return i >= 0 ? i : false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strrpos.js b/node_modules/locutus/php/strings/strrpos.js
deleted file mode 100644
index ccabd92..0000000
--- a/node_modules/locutus/php/strings/strrpos.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = function strrpos(haystack, needle, offset) {
- // discuss at: http://locutus.io/php/strrpos/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // input by: saulius
- // example 1: strrpos('Kevin van Zonneveld', 'e')
- // returns 1: 16
- // example 2: strrpos('somepage.com', '.', false)
- // returns 2: 8
- // example 3: strrpos('baa', 'a', 3)
- // returns 3: false
- // example 4: strrpos('baa', 'a', 2)
- // returns 4: 2
-
- var i = -1;
- if (offset) {
- i = (haystack + '').slice(offset).lastIndexOf(needle); // strrpos' offset indicates starting point of range till end,
- // while lastIndexOf's optional 2nd argument indicates ending point of range from the beginning
- if (i !== -1) {
- i += offset;
- }
- } else {
- i = (haystack + '').lastIndexOf(needle);
- }
- return i >= 0 ? i : false;
-};
-//# sourceMappingURL=strrpos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strrpos.js.map b/node_modules/locutus/php/strings/strrpos.js.map
deleted file mode 100644
index 6e64fbe..0000000
--- a/node_modules/locutus/php/strings/strrpos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strrpos.js"],"names":["module","exports","strrpos","haystack","needle","offset","i","slice","lastIndexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4BC,MAA5B,EAAoCC,MAApC,EAA4C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAI,CAAC,CAAT;AACA,MAAID,MAAJ,EAAY;AACVC,QAAI,CAACH,WAAW,EAAZ,EACDI,KADC,CACKF,MADL,EAEDG,WAFC,CAEWJ,MAFX,CAAJ,CADU,CAGa;AACvB;AACA,QAAIE,MAAM,CAAC,CAAX,EAAc;AACZA,WAAKD,MAAL;AACD;AACF,GARD,MAQO;AACLC,QAAI,CAACH,WAAW,EAAZ,EACDK,WADC,CACWJ,MADX,CAAJ;AAED;AACD,SAAOE,KAAK,CAAL,GAASA,CAAT,GAAa,KAApB;AACD,CA7BD","file":"strrpos.js","sourcesContent":["module.exports = function strrpos (haystack, needle, offset) {\n // discuss at: http://locutus.io/php/strrpos/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: saulius\n // example 1: strrpos('Kevin van Zonneveld', 'e')\n // returns 1: 16\n // example 2: strrpos('somepage.com', '.', false)\n // returns 2: 8\n // example 3: strrpos('baa', 'a', 3)\n // returns 3: false\n // example 4: strrpos('baa', 'a', 2)\n // returns 4: 2\n\n var i = -1\n if (offset) {\n i = (haystack + '')\n .slice(offset)\n .lastIndexOf(needle) // strrpos' offset indicates starting point of range till end,\n // while lastIndexOf's optional 2nd argument indicates ending point of range from the beginning\n if (i !== -1) {\n i += offset\n }\n } else {\n i = (haystack + '')\n .lastIndexOf(needle)\n }\n return i >= 0 ? i : false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strspn.js b/node_modules/locutus/php/strings/strspn.js
deleted file mode 100644
index 59e52c7..0000000
--- a/node_modules/locutus/php/strings/strspn.js
+++ /dev/null
@@ -1,39 +0,0 @@
-"use strict";
-
-module.exports = function strspn(str1, str2, start, lgth) {
- // discuss at: http://locutus.io/php/strspn/
- // original by: Valentina De Rosa
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: strspn('42 is the answer, what is the question ...', '1234567890')
- // returns 1: 2
- // example 2: strspn('foo', 'o', 1, 2)
- // returns 2: 2
-
- var found;
- var stri;
- var strj;
- var j = 0;
- var i = 0;
-
- start = start ? start < 0 ? str1.length + start : start : 0;
- lgth = lgth ? lgth < 0 ? str1.length + lgth - start : lgth : str1.length - start;
- str1 = str1.substr(start, lgth);
-
- for (i = 0; i < str1.length; i++) {
- found = 0;
- stri = str1.substring(i, i + 1);
- for (j = 0; j <= str2.length; j++) {
- strj = str2.substring(j, j + 1);
- if (stri === strj) {
- found = 1;
- break;
- }
- }
- if (found !== 1) {
- return i;
- }
- }
-
- return i;
-};
-//# sourceMappingURL=strspn.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strspn.js.map b/node_modules/locutus/php/strings/strspn.js.map
deleted file mode 100644
index c98518a..0000000
--- a/node_modules/locutus/php/strings/strspn.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strspn.js"],"names":["module","exports","strspn","str1","str2","start","lgth","found","stri","strj","j","i","length","substr","substring"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,IAAjB,EAAuBC,IAAvB,EAA6BC,KAA7B,EAAoCC,IAApC,EAA0C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAJ;AACA,MAAIC,IAAJ;AACA,MAAIC,IAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;;AAEAN,UAAQA,QAASA,QAAQ,CAAR,GAAaF,KAAKS,MAAL,GAAcP,KAA3B,GAAoCA,KAA7C,GAAsD,CAA9D;AACAC,SAAOA,OAASA,OAAO,CAAR,GAAcH,KAAKS,MAAL,GAAcN,IAAd,GAAqBD,KAAnC,GAA4CC,IAApD,GAA4DH,KAAKS,MAAL,GAAcP,KAAjF;AACAF,SAAOA,KAAKU,MAAL,CAAYR,KAAZ,EAAmBC,IAAnB,CAAP;;AAEA,OAAKK,IAAI,CAAT,EAAYA,IAAIR,KAAKS,MAArB,EAA6BD,GAA7B,EAAkC;AAChCJ,YAAQ,CAAR;AACAC,WAAOL,KAAKW,SAAL,CAAeH,CAAf,EAAkBA,IAAI,CAAtB,CAAP;AACA,SAAKD,IAAI,CAAT,EAAYA,KAAKN,KAAKQ,MAAtB,EAA8BF,GAA9B,EAAmC;AACjCD,aAAOL,KAAKU,SAAL,CAAeJ,CAAf,EAAkBA,IAAI,CAAtB,CAAP;AACA,UAAIF,SAASC,IAAb,EAAmB;AACjBF,gBAAQ,CAAR;AACA;AACD;AACF;AACD,QAAIA,UAAU,CAAd,EAAiB;AACf,aAAOI,CAAP;AACD;AACF;;AAED,SAAOA,CAAP;AACD,CAnCD","file":"strspn.js","sourcesContent":["module.exports = function strspn (str1, str2, start, lgth) {\n // discuss at: http://locutus.io/php/strspn/\n // original by: Valentina De Rosa\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: strspn('42 is the answer, what is the question ...', '1234567890')\n // returns 1: 2\n // example 2: strspn('foo', 'o', 1, 2)\n // returns 2: 2\n\n var found\n var stri\n var strj\n var j = 0\n var i = 0\n\n start = start ? (start < 0 ? (str1.length + start) : start) : 0\n lgth = lgth ? ((lgth < 0) ? (str1.length + lgth - start) : lgth) : str1.length - start\n str1 = str1.substr(start, lgth)\n\n for (i = 0; i < str1.length; i++) {\n found = 0\n stri = str1.substring(i, i + 1)\n for (j = 0; j <= str2.length; j++) {\n strj = str2.substring(j, j + 1)\n if (stri === strj) {\n found = 1\n break\n }\n }\n if (found !== 1) {\n return i\n }\n }\n\n return i\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strstr.js b/node_modules/locutus/php/strings/strstr.js
deleted file mode 100644
index 5a636b6..0000000
--- a/node_modules/locutus/php/strings/strstr.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-module.exports = function strstr(haystack, needle, bool) {
- // discuss at: http://locutus.io/php/strstr/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // example 1: strstr('Kevin van Zonneveld', 'van')
- // returns 1: 'van Zonneveld'
- // example 2: strstr('Kevin van Zonneveld', 'van', true)
- // returns 2: 'Kevin '
- // example 3: strstr('name@example.com', '@')
- // returns 3: '@example.com'
- // example 4: strstr('name@example.com', '@', true)
- // returns 4: 'name'
-
- var pos = 0;
-
- haystack += '';
- pos = haystack.indexOf(needle);
- if (pos === -1) {
- return false;
- } else {
- if (bool) {
- return haystack.substr(0, pos);
- } else {
- return haystack.slice(pos);
- }
- }
-};
-//# sourceMappingURL=strstr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strstr.js.map b/node_modules/locutus/php/strings/strstr.js.map
deleted file mode 100644
index 007d714..0000000
--- a/node_modules/locutus/php/strings/strstr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strstr.js"],"names":["module","exports","strstr","haystack","needle","bool","pos","indexOf","substr","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,MAA3B,EAAmCC,IAAnC,EAAyC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,CAAV;;AAEAH,cAAY,EAAZ;AACAG,QAAMH,SAASI,OAAT,CAAiBH,MAAjB,CAAN;AACA,MAAIE,QAAQ,CAAC,CAAb,EAAgB;AACd,WAAO,KAAP;AACD,GAFD,MAEO;AACL,QAAID,IAAJ,EAAU;AACR,aAAOF,SAASK,MAAT,CAAgB,CAAhB,EAAmBF,GAAnB,CAAP;AACD,KAFD,MAEO;AACL,aAAOH,SAASM,KAAT,CAAeH,GAAf,CAAP;AACD;AACF;AACF,CA3BD","file":"strstr.js","sourcesContent":["module.exports = function strstr (haystack, needle, bool) {\n // discuss at: http://locutus.io/php/strstr/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // example 1: strstr('Kevin van Zonneveld', 'van')\n // returns 1: 'van Zonneveld'\n // example 2: strstr('Kevin van Zonneveld', 'van', true)\n // returns 2: 'Kevin '\n // example 3: strstr('name@example.com', '@')\n // returns 3: '@example.com'\n // example 4: strstr('name@example.com', '@', true)\n // returns 4: 'name'\n\n var pos = 0\n\n haystack += ''\n pos = haystack.indexOf(needle)\n if (pos === -1) {\n return false\n } else {\n if (bool) {\n return haystack.substr(0, pos)\n } else {\n return haystack.slice(pos)\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtok.js b/node_modules/locutus/php/strings/strtok.js
deleted file mode 100644
index 74461b0..0000000
--- a/node_modules/locutus/php/strings/strtok.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = function strtok(str, tokens) {
- // discuss at: http://locutus.io/php/strtok/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Use tab and newline as tokenizing characters as well
- // example 1: var $string = "\t\t\t\nThis is\tan example\nstring\n"
- // example 1: var $tok = strtok($string, " \n\t")
- // example 1: var $b = ''
- // example 1: while ($tok !== false) {$b += "Word="+$tok+"\n"; $tok = strtok(" \n\t");}
- // example 1: var $result = $b
- // returns 1: "Word=This\nWord=is\nWord=an\nWord=example\nWord=string\n"
-
- var $global = typeof window !== 'undefined' ? window : global;
- $global.$locutus = $global.$locutus || {};
- var $locutus = $global.$locutus;
- $locutus.php = $locutus.php || {};
-
- if (tokens === undefined) {
- tokens = str;
- str = $locutus.php.strtokleftOver;
- }
- if (str.length === 0) {
- return false;
- }
- if (tokens.indexOf(str.charAt(0)) !== -1) {
- return strtok(str.substr(1), tokens);
- }
- for (var i = 0; i < str.length; i++) {
- if (tokens.indexOf(str.charAt(i)) !== -1) {
- break;
- }
- }
- $locutus.php.strtokleftOver = str.substr(i + 1);
-
- return str.substring(0, i);
-};
-//# sourceMappingURL=strtok.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtok.js.map b/node_modules/locutus/php/strings/strtok.js.map
deleted file mode 100644
index de177ae..0000000
--- a/node_modules/locutus/php/strings/strtok.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strtok.js"],"names":["module","exports","strtok","str","tokens","$global","window","global","$locutus","php","undefined","strtokleftOver","length","indexOf","charAt","substr","i","substring"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,GAAjB,EAAsBC,MAAtB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAIA,WAAWH,QAAQG,QAAvB;AACAA,WAASC,GAAT,GAAeD,SAASC,GAAT,IAAgB,EAA/B;;AAEA,MAAIL,WAAWM,SAAf,EAA0B;AACxBN,aAASD,GAAT;AACAA,UAAMK,SAASC,GAAT,CAAaE,cAAnB;AACD;AACD,MAAIR,IAAIS,MAAJ,KAAe,CAAnB,EAAsB;AACpB,WAAO,KAAP;AACD;AACD,MAAIR,OAAOS,OAAP,CAAeV,IAAIW,MAAJ,CAAW,CAAX,CAAf,MAAkC,CAAC,CAAvC,EAA0C;AACxC,WAAOZ,OAAOC,IAAIY,MAAJ,CAAW,CAAX,CAAP,EAAsBX,MAAtB,CAAP;AACD;AACD,OAAK,IAAIY,IAAI,CAAb,EAAgBA,IAAIb,IAAIS,MAAxB,EAAgCI,GAAhC,EAAqC;AACnC,QAAIZ,OAAOS,OAAP,CAAeV,IAAIW,MAAJ,CAAWE,CAAX,CAAf,MAAkC,CAAC,CAAvC,EAA0C;AACxC;AACD;AACF;AACDR,WAASC,GAAT,CAAaE,cAAb,GAA8BR,IAAIY,MAAJ,CAAWC,IAAI,CAAf,CAA9B;;AAEA,SAAOb,IAAIc,SAAJ,CAAc,CAAd,EAAiBD,CAAjB,CAAP;AACD,CAlCD","file":"strtok.js","sourcesContent":["module.exports = function strtok (str, tokens) {\n // discuss at: http://locutus.io/php/strtok/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Use tab and newline as tokenizing characters as well\n // example 1: var $string = \"\\t\\t\\t\\nThis is\\tan example\\nstring\\n\"\n // example 1: var $tok = strtok($string, \" \\n\\t\")\n // example 1: var $b = ''\n // example 1: while ($tok !== false) {$b += \"Word=\"+$tok+\"\\n\"; $tok = strtok(\" \\n\\t\");}\n // example 1: var $result = $b\n // returns 1: \"Word=This\\nWord=is\\nWord=an\\nWord=example\\nWord=string\\n\"\n\n var $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n var $locutus = $global.$locutus\n $locutus.php = $locutus.php || {}\n\n if (tokens === undefined) {\n tokens = str\n str = $locutus.php.strtokleftOver\n }\n if (str.length === 0) {\n return false\n }\n if (tokens.indexOf(str.charAt(0)) !== -1) {\n return strtok(str.substr(1), tokens)\n }\n for (var i = 0; i < str.length; i++) {\n if (tokens.indexOf(str.charAt(i)) !== -1) {\n break\n }\n }\n $locutus.php.strtokleftOver = str.substr(i + 1)\n\n return str.substring(0, i)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtolower.js b/node_modules/locutus/php/strings/strtolower.js
deleted file mode 100644
index 8309d82..0000000
--- a/node_modules/locutus/php/strings/strtolower.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function strtolower(str) {
- // discuss at: http://locutus.io/php/strtolower/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: strtolower('Kevin van Zonneveld')
- // returns 1: 'kevin van zonneveld'
-
- return (str + '').toLowerCase();
-};
-//# sourceMappingURL=strtolower.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtolower.js.map b/node_modules/locutus/php/strings/strtolower.js.map
deleted file mode 100644
index 92ff28a..0000000
--- a/node_modules/locutus/php/strings/strtolower.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strtolower.js"],"names":["module","exports","strtolower","str","toLowerCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,GAArB,EAA0B;AACzC;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,WADI,EAAP;AAED,CATD","file":"strtolower.js","sourcesContent":["module.exports = function strtolower (str) {\n // discuss at: http://locutus.io/php/strtolower/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: strtolower('Kevin van Zonneveld')\n // returns 1: 'kevin van zonneveld'\n\n return (str + '')\n .toLowerCase()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtoupper.js b/node_modules/locutus/php/strings/strtoupper.js
deleted file mode 100644
index b30d4a9..0000000
--- a/node_modules/locutus/php/strings/strtoupper.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function strtoupper(str) {
- // discuss at: http://locutus.io/php/strtoupper/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: strtoupper('Kevin van Zonneveld')
- // returns 1: 'KEVIN VAN ZONNEVELD'
-
- return (str + '').toUpperCase();
-};
-//# sourceMappingURL=strtoupper.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtoupper.js.map b/node_modules/locutus/php/strings/strtoupper.js.map
deleted file mode 100644
index e2da8aa..0000000
--- a/node_modules/locutus/php/strings/strtoupper.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strtoupper.js"],"names":["module","exports","strtoupper","str","toUpperCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,GAArB,EAA0B;AACzC;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,WADI,EAAP;AAED,CATD","file":"strtoupper.js","sourcesContent":["module.exports = function strtoupper (str) {\n // discuss at: http://locutus.io/php/strtoupper/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: strtoupper('Kevin van Zonneveld')\n // returns 1: 'KEVIN VAN ZONNEVELD'\n\n return (str + '')\n .toUpperCase()\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtr.js b/node_modules/locutus/php/strings/strtr.js
deleted file mode 100644
index 7c6f35f..0000000
--- a/node_modules/locutus/php/strings/strtr.js
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function strtr(str, trFrom, trTo) {
- // discuss at: http://locutus.io/php/strtr/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: uestla
- // input by: Alan C
- // input by: Taras Bogach
- // input by: jpfle
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: var $trans = {'hello' : 'hi', 'hi' : 'hello'}
- // example 1: strtr('hi all, I said hello', $trans)
- // returns 1: 'hello all, I said hi'
- // example 2: strtr('äaabaåccasdeöoo', 'äåö','aao')
- // returns 2: 'aaabaaccasdeooo'
- // example 3: strtr('ääääääää', 'ä', 'a')
- // returns 3: 'aaaaaaaa'
- // example 4: strtr('http', 'pthxyz','xyzpth')
- // returns 4: 'zyyx'
- // example 5: strtr('zyyx', 'pthxyz','xyzpth')
- // returns 5: 'http'
- // example 6: strtr('aa', {'a':1,'aa':2})
- // returns 6: '2'
-
- var krsort = require('../array/krsort');
- var iniSet = require('../info/ini_set');
-
- var fr = '';
- var i = 0;
- var j = 0;
- var lenStr = 0;
- var lenFrom = 0;
- var sortByReference = false;
- var fromTypeStr = '';
- var toTypeStr = '';
- var istr = '';
- var tmpFrom = [];
- var tmpTo = [];
- var ret = '';
- var match = false;
-
- // Received replace_pairs?
- // Convert to normal trFrom->trTo chars
- if ((typeof trFrom === 'undefined' ? 'undefined' : _typeof(trFrom)) === 'object') {
- // Not thread-safe; temporarily set to true
- // @todo: Don't rely on ini here, use internal krsort instead
- sortByReference = iniSet('locutus.sortByReference', false);
- trFrom = krsort(trFrom);
- iniSet('locutus.sortByReference', sortByReference);
-
- for (fr in trFrom) {
- if (trFrom.hasOwnProperty(fr)) {
- tmpFrom.push(fr);
- tmpTo.push(trFrom[fr]);
- }
- }
-
- trFrom = tmpFrom;
- trTo = tmpTo;
- }
-
- // Walk through subject and replace chars when needed
- lenStr = str.length;
- lenFrom = trFrom.length;
- fromTypeStr = typeof trFrom === 'string';
- toTypeStr = typeof trTo === 'string';
-
- for (i = 0; i < lenStr; i++) {
- match = false;
- if (fromTypeStr) {
- istr = str.charAt(i);
- for (j = 0; j < lenFrom; j++) {
- if (istr === trFrom.charAt(j)) {
- match = true;
- break;
- }
- }
- } else {
- for (j = 0; j < lenFrom; j++) {
- if (str.substr(i, trFrom[j].length) === trFrom[j]) {
- match = true;
- // Fast forward
- i = i + trFrom[j].length - 1;
- break;
- }
- }
- }
- if (match) {
- ret += toTypeStr ? trTo.charAt(j) : trTo[j];
- } else {
- ret += str.charAt(i);
- }
- }
-
- return ret;
-};
-//# sourceMappingURL=strtr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/strtr.js.map b/node_modules/locutus/php/strings/strtr.js.map
deleted file mode 100644
index 895329b..0000000
--- a/node_modules/locutus/php/strings/strtr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/strtr.js"],"names":["module","exports","strtr","str","trFrom","trTo","krsort","require","iniSet","fr","i","j","lenStr","lenFrom","sortByReference","fromTypeStr","toTypeStr","istr","tmpFrom","tmpTo","ret","match","hasOwnProperty","push","length","charAt","substr"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,MAArB,EAA6BC,IAA7B,EAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAASC,QAAQ,iBAAR,CAAb;AACA,MAAIC,SAASD,QAAQ,iBAAR,CAAb;;AAEA,MAAIE,KAAK,EAAT;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,SAAS,CAAb;AACA,MAAIC,UAAU,CAAd;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;AACA,MAAIC,YAAY,EAAhB;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,UAAU,EAAd;AACA,MAAIC,QAAQ,EAAZ;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,QAAQ,KAAZ;;AAEA;AACA;AACA,MAAI,QAAOjB,MAAP,yCAAOA,MAAP,OAAkB,QAAtB,EAAgC;AAC9B;AACA;AACAU,sBAAkBN,OAAO,yBAAP,EAAkC,KAAlC,CAAlB;AACAJ,aAASE,OAAOF,MAAP,CAAT;AACAI,WAAO,yBAAP,EAAkCM,eAAlC;;AAEA,SAAKL,EAAL,IAAWL,MAAX,EAAmB;AACjB,UAAIA,OAAOkB,cAAP,CAAsBb,EAAtB,CAAJ,EAA+B;AAC7BS,gBAAQK,IAAR,CAAad,EAAb;AACAU,cAAMI,IAAN,CAAWnB,OAAOK,EAAP,CAAX;AACD;AACF;;AAEDL,aAASc,OAAT;AACAb,WAAOc,KAAP;AACD;;AAED;AACAP,WAAST,IAAIqB,MAAb;AACAX,YAAUT,OAAOoB,MAAjB;AACAT,gBAAc,OAAOX,MAAP,KAAkB,QAAhC;AACAY,cAAY,OAAOX,IAAP,KAAgB,QAA5B;;AAEA,OAAKK,IAAI,CAAT,EAAYA,IAAIE,MAAhB,EAAwBF,GAAxB,EAA6B;AAC3BW,YAAQ,KAAR;AACA,QAAIN,WAAJ,EAAiB;AACfE,aAAOd,IAAIsB,MAAJ,CAAWf,CAAX,CAAP;AACA,WAAKC,IAAI,CAAT,EAAYA,IAAIE,OAAhB,EAAyBF,GAAzB,EAA8B;AAC5B,YAAIM,SAASb,OAAOqB,MAAP,CAAcd,CAAd,CAAb,EAA+B;AAC7BU,kBAAQ,IAAR;AACA;AACD;AACF;AACF,KARD,MAQO;AACL,WAAKV,IAAI,CAAT,EAAYA,IAAIE,OAAhB,EAAyBF,GAAzB,EAA8B;AAC5B,YAAIR,IAAIuB,MAAJ,CAAWhB,CAAX,EAAcN,OAAOO,CAAP,EAAUa,MAAxB,MAAoCpB,OAAOO,CAAP,CAAxC,EAAmD;AACjDU,kBAAQ,IAAR;AACA;AACAX,cAAKA,IAAIN,OAAOO,CAAP,EAAUa,MAAf,GAAyB,CAA7B;AACA;AACD;AACF;AACF;AACD,QAAIH,KAAJ,EAAW;AACTD,aAAOJ,YAAYX,KAAKoB,MAAL,CAAYd,CAAZ,CAAZ,GAA6BN,KAAKM,CAAL,CAApC;AACD,KAFD,MAEO;AACLS,aAAOjB,IAAIsB,MAAJ,CAAWf,CAAX,CAAP;AACD;AACF;;AAED,SAAOU,GAAP;AACD,CAhGD","file":"strtr.js","sourcesContent":["module.exports = function strtr (str, trFrom, trTo) {\n // discuss at: http://locutus.io/php/strtr/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: uestla\n // input by: Alan C\n // input by: Taras Bogach\n // input by: jpfle\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: var $trans = {'hello' : 'hi', 'hi' : 'hello'}\n // example 1: strtr('hi all, I said hello', $trans)\n // returns 1: 'hello all, I said hi'\n // example 2: strtr('äaabaåccasdeöoo', 'äåö','aao')\n // returns 2: 'aaabaaccasdeooo'\n // example 3: strtr('ääääääää', 'ä', 'a')\n // returns 3: 'aaaaaaaa'\n // example 4: strtr('http', 'pthxyz','xyzpth')\n // returns 4: 'zyyx'\n // example 5: strtr('zyyx', 'pthxyz','xyzpth')\n // returns 5: 'http'\n // example 6: strtr('aa', {'a':1,'aa':2})\n // returns 6: '2'\n\n var krsort = require('../array/krsort')\n var iniSet = require('../info/ini_set')\n\n var fr = ''\n var i = 0\n var j = 0\n var lenStr = 0\n var lenFrom = 0\n var sortByReference = false\n var fromTypeStr = ''\n var toTypeStr = ''\n var istr = ''\n var tmpFrom = []\n var tmpTo = []\n var ret = ''\n var match = false\n\n // Received replace_pairs?\n // Convert to normal trFrom->trTo chars\n if (typeof trFrom === 'object') {\n // Not thread-safe; temporarily set to true\n // @todo: Don't rely on ini here, use internal krsort instead\n sortByReference = iniSet('locutus.sortByReference', false)\n trFrom = krsort(trFrom)\n iniSet('locutus.sortByReference', sortByReference)\n\n for (fr in trFrom) {\n if (trFrom.hasOwnProperty(fr)) {\n tmpFrom.push(fr)\n tmpTo.push(trFrom[fr])\n }\n }\n\n trFrom = tmpFrom\n trTo = tmpTo\n }\n\n // Walk through subject and replace chars when needed\n lenStr = str.length\n lenFrom = trFrom.length\n fromTypeStr = typeof trFrom === 'string'\n toTypeStr = typeof trTo === 'string'\n\n for (i = 0; i < lenStr; i++) {\n match = false\n if (fromTypeStr) {\n istr = str.charAt(i)\n for (j = 0; j < lenFrom; j++) {\n if (istr === trFrom.charAt(j)) {\n match = true\n break\n }\n }\n } else {\n for (j = 0; j < lenFrom; j++) {\n if (str.substr(i, trFrom[j].length) === trFrom[j]) {\n match = true\n // Fast forward\n i = (i + trFrom[j].length) - 1\n break\n }\n }\n }\n if (match) {\n ret += toTypeStr ? trTo.charAt(j) : trTo[j]\n } else {\n ret += str.charAt(i)\n }\n }\n\n return ret\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr.js b/node_modules/locutus/php/strings/substr.js
deleted file mode 100644
index 3498296..0000000
--- a/node_modules/locutus/php/strings/substr.js
+++ /dev/null
@@ -1,124 +0,0 @@
-'use strict';
-
-module.exports = function substr(str, start, len) {
- // discuss at: http://locutus.io/php/substr/
- // original by: Martijn Wieringa
- // bugfixed by: T.Wild
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // revised by: Theriault (https://github.com/Theriault)
- // note 1: Handles rare Unicode characters if 'unicode.semantics' ini (PHP6) is set to 'on'
- // example 1: substr('abcdef', 0, -1)
- // returns 1: 'abcde'
- // example 2: substr(2, 0, -6)
- // returns 2: false
- // example 3: ini_set('unicode.semantics', 'on')
- // example 3: substr('a\uD801\uDC00', 0, -1)
- // returns 3: 'a'
- // example 4: ini_set('unicode.semantics', 'on')
- // example 4: substr('a\uD801\uDC00', 0, 2)
- // returns 4: 'a\uD801\uDC00'
- // example 5: ini_set('unicode.semantics', 'on')
- // example 5: substr('a\uD801\uDC00', -1, 1)
- // returns 5: '\uD801\uDC00'
- // example 6: ini_set('unicode.semantics', 'on')
- // example 6: substr('a\uD801\uDC00z\uD801\uDC00', -3, 2)
- // returns 6: '\uD801\uDC00z'
- // example 7: ini_set('unicode.semantics', 'on')
- // example 7: substr('a\uD801\uDC00z\uD801\uDC00', -3, -1)
- // returns 7: '\uD801\uDC00z'
- // test: skip-3 skip-4 skip-5 skip-6 skip-7
-
- str += '';
- var end = str.length;
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('unicode.emantics') : undefined) || 'off';
-
- if (iniVal === 'off') {
- // assumes there are no non-BMP characters;
- // if there may be such characters, then it is best to turn it on (critical in true XHTML/XML)
- if (start < 0) {
- start += end;
- }
- if (typeof len !== 'undefined') {
- if (len < 0) {
- end = len + end;
- } else {
- end = len + start;
- }
- }
-
- // PHP returns false if start does not fall within the string.
- // PHP returns false if the calculated end comes before the calculated start.
- // PHP returns an empty string if start and end are the same.
- // Otherwise, PHP returns the portion of the string from start to end.
- if (start >= str.length || start < 0 || start > end) {
- return false;
- }
-
- return str.slice(start, end);
- }
-
- // Full-blown Unicode including non-Basic-Multilingual-Plane characters
- var i = 0;
- var allBMP = true;
- var es = 0;
- var el = 0;
- var se = 0;
- var ret = '';
-
- for (i = 0; i < str.length; i++) {
- if (/[\uD800-\uDBFF]/.test(str.charAt(i)) && /[\uDC00-\uDFFF]/.test(str.charAt(i + 1))) {
- allBMP = false;
- break;
- }
- }
-
- if (!allBMP) {
- if (start < 0) {
- for (i = end - 1, es = start += end; i >= es; i--) {
- if (/[\uDC00-\uDFFF]/.test(str.charAt(i)) && /[\uD800-\uDBFF]/.test(str.charAt(i - 1))) {
- start--;
- es--;
- }
- }
- } else {
- var surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
- while (surrogatePairs.exec(str) !== null) {
- var li = surrogatePairs.lastIndex;
- if (li - 2 < start) {
- start++;
- } else {
- break;
- }
- }
- }
-
- if (start >= end || start < 0) {
- return false;
- }
- if (len < 0) {
- for (i = end - 1, el = end += len; i >= el; i--) {
- if (/[\uDC00-\uDFFF]/.test(str.charAt(i)) && /[\uD800-\uDBFF]/.test(str.charAt(i - 1))) {
- end--;
- el--;
- }
- }
- if (start > end) {
- return false;
- }
- return str.slice(start, end);
- } else {
- se = start + len;
- for (i = start; i < se; i++) {
- ret += str.charAt(i);
- if (/[\uD800-\uDBFF]/.test(str.charAt(i)) && /[\uDC00-\uDFFF]/.test(str.charAt(i + 1))) {
- // Go one further, since one of the "characters" is part of a surrogate pair
- se++;
- }
- }
- return ret;
- }
- }
-};
-//# sourceMappingURL=substr.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr.js.map b/node_modules/locutus/php/strings/substr.js.map
deleted file mode 100644
index c05fb4a..0000000
--- a/node_modules/locutus/php/strings/substr.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/substr.js"],"names":["module","exports","substr","str","start","len","end","length","iniVal","require","undefined","slice","i","allBMP","es","el","se","ret","test","charAt","surrogatePairs","exec","li","lastIndex"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,GAAjB,EAAsBC,KAAtB,EAA6BC,GAA7B,EAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAF,SAAO,EAAP;AACA,MAAIG,MAAMH,IAAII,MAAd;;AAEA,MAAIC,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,kBAA3B,CAAjC,GAAkFC,SAAnF,KAAiG,KAA9G;;AAEA,MAAIF,WAAW,KAAf,EAAsB;AACpB;AACA;AACA,QAAIJ,QAAQ,CAAZ,EAAe;AACbA,eAASE,GAAT;AACD;AACD,QAAI,OAAOD,GAAP,KAAe,WAAnB,EAAgC;AAC9B,UAAIA,MAAM,CAAV,EAAa;AACXC,cAAMD,MAAMC,GAAZ;AACD,OAFD,MAEO;AACLA,cAAMD,MAAMD,KAAZ;AACD;AACF;;AAED;AACA;AACA;AACA;AACA,QAAIA,SAASD,IAAII,MAAb,IAAuBH,QAAQ,CAA/B,IAAoCA,QAAQE,GAAhD,EAAqD;AACnD,aAAO,KAAP;AACD;;AAED,WAAOH,IAAIQ,KAAJ,CAAUP,KAAV,EAAiBE,GAAjB,CAAP;AACD;;AAED;AACA,MAAIM,IAAI,CAAR;AACA,MAAIC,SAAS,IAAb;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,MAAM,E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CAA7C,EAAwF;AACtFN;AACAS;AACD;AACF;AACD,UAAIX,QAAQE,GAAZ,EAAiB;AACf,eAAO,KAAP;AACD;AACD,aAAOH,IAAIQ,KAAJ,CAAUP,KAAV,EAAiBE,GAAjB,CAAP;AACD,KAXD,MAWO;AACLU,WAAKZ,QAAQC,GAAb;AACA,WAAKO,IAAIR,KAAT,EAAgBQ,IAAII,EAApB,EAAwBJ,GAAxB,EAA6B;AAC3BK,eAAOd,IAAIgB,MAAJ,CAAWP,CAAX,CAAP;AACA,YAAI,kBAAkBM,IAAlB,CAAuBf,IAAIgB,MAAJ,CAAWP,CAAX,CAAvB,KAAyC,kBAAkBM,IAAlB,CAAuBf,IAAIgB,MAAJ,CAAWP,IAAI,CAAf,CAAvB,CAA7C,EAAwF;AACtF;AACAI;AACD;AACF;AACD,aAAOC,GAAP;AACD;AACF;AACF,CAxHD","file":"substr.js","sourcesContent":["module.exports = function substr (str, start, len) {\n // discuss at: http://locutus.io/php/substr/\n // original by: Martijn Wieringa\n // bugfixed by: T.Wild\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // revised by: Theriault (https://github.com/Theriault)\n // note 1: Handles rare Unicode characters if 'unicode.semantics' ini (PHP6) is set to 'on'\n // example 1: substr('abcdef', 0, -1)\n // returns 1: 'abcde'\n // example 2: substr(2, 0, -6)\n // returns 2: false\n // example 3: ini_set('unicode.semantics', 'on')\n // example 3: substr('a\\uD801\\uDC00', 0, -1)\n // returns 3: 'a'\n // example 4: ini_set('unicode.semantics', 'on')\n // example 4: substr('a\\uD801\\uDC00', 0, 2)\n // returns 4: 'a\\uD801\\uDC00'\n // example 5: ini_set('unicode.semantics', 'on')\n // example 5: substr('a\\uD801\\uDC00', -1, 1)\n // returns 5: '\\uD801\\uDC00'\n // example 6: ini_set('unicode.semantics', 'on')\n // example 6: substr('a\\uD801\\uDC00z\\uD801\\uDC00', -3, 2)\n // returns 6: '\\uD801\\uDC00z'\n // example 7: ini_set('unicode.semantics', 'on')\n // example 7: substr('a\\uD801\\uDC00z\\uD801\\uDC00', -3, -1)\n // returns 7: '\\uD801\\uDC00z'\n // test: skip-3 skip-4 skip-5 skip-6 skip-7\n\n str += ''\n var end = str.length\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('unicode.emantics') : undefined) || 'off'\n\n if (iniVal === 'off') {\n // assumes there are no non-BMP characters;\n // if there may be such characters, then it is best to turn it on (critical in true XHTML/XML)\n if (start < 0) {\n start += end\n }\n if (typeof len !== 'undefined') {\n if (len < 0) {\n end = len + end\n } else {\n end = len + start\n }\n }\n\n // PHP returns false if start does not fall within the string.\n // PHP returns false if the calculated end comes before the calculated start.\n // PHP returns an empty string if start and end are the same.\n // Otherwise, PHP returns the portion of the string from start to end.\n if (start >= str.length || start < 0 || start > end) {\n return false\n }\n\n return str.slice(start, end)\n }\n\n // Full-blown Unicode including non-Basic-Multilingual-Plane characters\n var i = 0\n var allBMP = true\n var es = 0\n var el = 0\n var se = 0\n var ret = ''\n\n for (i = 0; i < str.length; i++) {\n if (/[\\uD800-\\uDBFF]/.test(str.charAt(i)) && /[\\uDC00-\\uDFFF]/.test(str.charAt(i + 1))) {\n allBMP = false\n break\n }\n }\n\n if (!allBMP) {\n if (start < 0) {\n for (i = end - 1, es = (start += end); i >= es; i--) {\n if (/[\\uDC00-\\uDFFF]/.test(str.charAt(i)) && /[\\uD800-\\uDBFF]/.test(str.charAt(i - 1))) {\n start--\n es--\n }\n }\n } else {\n var surrogatePairs = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g\n while ((surrogatePairs.exec(str)) !== null) {\n var li = surrogatePairs.lastIndex\n if (li - 2 < start) {\n start++\n } else {\n break\n }\n }\n }\n\n if (start >= end || start < 0) {\n return false\n }\n if (len < 0) {\n for (i = end - 1, el = (end += len); i >= el; i--) {\n if (/[\\uDC00-\\uDFFF]/.test(str.charAt(i)) && /[\\uD800-\\uDBFF]/.test(str.charAt(i - 1))) {\n end--\n el--\n }\n }\n if (start > end) {\n return false\n }\n return str.slice(start, end)\n } else {\n se = start + len\n for (i = start; i < se; i++) {\n ret += str.charAt(i)\n if (/[\\uD800-\\uDBFF]/.test(str.charAt(i)) && /[\\uDC00-\\uDFFF]/.test(str.charAt(i + 1))) {\n // Go one further, since one of the \"characters\" is part of a surrogate pair\n se++\n }\n }\n return ret\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr_compare.js b/node_modules/locutus/php/strings/substr_compare.js
deleted file mode 100644
index 81e09cd..0000000
--- a/node_modules/locutus/php/strings/substr_compare.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-module.exports = function substr_compare(mainStr, str, offset, length, caseInsensitivity) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/substr_compare/
- // original by: Brett Zamir (http://brett-zamir.me)
- // original by: strcasecmp, strcmp
- // example 1: substr_compare("abcde", "bc", 1, 2)
- // returns 1: 0
-
- if (!offset && offset !== 0) {
- throw new Error('Missing offset for substr_compare()');
- }
-
- if (offset < 0) {
- offset = mainStr.length + offset;
- }
-
- if (length && length > mainStr.length - offset) {
- return false;
- }
- length = length || mainStr.length - offset;
-
- mainStr = mainStr.substr(offset, length);
- // Should only compare up to the desired length
- str = str.substr(0, length);
- if (caseInsensitivity) {
- // Works as strcasecmp
- mainStr = (mainStr + '').toLowerCase();
- str = (str + '').toLowerCase();
- if (mainStr === str) {
- return 0;
- }
- return mainStr > str ? 1 : -1;
- }
- // Works as strcmp
- return mainStr === str ? 0 : mainStr > str ? 1 : -1;
-};
-//# sourceMappingURL=substr_compare.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr_compare.js.map b/node_modules/locutus/php/strings/substr_compare.js.map
deleted file mode 100644
index 6303978..0000000
--- a/node_modules/locutus/php/strings/substr_compare.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/substr_compare.js"],"names":["module","exports","substr_compare","mainStr","str","offset","length","caseInsensitivity","Error","substr","toLowerCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,OAAzB,EAAkCC,GAAlC,EAAuCC,MAAvC,EAA+CC,MAA/C,EAAuDC,iBAAvD,EAA0E;AAAE;AAC3F;AACA;AACA;AACA;AACA;;AAEA,MAAI,CAACF,MAAD,IAAWA,WAAW,CAA1B,EAA6B;AAC3B,UAAM,IAAIG,KAAJ,CAAU,qCAAV,CAAN;AACD;;AAED,MAAIH,SAAS,CAAb,EAAgB;AACdA,aAASF,QAAQG,MAAR,GAAiBD,MAA1B;AACD;;AAED,MAAIC,UAAUA,SAAUH,QAAQG,MAAR,GAAiBD,MAAzC,EAAkD;AAChD,WAAO,KAAP;AACD;AACDC,WAASA,UAAUH,QAAQG,MAAR,GAAiBD,MAApC;;AAEAF,YAAUA,QAAQM,MAAR,CAAeJ,MAAf,EAAuBC,MAAvB,CAAV;AACA;AACAF,QAAMA,IAAIK,MAAJ,CAAW,CAAX,EAAcH,MAAd,CAAN;AACA,MAAIC,iBAAJ,EAAuB;AACrB;AACAJ,cAAU,CAACA,UAAU,EAAX,EAAeO,WAAf,EAAV;AACAN,UAAM,CAACA,MAAM,EAAP,EAAWM,WAAX,EAAN;AACA,QAAIP,YAAYC,GAAhB,EAAqB;AACnB,aAAO,CAAP;AACD;AACD,WAAQD,UAAUC,GAAX,GAAkB,CAAlB,GAAsB,CAAC,CAA9B;AACD;AACD;AACA,SAASD,YAAYC,GAAb,GAAoB,CAApB,GAA0BD,UAAUC,GAAX,GAAkB,CAAlB,GAAsB,CAAC,CAAxD;AACD,CAlCD","file":"substr_compare.js","sourcesContent":["module.exports = function substr_compare (mainStr, str, offset, length, caseInsensitivity) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/substr_compare/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: strcasecmp, strcmp\n // example 1: substr_compare(\"abcde\", \"bc\", 1, 2)\n // returns 1: 0\n\n if (!offset && offset !== 0) {\n throw new Error('Missing offset for substr_compare()')\n }\n\n if (offset < 0) {\n offset = mainStr.length + offset\n }\n\n if (length && length > (mainStr.length - offset)) {\n return false\n }\n length = length || mainStr.length - offset\n\n mainStr = mainStr.substr(offset, length)\n // Should only compare up to the desired length\n str = str.substr(0, length)\n if (caseInsensitivity) {\n // Works as strcasecmp\n mainStr = (mainStr + '').toLowerCase()\n str = (str + '').toLowerCase()\n if (mainStr === str) {\n return 0\n }\n return (mainStr > str) ? 1 : -1\n }\n // Works as strcmp\n return ((mainStr === str) ? 0 : ((mainStr > str) ? 1 : -1))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr_count.js b/node_modules/locutus/php/strings/substr_count.js
deleted file mode 100644
index 9a17e93..0000000
--- a/node_modules/locutus/php/strings/substr_count.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function substr_count(haystack, needle, offset, length) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/substr_count/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Thomas
- // example 1: substr_count('Kevin van Zonneveld', 'e')
- // returns 1: 3
- // example 2: substr_count('Kevin van Zonneveld', 'K', 1)
- // returns 2: 0
- // example 3: substr_count('Kevin van Zonneveld', 'Z', 0, 10)
- // returns 3: false
-
- var cnt = 0;
-
- haystack += '';
- needle += '';
- if (isNaN(offset)) {
- offset = 0;
- }
- if (isNaN(length)) {
- length = 0;
- }
- if (needle.length === 0) {
- return false;
- }
- offset--;
-
- while ((offset = haystack.indexOf(needle, offset + 1)) !== -1) {
- if (length > 0 && offset + needle.length > length) {
- return false;
- }
- cnt++;
- }
-
- return cnt;
-};
-//# sourceMappingURL=substr_count.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr_count.js.map b/node_modules/locutus/php/strings/substr_count.js.map
deleted file mode 100644
index 2c0a4a7..0000000
--- a/node_modules/locutus/php/strings/substr_count.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/substr_count.js"],"names":["module","exports","substr_count","haystack","needle","offset","length","cnt","isNaN","indexOf"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,QAAvB,EAAiCC,MAAjC,EAAyCC,MAAzC,EAAiDC,MAAjD,EAAyD;AAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,CAAV;;AAEAJ,cAAY,EAAZ;AACAC,YAAU,EAAV;AACA,MAAII,MAAMH,MAAN,CAAJ,EAAmB;AACjBA,aAAS,CAAT;AACD;AACD,MAAIG,MAAMF,MAAN,CAAJ,EAAmB;AACjBA,aAAS,CAAT;AACD;AACD,MAAIF,OAAOE,MAAP,KAAkB,CAAtB,EAAyB;AACvB,WAAO,KAAP;AACD;AACDD;;AAEA,SAAO,CAACA,SAASF,SAASM,OAAT,CAAiBL,MAAjB,EAAyBC,SAAS,CAAlC,CAAV,MAAoD,CAAC,CAA5D,EAA+D;AAC7D,QAAIC,SAAS,CAAT,IAAeD,SAASD,OAAOE,MAAjB,GAA2BA,MAA7C,EAAqD;AACnD,aAAO,KAAP;AACD;AACDC;AACD;;AAED,SAAOA,GAAP;AACD,CApCD","file":"substr_count.js","sourcesContent":["module.exports = function substr_count (haystack, needle, offset, length) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/substr_count/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Thomas\n // example 1: substr_count('Kevin van Zonneveld', 'e')\n // returns 1: 3\n // example 2: substr_count('Kevin van Zonneveld', 'K', 1)\n // returns 2: 0\n // example 3: substr_count('Kevin van Zonneveld', 'Z', 0, 10)\n // returns 3: false\n\n var cnt = 0\n\n haystack += ''\n needle += ''\n if (isNaN(offset)) {\n offset = 0\n }\n if (isNaN(length)) {\n length = 0\n }\n if (needle.length === 0) {\n return false\n }\n offset--\n\n while ((offset = haystack.indexOf(needle, offset + 1)) !== -1) {\n if (length > 0 && (offset + needle.length) > length) {\n return false\n }\n cnt++\n }\n\n return cnt\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr_replace.js b/node_modules/locutus/php/strings/substr_replace.js
deleted file mode 100644
index 9778789..0000000
--- a/node_modules/locutus/php/strings/substr_replace.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-module.exports = function substr_replace(str, replace, start, length) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/substr_replace/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', 0)
- // returns 1: 'bob'
- // example 2: var $var = 'ABCDEFGH:/MNRPQR/'
- // example 2: substr_replace($var, 'bob', 0, $var.length)
- // returns 2: 'bob'
- // example 3: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', 0, 0)
- // returns 3: 'bobABCDEFGH:/MNRPQR/'
- // example 4: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', 10, -1)
- // returns 4: 'ABCDEFGH:/bob/'
- // example 5: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', -7, -1)
- // returns 5: 'ABCDEFGH:/bob/'
- // example 6: substr_replace('ABCDEFGH:/MNRPQR/', '', 10, -1)
- // returns 6: 'ABCDEFGH://'
-
- if (start < 0) {
- // start position in str
- start = start + str.length;
- }
- length = length !== undefined ? length : str.length;
- if (length < 0) {
- length = length + str.length - start;
- }
-
- return [str.slice(0, start), replace.substr(0, length), replace.slice(length), str.slice(start + length)].join('');
-};
-//# sourceMappingURL=substr_replace.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/substr_replace.js.map b/node_modules/locutus/php/strings/substr_replace.js.map
deleted file mode 100644
index 701d204..0000000
--- a/node_modules/locutus/php/strings/substr_replace.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/substr_replace.js"],"names":["module","exports","substr_replace","str","replace","start","length","undefined","slice","substr","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,GAAzB,EAA8BC,OAA9B,EAAuCC,KAAvC,EAA8CC,MAA9C,EAAsD;AAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAID,QAAQ,CAAZ,EAAe;AACb;AACAA,YAAQA,QAAQF,IAAIG,MAApB;AACD;AACDA,WAASA,WAAWC,SAAX,GAAuBD,MAAvB,GAAgCH,IAAIG,MAA7C;AACA,MAAIA,SAAS,CAAb,EAAgB;AACdA,aAASA,SAASH,IAAIG,MAAb,GAAsBD,KAA/B;AACD;;AAED,SAAO,CACLF,IAAIK,KAAJ,CAAU,CAAV,EAAaH,KAAb,CADK,EAELD,QAAQK,MAAR,CAAe,CAAf,EAAkBH,MAAlB,CAFK,EAGLF,QAAQI,KAAR,CAAcF,MAAd,CAHK,EAILH,IAAIK,KAAJ,CAAUH,QAAQC,MAAlB,CAJK,EAKLI,IALK,CAKA,EALA,CAAP;AAMD,CAhCD","file":"substr_replace.js","sourcesContent":["module.exports = function substr_replace (str, replace, start, length) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/substr_replace/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', 0)\n // returns 1: 'bob'\n // example 2: var $var = 'ABCDEFGH:/MNRPQR/'\n // example 2: substr_replace($var, 'bob', 0, $var.length)\n // returns 2: 'bob'\n // example 3: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', 0, 0)\n // returns 3: 'bobABCDEFGH:/MNRPQR/'\n // example 4: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', 10, -1)\n // returns 4: 'ABCDEFGH:/bob/'\n // example 5: substr_replace('ABCDEFGH:/MNRPQR/', 'bob', -7, -1)\n // returns 5: 'ABCDEFGH:/bob/'\n // example 6: substr_replace('ABCDEFGH:/MNRPQR/', '', 10, -1)\n // returns 6: 'ABCDEFGH://'\n\n if (start < 0) {\n // start position in str\n start = start + str.length\n }\n length = length !== undefined ? length : str.length\n if (length < 0) {\n length = length + str.length - start\n }\n\n return [\n str.slice(0, start),\n replace.substr(0, length),\n replace.slice(length),\n str.slice(start + length)\n ].join('')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/trim.js b/node_modules/locutus/php/strings/trim.js
deleted file mode 100644
index 49b75fe..0000000
--- a/node_modules/locutus/php/strings/trim.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = function trim(str, charlist) {
- // discuss at: http://locutus.io/php/trim/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: mdsjack (http://www.mdsjack.bo.it)
- // improved by: Alexander Ermolaev (http://snippets.dzone.com/user/AlexanderErmolaev)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Steven Levithan (http://blog.stevenlevithan.com)
- // improved by: Jack
- // input by: Erkekjetter
- // input by: DxGx
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: trim(' Kevin van Zonneveld ')
- // returns 1: 'Kevin van Zonneveld'
- // example 2: trim('Hello World', 'Hdle')
- // returns 2: 'o Wor'
- // example 3: trim(16, 1)
- // returns 3: '6'
-
- var whitespace = [' ', '\n', '\r', '\t', '\f', '\x0b', '\xa0', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', '\u200B', '\u2028', '\u2029', '\u3000'].join('');
- var l = 0;
- var i = 0;
- str += '';
-
- if (charlist) {
- whitespace = (charlist + '').replace(/([[\]().?/*{}+$^:])/g, '$1');
- }
-
- l = str.length;
- for (i = 0; i < l; i++) {
- if (whitespace.indexOf(str.charAt(i)) === -1) {
- str = str.substring(i);
- break;
- }
- }
-
- l = str.length;
- for (i = l - 1; i >= 0; i--) {
- if (whitespace.indexOf(str.charAt(i)) === -1) {
- str = str.substring(0, i + 1);
- break;
- }
- }
-
- return whitespace.indexOf(str.charAt(0)) === -1 ? str : '';
-};
-//# sourceMappingURL=trim.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/trim.js.map b/node_modules/locutus/php/strings/trim.js.map
deleted file mode 100644
index 9d1638e..0000000
--- a/node_modules/locutus/php/strings/trim.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/trim.js"],"names":["module","exports","trim","str","charlist","whitespace","join","l","i","replace","length","indexOf","charAt","substring"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoBC,QAApB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,aAAa,CACf,GADe,EAEf,IAFe,EAGf,IAHe,EAIf,IAJe,EAKf,IALe,EAMf,MANe,EAOf,MAPe,EAQf,QARe,EASf,QATe,EAUf,QAVe,EAWf,QAXe,EAYf,QAZe,EAaf,QAbe,EAcf,QAde,EAef,QAfe,EAgBf,QAhBe,EAiBf,QAjBe,EAkBf,QAlBe,EAmBf,QAnBe,EAoBf,QApBe,EAqBf,QArBe,EAsBf,QAtBe,EAuBfC,IAvBe,CAuBV,EAvBU,CAAjB;AAwBA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACAL,SAAO,EAAP;;AAEA,MAAIC,QAAJ,EAAc;AACZC,iBAAa,CAACD,WAAW,EAAZ,EAAgBK,OAAhB,CAAwB,sBAAxB,EAAgD,IAAhD,CAAb;AACD;;AAEDF,MAAIJ,IAAIO,MAAR;AACA,OAAKF,IAAI,CAAT,EAAYA,IAAID,CAAhB,EAAmBC,GAAnB,EAAwB;AACtB,QAAIH,WAAWM,OAAX,CAAmBR,IAAIS,MAAJ,CAAWJ,CAAX,CAAnB,MAAsC,CAAC,CAA3C,EAA8C;AAC5CL,YAAMA,IAAIU,SAAJ,CAAcL,CAAd,CAAN;AACA;AACD;AACF;;AAEDD,MAAIJ,IAAIO,MAAR;AACA,OAAKF,IAAID,IAAI,CAAb,EAAgBC,KAAK,CAArB,EAAwBA,GAAxB,EAA6B;AAC3B,QAAIH,WAAWM,OAAX,CAAmBR,IAAIS,MAAJ,CAAWJ,CAAX,CAAnB,MAAsC,CAAC,CAA3C,EAA8C;AAC5CL,YAAMA,IAAIU,SAAJ,CAAc,CAAd,EAAiBL,IAAI,CAArB,CAAN;AACA;AACD;AACF;;AAED,SAAOH,WAAWM,OAAX,CAAmBR,IAAIS,MAAJ,CAAW,CAAX,CAAnB,MAAsC,CAAC,CAAvC,GAA2CT,GAA3C,GAAiD,EAAxD;AACD,CAnED","file":"trim.js","sourcesContent":["module.exports = function trim (str, charlist) {\n // discuss at: http://locutus.io/php/trim/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: mdsjack (http://www.mdsjack.bo.it)\n // improved by: Alexander Ermolaev (http://snippets.dzone.com/user/AlexanderErmolaev)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Steven Levithan (http://blog.stevenlevithan.com)\n // improved by: Jack\n // input by: Erkekjetter\n // input by: DxGx\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // example 1: trim(' Kevin van Zonneveld ')\n // returns 1: 'Kevin van Zonneveld'\n // example 2: trim('Hello World', 'Hdle')\n // returns 2: 'o Wor'\n // example 3: trim(16, 1)\n // returns 3: '6'\n\n var whitespace = [\n ' ',\n '\\n',\n '\\r',\n '\\t',\n '\\f',\n '\\x0b',\n '\\xa0',\n '\\u2000',\n '\\u2001',\n '\\u2002',\n '\\u2003',\n '\\u2004',\n '\\u2005',\n '\\u2006',\n '\\u2007',\n '\\u2008',\n '\\u2009',\n '\\u200a',\n '\\u200b',\n '\\u2028',\n '\\u2029',\n '\\u3000'\n ].join('')\n var l = 0\n var i = 0\n str += ''\n\n if (charlist) {\n whitespace = (charlist + '').replace(/([[\\]().?/*{}+$^:])/g, '$1')\n }\n\n l = str.length\n for (i = 0; i < l; i++) {\n if (whitespace.indexOf(str.charAt(i)) === -1) {\n str = str.substring(i)\n break\n }\n }\n\n l = str.length\n for (i = l - 1; i >= 0; i--) {\n if (whitespace.indexOf(str.charAt(i)) === -1) {\n str = str.substring(0, i + 1)\n break\n }\n }\n\n return whitespace.indexOf(str.charAt(0)) === -1 ? str : ''\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ucfirst.js b/node_modules/locutus/php/strings/ucfirst.js
deleted file mode 100644
index 595f980..0000000
--- a/node_modules/locutus/php/strings/ucfirst.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function ucfirst(str) {
- // discuss at: http://locutus.io/php/ucfirst/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // example 1: ucfirst('kevin van zonneveld')
- // returns 1: 'Kevin van zonneveld'
-
- str += '';
- var f = str.charAt(0).toUpperCase();
- return f + str.substr(1);
-};
-//# sourceMappingURL=ucfirst.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ucfirst.js.map b/node_modules/locutus/php/strings/ucfirst.js.map
deleted file mode 100644
index 6bf6997..0000000
--- a/node_modules/locutus/php/strings/ucfirst.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/ucfirst.js"],"names":["module","exports","ucfirst","str","f","charAt","toUpperCase","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEAA,SAAO,EAAP;AACA,MAAIC,IAAID,IAAIE,MAAJ,CAAW,CAAX,EACLC,WADK,EAAR;AAEA,SAAOF,IAAID,IAAII,MAAJ,CAAW,CAAX,CAAX;AACD,CAZD","file":"ucfirst.js","sourcesContent":["module.exports = function ucfirst (str) {\n // discuss at: http://locutus.io/php/ucfirst/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // example 1: ucfirst('kevin van zonneveld')\n // returns 1: 'Kevin van zonneveld'\n\n str += ''\n var f = str.charAt(0)\n .toUpperCase()\n return f + str.substr(1)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ucwords.js b/node_modules/locutus/php/strings/ucwords.js
deleted file mode 100644
index 7d76e15..0000000
--- a/node_modules/locutus/php/strings/ucwords.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function ucwords(str) {
- // discuss at: http://locutus.io/php/ucwords/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // improved by: Waldo Malqui Silva (http://waldo.malqui.info)
- // improved by: Robin
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Cetvertacov Alexandr (https://github.com/cetver)
- // input by: James (http://www.james-bell.co.uk/)
- // example 1: ucwords('kevin van zonneveld')
- // returns 1: 'Kevin Van Zonneveld'
- // example 2: ucwords('HELLO WORLD')
- // returns 2: 'HELLO WORLD'
- // example 3: ucwords('у мэри был маленький ягненок и она его очень любила')
- // returns 3: 'У Мэри Был Маленький Ягненок И Она Его Очень Любила'
- // example 4: ucwords('τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός')
- // returns 4: 'Τάχιστη Αλώπηξ Βαφής Ψημένη Γη, Δρασκελίζει Υπέρ Νωθρού Κυνός'
-
- return (str + '').replace(/^(.)|\s+(.)/g, function ($1) {
- return $1.toUpperCase();
- });
-};
-//# sourceMappingURL=ucwords.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/ucwords.js.map b/node_modules/locutus/php/strings/ucwords.js.map
deleted file mode 100644
index 0e34ff0..0000000
--- a/node_modules/locutus/php/strings/ucwords.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/ucwords.js"],"names":["module","exports","ucwords","str","replace","$1","toUpperCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,GAAlB,EAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,MAAM,EAAP,EACJC,OADI,CACI,cADJ,EACoB,UAAUC,EAAV,EAAc;AACrC,WAAOA,GAAGC,WAAH,EAAP;AACD,GAHI,CAAP;AAID,CAtBD","file":"ucwords.js","sourcesContent":["module.exports = function ucwords (str) {\n // discuss at: http://locutus.io/php/ucwords/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // improved by: Waldo Malqui Silva (http://waldo.malqui.info)\n // improved by: Robin\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Cetvertacov Alexandr (https://github.com/cetver)\n // input by: James (http://www.james-bell.co.uk/)\n // example 1: ucwords('kevin van zonneveld')\n // returns 1: 'Kevin Van Zonneveld'\n // example 2: ucwords('HELLO WORLD')\n // returns 2: 'HELLO WORLD'\n // example 3: ucwords('у мэри был маленький ягненок и она его очень любила')\n // returns 3: 'У Мэри Был Маленький Ягненок И Она Его Очень Любила'\n // example 4: ucwords('τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός')\n // returns 4: 'Τάχιστη Αλώπηξ Βαφής Ψημένη Γη, Δρασκελίζει Υπέρ Νωθρού Κυνός'\n\n return (str + '')\n .replace(/^(.)|\\s+(.)/g, function ($1) {\n return $1.toUpperCase()\n })\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/vprintf.js b/node_modules/locutus/php/strings/vprintf.js
deleted file mode 100644
index 52a0b9e..0000000
--- a/node_modules/locutus/php/strings/vprintf.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function vprintf(format, args) {
- // discuss at: http://locutus.io/php/vprintf/
- // original by: Ash Searle (http://hexmen.com/blog/)
- // improved by: Michael White (http://getsprink.com)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // example 1: vprintf("%01.2f", 123.1)
- // returns 1: 6
-
- var sprintf = require('../strings/sprintf');
- var echo = require('../strings/echo');
- var ret = sprintf.apply(this, [format].concat(args));
- echo(ret);
-
- return ret.length;
-};
-//# sourceMappingURL=vprintf.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/vprintf.js.map b/node_modules/locutus/php/strings/vprintf.js.map
deleted file mode 100644
index cf3393d..0000000
--- a/node_modules/locutus/php/strings/vprintf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/vprintf.js"],"names":["module","exports","vprintf","format","args","sprintf","require","echo","ret","apply","concat","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,MAAlB,EAA0BC,IAA1B,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,oBAAR,CAAd;AACA,MAAIC,OAAOD,QAAQ,iBAAR,CAAX;AACA,MAAIE,MAAMH,QAAQI,KAAR,CAAc,IAAd,EAAoB,CAACN,MAAD,EAASO,MAAT,CAAgBN,IAAhB,CAApB,CAAV;AACAG,OAAKC,GAAL;;AAEA,SAAOA,IAAIG,MAAX;AACD,CAdD","file":"vprintf.js","sourcesContent":["module.exports = function vprintf (format, args) {\n // discuss at: http://locutus.io/php/vprintf/\n // original by: Ash Searle (http://hexmen.com/blog/)\n // improved by: Michael White (http://getsprink.com)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // example 1: vprintf(\"%01.2f\", 123.1)\n // returns 1: 6\n\n var sprintf = require('../strings/sprintf')\n var echo = require('../strings/echo')\n var ret = sprintf.apply(this, [format].concat(args))\n echo(ret)\n\n return ret.length\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/vsprintf.js b/node_modules/locutus/php/strings/vsprintf.js
deleted file mode 100644
index a44af5e..0000000
--- a/node_modules/locutus/php/strings/vsprintf.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function vsprintf(format, args) {
- // discuss at: http://locutus.io/php/vsprintf/
- // original by: ejsanders
- // example 1: vsprintf('%04d-%02d-%02d', [1988, 8, 1])
- // returns 1: '1988-08-01'
-
- var sprintf = require('../strings/sprintf');
-
- return sprintf.apply(this, [format].concat(args));
-};
-//# sourceMappingURL=vsprintf.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/vsprintf.js.map b/node_modules/locutus/php/strings/vsprintf.js.map
deleted file mode 100644
index d9a4be1..0000000
--- a/node_modules/locutus/php/strings/vsprintf.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/vsprintf.js"],"names":["module","exports","vsprintf","format","args","sprintf","require","apply","concat"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,MAAnB,EAA2BC,IAA3B,EAAiC;AAChD;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,oBAAR,CAAd;;AAEA,SAAOD,QAAQE,KAAR,CAAc,IAAd,EAAoB,CAACJ,MAAD,EAASK,MAAT,CAAgBJ,IAAhB,CAApB,CAAP;AACD,CATD","file":"vsprintf.js","sourcesContent":["module.exports = function vsprintf (format, args) {\n // discuss at: http://locutus.io/php/vsprintf/\n // original by: ejsanders\n // example 1: vsprintf('%04d-%02d-%02d', [1988, 8, 1])\n // returns 1: '1988-08-01'\n\n var sprintf = require('../strings/sprintf')\n\n return sprintf.apply(this, [format].concat(args))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/wordwrap.js b/node_modules/locutus/php/strings/wordwrap.js
deleted file mode 100644
index b0f4980..0000000
--- a/node_modules/locutus/php/strings/wordwrap.js
+++ /dev/null
@@ -1,93 +0,0 @@
-'use strict';
-
-module.exports = function wordwrap(str, intWidth, strBreak, cut) {
- // discuss at: http://locutus.io/php/wordwrap/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // improved by: Nick Callen
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Sakimori
- // revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // bugfixed by: Michael Grier
- // bugfixed by: Feras ALHAEK
- // improved by: Rafał Kukawski (http://kukawski.net)
- // example 1: wordwrap('Kevin van Zonneveld', 6, '|', true)
- // returns 1: 'Kevin|van|Zonnev|eld'
- // example 2: wordwrap('The quick brown fox jumped over the lazy dog.', 20, '<br />\n')
- // returns 2: 'The quick brown fox<br />\njumped over the lazy<br />\ndog.'
- // example 3: wordwrap('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.')
- // returns 3: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea\ncommodo consequat.'
-
- intWidth = arguments.length >= 2 ? +intWidth : 75;
- strBreak = arguments.length >= 3 ? '' + strBreak : '\n';
- cut = arguments.length >= 4 ? !!cut : false;
-
- var i, j, line;
-
- str += '';
-
- if (intWidth < 1) {
- return str;
- }
-
- var reLineBreaks = /\r\n|\n|\r/;
- var reBeginningUntilFirstWhitespace = /^\S*/;
- var reLastCharsWithOptionalTrailingWhitespace = /\S*(\s)?$/;
-
- var lines = str.split(reLineBreaks);
- var l = lines.length;
- var match;
-
- // for each line of text
- for (i = 0; i < l; lines[i++] += line) {
- line = lines[i];
- lines[i] = '';
-
- while (line.length > intWidth) {
- // get slice of length one char above limit
- var slice = line.slice(0, intWidth + 1);
-
- // remove leading whitespace from rest of line to parse
- var ltrim = 0;
- // remove trailing whitespace from new line content
- var rtrim = 0;
-
- match = slice.match(reLastCharsWithOptionalTrailingWhitespace);
-
- // if the slice ends with whitespace
- if (match[1]) {
- // then perfect moment to cut the line
- j = intWidth;
- ltrim = 1;
- } else {
- // otherwise cut at previous whitespace
- j = slice.length - match[0].length;
-
- if (j) {
- rtrim = 1;
- }
-
- // but if there is no previous whitespace
- // and cut is forced
- // cut just at the defined limit
- if (!j && cut && intWidth) {
- j = intWidth;
- }
-
- // if cut wasn't forced
- // cut at next possible whitespace after the limit
- if (!j) {
- var charsUntilNextWhitespace = (line.slice(intWidth).match(reBeginningUntilFirstWhitespace) || [''])[0];
-
- j = slice.length + charsUntilNextWhitespace.length;
- }
- }
-
- lines[i] += line.slice(0, j - rtrim);
- line = line.slice(j + ltrim);
- lines[i] += line.length ? strBreak : '';
- }
- }
-
- return lines.join('\n');
-};
-//# sourceMappingURL=wordwrap.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/strings/wordwrap.js.map b/node_modules/locutus/php/strings/wordwrap.js.map
deleted file mode 100644
index 936fe1f..0000000
--- a/node_modules/locutus/php/strings/wordwrap.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/strings/wordwrap.js"],"names":["module","exports","wordwrap","str","intWidth","strBreak","cut","arguments","length","i","j","line","reLineBreaks","reBeginningUntilFirstWhitespace","reLastCharsWithOptionalTrailingWhitespace","lines","split","l","match","slice","ltrim","rtrim","charsUntilNextWhitespace","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,GAAnB,EAAwBC,QAAxB,EAAkCC,QAAlC,EAA4CC,GAA5C,EAAiD;AA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O;AACLW,kBAAQ,CAAR;AACD;;AAED;AACA;AACA;AACA,YAAI,CAACX,CAAD,IAAMJ,GAAN,IAAaF,QAAjB,EAA2B;AACzBM,cAAIN,QAAJ;AACD;;AAED;AACA;AACA,YAAI,CAACM,CAAL,EAAQ;AACN,cAAIY,2BAA2B,CAACX,KAAKQ,KAAL,CAAWf,QAAX,EAAqBc,KAArB,CAA2BL,+BAA3B,KAA+D,CAAC,EAAD,CAAhE,EAAsE,CAAtE,CAA/B;;AAEAH,cAAIS,MAAMX,MAAN,GAAec,yBAAyBd,MAA5C;AACD;AACF;;AAEDO,YAAMN,CAAN,KAAYE,KAAKQ,KAAL,CAAW,CAAX,EAAcT,IAAIW,KAAlB,CAAZ;AACAV,aAAOA,KAAKQ,KAAL,CAAWT,IAAIU,KAAf,CAAP;AACAL,YAAMN,CAAN,KAAYE,KAAKH,MAAL,GAAcH,QAAd,GAAyB,EAArC;AACD;AACF;;AAED,SAAOU,MAAMQ,IAAN,CAAW,IAAX,CAAP;AACD,CAzFD","file":"wordwrap.js","sourcesContent":["module.exports = function wordwrap (str, intWidth, strBreak, cut) {\n // discuss at: http://locutus.io/php/wordwrap/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // improved by: Nick Callen\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Sakimori\n // revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // bugfixed by: Michael Grier\n // bugfixed by: Feras ALHAEK\n // improved by: Rafał Kukawski (http://kukawski.net)\n // example 1: wordwrap('Kevin van Zonneveld', 6, '|', true)\n // returns 1: 'Kevin|van|Zonnev|eld'\n // example 2: wordwrap('The quick brown fox jumped over the lazy dog.', 20, '<br />\\n')\n // returns 2: 'The quick brown fox<br />\\njumped over the lazy<br />\\ndog.'\n // example 3: wordwrap('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.')\n // returns 3: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim\\nveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea\\ncommodo consequat.'\n\n intWidth = arguments.length >= 2 ? +intWidth : 75\n strBreak = arguments.length >= 3 ? '' + strBreak : '\\n'\n cut = arguments.length >= 4 ? !!cut : false\n\n var i, j, line\n\n str += ''\n\n if (intWidth < 1) {\n return str\n }\n\n var reLineBreaks = /\\r\\n|\\n|\\r/\n var reBeginningUntilFirstWhitespace = /^\\S*/\n var reLastCharsWithOptionalTrailingWhitespace = /\\S*(\\s)?$/\n\n var lines = str.split(reLineBreaks)\n var l = lines.length\n var match\n\n // for each line of text\n for (i = 0; i < l; lines[i++] += line) {\n line = lines[i]\n lines[i] = ''\n\n while (line.length > intWidth) {\n // get slice of length one char above limit\n var slice = line.slice(0, intWidth + 1)\n\n // remove leading whitespace from rest of line to parse\n var ltrim = 0\n // remove trailing whitespace from new line content\n var rtrim = 0\n\n match = slice.match(reLastCharsWithOptionalTrailingWhitespace)\n\n // if the slice ends with whitespace\n if (match[1]) {\n // then perfect moment to cut the line\n j = intWidth\n ltrim = 1\n } else {\n // otherwise cut at previous whitespace\n j = slice.length - match[0].length\n\n if (j) {\n rtrim = 1\n }\n\n // but if there is no previous whitespace\n // and cut is forced\n // cut just at the defined limit\n if (!j && cut && intWidth) {\n j = intWidth\n }\n\n // if cut wasn't forced\n // cut at next possible whitespace after the limit\n if (!j) {\n var charsUntilNextWhitespace = (line.slice(intWidth).match(reBeginningUntilFirstWhitespace) || [''])[0]\n\n j = slice.length + charsUntilNextWhitespace.length\n }\n }\n\n lines[i] += line.slice(0, j - rtrim)\n line = line.slice(j + ltrim)\n lines[i] += line.length ? strBreak : ''\n }\n }\n\n return lines.join('\\n')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/base64_decode.js b/node_modules/locutus/php/url/base64_decode.js
deleted file mode 100644
index a39a50a..0000000
--- a/node_modules/locutus/php/url/base64_decode.js
+++ /dev/null
@@ -1,87 +0,0 @@
-'use strict';
-
-module.exports = function base64_decode(encodedData) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/base64_decode/
- // original by: Tyler Akins (http://rumkin.com)
- // improved by: Thunder.m
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Aman Gupta
- // input by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Pellentesque Malesuada
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Indigo744
- // example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==')
- // returns 1: 'Kevin van Zonneveld'
- // example 2: base64_decode('YQ==')
- // returns 2: 'a'
- // example 3: base64_decode('4pyTIMOgIGxhIG1vZGU=')
- // returns 3: '✓ à la mode'
-
- // decodeUTF8string()
- // Internal function to decode properly UTF8 string
- // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
- var decodeUTF8string = function decodeUTF8string(str) {
- // Going backwards: from bytestream, to percent-encoding, to original string.
- return decodeURIComponent(str.split('').map(function (c) {
- return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
- }).join(''));
- };
-
- if (typeof window !== 'undefined') {
- if (typeof window.atob !== 'undefined') {
- return decodeUTF8string(window.atob(encodedData));
- }
- } else {
- return new Buffer(encodedData, 'base64').toString('utf-8');
- }
-
- var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- var o1;
- var o2;
- var o3;
- var h1;
- var h2;
- var h3;
- var h4;
- var bits;
- var i = 0;
- var ac = 0;
- var dec = '';
- var tmpArr = [];
-
- if (!encodedData) {
- return encodedData;
- }
-
- encodedData += '';
-
- do {
- // unpack four hexets into three octets using index points in b64
- h1 = b64.indexOf(encodedData.charAt(i++));
- h2 = b64.indexOf(encodedData.charAt(i++));
- h3 = b64.indexOf(encodedData.charAt(i++));
- h4 = b64.indexOf(encodedData.charAt(i++));
-
- bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
-
- o1 = bits >> 16 & 0xff;
- o2 = bits >> 8 & 0xff;
- o3 = bits & 0xff;
-
- if (h3 === 64) {
- tmpArr[ac++] = String.fromCharCode(o1);
- } else if (h4 === 64) {
- tmpArr[ac++] = String.fromCharCode(o1, o2);
- } else {
- tmpArr[ac++] = String.fromCharCode(o1, o2, o3);
- }
- } while (i < encodedData.length);
-
- dec = tmpArr.join('');
-
- return decodeUTF8string(dec.replace(/\0+$/, ''));
-};
-//# sourceMappingURL=base64_decode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/base64_decode.js.map b/node_modules/locutus/php/url/base64_decode.js.map
deleted file mode 100644
index a5109e2..0000000
--- a/node_modules/locutus/php/url/base64_decode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/base64_decode.js"],"names":["module","exports","base64_decode","encodedData","decodeUTF8string","str","decodeURIComponent","split","map","c","charCodeAt","toString","slice","join","window","atob","Buffer","b64","o1","o2","o3","h1","h2","h3","h4","bits","i","ac","dec","tmpArr","indexOf","charAt","String","fromCharCode","length","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,WAAxB,EAAqC;AAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAIC,mBAAmB,SAAnBA,gBAAmB,CAAUC,GAAV,EAAe;AACpC;AACA,WAAOC,mBAAmBD,IAAIE,KAAJ,CAAU,EAAV,EAAcC,GAAd,CAAkB,UAAUC,CAAV,EAAa;AACvD,aAAO,MAAM,CAAC,OAAOA,EAAEC,UAA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AEAN,SAAKO,QAAQ,EAAR,GAAa,IAAlB;AACAN,SAAKM,QAAQ,CAAR,GAAY,IAAjB;AACAL,SAAKK,OAAO,IAAZ;;AAEA,QAAIF,OAAO,EAAX,EAAe;AACbM,aAAOF,IAAP,IAAeK,OAAOC,YAAP,CAAoBf,EAApB,CAAf;AACD,KAFD,MAEO,IAAIM,OAAO,EAAX,EAAe;AACpBK,aAAOF,IAAP,IAAeK,OAAOC,YAAP,CAAoBf,EAApB,EAAwBC,EAAxB,CAAf;AACD,KAFM,MAEA;AACLU,aAAOF,IAAP,IAAeK,OAAOC,YAAP,CAAoBf,EAApB,EAAwBC,EAAxB,EAA4BC,EAA5B,CAAf;AACD;AACF,GApBD,QAoBSM,IAAIvB,YAAY+B,MApBzB;;AAsBAN,QAAMC,OAAOhB,IAAP,CAAY,EAAZ,CAAN;;AAEA,SAAOT,iBAAiBwB,IAAIO,OAAJ,CAAY,MAAZ,EAAoB,EAApB,CAAjB,CAAP;AACD,CAlFD","file":"base64_decode.js","sourcesContent":["module.exports = function base64_decode (encodedData) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/base64_decode/\n // original by: Tyler Akins (http://rumkin.com)\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Aman Gupta\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Pellentesque Malesuada\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Indigo744\n // example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==')\n // returns 1: 'Kevin van Zonneveld'\n // example 2: base64_decode('YQ==')\n // returns 2: 'a'\n // example 3: base64_decode('4pyTIMOgIGxhIG1vZGU=')\n // returns 3: '✓ à la mode'\n\n // decodeUTF8string()\n // Internal function to decode properly UTF8 string\n // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n var decodeUTF8string = function (str) {\n // Going backwards: from bytestream, to percent-encoding, to original string.\n return decodeURIComponent(str.split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n }\n\n if (typeof window !== 'undefined') {\n if (typeof window.atob !== 'undefined') {\n return decodeUTF8string(window.atob(encodedData))\n }\n } else {\n return new Buffer(encodedData, 'base64').toString('utf-8')\n }\n\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n var o1\n var o2\n var o3\n var h1\n var h2\n var h3\n var h4\n var bits\n var i = 0\n var ac = 0\n var dec = ''\n var tmpArr = []\n\n if (!encodedData) {\n return encodedData\n }\n\n encodedData += ''\n\n do {\n // unpack four hexets into three octets using index points in b64\n h1 = b64.indexOf(encodedData.charAt(i++))\n h2 = b64.indexOf(encodedData.charAt(i++))\n h3 = b64.indexOf(encodedData.charAt(i++))\n h4 = b64.indexOf(encodedData.charAt(i++))\n\n bits = h1 << 18 | h2 << 12 | h3 << 6 | h4\n\n o1 = bits >> 16 & 0xff\n o2 = bits >> 8 & 0xff\n o3 = bits & 0xff\n\n if (h3 === 64) {\n tmpArr[ac++] = String.fromCharCode(o1)\n } else if (h4 === 64) {\n tmpArr[ac++] = String.fromCharCode(o1, o2)\n } else {\n tmpArr[ac++] = String.fromCharCode(o1, o2, o3)\n }\n } while (i < encodedData.length)\n\n dec = tmpArr.join('')\n\n return decodeUTF8string(dec.replace(/\\0+$/, ''))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/base64_encode.js b/node_modules/locutus/php/url/base64_encode.js
deleted file mode 100644
index 5512a3e..0000000
--- a/node_modules/locutus/php/url/base64_encode.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict';
-
-module.exports = function base64_encode(stringToEncode) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/base64_encode/
- // original by: Tyler Akins (http://rumkin.com)
- // improved by: Bayron Guevara
- // improved by: Thunder.m
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // bugfixed by: Pellentesque Malesuada
- // improved by: Indigo744
- // example 1: base64_encode('Kevin van Zonneveld')
- // returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='
- // example 2: base64_encode('a')
- // returns 2: 'YQ=='
- // example 3: base64_encode('✓ à la mode')
- // returns 3: '4pyTIMOgIGxhIG1vZGU='
-
- // encodeUTF8string()
- // Internal function to encode properly UTF8 string
- // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
- var encodeUTF8string = function encodeUTF8string(str) {
- // first we use encodeURIComponent to get percent-encoded UTF-8,
- // then we convert the percent encodings into raw bytes which
- // can be fed into the base64 encoding algorithm.
- return encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function toSolidBytes(match, p1) {
- return String.fromCharCode('0x' + p1);
- });
- };
-
- if (typeof window !== 'undefined') {
- if (typeof window.btoa !== 'undefined') {
- return window.btoa(encodeUTF8string(stringToEncode));
- }
- } else {
- return new Buffer(stringToEncode).toString('base64');
- }
-
- var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- var o1;
- var o2;
- var o3;
- var h1;
- var h2;
- var h3;
- var h4;
- var bits;
- var i = 0;
- var ac = 0;
- var enc = '';
- var tmpArr = [];
-
- if (!stringToEncode) {
- return stringToEncode;
- }
-
- stringToEncode = encodeUTF8string(stringToEncode);
-
- do {
- // pack three octets into four hexets
- o1 = stringToEncode.charCodeAt(i++);
- o2 = stringToEncode.charCodeAt(i++);
- o3 = stringToEncode.charCodeAt(i++);
-
- bits = o1 << 16 | o2 << 8 | o3;
-
- h1 = bits >> 18 & 0x3f;
- h2 = bits >> 12 & 0x3f;
- h3 = bits >> 6 & 0x3f;
- h4 = bits & 0x3f;
-
- // use hexets to index into b64, and append result to encoded string
- tmpArr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
- } while (i < stringToEncode.length);
-
- enc = tmpArr.join('');
-
- var r = stringToEncode.length % 3;
-
- return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);
-};
-//# sourceMappingURL=base64_encode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/base64_encode.js.map b/node_modules/locutus/php/url/base64_encode.js.map
deleted file mode 100644
index c7e6354..0000000
--- a/node_modules/locutus/php/url/base64_encode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/base64_encode.js"],"names":["module","exports","base64_encode","stringToEncode","encodeUTF8string","str","encodeURIComponent","replace","toSolidBytes","match","p1","String","fromCharCode","window","btoa","Buffer","toString","b64","o1","o2","o3","h1","h2","h3","h4","bits","i","ac","enc","tmpArr","charCodeAt","charAt","length","join","r","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,cAAxB,EAAwC;AAAE;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAIC,mBAAmB,SAAnBA,gBAAmB,CAAUC,GAAV,EAAe;AACpC;AACA;AACA;AACA,WAAOC,mBAAmBD,GAAnB,EAAwBE,OAAxB,CAAgC,iBAAhC,EACL,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,EAA9B,EAAkC;AAChC,aAAOC,OAAOC,YAAP,CAAoB,OAAOF,EAA3B,CAAP;AACD,KAHI,CAAP;AAID,GARD;;AAUA,MAAI,OAAOG,MAAP,KAAkB,WAAtB,EAAmC;AACjC,QAAI,OAAOA,OAAOC,IAAd,KAAuB,WAA3B,EAAwC;AACtC,aAAOD,OAAOC,IAAP,CAAYV,iBAAiBD,cAAjB,CAAZ,CAAP;AACD;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AJ,CAAU,CAAV,EAAaD,IAAI,CAAjB,CAAJ,GAA0BN,GAA3B,IAAkC,MAAMO,KAAN,CAAYD,KAAK,CAAjB,CAAzC;AACD,CAhFD","file":"base64_encode.js","sourcesContent":["module.exports = function base64_encode (stringToEncode) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/base64_encode/\n // original by: Tyler Akins (http://rumkin.com)\n // improved by: Bayron Guevara\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // bugfixed by: Pellentesque Malesuada\n // improved by: Indigo744\n // example 1: base64_encode('Kevin van Zonneveld')\n // returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='\n // example 2: base64_encode('a')\n // returns 2: 'YQ=='\n // example 3: base64_encode('✓ à la mode')\n // returns 3: '4pyTIMOgIGxhIG1vZGU='\n\n // encodeUTF8string()\n // Internal function to encode properly UTF8 string\n // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n var encodeUTF8string = function (str) {\n // first we use encodeURIComponent to get percent-encoded UTF-8,\n // then we convert the percent encodings into raw bytes which\n // can be fed into the base64 encoding algorithm.\n return encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\n function toSolidBytes (match, p1) {\n return String.fromCharCode('0x' + p1)\n })\n }\n\n if (typeof window !== 'undefined') {\n if (typeof window.btoa !== 'undefined') {\n return window.btoa(encodeUTF8string(stringToEncode))\n }\n } else {\n return new Buffer(stringToEncode).toString('base64')\n }\n\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n var o1\n var o2\n var o3\n var h1\n var h2\n var h3\n var h4\n var bits\n var i = 0\n var ac = 0\n var enc = ''\n var tmpArr = []\n\n if (!stringToEncode) {\n return stringToEncode\n }\n\n stringToEncode = encodeUTF8string(stringToEncode)\n\n do {\n // pack three octets into four hexets\n o1 = stringToEncode.charCodeAt(i++)\n o2 = stringToEncode.charCodeAt(i++)\n o3 = stringToEncode.charCodeAt(i++)\n\n bits = o1 << 16 | o2 << 8 | o3\n\n h1 = bits >> 18 & 0x3f\n h2 = bits >> 12 & 0x3f\n h3 = bits >> 6 & 0x3f\n h4 = bits & 0x3f\n\n // use hexets to index into b64, and append result to encoded string\n tmpArr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4)\n } while (i < stringToEncode.length)\n\n enc = tmpArr.join('')\n\n var r = stringToEncode.length % 3\n\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/http_build_query.js b/node_modules/locutus/php/url/http_build_query.js
deleted file mode 100644
index be91a79..0000000
--- a/node_modules/locutus/php/url/http_build_query.js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function http_build_query(formdata, numericPrefix, argSeparator, encType) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/http_build_query/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Legaev Andrey
- // improved by: Michael White (http://getsprink.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // revised by: stag019
- // input by: Dreamer
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/)
- // improved by: Will Rowe
- // note 1: If the value is null, key and value are skipped in the
- // note 1: http_build_query of PHP while in locutus they are not.
- // example 1: http_build_query({foo: 'bar', php: 'hypertext processor', baz: 'boom', cow: 'milk'}, '', '&amp;')
- // returns 1: 'foo=bar&amp;php=hypertext+processor&amp;baz=boom&amp;cow=milk'
- // example 2: http_build_query({'php': 'hypertext processor', 0: 'foo', 1: 'bar', 2: 'baz', 3: 'boom', 'cow': 'milk'}, 'myvar_')
- // returns 2: 'myvar_0=foo&myvar_1=bar&myvar_2=baz&myvar_3=boom&php=hypertext+processor&cow=milk'
- // example 3: http_build_query({foo: 'bar', php: 'hypertext processor', baz: 'boom', cow: 'milk'}, '', '&amp;', 'PHP_QUERY_RFC3986')
- // returns 3: 'foo=bar&amp;php=hypertext%20processor&amp;baz=boom&amp;cow=milk'
-
- var encodeFunc;
-
- switch (encType) {
- case 'PHP_QUERY_RFC3986':
- encodeFunc = require('../url/rawurlencode');
- break;
-
- case 'PHP_QUERY_RFC1738':
- default:
- encodeFunc = require('../url/urlencode');
- break;
- }
-
- var value;
- var key;
- var tmp = [];
-
- var _httpBuildQueryHelper = function _httpBuildQueryHelper(key, val, argSeparator) {
- var k;
- var tmp = [];
- if (val === true) {
- val = '1';
- } else if (val === false) {
- val = '0';
- }
- if (val !== null) {
- if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {
- for (k in val) {
- if (val[k] !== null) {
- tmp.push(_httpBuildQueryHelper(key + '[' + k + ']', val[k], argSeparator));
- }
- }
- return tmp.join(argSeparator);
- } else if (typeof val !== 'function') {
- return encodeFunc(key) + '=' + encodeFunc(val);
- } else {
- throw new Error('There was an error processing for http_build_query().');
- }
- } else {
- return '';
- }
- };
-
- if (!argSeparator) {
- argSeparator = '&';
- }
- for (key in formdata) {
- value = formdata[key];
- if (numericPrefix && !isNaN(key)) {
- key = String(numericPrefix) + key;
- }
- var query = _httpBuildQueryHelper(key, value, argSeparator);
- if (query !== '') {
- tmp.push(query);
- }
- }
-
- return tmp.join(argSeparator);
-};
-//# sourceMappingURL=http_build_query.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/http_build_query.js.map b/node_modules/locutus/php/url/http_build_query.js.map
deleted file mode 100644
index 968708d..0000000
--- a/node_modules/locutus/php/url/http_build_query.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/http_build_query.js"],"names":["module","exports","http_build_query","formdata","numericPrefix","argSeparator","encType","encodeFunc","require","value","key","tmp","_httpBuildQueryHelper","val","k","push","join","Error","isNaN","String","query"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,gBAAT,CAA2BC,QAA3B,EAAqCC,aAArC,EAAoDC,YAApD,EAAkEC,OAAlE,EAA2E;AAAE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAJ;;AAEA,UAAQD,OAAR;AACE,SAAK,mBAAL;AACEC,mBAAaC,QAAQ,qBAAR,CAAb;AACA;;AAEF,SAAK,mBAAL;AACA;AACED,mBAAaC,QAAQ,kBAAR,CAAb;AACA;AARJ;;AAWA,MAAIC,KAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,MAAM,EAAV;;AAEA,MAAIC,wBAAwB,SAAxBA,qBAAwB,CAAUF,GAAV,EAAeG,GAAf,EAAoBR,YAApB,EAAkC;AAC5D,QAAIS,CAAJ;AACA,QAAIH,MAAM,EAAV;AACA,QAAIE,QAAQ,IAAZ,EAAkB;AAChBA,YAAM,GAAN;AACD,KAFD,MAEO,IAAIA,QAAQ,KAAZ,EAAmB;AACxBA,YAAM,GAAN;AACD;AACD,QAAIA,QAAQ,IAAZ,EAAkB;AAChB,UAAI,QAAOA,GAAP,yCAAOA,GAAP,OAAe,QAAnB,EAA6B;AAC3B,aAAKC,CAAL,IAAUD,GAAV,EAAe;AACb,cAAIA,IAAIC,CAAJ,MAAW,IAAf,EAAqB;AACnBH,gBAAII,IAAJ,CAASH,sBAAsBF,MAAM,GAAN,GAAYI,CAAZ,GAAgB,GAAtC,EAA2CD,IAAIC,CAAJ,CAA3C,EAAmDT,YAAnD,CAAT;AACD;AACF;AACD,eAAOM,IAAIK,IAAJ,CAASX,YAAT,CAAP;AACD,OAPD,MAOO,IAAI,OAAOQ,GAAP,KAAe,UAAnB,EAA+B;AACpC,eAAON,WAAWG,GAAX,IAAkB,GAAlB,GAAwBH,WAAWM,GAAX,CAA/B;AACD,OAFM,MAEA;AACL,cAAM,IAAII,KAAJ,CAAU,uDAAV,CAAN;AACD;AACF,KAbD,MAaO;AACL,aAAO,EAAP;AACD;AACF,GAxBD;;AA0BA,MAAI,CAACZ,YAAL,EAAmB;AACjBA,mBAAe,GAAf;AACD;AACD,OAAKK,GAAL,IAAYP,QAAZ,EAAsB;AACpBM,YAAQN,SAASO,GAAT,CAAR;AACA,QAAIN,iBAAiB,CAACc,MAAMR,GAAN,CAAtB,EAAkC;AAChCA,YAAMS,OAAOf,aAAP,IAAwBM,GAA9B;AACD;AACD,QAAIU,QAAQR,sBAAsBF,GAAtB,EAA2BD,KAA3B,EAAkCJ,YAAlC,CAAZ;AACA,QAAIe,UAAU,EAAd,EAAkB;AAChBT,UAAII,IAAJ,CAASK,KAAT;AACD;AACF;;AAED,SAAOT,IAAIK,IAAJ,CAASX,YAAT,CAAP;AACD,CA/ED","file":"http_build_query.js","sourcesContent":["module.exports = function http_build_query (formdata, numericPrefix, argSeparator, encType) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/http_build_query/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Legaev Andrey\n // improved by: Michael White (http://getsprink.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // revised by: stag019\n // input by: Dreamer\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/)\n // improved by: Will Rowe\n // note 1: If the value is null, key and value are skipped in the\n // note 1: http_build_query of PHP while in locutus they are not.\n // example 1: http_build_query({foo: 'bar', php: 'hypertext processor', baz: 'boom', cow: 'milk'}, '', '&amp;')\n // returns 1: 'foo=bar&amp;php=hypertext+processor&amp;baz=boom&amp;cow=milk'\n // example 2: http_build_query({'php': 'hypertext processor', 0: 'foo', 1: 'bar', 2: 'baz', 3: 'boom', 'cow': 'milk'}, 'myvar_')\n // returns 2: 'myvar_0=foo&myvar_1=bar&myvar_2=baz&myvar_3=boom&php=hypertext+processor&cow=milk'\n // example 3: http_build_query({foo: 'bar', php: 'hypertext processor', baz: 'boom', cow: 'milk'}, '', '&amp;', 'PHP_QUERY_RFC3986')\n // returns 3: 'foo=bar&amp;php=hypertext%20processor&amp;baz=boom&amp;cow=milk'\n\n var encodeFunc\n\n switch (encType) {\n case 'PHP_QUERY_RFC3986':\n encodeFunc = require('../url/rawurlencode')\n break\n\n case 'PHP_QUERY_RFC1738':\n default:\n encodeFunc = require('../url/urlencode')\n break\n }\n\n var value\n var key\n var tmp = []\n\n var _httpBuildQueryHelper = function (key, val, argSeparator) {\n var k\n var tmp = []\n if (val === true) {\n val = '1'\n } else if (val === false) {\n val = '0'\n }\n if (val !== null) {\n if (typeof val === 'object') {\n for (k in val) {\n if (val[k] !== null) {\n tmp.push(_httpBuildQueryHelper(key + '[' + k + ']', val[k], argSeparator))\n }\n }\n return tmp.join(argSeparator)\n } else if (typeof val !== 'function') {\n return encodeFunc(key) + '=' + encodeFunc(val)\n } else {\n throw new Error('There was an error processing for http_build_query().')\n }\n } else {\n return ''\n }\n }\n\n if (!argSeparator) {\n argSeparator = '&'\n }\n for (key in formdata) {\n value = formdata[key]\n if (numericPrefix && !isNaN(key)) {\n key = String(numericPrefix) + key\n }\n var query = _httpBuildQueryHelper(key, value, argSeparator)\n if (query !== '') {\n tmp.push(query)\n }\n }\n\n return tmp.join(argSeparator)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/index.js b/node_modules/locutus/php/url/index.js
deleted file mode 100644
index f43e590..0000000
--- a/node_modules/locutus/php/url/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports['base64_decode'] = require('./base64_decode');
-module.exports['base64_encode'] = require('./base64_encode');
-module.exports['http_build_query'] = require('./http_build_query');
-module.exports['parse_url'] = require('./parse_url');
-module.exports['rawurldecode'] = require('./rawurldecode');
-module.exports['rawurlencode'] = require('./rawurlencode');
-module.exports['urldecode'] = require('./urldecode');
-module.exports['urlencode'] = require('./urlencode');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/index.js.map b/node_modules/locutus/php/url/index.js.map
deleted file mode 100644
index eb7aa38..0000000
--- a/node_modules/locutus/php/url/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,eAAf,IAAkCC,QAAQ,iBAAR,CAAlC;AACAF,OAAOC,OAAP,CAAe,eAAf,IAAkCC,QAAQ,iBAAR,CAAlC;AACAF,OAAOC,OAAP,CAAe,kBAAf,IAAqCC,QAAQ,oBAAR,CAArC;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC;AACAF,OAAOC,OAAP,CAAe,cAAf,IAAiCC,QAAQ,gBAAR,CAAjC;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B","file":"index.js","sourcesContent":["module.exports['base64_decode'] = require('./base64_decode')\nmodule.exports['base64_encode'] = require('./base64_encode')\nmodule.exports['http_build_query'] = require('./http_build_query')\nmodule.exports['parse_url'] = require('./parse_url')\nmodule.exports['rawurldecode'] = require('./rawurldecode')\nmodule.exports['rawurlencode'] = require('./rawurlencode')\nmodule.exports['urldecode'] = require('./urldecode')\nmodule.exports['urlencode'] = require('./urlencode')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/parse_url.js b/node_modules/locutus/php/url/parse_url.js
deleted file mode 100644
index e9c977b..0000000
--- a/node_modules/locutus/php/url/parse_url.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-
-module.exports = function parse_url(str, component) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/parse_url/
- // original by: Steven Levithan (http://blog.stevenlevithan.com)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // input by: Lorenzo Pisani
- // input by: Tony
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: original by http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js
- // note 1: blog post at http://blog.stevenlevithan.com/archives/parseuri
- // note 1: demo at http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js
- // note 1: Does not replace invalid characters with '_' as in PHP,
- // note 1: nor does it return false with
- // note 1: a seriously malformed URL.
- // note 1: Besides function name, is essentially the same as parseUri as
- // note 1: well as our allowing
- // note 1: an extra slash after the scheme/protocol (to allow file:/// as in PHP)
- // example 1: parse_url('http://user:pass@host/path?a=v#a')
- // returns 1: {scheme: 'http', host: 'host', user: 'user', pass: 'pass', path: '/path', query: 'a=v', fragment: 'a'}
- // example 2: parse_url('http://en.wikipedia.org/wiki/%22@%22_%28album%29')
- // returns 2: {scheme: 'http', host: 'en.wikipedia.org', path: '/wiki/%22@%22_%28album%29'}
- // example 3: parse_url('https://host.domain.tld/a@b.c/folder')
- // returns 3: {scheme: 'https', host: 'host.domain.tld', path: '/a@b.c/folder'}
- // example 4: parse_url('https://gooduser:secretpassword@www.example.com/a@b.c/folder?foo=bar')
- // returns 4: { scheme: 'https', host: 'www.example.com', path: '/a@b.c/folder', query: 'foo=bar', user: 'gooduser', pass: 'secretpassword' }
-
- var query;
-
- var mode = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.mode') : undefined) || 'php';
-
- var key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'];
-
- // For loose we added one optional slash to post-scheme to catch file:/// (should restrict this)
- var parser = {
- php: new RegExp(['(?:([^:\\/?#]+):)?', '(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?', '()', '(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)'].join('')),
- strict: new RegExp(['(?:([^:\\/?#]+):)?', '(?:\\/\\/((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?', '((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)'].join('')),
- loose: new RegExp(['(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?', '(?:\\/\\/\\/?)?', '((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?)', '(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))', '(?:\\?([^#]*))?(?:#(.*))?)'].join(''))
- };
-
- var m = parser[mode].exec(str);
- var uri = {};
- var i = 14;
-
- while (i--) {
- if (m[i]) {
- uri[key[i]] = m[i];
- }
- }
-
- if (component) {
- return uri[component.replace('PHP_URL_', '').toLowerCase()];
- }
-
- if (mode !== 'php') {
- var name = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.queryKey') : undefined) || 'queryKey';
- parser = /(?:^|&)([^&=]*)=?([^&]*)/g;
- uri[name] = {};
- query = uri[key[12]] || '';
- query.replace(parser, function ($0, $1, $2) {
- if ($1) {
- uri[name][$1] = $2;
- }
- });
- }
-
- delete uri.source;
- return uri;
-};
-//# sourceMappingURL=parse_url.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/parse_url.js.map b/node_modules/locutus/php/url/parse_url.js.map
deleted file mode 100644
index 865fc8f..0000000
--- a/node_modules/locutus/php/url/parse_url.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/parse_url.js"],"names":["module","exports","parse_url","str","component","query","mode","require","undefined","key","parser","php","RegExp","join","strict","loose","m","exec","uri","i","replace","toLowerCase","name","$0","$1","$2","source"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyBC,SAAzB,EAAoC;AAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAJ;;AAEA,MAAIC,OAAO,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,wBAA3B,CAAjC,GAAwFC,SAAzF,KAAuG,KAAlH;;AAEA,MAAIC,MAAM,CACR,QADQ,EAER,QAFQ,EAGR,WAHQ,EAIR,UAJQ,EAKR,MALQ,EAMR,MANQ,EAOR,MAPQ,EAQR,MARQ,EASR,UATQ,EAUR,MAVQ,EAWR,WAXQ,EAYR,MAZQ,EAaR,OAbQ,EAcR,UAdQ,CAAV;;AAiBA;AACA,MAAIC,SAAS;AACXC,SAAK,IAAIC,MAAJ,CAAW,CACd,oBADc,EAEd,gFAFc,EAGd,IAHc,EAId,oEAJc,EAKdC,IALc,CAKT,EALS,CAAX,CADM;AAOXC,YAAQ,IAAIF,MAAJ,CAAW,CACjB,oBADiB,EAEjB,wEAFiB,EAGjB,0DAHiB,EAIjBC,IAJiB,CAIZ,EAJY,CAAX,CAPG;AAYXE,WAAO,IAAIH,MAAJ,CAAW,CAChB,0CADgB,EAEhB,iBAFgB,EAGhB,6DAHgB,EAIhB,wEAJgB,EAKhB,4BALgB,EAMhBC,IANgB,CAMX,EANW,CAAX;AAZI,GAAb;;AAqBA,MAAIG,IAAIN,OAAOJ,IAAP,EAAaW,IAAb,CAAkBd,GAAlB,CAAR;AACA,MAAIe,MAAM,EAAV;AACA,MAAIC,IAAI,EAAR;;AAEA,SAAOA,GAAP,EAAY;AACV,QAAIH,EAAEG,CAAF,CAAJ,EAAU;AACRD,UAAIT,IAAIU,CAAJ,CAAJ,IAAcH,EAAEG,CAAF,CAAd;AACD;AACF;;AAED,MAAIf,SAAJ,EAAe;AACb,WAAOc,IAAId,UAAUgB,OAAV,CAAkB,UAAlB,EAA8B,EAA9B,EAAkCC,WAAlC,EAAJ,CAAP;AACD;;AAED,MAAIf,SAAS,KAAb,EAAoB;AAClB,QAAIgB,OAAO,CAAC,OAAOf,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,4BAA3B,CAAjC,GAA4FC,SAA7F,KAA2G,UAAtH;AACAE,aAAS,2BAAT;AACAQ,QAAII,IAAJ,IAAY,EAAZ;AACAjB,YAAQa,IAAIT,IAAI,EAAJ,CAAJ,KAAgB,EAAxB;AACAJ,UAAMe,OAAN,CAAcV,MAAd,EAAsB,UAAUa,EAAV,EAAcC,EAAd,EAAkBC,EAAlB,EAAsB;AAC1C,UAAID,EAAJ,EAAQ;AACNN,YAAII,IAAJ,EAAUE,EAAV,IAAgBC,EAAhB;AACD;AACF,KAJD;AAKD;;AAED,SAAOP,IAAIQ,MAAX;AACA,SAAOR,GAAP;AACD,CAhGD","file":"parse_url.js","sourcesContent":["module.exports = function parse_url (str, component) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/parse_url/\n // original by: Steven Levithan (http://blog.stevenlevithan.com)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // input by: Lorenzo Pisani\n // input by: Tony\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: original by http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js\n // note 1: blog post at http://blog.stevenlevithan.com/archives/parseuri\n // note 1: demo at http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js\n // note 1: Does not replace invalid characters with '_' as in PHP,\n // note 1: nor does it return false with\n // note 1: a seriously malformed URL.\n // note 1: Besides function name, is essentially the same as parseUri as\n // note 1: well as our allowing\n // note 1: an extra slash after the scheme/protocol (to allow file:/// as in PHP)\n // example 1: parse_url('http://user:pass@host/path?a=v#a')\n // returns 1: {scheme: 'http', host: 'host', user: 'user', pass: 'pass', path: '/path', query: 'a=v', fragment: 'a'}\n // example 2: parse_url('http://en.wikipedia.org/wiki/%22@%22_%28album%29')\n // returns 2: {scheme: 'http', host: 'en.wikipedia.org', path: '/wiki/%22@%22_%28album%29'}\n // example 3: parse_url('https://host.domain.tld/a@b.c/folder')\n // returns 3: {scheme: 'https', host: 'host.domain.tld', path: '/a@b.c/folder'}\n // example 4: parse_url('https://gooduser:secretpassword@www.example.com/a@b.c/folder?foo=bar')\n // returns 4: { scheme: 'https', host: 'www.example.com', path: '/a@b.c/folder', query: 'foo=bar', user: 'gooduser', pass: 'secretpassword' }\n\n var query\n\n var mode = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.mode') : undefined) || 'php'\n\n var key = [\n 'source',\n 'scheme',\n 'authority',\n 'userInfo',\n 'user',\n 'pass',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'fragment'\n ]\n\n // For loose we added one optional slash to post-scheme to catch file:/// (should restrict this)\n var parser = {\n php: new RegExp([\n '(?:([^:\\\\/?#]+):)?',\n '(?:\\\\/\\\\/()(?:(?:()(?:([^:@\\\\/]*):?([^:@\\\\/]*))?@)?([^:\\\\/?#]*)(?::(\\\\d*))?))?',\n '()',\n '(?:(()(?:(?:[^?#\\\\/]*\\\\/)*)()(?:[^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)'\n ].join('')),\n strict: new RegExp([\n '(?:([^:\\\\/?#]+):)?',\n '(?:\\\\/\\\\/((?:(([^:@\\\\/]*):?([^:@\\\\/]*))?@)?([^:\\\\/?#]*)(?::(\\\\d*))?))?',\n '((((?:[^?#\\\\/]*\\\\/)*)([^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)'\n ].join('')),\n loose: new RegExp([\n '(?:(?![^:@]+:[^:@\\\\/]*@)([^:\\\\/?#.]+):)?',\n '(?:\\\\/\\\\/\\\\/?)?',\n '((?:(([^:@\\\\/]*):?([^:@\\\\/]*))?@)?([^:\\\\/?#]*)(?::(\\\\d*))?)',\n '(((\\\\/(?:[^?#](?![^?#\\\\/]*\\\\.[^?#\\\\/.]+(?:[?#]|$)))*\\\\/?)?([^?#\\\\/]*))',\n '(?:\\\\?([^#]*))?(?:#(.*))?)'\n ].join(''))\n }\n\n var m = parser[mode].exec(str)\n var uri = {}\n var i = 14\n\n while (i--) {\n if (m[i]) {\n uri[key[i]] = m[i]\n }\n }\n\n if (component) {\n return uri[component.replace('PHP_URL_', '').toLowerCase()]\n }\n\n if (mode !== 'php') {\n var name = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.queryKey') : undefined) || 'queryKey'\n parser = /(?:^|&)([^&=]*)=?([^&]*)/g\n uri[name] = {}\n query = uri[key[12]] || ''\n query.replace(parser, function ($0, $1, $2) {\n if ($1) {\n uri[name][$1] = $2\n }\n })\n }\n\n delete uri.source\n return uri\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/rawurldecode.js b/node_modules/locutus/php/url/rawurldecode.js
deleted file mode 100644
index d2869cc..0000000
--- a/node_modules/locutus/php/url/rawurldecode.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-module.exports = function rawurldecode(str) {
- // discuss at: http://locutus.io/php/rawurldecode/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: travc
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Ratheous
- // input by: lovio
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: Please be aware that this function expects to decode
- // note 1: from UTF-8 encoded strings, as found on
- // note 1: pages served as UTF-8
- // example 1: rawurldecode('Kevin+van+Zonneveld%21')
- // returns 1: 'Kevin+van+Zonneveld!'
- // example 2: rawurldecode('http%3A%2F%2Fkvz.io%2F')
- // returns 2: 'http://kvz.io/'
- // example 3: rawurldecode('http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3D')
- // returns 3: 'http://www.google.nl/search?q=Locutus&ie='
-
- return decodeURIComponent((str + '').replace(/%(?![\da-f]{2})/gi, function () {
- // PHP tolerates poorly formed escape sequences
- return '%25';
- }));
-};
-//# sourceMappingURL=rawurldecode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/rawurldecode.js.map b/node_modules/locutus/php/url/rawurldecode.js.map
deleted file mode 100644
index fe014e0..0000000
--- a/node_modules/locutus/php/url/rawurldecode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/rawurldecode.js"],"names":["module","exports","rawurldecode","str","decodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,GAAvB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,mBAAmB,CAACD,MAAM,EAAP,EACvBE,OADuB,CACf,mBADe,EACM,YAAY;AACxC;AACA,WAAO,KAAP;AACD,GAJuB,CAAnB,CAAP;AAKD,CAzBD","file":"rawurldecode.js","sourcesContent":["module.exports = function rawurldecode (str) {\n // discuss at: http://locutus.io/php/rawurldecode/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: travc\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Ratheous\n // input by: lovio\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: Please be aware that this function expects to decode\n // note 1: from UTF-8 encoded strings, as found on\n // note 1: pages served as UTF-8\n // example 1: rawurldecode('Kevin+van+Zonneveld%21')\n // returns 1: 'Kevin+van+Zonneveld!'\n // example 2: rawurldecode('http%3A%2F%2Fkvz.io%2F')\n // returns 2: 'http://kvz.io/'\n // example 3: rawurldecode('http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3D')\n // returns 3: 'http://www.google.nl/search?q=Locutus&ie='\n\n return decodeURIComponent((str + '')\n .replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25'\n }))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/rawurlencode.js b/node_modules/locutus/php/url/rawurlencode.js
deleted file mode 100644
index 3b22bd0..0000000
--- a/node_modules/locutus/php/url/rawurlencode.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-module.exports = function rawurlencode(str) {
- // discuss at: http://locutus.io/php/rawurlencode/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: travc
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Michael Grier
- // input by: Ratheous
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Joris
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // note 1: This reflects PHP 5.3/6.0+ behavior
- // note 1: Please be aware that this function expects \
- // note 1: to encode into UTF-8 encoded strings, as found on
- // note 1: pages served as UTF-8
- // example 1: rawurlencode('Kevin van Zonneveld!')
- // returns 1: 'Kevin%20van%20Zonneveld%21'
- // example 2: rawurlencode('http://kvz.io/')
- // returns 2: 'http%3A%2F%2Fkvz.io%2F'
- // example 3: rawurlencode('http://www.google.nl/search?q=Locutus&ie=utf-8')
- // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8'
-
- str = str + '';
-
- // Tilde should be allowed unescaped in future versions of PHP (as reflected below),
- // but if you want to reflect current
- // PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following.
- return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A');
-};
-//# sourceMappingURL=rawurlencode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/rawurlencode.js.map b/node_modules/locutus/php/url/rawurlencode.js.map
deleted file mode 100644
index 22e205e..0000000
--- a/node_modules/locutus/php/url/rawurlencode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/rawurlencode.js"],"names":["module","exports","rawurlencode","str","encodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,GAAvB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,QAAOA,MAAM,EAAb;;AAEA;AACA;AACA;AACA,SAAOC,mBAAmBD,GAAnB,EACJE,OADI,CACI,IADJ,EACU,KADV,EAEJA,OAFI,CAEI,IAFJ,EAEU,KAFV,EAGJA,OAHI,CAGI,KAHJ,EAGW,KAHX,EAIJA,OAJI,CAII,KAJJ,EAIW,KAJX,EAKJA,OALI,CAKI,KALJ,EAKW,KALX,CAAP;AAMD,CAlCD","file":"rawurlencode.js","sourcesContent":["module.exports = function rawurlencode (str) {\n // discuss at: http://locutus.io/php/rawurlencode/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: travc\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Michael Grier\n // input by: Ratheous\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Joris\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // note 1: This reflects PHP 5.3/6.0+ behavior\n // note 1: Please be aware that this function expects \\\n // note 1: to encode into UTF-8 encoded strings, as found on\n // note 1: pages served as UTF-8\n // example 1: rawurlencode('Kevin van Zonneveld!')\n // returns 1: 'Kevin%20van%20Zonneveld%21'\n // example 2: rawurlencode('http://kvz.io/')\n // returns 2: 'http%3A%2F%2Fkvz.io%2F'\n // example 3: rawurlencode('http://www.google.nl/search?q=Locutus&ie=utf-8')\n // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8'\n\n str = (str + '')\n\n // Tilde should be allowed unescaped in future versions of PHP (as reflected below),\n // but if you want to reflect current\n // PHP behavior, you would need to add \".replace(/~/g, '%7E');\" to the following.\n return encodeURIComponent(str)\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/urldecode.js b/node_modules/locutus/php/url/urldecode.js
deleted file mode 100644
index d0477a6..0000000
--- a/node_modules/locutus/php/url/urldecode.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = function urldecode(str) {
- // discuss at: http://locutus.io/php/urldecode/
- // original by: Philip Peterson
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Lars Fischer
- // improved by: Orlando
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: AJ
- // input by: travc
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Ratheous
- // input by: e-mike
- // input by: lovio
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Rob
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // note 1: info on what encoding functions to use from:
- // note 1: http://xkr.us/articles/javascript/encode-compare/
- // note 1: Please be aware that this function expects to decode
- // note 1: from UTF-8 encoded strings, as found on
- // note 1: pages served as UTF-8
- // example 1: urldecode('Kevin+van+Zonneveld%21')
- // returns 1: 'Kevin van Zonneveld!'
- // example 2: urldecode('http%3A%2F%2Fkvz.io%2F')
- // returns 2: 'http://kvz.io/'
- // example 3: urldecode('http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a')
- // returns 3: 'http://www.google.nl/search?q=Locutus&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a'
- // example 4: urldecode('%E5%A5%BD%3_4')
- // returns 4: '\u597d%3_4'
-
- return decodeURIComponent((str + '').replace(/%(?![\da-f]{2})/gi, function () {
- // PHP tolerates poorly formed escape sequences
- return '%25';
- }).replace(/\+/g, '%20'));
-};
-//# sourceMappingURL=urldecode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/urldecode.js.map b/node_modules/locutus/php/url/urldecode.js.map
deleted file mode 100644
index 6cfdbd5..0000000
--- a/node_modules/locutus/php/url/urldecode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/urldecode.js"],"names":["module","exports","urldecode","str","decodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,mBAAmB,CAACD,MAAM,EAAP,EACvBE,OADuB,CACf,mBADe,EACM,YAAY;AACxC;AACA,WAAO,KAAP;AACD,GAJuB,EAKvBA,OALuB,CAKf,KALe,EAKR,KALQ,CAAnB,CAAP;AAMD,CAvCD","file":"urldecode.js","sourcesContent":["module.exports = function urldecode (str) {\n // discuss at: http://locutus.io/php/urldecode/\n // original by: Philip Peterson\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Lars Fischer\n // improved by: Orlando\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: AJ\n // input by: travc\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Ratheous\n // input by: e-mike\n // input by: lovio\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Rob\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // note 1: info on what encoding functions to use from:\n // note 1: http://xkr.us/articles/javascript/encode-compare/\n // note 1: Please be aware that this function expects to decode\n // note 1: from UTF-8 encoded strings, as found on\n // note 1: pages served as UTF-8\n // example 1: urldecode('Kevin+van+Zonneveld%21')\n // returns 1: 'Kevin van Zonneveld!'\n // example 2: urldecode('http%3A%2F%2Fkvz.io%2F')\n // returns 2: 'http://kvz.io/'\n // example 3: urldecode('http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a')\n // returns 3: 'http://www.google.nl/search?q=Locutus&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a'\n // example 4: urldecode('%E5%A5%BD%3_4')\n // returns 4: '\\u597d%3_4'\n\n return decodeURIComponent((str + '')\n .replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25'\n })\n .replace(/\\+/g, '%20'))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/url/urlencode.js b/node_modules/locutus/php/url/urlencode.js
deleted file mode 100644
index 6608ff7..0000000
--- a/node_modules/locutus/php/url/urlencode.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-module.exports = function urlencode(str) {
- // discuss at: http://locutus.io/php/urlencode/
- // original by: Philip Peterson
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Lars Fischer
- // input by: AJ
- // input by: travc
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Ratheous
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Joris
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // reimplemented by: Brett Zamir (http://brett-zamir.me)
- // note 1: This reflects PHP 5.3/6.0+ behavior
- // note 1: Please be aware that this function
- // note 1: expects to encode into UTF-8 encoded strings, as found on
- // note 1: pages served as UTF-8
- // example 1: urlencode('Kevin van Zonneveld!')
- // returns 1: 'Kevin+van+Zonneveld%21'
- // example 2: urlencode('http://kvz.io/')
- // returns 2: 'http%3A%2F%2Fkvz.io%2F'
- // example 3: urlencode('http://www.google.nl/search?q=Locutus&ie=utf-8')
- // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8'
-
- str = str + '';
-
- // Tilde should be allowed unescaped in future versions of PHP (as reflected below),
- // but if you want to reflect current
- // PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following.
- return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
-};
-//# sourceMappingURL=urlencode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/url/urlencode.js.map b/node_modules/locutus/php/url/urlencode.js.map
deleted file mode 100644
index 83c661b..0000000
--- a/node_modules/locutus/php/url/urlencode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/url/urlencode.js"],"names":["module","exports","urlencode","str","encodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,GAApB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,QAAOA,MAAM,EAAb;;AAEA;AACA;AACA;AACA,SAAOC,mBAAmBD,GAAnB,EACJE,OADI,CACI,IADJ,EACU,KADV,EAEJA,OAFI,CAEI,IAFJ,EAEU,KAFV,EAGJA,OAHI,CAGI,KAHJ,EAGW,KAHX,EAIJA,OAJI,CAII,KAJJ,EAIW,KAJX,EAKJA,OALI,CAKI,KALJ,EAKW,KALX,EAMJA,OANI,CAMI,MANJ,EAMY,GANZ,CAAP;AAOD,CAvCD","file":"urlencode.js","sourcesContent":["module.exports = function urlencode (str) {\n // discuss at: http://locutus.io/php/urlencode/\n // original by: Philip Peterson\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Lars Fischer\n // input by: AJ\n // input by: travc\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Ratheous\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Joris\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // reimplemented by: Brett Zamir (http://brett-zamir.me)\n // note 1: This reflects PHP 5.3/6.0+ behavior\n // note 1: Please be aware that this function\n // note 1: expects to encode into UTF-8 encoded strings, as found on\n // note 1: pages served as UTF-8\n // example 1: urlencode('Kevin van Zonneveld!')\n // returns 1: 'Kevin+van+Zonneveld%21'\n // example 2: urlencode('http://kvz.io/')\n // returns 2: 'http%3A%2F%2Fkvz.io%2F'\n // example 3: urlencode('http://www.google.nl/search?q=Locutus&ie=utf-8')\n // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8'\n\n str = (str + '')\n\n // Tilde should be allowed unescaped in future versions of PHP (as reflected below),\n // but if you want to reflect current\n // PHP behavior, you would need to add \".replace(/~/g, '%7E');\" to the following.\n return encodeURIComponent(str)\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A')\n .replace(/%20/g, '+')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/boolval.js b/node_modules/locutus/php/var/boolval.js
deleted file mode 100644
index 7ff228a..0000000
--- a/node_modules/locutus/php/var/boolval.js
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-module.exports = function boolval(mixedVar) {
- // original by: Will Rowe
- // example 1: boolval(true)
- // returns 1: true
- // example 2: boolval(false)
- // returns 2: false
- // example 3: boolval(0)
- // returns 3: false
- // example 4: boolval(0.0)
- // returns 4: false
- // example 5: boolval('')
- // returns 5: false
- // example 6: boolval('0')
- // returns 6: false
- // example 7: boolval([])
- // returns 7: false
- // example 8: boolval('')
- // returns 8: false
- // example 9: boolval(null)
- // returns 9: false
- // example 10: boolval(undefined)
- // returns 10: false
- // example 11: boolval('true')
- // returns 11: true
-
- if (mixedVar === false) {
- return false;
- }
-
- if (mixedVar === 0 || mixedVar === 0.0) {
- return false;
- }
-
- if (mixedVar === '' || mixedVar === '0') {
- return false;
- }
-
- if (Array.isArray(mixedVar) && mixedVar.length === 0) {
- return false;
- }
-
- if (mixedVar === null || mixedVar === undefined) {
- return false;
- }
-
- return true;
-};
-//# sourceMappingURL=boolval.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/boolval.js.map b/node_modules/locutus/php/var/boolval.js.map
deleted file mode 100644
index 2853855..0000000
--- a/node_modules/locutus/php/var/boolval.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/boolval.js"],"names":["module","exports","boolval","mixedVar","Array","isArray","length","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,aAAa,KAAjB,EAAwB;AACtB,WAAO,KAAP;AACD;;AAED,MAAIA,aAAa,CAAb,IAAkBA,aAAa,GAAnC,EAAwC;AACtC,WAAO,KAAP;AACD;;AAED,MAAIA,aAAa,EAAb,IAAmBA,aAAa,GAApC,EAAyC;AACvC,WAAO,KAAP;AACD;;AAED,MAAIC,MAAMC,OAAN,CAAcF,QAAd,KAA2BA,SAASG,MAAT,KAAoB,CAAnD,EAAsD;AACpD,WAAO,KAAP;AACD;;AAED,MAAIH,aAAa,IAAb,IAAqBA,aAAaI,SAAtC,EAAiD;AAC/C,WAAO,KAAP;AACD;;AAED,SAAO,IAAP;AACD,CA9CD","file":"boolval.js","sourcesContent":["module.exports = function boolval (mixedVar) {\n // original by: Will Rowe\n // example 1: boolval(true)\n // returns 1: true\n // example 2: boolval(false)\n // returns 2: false\n // example 3: boolval(0)\n // returns 3: false\n // example 4: boolval(0.0)\n // returns 4: false\n // example 5: boolval('')\n // returns 5: false\n // example 6: boolval('0')\n // returns 6: false\n // example 7: boolval([])\n // returns 7: false\n // example 8: boolval('')\n // returns 8: false\n // example 9: boolval(null)\n // returns 9: false\n // example 10: boolval(undefined)\n // returns 10: false\n // example 11: boolval('true')\n // returns 11: true\n\n if (mixedVar === false) {\n return false\n }\n\n if (mixedVar === 0 || mixedVar === 0.0) {\n return false\n }\n\n if (mixedVar === '' || mixedVar === '0') {\n return false\n }\n\n if (Array.isArray(mixedVar) && mixedVar.length === 0) {\n return false\n }\n\n if (mixedVar === null || mixedVar === undefined) {\n return false\n }\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/doubleval.js b/node_modules/locutus/php/var/doubleval.js
deleted file mode 100644
index 77e974b..0000000
--- a/node_modules/locutus/php/var/doubleval.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function doubleval(mixedVar) {
- // discuss at: http://locutus.io/php/doubleval/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: doubleval(186)
- // returns 1: 186.00
-
- var floatval = require('../var/floatval');
-
- return floatval(mixedVar);
-};
-//# sourceMappingURL=doubleval.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/doubleval.js.map b/node_modules/locutus/php/var/doubleval.js.map
deleted file mode 100644
index 4339e8e..0000000
--- a/node_modules/locutus/php/var/doubleval.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/doubleval.js"],"names":["module","exports","doubleval","mixedVar","floatval","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,iBAAR,CAAf;;AAEA,SAAOD,SAASD,QAAT,CAAP;AACD,CAXD","file":"doubleval.js","sourcesContent":["module.exports = function doubleval (mixedVar) {\n // discuss at: http://locutus.io/php/doubleval/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: doubleval(186)\n // returns 1: 186.00\n\n var floatval = require('../var/floatval')\n\n return floatval(mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/empty.js b/node_modules/locutus/php/var/empty.js
deleted file mode 100644
index 654a41a..0000000
--- a/node_modules/locutus/php/var/empty.js
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function empty(mixedVar) {
- // discuss at: http://locutus.io/php/empty/
- // original by: Philippe Baumann
- // input by: Onno Marsman (https://twitter.com/onnomarsman)
- // input by: LH
- // input by: Stoyan Kyosev (http://www.svest.org/)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Francesco
- // improved by: Marc Jansen
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: empty(null)
- // returns 1: true
- // example 2: empty(undefined)
- // returns 2: true
- // example 3: empty([])
- // returns 3: true
- // example 4: empty({})
- // returns 4: true
- // example 5: empty({'aFunc' : function () { alert('humpty'); } })
- // returns 5: false
-
- var undef;
- var key;
- var i;
- var len;
- var emptyValues = [undef, null, false, 0, '', '0'];
-
- for (i = 0, len = emptyValues.length; i < len; i++) {
- if (mixedVar === emptyValues[i]) {
- return true;
- }
- }
-
- if ((typeof mixedVar === 'undefined' ? 'undefined' : _typeof(mixedVar)) === 'object') {
- for (key in mixedVar) {
- if (mixedVar.hasOwnProperty(key)) {
- return false;
- }
- }
- return true;
- }
-
- return false;
-};
-//# sourceMappingURL=empty.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/empty.js.map b/node_modules/locutus/php/var/empty.js.map
deleted file mode 100644
index 4bf3b0f..0000000
--- a/node_modules/locutus/php/var/empty.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/empty.js"],"names":["module","exports","empty","mixedVar","undef","key","i","len","emptyValues","length","hasOwnProperty"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,GAAJ;AACA,MAAIC,cAAc,CAACJ,KAAD,EAAQ,IAAR,EAAc,KAAd,EAAqB,CAArB,EAAwB,EAAxB,EAA4B,GAA5B,CAAlB;;AAEA,OAAKE,IAAI,CAAJ,EAAOC,MAAMC,YAAYC,MAA9B,EAAsCH,IAAIC,GAA1C,EAA+CD,GAA/C,EAAoD;AAClD,QAAIH,aAAaK,YAAYF,CAAZ,CAAjB,EAAiC;AAC/B,aAAO,IAAP;AACD;AACF;;AAED,MAAI,QAAOH,QAAP,yCAAOA,QAAP,OAAoB,QAAxB,EAAkC;AAChC,SAAKE,GAAL,IAAYF,QAAZ,EAAsB;AACpB,UAAIA,SAASO,cAAT,CAAwBL,GAAxB,CAAJ,EAAkC;AAChC,eAAO,KAAP;AACD;AACF;AACD,WAAO,IAAP;AACD;;AAED,SAAO,KAAP;AACD,CA5CD","file":"empty.js","sourcesContent":["module.exports = function empty (mixedVar) {\n // discuss at: http://locutus.io/php/empty/\n // original by: Philippe Baumann\n // input by: Onno Marsman (https://twitter.com/onnomarsman)\n // input by: LH\n // input by: Stoyan Kyosev (http://www.svest.org/)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Francesco\n // improved by: Marc Jansen\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: empty(null)\n // returns 1: true\n // example 2: empty(undefined)\n // returns 2: true\n // example 3: empty([])\n // returns 3: true\n // example 4: empty({})\n // returns 4: true\n // example 5: empty({'aFunc' : function () { alert('humpty'); } })\n // returns 5: false\n\n var undef\n var key\n var i\n var len\n var emptyValues = [undef, null, false, 0, '', '0']\n\n for (i = 0, len = emptyValues.length; i < len; i++) {\n if (mixedVar === emptyValues[i]) {\n return true\n }\n }\n\n if (typeof mixedVar === 'object') {\n for (key in mixedVar) {\n if (mixedVar.hasOwnProperty(key)) {\n return false\n }\n }\n return true\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/floatval.js b/node_modules/locutus/php/var/floatval.js
deleted file mode 100644
index 247fac6..0000000
--- a/node_modules/locutus/php/var/floatval.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-module.exports = function floatval(mixedVar) {
- // discuss at: http://locutus.io/php/floatval/
- // original by: Michael White (http://getsprink.com)
- // note 1: The native parseFloat() method of JavaScript returns NaN
- // note 1: when it encounters a string before an int or float value.
- // example 1: floatval('150.03_page-section')
- // returns 1: 150.03
- // example 2: floatval('page: 3')
- // example 2: floatval('-50 + 8')
- // returns 2: 0
- // returns 2: -50
-
- return parseFloat(mixedVar) || 0;
-};
-//# sourceMappingURL=floatval.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/floatval.js.map b/node_modules/locutus/php/var/floatval.js.map
deleted file mode 100644
index cd67f57..0000000
--- a/node_modules/locutus/php/var/floatval.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/floatval.js"],"names":["module","exports","floatval","mixedVar","parseFloat"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,QAAnB,EAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQC,WAAWD,QAAX,KAAwB,CAAhC;AACD,CAbD","file":"floatval.js","sourcesContent":["module.exports = function floatval (mixedVar) {\n // discuss at: http://locutus.io/php/floatval/\n // original by: Michael White (http://getsprink.com)\n // note 1: The native parseFloat() method of JavaScript returns NaN\n // note 1: when it encounters a string before an int or float value.\n // example 1: floatval('150.03_page-section')\n // returns 1: 150.03\n // example 2: floatval('page: 3')\n // example 2: floatval('-50 + 8')\n // returns 2: 0\n // returns 2: -50\n\n return (parseFloat(mixedVar) || 0)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/gettype.js b/node_modules/locutus/php/var/gettype.js
deleted file mode 100644
index 3e68299..0000000
--- a/node_modules/locutus/php/var/gettype.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function gettype(mixedVar) {
- // discuss at: http://locutus.io/php/gettype/
- // original by: Paulo Freitas
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Douglas Crockford (http://javascript.crockford.com)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: KELAN
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: gettype(1)
- // returns 1: 'integer'
- // example 2: gettype(undefined)
- // returns 2: 'undefined'
- // example 3: gettype({0: 'Kevin van Zonneveld'})
- // returns 3: 'object'
- // example 4: gettype('foo')
- // returns 4: 'string'
- // example 5: gettype({0: function () {return false;}})
- // returns 5: 'object'
- // example 6: gettype({0: 'test', length: 1, splice: function () {}})
- // returns 6: 'object'
- // example 7: gettype(['test'])
- // returns 7: 'array'
-
- var isFloat = require('../var/is_float');
-
- var s = typeof mixedVar === 'undefined' ? 'undefined' : _typeof(mixedVar);
- var name;
- var _getFuncName = function _getFuncName(fn) {
- var name = /\W*function\s+([\w$]+)\s*\(/.exec(fn);
- if (!name) {
- return '(Anonymous)';
- }
- return name[1];
- };
-
- if (s === 'object') {
- if (mixedVar !== null) {
- // From: http://javascript.crockford.com/remedial.html
- // @todo: Break up this lengthy if statement
- if (typeof mixedVar.length === 'number' && !mixedVar.propertyIsEnumerable('length') && typeof mixedVar.splice === 'function') {
- s = 'array';
- } else if (mixedVar.constructor && _getFuncName(mixedVar.constructor)) {
- name = _getFuncName(mixedVar.constructor);
- if (name === 'Date') {
- // not in PHP
- s = 'date';
- } else if (name === 'RegExp') {
- // not in PHP
- s = 'regexp';
- } else if (name === 'LOCUTUS_Resource') {
- // Check against our own resource constructor
- s = 'resource';
- }
- }
- } else {
- s = 'null';
- }
- } else if (s === 'number') {
- s = isFloat(mixedVar) ? 'double' : 'integer';
- }
-
- return s;
-};
-//# sourceMappingURL=gettype.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/gettype.js.map b/node_modules/locutus/php/var/gettype.js.map
deleted file mode 100644
index b932c49..0000000
--- a/node_modules/locutus/php/var/gettype.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/gettype.js"],"names":["module","exports","gettype","mixedVar","isFloat","require","s","name","_getFuncName","fn","exec","length","propertyIsEnumerable","splice","constructor"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,iBAAR,CAAd;;AAEA,MAAIC,WAAWH,QAAX,yCAAWA,QAAX,CAAJ;AACA,MAAII,IAAJ;AACA,MAAIC,eAAe,SAAfA,YAAe,CAAUC,EAAV,EAAc;AAC/B,QAAIF,OAAQ,6BAAD,CAAgCG,IAAhC,CAAqCD,EAArC,CAAX;AACA,QAAI,CAACF,IAAL,EAAW;AACT,aAAO,aAAP;AACD;AACD,WAAOA,KAAK,CAAL,CAAP;AACD,GAND;;AAQA,MAAID,MAAM,QAAV,EAAoB;AAClB,QAAIH,aAAa,IAAjB,EAAuB;AACrB;AACA;AACA,UAAI,OAAOA,SAASQ,MAAhB,KAA2B,QAA3B,IACF,CAAER,SAASS,oBAAT,CAA8B,QAA9B,CADA,IAEF,OAAOT,SAASU,MAAhB,KAA2B,UAF7B,EAEyC;AACvCP,YAAI,OAAJ;AACD,OAJD,MAIO,IAAIH,SAASW,WAAT,IAAwBN,aAAaL,SAASW,WAAtB,CAA5B,EAAgE;AACrEP,eAAOC,aAAaL,SAASW,WAAtB,CAAP;AACA,YAAIP,SAAS,MAAb,EAAqB;AACnB;AACAD,cAAI,MAAJ;AACD,SAHD,MAGO,IAAIC,SAAS,QAAb,EAAuB;AAC5B;AACAD,cAAI,QAAJ;AACD,SAHM,MAGA,IAAIC,SAAS,kBAAb,EAAiC;AACtC;AACAD,cAAI,UAAJ;AACD;AACF;AACF,KApBD,MAoBO;AACLA,UAAI,MAAJ;AACD;AACF,GAxBD,MAwBO,IAAIA,MAAM,QAAV,EAAoB;AACzBA,QAAIF,QAAQD,QAAR,IAAoB,QAApB,GAA+B,SAAnC;AACD;;AAED,SAAOG,CAAP;AACD,CAjED","file":"gettype.js","sourcesContent":["module.exports = function gettype (mixedVar) {\n // discuss at: http://locutus.io/php/gettype/\n // original by: Paulo Freitas\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Douglas Crockford (http://javascript.crockford.com)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: KELAN\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: gettype(1)\n // returns 1: 'integer'\n // example 2: gettype(undefined)\n // returns 2: 'undefined'\n // example 3: gettype({0: 'Kevin van Zonneveld'})\n // returns 3: 'object'\n // example 4: gettype('foo')\n // returns 4: 'string'\n // example 5: gettype({0: function () {return false;}})\n // returns 5: 'object'\n // example 6: gettype({0: 'test', length: 1, splice: function () {}})\n // returns 6: 'object'\n // example 7: gettype(['test'])\n // returns 7: 'array'\n\n var isFloat = require('../var/is_float')\n\n var s = typeof mixedVar\n var name\n var _getFuncName = function (fn) {\n var name = (/\\W*function\\s+([\\w$]+)\\s*\\(/).exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n\n if (s === 'object') {\n if (mixedVar !== null) {\n // From: http://javascript.crockford.com/remedial.html\n // @todo: Break up this lengthy if statement\n if (typeof mixedVar.length === 'number' &&\n !(mixedVar.propertyIsEnumerable('length')) &&\n typeof mixedVar.splice === 'function') {\n s = 'array'\n } else if (mixedVar.constructor && _getFuncName(mixedVar.constructor)) {\n name = _getFuncName(mixedVar.constructor)\n if (name === 'Date') {\n // not in PHP\n s = 'date'\n } else if (name === 'RegExp') {\n // not in PHP\n s = 'regexp'\n } else if (name === 'LOCUTUS_Resource') {\n // Check against our own resource constructor\n s = 'resource'\n }\n }\n } else {\n s = 'null'\n }\n } else if (s === 'number') {\n s = isFloat(mixedVar) ? 'double' : 'integer'\n }\n\n return s\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/index.js b/node_modules/locutus/php/var/index.js
deleted file mode 100644
index 1b4a40a..0000000
--- a/node_modules/locutus/php/var/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-module.exports['boolval'] = require('./boolval');
-module.exports['doubleval'] = require('./doubleval');
-module.exports['empty'] = require('./empty');
-module.exports['floatval'] = require('./floatval');
-module.exports['gettype'] = require('./gettype');
-module.exports['intval'] = require('./intval');
-module.exports['is_array'] = require('./is_array');
-module.exports['is_binary'] = require('./is_binary');
-module.exports['is_bool'] = require('./is_bool');
-module.exports['is_buffer'] = require('./is_buffer');
-module.exports['is_callable'] = require('./is_callable');
-module.exports['is_double'] = require('./is_double');
-module.exports['is_float'] = require('./is_float');
-module.exports['is_int'] = require('./is_int');
-module.exports['is_integer'] = require('./is_integer');
-module.exports['is_long'] = require('./is_long');
-module.exports['is_null'] = require('./is_null');
-module.exports['is_numeric'] = require('./is_numeric');
-module.exports['is_object'] = require('./is_object');
-module.exports['is_real'] = require('./is_real');
-module.exports['is_scalar'] = require('./is_scalar');
-module.exports['is_string'] = require('./is_string');
-module.exports['is_unicode'] = require('./is_unicode');
-module.exports['isset'] = require('./isset');
-module.exports['print_r'] = require('./print_r');
-module.exports['serialize'] = require('./serialize');
-module.exports['strval'] = require('./strval');
-module.exports['unserialize'] = require('./unserialize');
-module.exports['var_dump'] = require('./var_dump');
-module.exports['var_export'] = require('./var_export');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/index.js.map b/node_modules/locutus/php/var/index.js.map
deleted file mode 100644
index 99e7e60..0000000
--- a/node_modules/locutus/php/var/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B;AACAF,OAAOC,OAAP,CAAe,OAAf,IAA0BC,QAAQ,SAAR,CAA1B;AACAF,OAAOC,OAAP,CAAe,SAAf,IAA4BC,QAAQ,WAAR,CAA5B;AACAF,OAAOC,OAAP,CAAe,WAAf,IAA8BC,QAAQ,aAAR,CAA9B;AACAF,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B;AACAF,OAAOC,OAAP,CAAe,YAAf,IAA+BC,QAAQ,cAAR,CAA/B","file":"index.js","sourcesContent":["module.exports['boolval'] = require('./boolval')\nmodule.exports['doubleval'] = require('./doubleval')\nmodule.exports['empty'] = require('./empty')\nmodule.exports['floatval'] = require('./floatval')\nmodule.exports['gettype'] = require('./gettype')\nmodule.exports['intval'] = require('./intval')\nmodule.exports['is_array'] = require('./is_array')\nmodule.exports['is_binary'] = require('./is_binary')\nmodule.exports['is_bool'] = require('./is_bool')\nmodule.exports['is_buffer'] = require('./is_buffer')\nmodule.exports['is_callable'] = require('./is_callable')\nmodule.exports['is_double'] = require('./is_double')\nmodule.exports['is_float'] = require('./is_float')\nmodule.exports['is_int'] = require('./is_int')\nmodule.exports['is_integer'] = require('./is_integer')\nmodule.exports['is_long'] = require('./is_long')\nmodule.exports['is_null'] = require('./is_null')\nmodule.exports['is_numeric'] = require('./is_numeric')\nmodule.exports['is_object'] = require('./is_object')\nmodule.exports['is_real'] = require('./is_real')\nmodule.exports['is_scalar'] = require('./is_scalar')\nmodule.exports['is_string'] = require('./is_string')\nmodule.exports['is_unicode'] = require('./is_unicode')\nmodule.exports['isset'] = require('./isset')\nmodule.exports['print_r'] = require('./print_r')\nmodule.exports['serialize'] = require('./serialize')\nmodule.exports['strval'] = require('./strval')\nmodule.exports['unserialize'] = require('./unserialize')\nmodule.exports['var_dump'] = require('./var_dump')\nmodule.exports['var_export'] = require('./var_export')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/intval.js b/node_modules/locutus/php/var/intval.js
deleted file mode 100644
index a5ef568..0000000
--- a/node_modules/locutus/php/var/intval.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function intval(mixedVar, base) {
- // discuss at: http://locutus.io/php/intval/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: stensi
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Rafał Kukawski (http://blog.kukawski.pl)
- // input by: Matteo
- // example 1: intval('Kevin van Zonneveld')
- // returns 1: 0
- // example 2: intval(4.2)
- // returns 2: 4
- // example 3: intval(42, 8)
- // returns 3: 42
- // example 4: intval('09')
- // returns 4: 9
- // example 5: intval('1e', 16)
- // returns 5: 30
- // example 6: intval(0x200000001)
- // returns 6: 8589934593
- // example 7: intval('0xff', 0)
- // returns 7: 255
- // example 8: intval('010', 0)
- // returns 8: 8
-
- var tmp, match;
-
- var type = typeof mixedVar === 'undefined' ? 'undefined' : _typeof(mixedVar);
-
- if (type === 'boolean') {
- return +mixedVar;
- } else if (type === 'string') {
- if (base === 0) {
- match = mixedVar.match(/^\s*0(x?)/i);
- base = match ? match[1] ? 16 : 8 : 10;
- }
- tmp = parseInt(mixedVar, base || 10);
- return isNaN(tmp) || !isFinite(tmp) ? 0 : tmp;
- } else if (type === 'number' && isFinite(mixedVar)) {
- return mixedVar < 0 ? Math.ceil(mixedVar) : Math.floor(mixedVar);
- } else {
- return 0;
- }
-};
-//# sourceMappingURL=intval.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/intval.js.map b/node_modules/locutus/php/var/intval.js.map
deleted file mode 100644
index cb526ba..0000000
--- a/node_modules/locutus/php/var/intval.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/intval.js"],"names":["module","exports","intval","mixedVar","base","tmp","match","type","parseInt","isNaN","isFinite","Math","ceil","floor"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,IAA3B,EAAiC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,GAAJ,EAASC,KAAT;;AAEA,MAAIC,cAAcJ,QAAd,yCAAcA,QAAd,CAAJ;;AAEA,MAAII,SAAS,SAAb,EAAwB;AACtB,WAAO,CAACJ,QAAR;AACD,GAFD,MAEO,IAAII,SAAS,QAAb,EAAuB;AAC5B,QAAIH,SAAS,CAAb,EAAgB;AACdE,cAAQH,SAASG,KAAT,CAAe,YAAf,CAAR;AACAF,aAAOE,QAASA,MAAM,CAAN,IAAW,EAAX,GAAgB,CAAzB,GAA8B,EAArC;AACD;AACDD,UAAMG,SAASL,QAAT,EAAmBC,QAAQ,EAA3B,CAAN;AACA,WAAQK,MAAMJ,GAAN,KAAc,CAACK,SAASL,GAAT,CAAhB,GAAiC,CAAjC,GAAqCA,GAA5C;AACD,GAPM,MAOA,IAAIE,SAAS,QAAT,IAAqBG,SAASP,QAAT,CAAzB,EAA6C;AAClD,WAAOA,WAAW,CAAX,GAAeQ,KAAKC,IAAL,CAAUT,QAAV,CAAf,GAAqCQ,KAAKE,KAAL,CAAWV,QAAX,CAA5C;AACD,GAFM,MAEA;AACL,WAAO,CAAP;AACD;AACF,CA3CD","file":"intval.js","sourcesContent":["module.exports = function intval (mixedVar, base) {\n // discuss at: http://locutus.io/php/intval/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: stensi\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Rafał Kukawski (http://blog.kukawski.pl)\n // input by: Matteo\n // example 1: intval('Kevin van Zonneveld')\n // returns 1: 0\n // example 2: intval(4.2)\n // returns 2: 4\n // example 3: intval(42, 8)\n // returns 3: 42\n // example 4: intval('09')\n // returns 4: 9\n // example 5: intval('1e', 16)\n // returns 5: 30\n // example 6: intval(0x200000001)\n // returns 6: 8589934593\n // example 7: intval('0xff', 0)\n // returns 7: 255\n // example 8: intval('010', 0)\n // returns 8: 8\n\n var tmp, match\n\n var type = typeof mixedVar\n\n if (type === 'boolean') {\n return +mixedVar\n } else if (type === 'string') {\n if (base === 0) {\n match = mixedVar.match(/^\\s*0(x?)/i)\n base = match ? (match[1] ? 16 : 8) : 10\n }\n tmp = parseInt(mixedVar, base || 10)\n return (isNaN(tmp) || !isFinite(tmp)) ? 0 : tmp\n } else if (type === 'number' && isFinite(mixedVar)) {\n return mixedVar < 0 ? Math.ceil(mixedVar) : Math.floor(mixedVar)\n } else {\n return 0\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_array.js b/node_modules/locutus/php/var/is_array.js
deleted file mode 100644
index d77a286..0000000
--- a/node_modules/locutus/php/var/is_array.js
+++ /dev/null
@@ -1,98 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_array(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_array/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Legaev Andrey
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Nathan Sepulveda
- // improved by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Cord
- // bugfixed by: Manish
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // note 1: In Locutus, javascript objects are like php associative arrays,
- // note 1: thus JavaScript objects will also
- // note 1: return true in this function (except for objects which inherit properties,
- // note 1: being thus used as objects),
- // note 1: unless you do ini_set('locutus.objectsAsArrays', 0),
- // note 1: in which case only genuine JavaScript arrays
- // note 1: will return true
- // example 1: is_array(['Kevin', 'van', 'Zonneveld'])
- // returns 1: true
- // example 2: is_array('Kevin van Zonneveld')
- // returns 2: false
- // example 3: is_array({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})
- // returns 3: true
- // example 4: ini_set('locutus.objectsAsArrays', 0)
- // example 4: is_array({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})
- // returns 4: false
- // example 5: is_array(function tmp_a (){ this.name = 'Kevin' })
- // returns 5: false
-
- var _getFuncName = function _getFuncName(fn) {
- var name = /\W*function\s+([\w$]+)\s*\(/.exec(fn);
- if (!name) {
- return '(Anonymous)';
- }
- return name[1];
- };
- var _isArray = function _isArray(mixedVar) {
- // return Object.prototype.toString.call(mixedVar) === '[object Array]';
- // The above works, but let's do the even more stringent approach:
- // (since Object.prototype.toString could be overridden)
- // Null, Not an object, no length property so couldn't be an Array (or String)
- if (!mixedVar || (typeof mixedVar === 'undefined' ? 'undefined' : _typeof(mixedVar)) !== 'object' || typeof mixedVar.length !== 'number') {
- return false;
- }
- var len = mixedVar.length;
- mixedVar[mixedVar.length] = 'bogus';
- // The only way I can think of to get around this (or where there would be trouble)
- // would be to have an object defined
- // with a custom "length" getter which changed behavior on each call
- // (or a setter to mess up the following below) or a custom
- // setter for numeric properties, but even that would need to listen for
- // specific indexes; but there should be no false negatives
- // and such a false positive would need to rely on later JavaScript
- // innovations like __defineSetter__
- if (len !== mixedVar.length) {
- // We know it's an array since length auto-changed with the addition of a
- // numeric property at its length end, so safely get rid of our bogus element
- mixedVar.length -= 1;
- return true;
- }
- // Get rid of the property we added onto a non-array object; only possible
- // side-effect is if the user adds back the property later, it will iterate
- // this property in the older order placement in IE (an order which should not
- // be depended on anyways)
- delete mixedVar[mixedVar.length];
- return false;
- };
-
- if (!mixedVar || (typeof mixedVar === 'undefined' ? 'undefined' : _typeof(mixedVar)) !== 'object') {
- return false;
- }
-
- var isArray = _isArray(mixedVar);
-
- if (isArray) {
- return true;
- }
-
- var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.objectsAsArrays') : undefined) || 'on';
- if (iniVal === 'on') {
- var asString = Object.prototype.toString.call(mixedVar);
- var asFunc = _getFuncName(mixedVar.constructor);
-
- if (asString === '[object Object]' && asFunc === 'Object') {
- // Most likely a literal and intended as assoc. array
- return true;
- }
- }
-
- return false;
-};
-//# sourceMappingURL=is_array.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_array.js.map b/node_modules/locutus/php/var/is_array.js.map
deleted file mode 100644
index 9c4b117..0000000
--- a/node_modules/locutus/php/var/is_array.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_array.js"],"names":["module","exports","is_array","mixedVar","_getFuncName","fn","name","exec","_isArray","length","len","isArray","iniVal","require","undefined","asString","Object","prototype","toString","call","asFunc","constructor"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,QAAnB,EAA6B;AAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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A,QAAIiB,SAAShB,aAAaD,SAASkB,WAAtB,CAAb;;AAEA,QAAIN,aAAa,iBAAb,IAAkCK,WAAW,QAAjD,EAA2D;AACzD;AACA,aAAO,IAAP;AACD;AACF;;AAED,SAAO,KAAP;AACD,CA3FD","file":"is_array.js","sourcesContent":["module.exports = function is_array (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_array/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Legaev Andrey\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Nathan Sepulveda\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Cord\n // bugfixed by: Manish\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // note 1: In Locutus, javascript objects are like php associative arrays,\n // note 1: thus JavaScript objects will also\n // note 1: return true in this function (except for objects which inherit properties,\n // note 1: being thus used as objects),\n // note 1: unless you do ini_set('locutus.objectsAsArrays', 0),\n // note 1: in which case only genuine JavaScript arrays\n // note 1: will return true\n // example 1: is_array(['Kevin', 'van', 'Zonneveld'])\n // returns 1: true\n // example 2: is_array('Kevin van Zonneveld')\n // returns 2: false\n // example 3: is_array({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})\n // returns 3: true\n // example 4: ini_set('locutus.objectsAsArrays', 0)\n // example 4: is_array({0: 'Kevin', 1: 'van', 2: 'Zonneveld'})\n // returns 4: false\n // example 5: is_array(function tmp_a (){ this.name = 'Kevin' })\n // returns 5: false\n\n var _getFuncName = function (fn) {\n var name = (/\\W*function\\s+([\\w$]+)\\s*\\(/).exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n var _isArray = function (mixedVar) {\n // return Object.prototype.toString.call(mixedVar) === '[object Array]';\n // The above works, but let's do the even more stringent approach:\n // (since Object.prototype.toString could be overridden)\n // Null, Not an object, no length property so couldn't be an Array (or String)\n if (!mixedVar || typeof mixedVar !== 'object' || typeof mixedVar.length !== 'number') {\n return false\n }\n var len = mixedVar.length\n mixedVar[mixedVar.length] = 'bogus'\n // The only way I can think of to get around this (or where there would be trouble)\n // would be to have an object defined\n // with a custom \"length\" getter which changed behavior on each call\n // (or a setter to mess up the following below) or a custom\n // setter for numeric properties, but even that would need to listen for\n // specific indexes; but there should be no false negatives\n // and such a false positive would need to rely on later JavaScript\n // innovations like __defineSetter__\n if (len !== mixedVar.length) {\n // We know it's an array since length auto-changed with the addition of a\n // numeric property at its length end, so safely get rid of our bogus element\n mixedVar.length -= 1\n return true\n }\n // Get rid of the property we added onto a non-array object; only possible\n // side-effect is if the user adds back the property later, it will iterate\n // this property in the older order placement in IE (an order which should not\n // be depended on anyways)\n delete mixedVar[mixedVar.length]\n return false\n }\n\n if (!mixedVar || typeof mixedVar !== 'object') {\n return false\n }\n\n var isArray = _isArray(mixedVar)\n\n if (isArray) {\n return true\n }\n\n var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.objectsAsArrays') : undefined) || 'on'\n if (iniVal === 'on') {\n var asString = Object.prototype.toString.call(mixedVar)\n var asFunc = _getFuncName(mixedVar.constructor)\n\n if (asString === '[object Object]' && asFunc === 'Object') {\n // Most likely a literal and intended as assoc. array\n return true\n }\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_binary.js b/node_modules/locutus/php/var/is_binary.js
deleted file mode 100644
index be380f1..0000000
--- a/node_modules/locutus/php/var/is_binary.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function is_binary(vr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_binary/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: is_binary('This could be binary as far as JavaScript knows...')
- // returns 1: true
-
- return typeof vr === 'string'; // If it is a string of any kind, it could be binary
-};
-//# sourceMappingURL=is_binary.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_binary.js.map b/node_modules/locutus/php/var/is_binary.js.map
deleted file mode 100644
index 36eee73..0000000
--- a/node_modules/locutus/php/var/is_binary.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_binary.js"],"names":["module","exports","is_binary","vr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,EAApB,EAAwB;AAAE;AACzC;AACA;AACA;AACA;;AAEA,SAAO,OAAOA,EAAP,KAAc,QAArB,CANuC,CAMT;AAC/B,CAPD","file":"is_binary.js","sourcesContent":["module.exports = function is_binary (vr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_binary/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: is_binary('This could be binary as far as JavaScript knows...')\n // returns 1: true\n\n return typeof vr === 'string' // If it is a string of any kind, it could be binary\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_bool.js b/node_modules/locutus/php/var/is_bool.js
deleted file mode 100644
index eb89b8f..0000000
--- a/node_modules/locutus/php/var/is_bool.js
+++ /dev/null
@@ -1,15 +0,0 @@
-"use strict";
-
-module.exports = function is_bool(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_bool/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: CoursesWeb (http://www.coursesweb.net/)
- // example 1: is_bool(false)
- // returns 1: true
- // example 2: is_bool(0)
- // returns 2: false
-
- return mixedVar === true || mixedVar === false; // Faster (in FF) than type checking
-};
-//# sourceMappingURL=is_bool.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_bool.js.map b/node_modules/locutus/php/var/is_bool.js.map
deleted file mode 100644
index 237b87e..0000000
--- a/node_modules/locutus/php/var/is_bool.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_bool.js"],"names":["module","exports","is_bool","mixedVar"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,aAAa,IAAb,IAAqBA,aAAa,KAA1C,CAT2C,CASM;AAClD,CAVD","file":"is_bool.js","sourcesContent":["module.exports = function is_bool (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_bool/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: CoursesWeb (http://www.coursesweb.net/)\n // example 1: is_bool(false)\n // returns 1: true\n // example 2: is_bool(0)\n // returns 2: false\n\n return (mixedVar === true || mixedVar === false) // Faster (in FF) than type checking\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_buffer.js b/node_modules/locutus/php/var/is_buffer.js
deleted file mode 100644
index bc3d344..0000000
--- a/node_modules/locutus/php/var/is_buffer.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function is_buffer(vr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_buffer/
- // original by: Brett Zamir (http://brett-zamir.me)
- // example 1: is_buffer('This could be binary or a regular string...')
- // returns 1: true
-
- return typeof vr === 'string';
-};
-//# sourceMappingURL=is_buffer.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_buffer.js.map b/node_modules/locutus/php/var/is_buffer.js.map
deleted file mode 100644
index d3d9dd4..0000000
--- a/node_modules/locutus/php/var/is_buffer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_buffer.js"],"names":["module","exports","is_buffer","vr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,EAApB,EAAwB;AAAE;AACzC;AACA;AACA;AACA;;AAEA,SAAO,OAAOA,EAAP,KAAc,QAArB;AACD,CAPD","file":"is_buffer.js","sourcesContent":["module.exports = function is_buffer (vr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_buffer/\n // original by: Brett Zamir (http://brett-zamir.me)\n // example 1: is_buffer('This could be binary or a regular string...')\n // returns 1: true\n\n return typeof vr === 'string'\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_callable.js b/node_modules/locutus/php/var/is_callable.js
deleted file mode 100644
index 962d742..0000000
--- a/node_modules/locutus/php/var/is_callable.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_callable(mixedVar, syntaxOnly, callableName) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_callable/
- // original by: Brett Zamir (http://brett-zamir.me)
- // input by: François
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: The variable callableName cannot work as a string variable passed by
- // note 1: reference as in PHP (since JavaScript does not support passing
- // note 1: strings by reference), but instead will take the name of
- // note 1: a global variable and set that instead.
- // note 1: When used on an object, depends on a constructor property
- // note 1: being kept on the object prototype
- // note 2: Depending on the `callableName` that is passed, this function can use eval.
- // note 2: The eval input is however checked to only allow valid function names,
- // note 2: So it should not be unsafer than uses without eval (seeing as you can)
- // note 2: already pass any function to be executed here.
- // example 1: is_callable('is_callable')
- // returns 1: true
- // example 2: is_callable('bogusFunction', true)
- // returns 2: true // gives true because does not do strict checking
- // example 3: function SomeClass () {}
- // example 3: SomeClass.prototype.someMethod = function (){}
- // example 3: var testObj = new SomeClass()
- // example 3: is_callable([testObj, 'someMethod'], true, 'myVar')
- // example 3: var $result = myVar
- // returns 3: 'SomeClass::someMethod'
- // example 4: is_callable(function () {})
- // returns 4: true
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- var validJSFunctionNamePattern = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
-
- var name = '';
- var obj = {};
- var method = '';
- var validFunctionName = false;
-
- var getFuncName = function getFuncName(fn) {
- var name = /\W*function\s+([\w$]+)\s*\(/.exec(fn);
- if (!name) {
- return '(Anonymous)';
- }
- return name[1];
- };
-
- if (typeof mixedVar === 'string') {
- obj = $global;
- method = mixedVar;
- name = mixedVar;
- validFunctionName = !!name.match(validJSFunctionNamePattern);
- } else if (typeof mixedVar === 'function') {
- return true;
- } else if (Object.prototype.toString.call(mixedVar) === '[object Array]' && mixedVar.length === 2 && _typeof(mixedVar[0]) === 'object' && typeof mixedVar[1] === 'string') {
- obj = mixedVar[0];
- method = mixedVar[1];
- name = (obj.constructor && getFuncName(obj.constructor)) + '::' + method;
- } else {
- return false;
- }
-
- if (syntaxOnly || typeof obj[method] === 'function') {
- if (callableName) {
- $global[callableName] = name;
- }
- return true;
- }
-
- // validFunctionName avoids exploits
- if (validFunctionName && typeof eval(method) === 'function') {
- // eslint-disable-line no-eval
- if (callableName) {
- $global[callableName] = name;
- }
- return true;
- }
-
- return false;
-};
-//# sourceMappingURL=is_callable.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_callable.js.map b/node_modules/locutus/php/var/is_callable.js.map
deleted file mode 100644
index 6c2fc21..0000000
--- a/node_modules/locutus/php/var/is_callable.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_callable.js"],"names":["module","exports","is_callable","mixedVar","syntaxOnly","callableName","$global","window","global","validJSFunctionNamePattern","name","obj","method","validFunctionName","getFuncName","fn","exec","match","Object","prototype","toString","call","length","constructor","eval"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,QAAtB,EAAgCC,UAAhC,EAA4CC,YAA5C,EAA0D;AAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAxD;;AAE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D,EAA6D;AAAE;AAC7D,QAAIP,YAAJ,EAAkB;AAChBC,cAAQD,YAAR,IAAwBK,IAAxB;AACD;AACD,WAAO,IAAP;AACD;;AAED,SAAO,KAAP;AACD,CA/ED","file":"is_callable.js","sourcesContent":["module.exports = function is_callable (mixedVar, syntaxOnly, callableName) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_callable/\n // original by: Brett Zamir (http://brett-zamir.me)\n // input by: François\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: The variable callableName cannot work as a string variable passed by\n // note 1: reference as in PHP (since JavaScript does not support passing\n // note 1: strings by reference), but instead will take the name of\n // note 1: a global variable and set that instead.\n // note 1: When used on an object, depends on a constructor property\n // note 1: being kept on the object prototype\n // note 2: Depending on the `callableName` that is passed, this function can use eval.\n // note 2: The eval input is however checked to only allow valid function names,\n // note 2: So it should not be unsafer than uses without eval (seeing as you can)\n // note 2: already pass any function to be executed here.\n // example 1: is_callable('is_callable')\n // returns 1: true\n // example 2: is_callable('bogusFunction', true)\n // returns 2: true // gives true because does not do strict checking\n // example 3: function SomeClass () {}\n // example 3: SomeClass.prototype.someMethod = function (){}\n // example 3: var testObj = new SomeClass()\n // example 3: is_callable([testObj, 'someMethod'], true, 'myVar')\n // example 3: var $result = myVar\n // returns 3: 'SomeClass::someMethod'\n // example 4: is_callable(function () {})\n // returns 4: true\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n var validJSFunctionNamePattern = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/\n\n var name = ''\n var obj = {}\n var method = ''\n var validFunctionName = false\n\n var getFuncName = function (fn) {\n var name = (/\\W*function\\s+([\\w$]+)\\s*\\(/).exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n\n if (typeof mixedVar === 'string') {\n obj = $global\n method = mixedVar\n name = mixedVar\n validFunctionName = !!name.match(validJSFunctionNamePattern)\n } else if (typeof mixedVar === 'function') {\n return true\n } else if (Object.prototype.toString.call(mixedVar) === '[object Array]' &&\n mixedVar.length === 2 &&\n typeof mixedVar[0] === 'object' &&\n typeof mixedVar[1] === 'string') {\n obj = mixedVar[0]\n method = mixedVar[1]\n name = (obj.constructor && getFuncName(obj.constructor)) + '::' + method\n } else {\n return false\n }\n\n if (syntaxOnly || typeof obj[method] === 'function') {\n if (callableName) {\n $global[callableName] = name\n }\n return true\n }\n\n // validFunctionName avoids exploits\n if (validFunctionName && typeof eval(method) === 'function') { // eslint-disable-line no-eval\n if (callableName) {\n $global[callableName] = name\n }\n return true\n }\n\n return false\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_double.js b/node_modules/locutus/php/var/is_double.js
deleted file mode 100644
index 7def351..0000000
--- a/node_modules/locutus/php/var/is_double.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function is_double(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_double/
- // original by: Paulo Freitas
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: is_double(186.31)
- // returns 1: true
-
- var _isFloat = require('../var/is_float');
- return _isFloat(mixedVar);
-};
-//# sourceMappingURL=is_double.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_double.js.map b/node_modules/locutus/php/var/is_double.js.map
deleted file mode 100644
index 4b9e697..0000000
--- a/node_modules/locutus/php/var/is_double.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_double.js"],"names":["module","exports","is_double","mixedVar","_isFloat","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,iBAAR,CAAf;AACA,SAAOD,SAASD,QAAT,CAAP;AACD,CAVD","file":"is_double.js","sourcesContent":["module.exports = function is_double (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_double/\n // original by: Paulo Freitas\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: is_double(186.31)\n // returns 1: true\n\n var _isFloat = require('../var/is_float')\n return _isFloat(mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_float.js b/node_modules/locutus/php/var/is_float.js
deleted file mode 100644
index f8f8871..0000000
--- a/node_modules/locutus/php/var/is_float.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-module.exports = function is_float(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_float/
- // original by: Paulo Freitas
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // improved by: WebDevHobo (http://webdevhobo.blogspot.com/)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: is_float(186.31)
- // returns 1: true
-
- return +mixedVar === mixedVar && (!isFinite(mixedVar) || !!(mixedVar % 1));
-};
-//# sourceMappingURL=is_float.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_float.js.map b/node_modules/locutus/php/var/is_float.js.map
deleted file mode 100644
index d31ea40..0000000
--- a/node_modules/locutus/php/var/is_float.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_float.js"],"names":["module","exports","is_float","mixedVar","isFinite"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,QAAnB,EAA6B;AAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAO,CAACA,QAAD,KAAcA,QAAd,KAA2B,CAACC,SAASD,QAAT,CAAD,IAAuB,CAAC,EAAEA,WAAW,CAAb,CAAnD,CAAP;AACD,CAZD","file":"is_float.js","sourcesContent":["module.exports = function is_float (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_float/\n // original by: Paulo Freitas\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // improved by: WebDevHobo (http://webdevhobo.blogspot.com/)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: is_float(186.31)\n // returns 1: true\n\n return +mixedVar === mixedVar && (!isFinite(mixedVar) || !!(mixedVar % 1))\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_int.js b/node_modules/locutus/php/var/is_int.js
deleted file mode 100644
index f234c4e..0000000
--- a/node_modules/locutus/php/var/is_int.js
+++ /dev/null
@@ -1,25 +0,0 @@
-"use strict";
-
-module.exports = function is_int(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_int/
- // original by: Alex
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: WebDevHobo (http://webdevhobo.blogspot.com/)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // revised by: Matt Bradley
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: is_int(23)
- // returns 1: true
- // example 2: is_int('23')
- // returns 2: false
- // example 3: is_int(23.5)
- // returns 3: false
- // example 4: is_int(true)
- // returns 4: false
-
- return mixedVar === +mixedVar && isFinite(mixedVar) && !(mixedVar % 1);
-};
-//# sourceMappingURL=is_int.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_int.js.map b/node_modules/locutus/php/var/is_int.js.map
deleted file mode 100644
index 93801e9..0000000
--- a/node_modules/locutus/php/var/is_int.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_int.js"],"names":["module","exports","is_int","mixedVar","isFinite"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2B;AAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOA,aAAa,CAACA,QAAd,IAA0BC,SAASD,QAAT,CAA1B,IAAgD,EAAEA,WAAW,CAAb,CAAvD;AACD,CApBD","file":"is_int.js","sourcesContent":["module.exports = function is_int (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_int/\n // original by: Alex\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: WebDevHobo (http://webdevhobo.blogspot.com/)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // revised by: Matt Bradley\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: is_int(23)\n // returns 1: true\n // example 2: is_int('23')\n // returns 2: false\n // example 3: is_int(23.5)\n // returns 3: false\n // example 4: is_int(true)\n // returns 4: false\n\n return mixedVar === +mixedVar && isFinite(mixedVar) && !(mixedVar % 1)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_integer.js b/node_modules/locutus/php/var/is_integer.js
deleted file mode 100644
index f3ab898..0000000
--- a/node_modules/locutus/php/var/is_integer.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function is_integer(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_integer/
- // original by: Paulo Freitas
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: is_integer(186.31)
- // returns 1: false
- // example 2: is_integer(12)
- // returns 2: true
-
- var _isInt = require('../var/is_int');
- return _isInt(mixedVar);
-};
-//# sourceMappingURL=is_integer.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_integer.js.map b/node_modules/locutus/php/var/is_integer.js.map
deleted file mode 100644
index 97ce877..0000000
--- a/node_modules/locutus/php/var/is_integer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_integer.js"],"names":["module","exports","is_integer","mixedVar","_isInt","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,QAArB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAASC,QAAQ,eAAR,CAAb;AACA,SAAOD,OAAOD,QAAP,CAAP;AACD,CAZD","file":"is_integer.js","sourcesContent":["module.exports = function is_integer (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_integer/\n // original by: Paulo Freitas\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: is_integer(186.31)\n // returns 1: false\n // example 2: is_integer(12)\n // returns 2: true\n\n var _isInt = require('../var/is_int')\n return _isInt(mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_long.js b/node_modules/locutus/php/var/is_long.js
deleted file mode 100644
index 848e8b8..0000000
--- a/node_modules/locutus/php/var/is_long.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function is_long(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_long/
- // original by: Paulo Freitas
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: is_long(186.31)
- // returns 1: true
-
- var _isFloat = require('../var/is_float');
- return _isFloat(mixedVar);
-};
-//# sourceMappingURL=is_long.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_long.js.map b/node_modules/locutus/php/var/is_long.js.map
deleted file mode 100644
index ff211b3..0000000
--- a/node_modules/locutus/php/var/is_long.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_long.js"],"names":["module","exports","is_long","mixedVar","_isFloat","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,iBAAR,CAAf;AACA,SAAOD,SAASD,QAAT,CAAP;AACD,CAVD","file":"is_long.js","sourcesContent":["module.exports = function is_long (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_long/\n // original by: Paulo Freitas\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: is_long(186.31)\n // returns 1: true\n\n var _isFloat = require('../var/is_float')\n return _isFloat(mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_null.js b/node_modules/locutus/php/var/is_null.js
deleted file mode 100644
index 6883e95..0000000
--- a/node_modules/locutus/php/var/is_null.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-
-module.exports = function is_null(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_null/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: is_null('23')
- // returns 1: false
- // example 2: is_null(null)
- // returns 2: true
-
- return mixedVar === null;
-};
-//# sourceMappingURL=is_null.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_null.js.map b/node_modules/locutus/php/var/is_null.js.map
deleted file mode 100644
index 805c8c4..0000000
--- a/node_modules/locutus/php/var/is_null.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_null.js"],"names":["module","exports","is_null","mixedVar"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,aAAa,IAArB;AACD,CATD","file":"is_null.js","sourcesContent":["module.exports = function is_null (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_null/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: is_null('23')\n // returns 1: false\n // example 2: is_null(null)\n // returns 2: true\n\n return (mixedVar === null)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_numeric.js b/node_modules/locutus/php/var/is_numeric.js
deleted file mode 100644
index b4076a2..0000000
--- a/node_modules/locutus/php/var/is_numeric.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-module.exports = function is_numeric(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_numeric/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: David
- // improved by: taith
- // bugfixed by: Tim de Koning
- // bugfixed by: WebDevHobo (http://webdevhobo.blogspot.com/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Denis Chenu (http://shnoulle.net)
- // example 1: is_numeric(186.31)
- // returns 1: true
- // example 2: is_numeric('Kevin van Zonneveld')
- // returns 2: false
- // example 3: is_numeric(' +186.31e2')
- // returns 3: true
- // example 4: is_numeric('')
- // returns 4: false
- // example 5: is_numeric([])
- // returns 5: false
- // example 6: is_numeric('1 ')
- // returns 6: false
-
- var whitespace = [' ', '\n', '\r', '\t', '\f', '\x0b', '\xa0', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', '\u200B', '\u2028', '\u2029', '\u3000'].join('');
-
- // @todo: Break this up using many single conditions with early returns
- return (typeof mixedVar === 'number' || typeof mixedVar === 'string' && whitespace.indexOf(mixedVar.slice(-1)) === -1) && mixedVar !== '' && !isNaN(mixedVar);
-};
-//# sourceMappingURL=is_numeric.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_numeric.js.map b/node_modules/locutus/php/var/is_numeric.js.map
deleted file mode 100644
index 57a8c24..0000000
--- a/node_modules/locutus/php/var/is_numeric.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_numeric.js"],"names":["module","exports","is_numeric","mixedVar","whitespace","join","indexOf","slice","isNaN"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,QAArB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,aAAa,CACf,GADe,EAEf,IAFe,EAGf,IAHe,EAIf,IAJe,EAKf,IALe,EAMf,MANe,EAOf,MAPe,EAQf,QARe,EASf,QATe,EAUf,QAVe,EAWf,QAXe,EAYf,QAZe,EAaf,QAbe,EAcf,QAde,EAef,QAfe,EAgBf,QAhBe,EAiBf,QAjBe,EAkBf,QAlBe,EAmBf,QAnBe,EAoBf,QApBe,EAqBf,QArBe,EAsBf,QAtBe,EAuBfC,IAvBe,CAuBV,EAvBU,CAAjB;;AAyBA;AACA,SAAO,CAAC,OAAOF,QAAP,KAAoB,QAApB,IACL,OAAOA,QAAP,KAAoB,QAApB,IACDC,WAAWE,OAAX,CAAmBH,SAASI,KAAT,CAAe,CAAC,CAAhB,CAAnB,MAA2C,CAAC,CAFvC,KAGLJ,aAAa,EAHR,IAIL,CAACK,MAAML,QAAN,CAJH;AAKD,CArDD","file":"is_numeric.js","sourcesContent":["module.exports = function is_numeric (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_numeric/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: David\n // improved by: taith\n // bugfixed by: Tim de Koning\n // bugfixed by: WebDevHobo (http://webdevhobo.blogspot.com/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Denis Chenu (http://shnoulle.net)\n // example 1: is_numeric(186.31)\n // returns 1: true\n // example 2: is_numeric('Kevin van Zonneveld')\n // returns 2: false\n // example 3: is_numeric(' +186.31e2')\n // returns 3: true\n // example 4: is_numeric('')\n // returns 4: false\n // example 5: is_numeric([])\n // returns 5: false\n // example 6: is_numeric('1 ')\n // returns 6: false\n\n var whitespace = [\n ' ',\n '\\n',\n '\\r',\n '\\t',\n '\\f',\n '\\x0b',\n '\\xa0',\n '\\u2000',\n '\\u2001',\n '\\u2002',\n '\\u2003',\n '\\u2004',\n '\\u2005',\n '\\u2006',\n '\\u2007',\n '\\u2008',\n '\\u2009',\n '\\u200a',\n '\\u200b',\n '\\u2028',\n '\\u2029',\n '\\u3000'\n ].join('')\n\n // @todo: Break this up using many single conditions with early returns\n return (typeof mixedVar === 'number' ||\n (typeof mixedVar === 'string' &&\n whitespace.indexOf(mixedVar.slice(-1)) === -1)) &&\n mixedVar !== '' &&\n !isNaN(mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_object.js b/node_modules/locutus/php/var/is_object.js
deleted file mode 100644
index 2b29c92..0000000
--- a/node_modules/locutus/php/var/is_object.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_object(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_object/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Legaev Andrey
- // improved by: Michael White (http://getsprink.com)
- // example 1: is_object('23')
- // returns 1: false
- // example 2: is_object({foo: 'bar'})
- // returns 2: true
- // example 3: is_object(null)
- // returns 3: false
-
- if (Object.prototype.toString.call(mixedVar) === '[object Array]') {
- return false;
- }
- return mixedVar !== null && (typeof mixedVar === 'undefined' ? 'undefined' : _typeof(mixedVar)) === 'object';
-};
-//# sourceMappingURL=is_object.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_object.js.map b/node_modules/locutus/php/var/is_object.js.map
deleted file mode 100644
index 0a6e31d..0000000
--- a/node_modules/locutus/php/var/is_object.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_object.js"],"names":["module","exports","is_object","mixedVar","Object","prototype","toString","call"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BJ,QAA/B,MAA6C,gBAAjD,EAAmE;AACjE,WAAO,KAAP;AACD;AACD,SAAOA,aAAa,IAAb,IAAqB,QAAOA,QAAP,yCAAOA,QAAP,OAAoB,QAAhD;AACD,CAhBD","file":"is_object.js","sourcesContent":["module.exports = function is_object (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_object/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Legaev Andrey\n // improved by: Michael White (http://getsprink.com)\n // example 1: is_object('23')\n // returns 1: false\n // example 2: is_object({foo: 'bar'})\n // returns 2: true\n // example 3: is_object(null)\n // returns 3: false\n\n if (Object.prototype.toString.call(mixedVar) === '[object Array]') {\n return false\n }\n return mixedVar !== null && typeof mixedVar === 'object'\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_real.js b/node_modules/locutus/php/var/is_real.js
deleted file mode 100644
index 932cfd4..0000000
--- a/node_modules/locutus/php/var/is_real.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function is_real(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_real/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
- // note 1: it different from the PHP implementation. We can't fix this unfortunately.
- // example 1: is_real(186.31)
- // returns 1: true
-
- var _isFloat = require('../var/is_float');
- return _isFloat(mixedVar);
-};
-//# sourceMappingURL=is_real.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_real.js.map b/node_modules/locutus/php/var/is_real.js.map
deleted file mode 100644
index 771afff..0000000
--- a/node_modules/locutus/php/var/is_real.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_real.js"],"names":["module","exports","is_real","mixedVar","_isFloat","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4B;AAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,WAAWC,QAAQ,iBAAR,CAAf;AACA,SAAOD,SAASD,QAAT,CAAP;AACD,CAVD","file":"is_real.js","sourcesContent":["module.exports = function is_real (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_real/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes\n // note 1: it different from the PHP implementation. We can't fix this unfortunately.\n // example 1: is_real(186.31)\n // returns 1: true\n\n var _isFloat = require('../var/is_float')\n return _isFloat(mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_scalar.js b/node_modules/locutus/php/var/is_scalar.js
deleted file mode 100644
index 16df4c4..0000000
--- a/node_modules/locutus/php/var/is_scalar.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function is_scalar(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_scalar/
- // original by: Paulo Freitas
- // example 1: is_scalar(186.31)
- // returns 1: true
- // example 2: is_scalar({0: 'Kevin van Zonneveld'})
- // returns 2: false
-
- return (/boolean|number|string/.test(typeof mixedVar === "undefined" ? "undefined" : _typeof(mixedVar))
- );
-};
-//# sourceMappingURL=is_scalar.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_scalar.js.map b/node_modules/locutus/php/var/is_scalar.js.map
deleted file mode 100644
index 3f28f10..0000000
--- a/node_modules/locutus/php/var/is_scalar.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_scalar.js"],"names":["module","exports","is_scalar","mixedVar","test"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQ,wBAAD,CAA0BC,IAA1B,QAAsCD,QAAtC,yCAAsCA,QAAtC;AAAP;AACD,CATD","file":"is_scalar.js","sourcesContent":["module.exports = function is_scalar (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_scalar/\n // original by: Paulo Freitas\n // example 1: is_scalar(186.31)\n // returns 1: true\n // example 2: is_scalar({0: 'Kevin van Zonneveld'})\n // returns 2: false\n\n return (/boolean|number|string/).test(typeof mixedVar)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_string.js b/node_modules/locutus/php/var/is_string.js
deleted file mode 100644
index b3560eb..0000000
--- a/node_modules/locutus/php/var/is_string.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function is_string(mixedVar) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_string/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: is_string('23')
- // returns 1: true
- // example 2: is_string(23.5)
- // returns 2: false
-
- return typeof mixedVar === 'string';
-};
-//# sourceMappingURL=is_string.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_string.js.map b/node_modules/locutus/php/var/is_string.js.map
deleted file mode 100644
index 12243be..0000000
--- a/node_modules/locutus/php/var/is_string.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_string.js"],"names":["module","exports","is_string","mixedVar"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,QAApB,EAA8B;AAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQ,OAAOA,QAAP,KAAoB,QAA5B;AACD,CATD","file":"is_string.js","sourcesContent":["module.exports = function is_string (mixedVar) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_string/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // example 1: is_string('23')\n // returns 1: true\n // example 2: is_string(23.5)\n // returns 2: false\n\n return (typeof mixedVar === 'string')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_unicode.js b/node_modules/locutus/php/var/is_unicode.js
deleted file mode 100644
index 52b0a94..0000000
--- a/node_modules/locutus/php/var/is_unicode.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-module.exports = function is_unicode(vr) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_unicode/
- // original by: Brett Zamir (http://brett-zamir.me)
- // note 1: Almost all strings in JavaScript should be Unicode
- // example 1: is_unicode('We the peoples of the United Nations...!')
- // returns 1: true
-
- if (typeof vr !== 'string') {
- return false;
- }
-
- // If surrogates occur outside of high-low pairs, then this is not Unicode
- var arr = [];
- var highSurrogate = '[\uD800-\uDBFF]';
- var lowSurrogate = '[\uDC00-\uDFFF]';
- var highSurrogateBeforeAny = new RegExp(highSurrogate + '([\\s\\S])', 'g');
- var lowSurrogateAfterAny = new RegExp('([\\s\\S])' + lowSurrogate, 'g');
- var singleLowSurrogate = new RegExp('^' + lowSurrogate + '$');
- var singleHighSurrogate = new RegExp('^' + highSurrogate + '$');
-
- while ((arr = highSurrogateBeforeAny.exec(vr)) !== null) {
- if (!arr[1] || !arr[1].match(singleLowSurrogate)) {
- // If high not followed by low surrogate
- return false;
- }
- }
- while ((arr = lowSurrogateAfterAny.exec(vr)) !== null) {
- if (!arr[1] || !arr[1].match(singleHighSurrogate)) {
- // If low not preceded by high surrogate
- return false;
- }
- }
-
- return true;
-};
-//# sourceMappingURL=is_unicode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/is_unicode.js.map b/node_modules/locutus/php/var/is_unicode.js.map
deleted file mode 100644
index fbfa483..0000000
--- a/node_modules/locutus/php/var/is_unicode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/is_unicode.js"],"names":["module","exports","is_unicode","vr","arr","highSurrogate","lowSurrogate","highSurrogateBeforeAny","RegExp","lowSurrogateAfterAny","singleLowSurrogate","singleHighSurrogate","exec","match"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,EAArB,EAAyB;AAAE;AAC1C;AACA;AACA;AACA;AACA;;AAEA,MAAI,OAAOA,EAAP,KAAc,QAAlB,EAA4B;AAC1B,WAAO,KAAP;AACD;;AAED;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,gBAAgB,iBAApB;AACA,MAAIC,eAAe,iBAAnB;AACA,MAAIC,yBAAyB,IAAIC,MAAJ,CAAWH,gBAAgB,YAA3B,EAAyC,GAAzC,CAA7B;AACA,MAAII,uBAAuB,IAAID,MAAJ,CAAW,eAAeF,YAA1B,EAAwC,GAAxC,CAA3B;AACA,MAAII,qBAAqB,IAAIF,MAAJ,CAAW,MAAMF,YAAN,GAAqB,GAAhC,CAAzB;AACA,MAAIK,sBAAsB,IAAIH,MAAJ,CAAW,MAAMH,aAAN,GAAsB,GAAjC,CAA1B;;AAEA,SAAO,CAACD,MAAMG,uBAAuBK,IAAvB,CAA4BT,EAA5B,CAAP,MAA4C,IAAnD,EAAyD;AACvD,QAAI,CAACC,IAAI,CAAJ,CAAD,IAAW,CAACA,IAAI,CAAJ,EAAOS,KAAP,CAAaH,kBAAb,CAAhB,EAAkD;AAChD;AACA,aAAO,KAAP;AACD;AACF;AACD,SAAO,CAACN,MAAMK,qBAAqBG,IAArB,CAA0BT,EAA1B,CAAP,MAA0C,IAAjD,EAAuD;AACrD,QAAI,CAACC,IAAI,CAAJ,CAAD,IAAW,CAACA,IAAI,CAAJ,EAAOS,KAAP,CAAaF,mBAAb,CAAhB,EAAmD;AACjD;AACA,aAAO,KAAP;AACD;AACF;;AAED,SAAO,IAAP;AACD,CAlCD","file":"is_unicode.js","sourcesContent":["module.exports = function is_unicode (vr) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/is_unicode/\n // original by: Brett Zamir (http://brett-zamir.me)\n // note 1: Almost all strings in JavaScript should be Unicode\n // example 1: is_unicode('We the peoples of the United Nations...!')\n // returns 1: true\n\n if (typeof vr !== 'string') {\n return false\n }\n\n // If surrogates occur outside of high-low pairs, then this is not Unicode\n var arr = []\n var highSurrogate = '[\\uD800-\\uDBFF]'\n var lowSurrogate = '[\\uDC00-\\uDFFF]'\n var highSurrogateBeforeAny = new RegExp(highSurrogate + '([\\\\s\\\\S])', 'g')\n var lowSurrogateAfterAny = new RegExp('([\\\\s\\\\S])' + lowSurrogate, 'g')\n var singleLowSurrogate = new RegExp('^' + lowSurrogate + '$')\n var singleHighSurrogate = new RegExp('^' + highSurrogate + '$')\n\n while ((arr = highSurrogateBeforeAny.exec(vr)) !== null) {\n if (!arr[1] || !arr[1].match(singleLowSurrogate)) {\n // If high not followed by low surrogate\n return false\n }\n }\n while ((arr = lowSurrogateAfterAny.exec(vr)) !== null) {\n if (!arr[1] || !arr[1].match(singleHighSurrogate)) {\n // If low not preceded by high surrogate\n return false\n }\n }\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/isset.js b/node_modules/locutus/php/var/isset.js
deleted file mode 100644
index 48108c2..0000000
--- a/node_modules/locutus/php/var/isset.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-module.exports = function isset() {
- // discuss at: http://locutus.io/php/isset/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: FremyCompany
- // improved by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: isset( undefined, true)
- // returns 1: false
- // example 2: isset( 'Kevin van Zonneveld' )
- // returns 2: true
-
- var a = arguments;
- var l = a.length;
- var i = 0;
- var undef;
-
- if (l === 0) {
- throw new Error('Empty isset');
- }
-
- while (i !== l) {
- if (a[i] === undef || a[i] === null) {
- return false;
- }
- i++;
- }
-
- return true;
-};
-//# sourceMappingURL=isset.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/isset.js.map b/node_modules/locutus/php/var/isset.js.map
deleted file mode 100644
index c62da64..0000000
--- a/node_modules/locutus/php/var/isset.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/isset.js"],"names":["module","exports","isset","a","arguments","l","length","i","undef","Error"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,GAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,IAAIC,SAAR;AACA,MAAIC,IAAIF,EAAEG,MAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAJ;;AAEA,MAAIH,MAAM,CAAV,EAAa;AACX,UAAM,IAAII,KAAJ,CAAU,aAAV,CAAN;AACD;;AAED,SAAOF,MAAMF,CAAb,EAAgB;AACd,QAAIF,EAAEI,CAAF,MAASC,KAAT,IAAkBL,EAAEI,CAAF,MAAS,IAA/B,EAAqC;AACnC,aAAO,KAAP;AACD;AACDA;AACD;;AAED,SAAO,IAAP;AACD,CA5BD","file":"isset.js","sourcesContent":["module.exports = function isset () {\n // discuss at: http://locutus.io/php/isset/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // improved by: FremyCompany\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Rafał Kukawski (http://blog.kukawski.pl)\n // example 1: isset( undefined, true)\n // returns 1: false\n // example 2: isset( 'Kevin van Zonneveld' )\n // returns 2: true\n\n var a = arguments\n var l = a.length\n var i = 0\n var undef\n\n if (l === 0) {\n throw new Error('Empty isset')\n }\n\n while (i !== l) {\n if (a[i] === undef || a[i] === null) {\n return false\n }\n i++\n }\n\n return true\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/print_r.js b/node_modules/locutus/php/var/print_r.js
deleted file mode 100644
index 534ebe3..0000000
--- a/node_modules/locutus/php/var/print_r.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function print_r(array, returnVal) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/print_r/
- // original by: Michael White (http://getsprink.com)
- // improved by: Ben Bryan
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Brett Zamir (http://brett-zamir.me)
- // example 1: print_r(1, true)
- // returns 1: '1'
-
- var echo = require('../strings/echo');
-
- var output = '';
- var padChar = ' ';
- var padVal = 4;
-
- var _repeatChar = function _repeatChar(len, padChar) {
- var str = '';
- for (var i = 0; i < len; i++) {
- str += padChar;
- }
- return str;
- };
- var _formatArray = function _formatArray(obj, curDepth, padVal, padChar) {
- if (curDepth > 0) {
- curDepth++;
- }
-
- var basePad = _repeatChar(padVal * curDepth, padChar);
- var thickPad = _repeatChar(padVal * (curDepth + 1), padChar);
- var str = '';
-
- if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.constructor) {
- str += 'Array\n' + basePad + '(\n';
- for (var key in obj) {
- if (Object.prototype.toString.call(obj[key]) === '[object Array]') {
- str += thickPad;
- str += '[';
- str += key;
- str += '] => ';
- str += _formatArray(obj[key], curDepth + 1, padVal, padChar);
- } else {
- str += thickPad;
- str += '[';
- str += key;
- str += '] => ';
- str += obj[key];
- str += '\n';
- }
- }
- str += basePad + ')\n';
- } else if (obj === null || obj === undefined) {
- str = '';
- } else {
- // for our "resource" class
- str = obj.toString();
- }
-
- return str;
- };
-
- output = _formatArray(array, 0, padVal, padChar);
-
- if (returnVal !== true) {
- echo(output);
- return true;
- }
- return output;
-};
-//# sourceMappingURL=print_r.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/print_r.js.map b/node_modules/locutus/php/var/print_r.js.map
deleted file mode 100644
index 964adcc..0000000
--- a/node_modules/locutus/php/var/print_r.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/print_r.js"],"names":["module","exports","print_r","array","returnVal","echo","require","output","padChar","padVal","_repeatChar","len","str","i","_formatArray","obj","curDepth","basePad","thickPad","constructor","key","Object","prototype","toString","call","undefined"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,KAAlB,EAAyBC,SAAzB,EAAoC;AAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,QAAQ,iBAAR,CAAX;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,UAAU,GAAd;AACA,MAAIC,SAAS,CAAb;;AAEA,MAAIC,cAAc,SAAdA,WAAc,CAAUC,GAAV,EAAeH,OAAf,EAAwB;AACxC,QAAII,MAAM,EAAV;AACA,SAAK,IAAIC,IAAI,CAAb,EAAgBA,IAAIF,GAApB,EAAyBE,GAAzB,EAA8B;AAC5BD,aAAOJ,OAAP;AACD;AACD,WAAOI,GAAP;AACD,GAND;AAOA,MAAIE,eAAe,SAAfA,YAAe,CAAUC,GAAV,EAAeC,QAAf,EAAyBP,MAAzB,EAAiCD,OAAjC,EAA0C;AAC3D,QAAIQ,WAAW,CAAf,EAAkB;AAChBA;AACD;;AAED,QAAIC,UAAUP,YAAYD,SAASO,QAArB,EAA+BR,OAA/B,CAAd;AACA,QAAIU,WAAWR,YAAYD,UAAUO,WAAW,CAArB,CAAZ,EAAqCR,OAArC,CAAf;AACA,QAAII,MAAM,EAAV;;AAEA,QAAI,QAAOG,GAAP,yCAAOA,GAAP,OAAe,QAAf,IACFA,QAAQ,IADN,IAEFA,IAAII,WAFN,EAEmB;AACjBP,aAAO,YAAYK,OAAZ,GAAsB,KAA7B;AACA,WAAK,IAAIG,GAAT,IAAgBL,GAAhB,EAAqB;AACnB,YAAIM,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BT,IAAIK,GAAJ,CAA/B,MAA6C,gBAAjD,EAAmE;AACjER,iBAAOM,QAAP;AACAN,iBAAO,GAAP;AACAA,iBAAOQ,GAAP;AACAR,iBAAO,OAAP;AACAA,iBAAOE,aAAaC,IAAIK,GAAJ,CAAb,EAAuBJ,WAAW,CAAlC,EAAqCP,MAArC,EAA6CD,OAA7C,CAAP;AACD,SAND,MAMO;AACLI,iBAAOM,QAAP;AACAN,iBAAO,GAAP;AACAA,iBAAOQ,GAAP;AACAR,iBAAO,OAAP;AACAA,iBAAOG,IAAIK,GAAJ,CAAP;AACAR,iBAAO,IAAP;AACD;AACF;AACDA,aAAOK,UAAU,KAAjB;AACD,KArBD,MAqBO,IAAIF,QAAQ,IAAR,IAAgBA,QAAQU,SAA5B,EAAuC;AAC5Cb,YAAM,EAAN;AACD,KAFM,MAEA;AACL;AACAA,YAAMG,IAAIQ,QAAJ,EAAN;AACD;;AAED,WAAOX,GAAP;AACD,GAtCD;;AAwCAL,WAASO,aAAaX,KAAb,EAAoB,CAApB,EAAuBM,MAAvB,EAA+BD,OAA/B,CAAT;;AAEA,MAAIJ,cAAc,IAAlB,EAAwB;AACtBC,SAAKE,MAAL;AACA,WAAO,IAAP;AACD;AACD,SAAOA,MAAP;AACD,CAtED","file":"print_r.js","sourcesContent":["module.exports = function print_r (array, returnVal) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/print_r/\n // original by: Michael White (http://getsprink.com)\n // improved by: Ben Bryan\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Brett Zamir (http://brett-zamir.me)\n // example 1: print_r(1, true)\n // returns 1: '1'\n\n var echo = require('../strings/echo')\n\n var output = ''\n var padChar = ' '\n var padVal = 4\n\n var _repeatChar = function (len, padChar) {\n var str = ''\n for (var i = 0; i < len; i++) {\n str += padChar\n }\n return str\n }\n var _formatArray = function (obj, curDepth, padVal, padChar) {\n if (curDepth > 0) {\n curDepth++\n }\n\n var basePad = _repeatChar(padVal * curDepth, padChar)\n var thickPad = _repeatChar(padVal * (curDepth + 1), padChar)\n var str = ''\n\n if (typeof obj === 'object' &&\n obj !== null &&\n obj.constructor) {\n str += 'Array\\n' + basePad + '(\\n'\n for (var key in obj) {\n if (Object.prototype.toString.call(obj[key]) === '[object Array]') {\n str += thickPad\n str += '['\n str += key\n str += '] => '\n str += _formatArray(obj[key], curDepth + 1, padVal, padChar)\n } else {\n str += thickPad\n str += '['\n str += key\n str += '] => '\n str += obj[key]\n str += '\\n'\n }\n }\n str += basePad + ')\\n'\n } else if (obj === null || obj === undefined) {\n str = ''\n } else {\n // for our \"resource\" class\n str = obj.toString()\n }\n\n return str\n }\n\n output = _formatArray(array, 0, padVal, padChar)\n\n if (returnVal !== true) {\n echo(output)\n return true\n }\n return output\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/serialize.js b/node_modules/locutus/php/var/serialize.js
deleted file mode 100644
index 63cb8e8..0000000
--- a/node_modules/locutus/php/var/serialize.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function serialize(mixedValue) {
- // discuss at: http://locutus.io/php/serialize/
- // original by: Arpad Ray (mailto:arpad@php.net)
- // improved by: Dino
- // improved by: Le Torbi (http://www.letorbi.de/)
- // improved by: Kevin van Zonneveld (http://kvz.io/)
- // bugfixed by: Andrej Pavlovic
- // bugfixed by: Garagoth
- // bugfixed by: Russell Walker (http://www.nbill.co.uk/)
- // bugfixed by: Jamie Beck (http://www.terabit.ca/)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io/)
- // bugfixed by: Ben (http://benblume.co.uk/)
- // bugfixed by: Codestar (http://codestarlive.com/)
- // bugfixed by: idjem (https://github.com/idjem)
- // input by: DtTvB (http://dt.in.th/2008-09-16.string-length-in-bytes.html)
- // input by: Martin (http://www.erlenwiese.de/)
- // note 1: We feel the main purpose of this function should be to ease
- // note 1: the transport of data between php & js
- // note 1: Aiming for PHP-compatibility, we have to translate objects to arrays
- // example 1: serialize(['Kevin', 'van', 'Zonneveld'])
- // returns 1: 'a:3:{i:0;s:5:"Kevin";i:1;s:3:"van";i:2;s:9:"Zonneveld";}'
- // example 2: serialize({firstName: 'Kevin', midName: 'van'})
- // returns 2: 'a:2:{s:9:"firstName";s:5:"Kevin";s:7:"midName";s:3:"van";}'
- // example 3: serialize( {'ü': 'ü', '四': '四', '𠜎': '𠜎'})
- // returns 3: 'a:3:{s:2:"ü";s:2:"ü";s:3:"四";s:3:"四";s:4:"𠜎";s:4:"𠜎";}'
-
- var val, key, okey;
- var ktype = '';
- var vals = '';
- var count = 0;
-
- var _utf8Size = function _utf8Size(str) {
- return ~-encodeURI(str).split(/%..|./).length;
- };
-
- var _getType = function _getType(inp) {
- var match;
- var key;
- var cons;
- var types;
- var type = typeof inp === 'undefined' ? 'undefined' : _typeof(inp);
-
- if (type === 'object' && !inp) {
- return 'null';
- }
-
- if (type === 'object') {
- if (!inp.constructor) {
- return 'object';
- }
- cons = inp.constructor.toString();
- match = cons.match(/(\w+)\(/);
- if (match) {
- cons = match[1].toLowerCase();
- }
- types = ['boolean', 'number', 'string', 'array'];
- for (key in types) {
- if (cons === types[key]) {
- type = types[key];
- break;
- }
- }
- }
- return type;
- };
-
- var type = _getType(mixedValue);
-
- switch (type) {
- case 'function':
- val = '';
- break;
- case 'boolean':
- val = 'b:' + (mixedValue ? '1' : '0');
- break;
- case 'number':
- val = (Math.round(mixedValue) === mixedValue ? 'i' : 'd') + ':' + mixedValue;
- break;
- case 'string':
- val = 's:' + _utf8Size(mixedValue) + ':"' + mixedValue + '"';
- break;
- case 'array':
- case 'object':
- val = 'a';
- /*
- if (type === 'object') {
- var objname = mixedValue.constructor.toString().match(/(\w+)\(\)/);
- if (objname === undefined) {
- return;
- }
- objname[1] = serialize(objname[1]);
- val = 'O' + objname[1].substring(1, objname[1].length - 1);
- }
- */
-
- for (key in mixedValue) {
- if (mixedValue.hasOwnProperty(key)) {
- ktype = _getType(mixedValue[key]);
- if (ktype === 'function') {
- continue;
- }
-
- okey = key.match(/^[0-9]+$/) ? parseInt(key, 10) : key;
- vals += serialize(okey) + serialize(mixedValue[key]);
- count++;
- }
- }
- val += ':' + count + ':{' + vals + '}';
- break;
- case 'undefined':
- default:
- // Fall-through
- // if the JS object has a property which contains a null value,
- // the string cannot be unserialized by PHP
- val = 'N';
- break;
- }
- if (type !== 'object' && type !== 'array') {
- val += ';';
- }
-
- return val;
-};
-//# sourceMappingURL=serialize.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/serialize.js.map b/node_modules/locutus/php/var/serialize.js.map
deleted file mode 100644
index 29940bf..0000000
--- a/node_modules/locutus/php/var/serialize.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/serialize.js"],"names":["module","exports","serialize","mixedValue","val","key","okey","ktype","vals","count","_utf8Size","str","encodeURI","split","length","_getType","inp","match","cons","types","type","constructor","toString","toLowerCase","Math","round","hasOwnProperty","parseInt"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAoBC,UAApB,EAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA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AAL;AACEA,YAAM,QAAQD,aAAa,GAAb,GAAmB,GAA3B,CAAN;AACA;AACF,SAAK,QAAL;AACEC,YAAM,CAACoB,KAAKC,KAAL,CAAWtB,UAAX,MAA2BA,UAA3B,GAAwC,GAAxC,GAA8C,GAA/C,IAAsD,GAAtD,GAA4DA,UAAlE;AACA;AACF,SAAK,QAAL;AACEC,YAAM,OAAOM,UAAUP,UAAV,CAAP,GAA+B,IAA/B,GAAsCA,UAAtC,GAAmD,GAAzD;AACA;AACF,SAAK,OAAL;AACA,SAAK,QAAL;AACEC,YAAM,GAAN;AACA;;;;;;;;;;;AAWA,WAAKC,GAAL,IAAYF,UAAZ,EAAwB;AACtB,YAAIA,WAAWuB,cAAX,CAA0BrB,GAA1B,CAAJ,EAAoC;AAClCE,kBAAQQ,SAASZ,WAAWE,GAAX,CAAT,CAAR;AACA,cAAIE,UAAU,UAAd,EAA0B;AACxB;AACD;;AAEDD,iBAAQD,IAAIY,KAAJ,CAAU,UAAV,IAAwBU,SAAStB,GAAT,EAAc,EAAd,CAAxB,GAA4CA,GAApD;AACAG,kBAAQN,UAAUI,IAAV,IAAkBJ,UAAUC,WAAWE,GAAX,CAAV,CAA1B;AACAI;AACD;AACF;AACDL,aAAO,MAAMK,KAAN,GAAc,IAAd,GAAqBD,IAArB,GAA4B,GAAnC;AACA;AACF,SAAK,WAAL;AACA;AACE;AACA;AACA;AACAJ,YAAM,GAAN;AACA;AA/CJ;AAiDA,MAAIgB,SAAS,QAAT,IAAqBA,SAAS,OAAlC,EAA2C;AACzChB,WAAO,GAAP;AACD;;AAED,SAAOA,GAAP;AACD,CA1HD","file":"serialize.js","sourcesContent":["module.exports = function serialize (mixedValue) {\n // discuss at: http://locutus.io/php/serialize/\n // original by: Arpad Ray (mailto:arpad@php.net)\n // improved by: Dino\n // improved by: Le Torbi (http://www.letorbi.de/)\n // improved by: Kevin van Zonneveld (http://kvz.io/)\n // bugfixed by: Andrej Pavlovic\n // bugfixed by: Garagoth\n // bugfixed by: Russell Walker (http://www.nbill.co.uk/)\n // bugfixed by: Jamie Beck (http://www.terabit.ca/)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io/)\n // bugfixed by: Ben (http://benblume.co.uk/)\n // bugfixed by: Codestar (http://codestarlive.com/)\n // bugfixed by: idjem (https://github.com/idjem)\n // input by: DtTvB (http://dt.in.th/2008-09-16.string-length-in-bytes.html)\n // input by: Martin (http://www.erlenwiese.de/)\n // note 1: We feel the main purpose of this function should be to ease\n // note 1: the transport of data between php & js\n // note 1: Aiming for PHP-compatibility, we have to translate objects to arrays\n // example 1: serialize(['Kevin', 'van', 'Zonneveld'])\n // returns 1: 'a:3:{i:0;s:5:\"Kevin\";i:1;s:3:\"van\";i:2;s:9:\"Zonneveld\";}'\n // example 2: serialize({firstName: 'Kevin', midName: 'van'})\n // returns 2: 'a:2:{s:9:\"firstName\";s:5:\"Kevin\";s:7:\"midName\";s:3:\"van\";}'\n // example 3: serialize( {'ü': 'ü', '四': '四', '𠜎': '𠜎'})\n // returns 3: 'a:3:{s:2:\"ü\";s:2:\"ü\";s:3:\"四\";s:3:\"四\";s:4:\"𠜎\";s:4:\"𠜎\";}'\n\n var val, key, okey\n var ktype = ''\n var vals = ''\n var count = 0\n\n var _utf8Size = function (str) {\n return ~-encodeURI(str).split(/%..|./).length\n }\n\n var _getType = function (inp) {\n var match\n var key\n var cons\n var types\n var type = typeof inp\n\n if (type === 'object' && !inp) {\n return 'null'\n }\n\n if (type === 'object') {\n if (!inp.constructor) {\n return 'object'\n }\n cons = inp.constructor.toString()\n match = cons.match(/(\\w+)\\(/)\n if (match) {\n cons = match[1].toLowerCase()\n }\n types = ['boolean', 'number', 'string', 'array']\n for (key in types) {\n if (cons === types[key]) {\n type = types[key]\n break\n }\n }\n }\n return type\n }\n\n var type = _getType(mixedValue)\n\n switch (type) {\n case 'function':\n val = ''\n break\n case 'boolean':\n val = 'b:' + (mixedValue ? '1' : '0')\n break\n case 'number':\n val = (Math.round(mixedValue) === mixedValue ? 'i' : 'd') + ':' + mixedValue\n break\n case 'string':\n val = 's:' + _utf8Size(mixedValue) + ':\"' + mixedValue + '\"'\n break\n case 'array':\n case 'object':\n val = 'a'\n /*\n if (type === 'object') {\n var objname = mixedValue.constructor.toString().match(/(\\w+)\\(\\)/);\n if (objname === undefined) {\n return;\n }\n objname[1] = serialize(objname[1]);\n val = 'O' + objname[1].substring(1, objname[1].length - 1);\n }\n */\n\n for (key in mixedValue) {\n if (mixedValue.hasOwnProperty(key)) {\n ktype = _getType(mixedValue[key])\n if (ktype === 'function') {\n continue\n }\n\n okey = (key.match(/^[0-9]+$/) ? parseInt(key, 10) : key)\n vals += serialize(okey) + serialize(mixedValue[key])\n count++\n }\n }\n val += ':' + count + ':{' + vals + '}'\n break\n case 'undefined':\n default:\n // Fall-through\n // if the JS object has a property which contains a null value,\n // the string cannot be unserialized by PHP\n val = 'N'\n break\n }\n if (type !== 'object' && type !== 'array') {\n val += ';'\n }\n\n return val\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/strval.js b/node_modules/locutus/php/var/strval.js
deleted file mode 100644
index a9d9b08..0000000
--- a/node_modules/locutus/php/var/strval.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-module.exports = function strval(str) {
- // discuss at: http://locutus.io/php/strval/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: strval({red: 1, green: 2, blue: 3, white: 4})
- // returns 1: 'Object'
-
- var gettype = require('../var/gettype');
- var type = '';
-
- if (str === null) {
- return '';
- }
-
- type = gettype(str);
-
- // Comment out the entire switch if you want JS-like
- // behavior instead of PHP behavior
- switch (type) {
- case 'boolean':
- if (str === true) {
- return '1';
- }
- return '';
- case 'array':
- return 'Array';
- case 'object':
- return 'Object';
- }
-
- return str;
-};
-//# sourceMappingURL=strval.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/strval.js.map b/node_modules/locutus/php/var/strval.js.map
deleted file mode 100644
index 4661716..0000000
--- a/node_modules/locutus/php/var/strval.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/strval.js"],"names":["module","exports","strval","str","gettype","require","type"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,GAAjB,EAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,gBAAR,CAAd;AACA,MAAIC,OAAO,EAAX;;AAEA,MAAIH,QAAQ,IAAZ,EAAkB;AAChB,WAAO,EAAP;AACD;;AAEDG,SAAOF,QAAQD,GAAR,CAAP;;AAEA;AACA;AACA,UAAQG,IAAR;AACE,SAAK,SAAL;AACE,UAAIH,QAAQ,IAAZ,EAAkB;AAChB,eAAO,GAAP;AACD;AACD,aAAO,EAAP;AACF,SAAK,OAAL;AACE,aAAO,OAAP;AACF,SAAK,QAAL;AACE,aAAO,QAAP;AATJ;;AAYA,SAAOA,GAAP;AACD,CAhCD","file":"strval.js","sourcesContent":["module.exports = function strval (str) {\n // discuss at: http://locutus.io/php/strval/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: strval({red: 1, green: 2, blue: 3, white: 4})\n // returns 1: 'Object'\n\n var gettype = require('../var/gettype')\n var type = ''\n\n if (str === null) {\n return ''\n }\n\n type = gettype(str)\n\n // Comment out the entire switch if you want JS-like\n // behavior instead of PHP behavior\n switch (type) {\n case 'boolean':\n if (str === true) {\n return '1'\n }\n return ''\n case 'array':\n return 'Array'\n case 'object':\n return 'Object'\n }\n\n return str\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/unserialize.js b/node_modules/locutus/php/var/unserialize.js
deleted file mode 100644
index 048a133..0000000
--- a/node_modules/locutus/php/var/unserialize.js
+++ /dev/null
@@ -1,204 +0,0 @@
-'use strict';
-
-module.exports = function unserialize(data) {
- // discuss at: http://locutus.io/php/unserialize/
- // original by: Arpad Ray (mailto:arpad@php.net)
- // improved by: Pedro Tainha (http://www.pedrotainha.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Chris
- // improved by: James
- // improved by: Le Torbi
- // improved by: Eli Skeggs
- // bugfixed by: dptr1988
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: philippsimon (https://github.com/philippsimon/)
- // revised by: d3x
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Martin (http://www.erlenwiese.de/)
- // input by: kilops
- // input by: Jaroslaw Czarniak
- // input by: lovasoa (https://github.com/lovasoa/)
- // note 1: We feel the main purpose of this function should be
- // note 1: to ease the transport of data between php & js
- // note 1: Aiming for PHP-compatibility, we have to translate objects to arrays
- // example 1: unserialize('a:3:{i:0;s:5:"Kevin";i:1;s:3:"van";i:2;s:9:"Zonneveld";}')
- // returns 1: ['Kevin', 'van', 'Zonneveld']
- // example 2: unserialize('a:2:{s:9:"firstName";s:5:"Kevin";s:7:"midName";s:3:"van";}')
- // returns 2: {firstName: 'Kevin', midName: 'van'}
- // example 3: unserialize('a:3:{s:2:"ü";s:2:"ü";s:3:"四";s:3:"四";s:4:"𠜎";s:4:"𠜎";}')
- // returns 3: {'ü': 'ü', '四': '四', '𠜎': '𠜎'}
-
- var $global = typeof window !== 'undefined' ? window : global;
-
- var utf8Overhead = function utf8Overhead(str) {
- var s = str.length;
- for (var i = str.length - 1; i >= 0; i--) {
- var code = str.charCodeAt(i);
- if (code > 0x7f && code <= 0x7ff) {
- s++;
- } else if (code > 0x7ff && code <= 0xffff) {
- s += 2;
- }
- // trail surrogate
- if (code >= 0xDC00 && code <= 0xDFFF) {
- i--;
- }
- }
- return s - 1;
- };
- var error = function error(type, msg, filename, line) {
- throw new $global[type](msg, filename, line);
- };
- var readUntil = function readUntil(data, offset, stopchr) {
- var i = 2;
- var buf = [];
- var chr = data.slice(offset, offset + 1);
-
- while (chr !== stopchr) {
- if (i + offset > data.length) {
- error('Error', 'Invalid');
- }
- buf.push(chr);
- chr = data.slice(offset + (i - 1), offset + i);
- i += 1;
- }
- return [buf.length, buf.join('')];
- };
- var readChrs = function readChrs(data, offset, length) {
- var i, chr, buf;
-
- buf = [];
- for (i = 0; i < length; i++) {
- chr = data.slice(offset + (i - 1), offset + i);
- buf.push(chr);
- length -= utf8Overhead(chr);
- }
- return [buf.length, buf.join('')];
- };
- function _unserialize(data, offset) {
- var dtype;
- var dataoffset;
- var keyandchrs;
- var keys;
- var contig;
- var length;
- var array;
- var readdata;
- var readData;
- var ccount;
- var stringlength;
- var i;
- var key;
- var kprops;
- var kchrs;
- var vprops;
- var vchrs;
- var value;
- var chrs = 0;
- var typeconvert = function typeconvert(x) {
- return x;
- };
-
- if (!offset) {
- offset = 0;
- }
- dtype = data.slice(offset, offset + 1).toLowerCase();
-
- dataoffset = offset + 2;
-
- switch (dtype) {
- case 'i':
- typeconvert = function typeconvert(x) {
- return parseInt(x, 10);
- };
- readData = readUntil(data, dataoffset, ';');
- chrs = readData[0];
- readdata = readData[1];
- dataoffset += chrs + 1;
- break;
- case 'b':
- typeconvert = function typeconvert(x) {
- return parseInt(x, 10) !== 0;
- };
- readData = readUntil(data, dataoffset, ';');
- chrs = readData[0];
- readdata = readData[1];
- dataoffset += chrs + 1;
- break;
- case 'd':
- typeconvert = function typeconvert(x) {
- return parseFloat(x);
- };
- readData = readUntil(data, dataoffset, ';');
- chrs = readData[0];
- readdata = readData[1];
- dataoffset += chrs + 1;
- break;
- case 'n':
- readdata = null;
- break;
- case 's':
- ccount = readUntil(data, dataoffset, ':');
- chrs = ccount[0];
- stringlength = ccount[1];
- dataoffset += chrs + 2;
-
- readData = readChrs(data, dataoffset + 1, parseInt(stringlength, 10));
- chrs = readData[0];
- readdata = readData[1];
- dataoffset += chrs + 2;
- if (chrs !== parseInt(stringlength, 10) && chrs !== readdata.length) {
- error('SyntaxError', 'String length mismatch');
- }
- break;
- case 'a':
- readdata = {};
-
- keyandchrs = readUntil(data, dataoffset, ':');
- chrs = keyandchrs[0];
- keys = keyandchrs[1];
- dataoffset += chrs + 2;
-
- length = parseInt(keys, 10);
- contig = true;
-
- for (i = 0; i < length; i++) {
- kprops = _unserialize(data, dataoffset);
- kchrs = kprops[1];
- key = kprops[2];
- dataoffset += kchrs;
-
- vprops = _unserialize(data, dataoffset);
- vchrs = vprops[1];
- value = vprops[2];
- dataoffset += vchrs;
-
- if (key !== i) {
- contig = false;
- }
-
- readdata[key] = value;
- }
-
- if (contig) {
- array = new Array(length);
- for (i = 0; i < length; i++) {
- array[i] = readdata[i];
- }
- readdata = array;
- }
-
- dataoffset += 1;
- break;
- default:
- error('SyntaxError', 'Unknown / Unhandled data type(s): ' + dtype);
- break;
- }
- return [dtype, dataoffset - offset, typeconvert(readdata)];
- }
-
- return _unserialize(data + '', 0)[2];
-};
-//# sourceMappingURL=unserialize.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/unserialize.js.map b/node_modules/locutus/php/var/unserialize.js.map
deleted file mode 100644
index dbf9160..0000000
--- a/node_modules/locutus/php/var/unserialize.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/unserialize.js"],"names":["module","exports","unserialize","data","$global","window","global","utf8Overhead","str","s","length","i","code","charCodeAt","error","type","msg","filename","line","readUntil","offset","stopchr","buf","chr","slice","push","join","readChrs","_unserialize","dtype","dataoffset","keyandchrs","keys","contig","array","readdata","readData","ccount","stringlength","key","kprops","kchrs","vprops","vchrs","value","chrs","typeconvert","x","toLowerCase","parseInt","parseFloat","Array"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,IAAtB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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uCAAuCe,KAA5D;AACA;AAtFJ;AAwFA,WAAO,CAACA,KAAD,EAAQC,aAAaV,MAArB,EAA6B0B,YAAYX,QAAZ,CAA7B,CAAP;AACD;;AAED,SAAOP,aAAczB,OAAO,EAArB,EAA0B,CAA1B,EAA6B,CAA7B,CAAP;AACD,CAzMD","file":"unserialize.js","sourcesContent":["module.exports = function unserialize (data) {\n // discuss at: http://locutus.io/php/unserialize/\n // original by: Arpad Ray (mailto:arpad@php.net)\n // improved by: Pedro Tainha (http://www.pedrotainha.com)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Chris\n // improved by: James\n // improved by: Le Torbi\n // improved by: Eli Skeggs\n // bugfixed by: dptr1988\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: philippsimon (https://github.com/philippsimon/)\n // revised by: d3x\n // input by: Brett Zamir (http://brett-zamir.me)\n // input by: Martin (http://www.erlenwiese.de/)\n // input by: kilops\n // input by: Jaroslaw Czarniak\n // input by: lovasoa (https://github.com/lovasoa/)\n // note 1: We feel the main purpose of this function should be\n // note 1: to ease the transport of data between php & js\n // note 1: Aiming for PHP-compatibility, we have to translate objects to arrays\n // example 1: unserialize('a:3:{i:0;s:5:\"Kevin\";i:1;s:3:\"van\";i:2;s:9:\"Zonneveld\";}')\n // returns 1: ['Kevin', 'van', 'Zonneveld']\n // example 2: unserialize('a:2:{s:9:\"firstName\";s:5:\"Kevin\";s:7:\"midName\";s:3:\"van\";}')\n // returns 2: {firstName: 'Kevin', midName: 'van'}\n // example 3: unserialize('a:3:{s:2:\"ü\";s:2:\"ü\";s:3:\"四\";s:3:\"四\";s:4:\"𠜎\";s:4:\"𠜎\";}')\n // returns 3: {'ü': 'ü', '四': '四', '𠜎': '𠜎'}\n\n var $global = (typeof window !== 'undefined' ? window : global)\n\n var utf8Overhead = function (str) {\n var s = str.length\n for (var i = str.length - 1; i >= 0; i--) {\n var code = str.charCodeAt(i)\n if (code > 0x7f && code <= 0x7ff) {\n s++\n } else if (code > 0x7ff && code <= 0xffff) {\n s += 2\n }\n // trail surrogate\n if (code >= 0xDC00 && code <= 0xDFFF) {\n i--\n }\n }\n return s - 1\n }\n var error = function (type,\n msg, filename, line) {\n throw new $global[type](msg, filename, line)\n }\n var readUntil = function (data, offset, stopchr) {\n var i = 2\n var buf = []\n var chr = data.slice(offset, offset + 1)\n\n while (chr !== stopchr) {\n if ((i + offset) > data.length) {\n error('Error', 'Invalid')\n }\n buf.push(chr)\n chr = data.slice(offset + (i - 1), offset + i)\n i += 1\n }\n return [buf.length, buf.join('')]\n }\n var readChrs = function (data, offset, length) {\n var i, chr, buf\n\n buf = []\n for (i = 0; i < length; i++) {\n chr = data.slice(offset + (i - 1), offset + i)\n buf.push(chr)\n length -= utf8Overhead(chr)\n }\n return [buf.length, buf.join('')]\n }\n function _unserialize (data, offset) {\n var dtype\n var dataoffset\n var keyandchrs\n var keys\n var contig\n var length\n var array\n var readdata\n var readData\n var ccount\n var stringlength\n var i\n var key\n var kprops\n var kchrs\n var vprops\n var vchrs\n var value\n var chrs = 0\n var typeconvert = function (x) {\n return x\n }\n\n if (!offset) {\n offset = 0\n }\n dtype = (data.slice(offset, offset + 1)).toLowerCase()\n\n dataoffset = offset + 2\n\n switch (dtype) {\n case 'i':\n typeconvert = function (x) {\n return parseInt(x, 10)\n }\n readData = readUntil(data, dataoffset, ';')\n chrs = readData[0]\n readdata = readData[1]\n dataoffset += chrs + 1\n break\n case 'b':\n typeconvert = function (x) {\n return parseInt(x, 10) !== 0\n }\n readData = readUntil(data, dataoffset, ';')\n chrs = readData[0]\n readdata = readData[1]\n dataoffset += chrs + 1\n break\n case 'd':\n typeconvert = function (x) {\n return parseFloat(x)\n }\n readData = readUntil(data, dataoffset, ';')\n chrs = readData[0]\n readdata = readData[1]\n dataoffset += chrs + 1\n break\n case 'n':\n readdata = null\n break\n case 's':\n ccount = readUntil(data, dataoffset, ':')\n chrs = ccount[0]\n stringlength = ccount[1]\n dataoffset += chrs + 2\n\n readData = readChrs(data, dataoffset + 1, parseInt(stringlength, 10))\n chrs = readData[0]\n readdata = readData[1]\n dataoffset += chrs + 2\n if (chrs !== parseInt(stringlength, 10) && chrs !== readdata.length) {\n error('SyntaxError', 'String length mismatch')\n }\n break\n case 'a':\n readdata = {}\n\n keyandchrs = readUntil(data, dataoffset, ':')\n chrs = keyandchrs[0]\n keys = keyandchrs[1]\n dataoffset += chrs + 2\n\n length = parseInt(keys, 10)\n contig = true\n\n for (i = 0; i < length; i++) {\n kprops = _unserialize(data, dataoffset)\n kchrs = kprops[1]\n key = kprops[2]\n dataoffset += kchrs\n\n vprops = _unserialize(data, dataoffset)\n vchrs = vprops[1]\n value = vprops[2]\n dataoffset += vchrs\n\n if (key !== i) {\n contig = false\n }\n\n readdata[key] = value\n }\n\n if (contig) {\n array = new Array(length)\n for (i = 0; i < length; i++) {\n array[i] = readdata[i]\n }\n readdata = array\n }\n\n dataoffset += 1\n break\n default:\n error('SyntaxError', 'Unknown / Unhandled data type(s): ' + dtype)\n break\n }\n return [dtype, dataoffset - offset, typeconvert(readdata)]\n }\n\n return _unserialize((data + ''), 0)[2]\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/var_dump.js b/node_modules/locutus/php/var/var_dump.js
deleted file mode 100644
index 96cf6e6..0000000
--- a/node_modules/locutus/php/var/var_dump.js
+++ /dev/null
@@ -1,173 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function var_dump() {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/var_dump/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Zahlii
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: For returning a string, use var_export() with the second argument set to true
- // test: skip-all
- // example 1: var_dump(1)
- // returns 1: 'int(1)'
-
- var echo = require('../strings/echo');
- var output = '';
- var padChar = ' ';
- var padVal = 4;
- var lgth = 0;
- var i = 0;
-
- var _getFuncName = function _getFuncName(fn) {
- var name = /\W*function\s+([\w$]+)\s*\(/.exec(fn);
- if (!name) {
- return '(Anonymous)';
- }
- return name[1];
- };
-
- var _repeatChar = function _repeatChar(len, padChar) {
- var str = '';
- for (var i = 0; i < len; i++) {
- str += padChar;
- }
- return str;
- };
- var _getInnerVal = function _getInnerVal(val, thickPad) {
- var ret = '';
- if (val === null) {
- ret = 'NULL';
- } else if (typeof val === 'boolean') {
- ret = 'bool(' + val + ')';
- } else if (typeof val === 'string') {
- ret = 'string(' + val.length + ') "' + val + '"';
- } else if (typeof val === 'number') {
- if (parseFloat(val) === parseInt(val, 10)) {
- ret = 'int(' + val + ')';
- } else {
- ret = 'float(' + val + ')';
- }
- } else if (typeof val === 'undefined') {
- // The remaining are not PHP behavior because these values
- // only exist in this exact form in JavaScript
- ret = 'undefined';
- } else if (typeof val === 'function') {
- var funcLines = val.toString().split('\n');
- ret = '';
- for (var i = 0, fll = funcLines.length; i < fll; i++) {
- ret += (i !== 0 ? '\n' + thickPad : '') + funcLines[i];
- }
- } else if (val instanceof Date) {
- ret = 'Date(' + val + ')';
- } else if (val instanceof RegExp) {
- ret = 'RegExp(' + val + ')';
- } else if (val.nodeName) {
- // Different than PHP's DOMElement
- switch (val.nodeType) {
- case 1:
- if (typeof val.namespaceURI === 'undefined' || val.namespaceURI === 'http://www.w3.org/1999/xhtml') {
- // Undefined namespace could be plain XML, but namespaceURI not widely supported
- ret = 'HTMLElement("' + val.nodeName + '")';
- } else {
- ret = 'XML Element("' + val.nodeName + '")';
- }
- break;
- case 2:
- ret = 'ATTRIBUTE_NODE(' + val.nodeName + ')';
- break;
- case 3:
- ret = 'TEXT_NODE(' + val.nodeValue + ')';
- break;
- case 4:
- ret = 'CDATA_SECTION_NODE(' + val.nodeValue + ')';
- break;
- case 5:
- ret = 'ENTITY_REFERENCE_NODE';
- break;
- case 6:
- ret = 'ENTITY_NODE';
- break;
- case 7:
- ret = 'PROCESSING_INSTRUCTION_NODE(' + val.nodeName + ':' + val.nodeValue + ')';
- break;
- case 8:
- ret = 'COMMENT_NODE(' + val.nodeValue + ')';
- break;
- case 9:
- ret = 'DOCUMENT_NODE';
- break;
- case 10:
- ret = 'DOCUMENT_TYPE_NODE';
- break;
- case 11:
- ret = 'DOCUMENT_FRAGMENT_NODE';
- break;
- case 12:
- ret = 'NOTATION_NODE';
- break;
- }
- }
- return ret;
- };
-
- var _formatArray = function _formatArray(obj, curDepth, padVal, padChar) {
- if (curDepth > 0) {
- curDepth++;
- }
-
- var basePad = _repeatChar(padVal * (curDepth - 1), padChar);
- var thickPad = _repeatChar(padVal * (curDepth + 1), padChar);
- var str = '';
- var val = '';
-
- if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {
- if (obj.constructor && _getFuncName(obj.constructor) === 'LOCUTUS_Resource') {
- return obj.var_dump();
- }
- lgth = 0;
- for (var someProp in obj) {
- if (obj.hasOwnProperty(someProp)) {
- lgth++;
- }
- }
- str += 'array(' + lgth + ') {\n';
- for (var key in obj) {
- var objVal = obj[key];
- if ((typeof objVal === 'undefined' ? 'undefined' : _typeof(objVal)) === 'object' && objVal !== null && !(objVal instanceof Date) && !(objVal instanceof RegExp) && !objVal.nodeName) {
- str += thickPad;
- str += '[';
- str += key;
- str += '] =>\n';
- str += thickPad;
- str += _formatArray(objVal, curDepth + 1, padVal, padChar);
- } else {
- val = _getInnerVal(objVal, thickPad);
- str += thickPad;
- str += '[';
- str += key;
- str += '] =>\n';
- str += thickPad;
- str += val;
- str += '\n';
- }
- }
- str += basePad + '}\n';
- } else {
- str = _getInnerVal(obj, thickPad);
- }
- return str;
- };
-
- output = _formatArray(arguments[0], 0, padVal, padChar);
- for (i = 1; i < arguments.length; i++) {
- output += '\n' + _formatArray(arguments[i], 0, padVal, padChar);
- }
-
- echo(output);
-
- // Not how PHP does it, but helps us test:
- return output;
-};
-//# sourceMappingURL=var_dump.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/var_dump.js.map b/node_modules/locutus/php/var/var_dump.js.map
deleted file mode 100644
index dacfb43..0000000
--- a/node_modules/locutus/php/var/var_dump.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/var_dump.js"],"names":["module","exports","var_dump","echo","require","output","padChar","padVal","lgth","i","_getFuncName","fn","name","exec","_repeatChar","len","str","_getInnerVal","val","thickPad","ret","length","parseFloat","parseInt","funcLines","toString","split","fll","Date","RegExp","nodeName","nodeType","namespaceURI","nodeValue","_formatArray","obj","curDepth","basePad","constructor","someProp","hasOwnProperty","key","objVal","arguments"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,GAAqB;AAAE;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,QAAQ,iBAAR,CAAX;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,UAAU,GAAd;AACA,MAAIC,SAAS,CAAb;AACA,MAAIC,OAAO,CAAX;AACA,MAAIC,IAAI,CAAR;;AAEA,MAAIC,eAAe,SAAfA,YAAe,CAAUC,EAAV,EAAc;AAC/B,QAAIC,OAAQ,6BAAD,CACRC,IADQ,CACHF,EADG,CAAX;AAEA,QAAI,CAACC,IAAL,EAAW;AACT,aAAO,aAAP;AACD;AACD,WAAOA,KAAK,CAAL,CAAP;AACD,GAPD;;AASA,MAAIE,cAAc,SAAdA,WAAc,CAAUC,GAAV,EAAeT,OAAf,EAAwB;AACxC,QAAIU,MAAM,EAAV;AACA,SAAK,IAAIP,IAAI,CAAb,EAAgBA,IAAIM,GAApB,EAAyBN,GAAzB,EAA8B;AAC5BO,aAAOV,OAAP;AACD;AACD,WAAOU,GAAP;AACD,GAND;AAOA,MAAIC,eAAe,SAAfA,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hB,QAAlB,CAAN;AACD;AACD,WAAOH,GAAP;AACD,GAlDD;;AAoDAX,WAAS6B,aAAaS,UAAU,CAAV,CAAb,EAA2B,CAA3B,EAA8BpC,MAA9B,EAAsCD,OAAtC,CAAT;AACA,OAAKG,IAAI,CAAT,EAAYA,IAAIkC,UAAUtB,MAA1B,EAAkCZ,GAAlC,EAAuC;AACrCJ,cAAU,OAAO6B,aAAaS,UAAUlC,CAAV,CAAb,EAA2B,CAA3B,EAA8BF,MAA9B,EAAsCD,OAAtC,CAAjB;AACD;;AAEDH,OAAKE,MAAL;;AAEA;AACA,SAAOA,MAAP;AACD,CA7KD","file":"var_dump.js","sourcesContent":["module.exports = function var_dump () { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/var_dump/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Zahlii\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: For returning a string, use var_export() with the second argument set to true\n // test: skip-all\n // example 1: var_dump(1)\n // returns 1: 'int(1)'\n\n var echo = require('../strings/echo')\n var output = ''\n var padChar = ' '\n var padVal = 4\n var lgth = 0\n var i = 0\n\n var _getFuncName = function (fn) {\n var name = (/\\W*function\\s+([\\w$]+)\\s*\\(/)\n .exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n\n var _repeatChar = function (len, padChar) {\n var str = ''\n for (var i = 0; i < len; i++) {\n str += padChar\n }\n return str\n }\n var _getInnerVal = function (val, thickPad) {\n var ret = ''\n if (val === null) {\n ret = 'NULL'\n } else if (typeof val === 'boolean') {\n ret = 'bool(' + val + ')'\n } else if (typeof val === 'string') {\n ret = 'string(' + val.length + ') \"' + val + '\"'\n } else if (typeof val === 'number') {\n if (parseFloat(val) === parseInt(val, 10)) {\n ret = 'int(' + val + ')'\n } else {\n ret = 'float(' + val + ')'\n }\n } else if (typeof val === 'undefined') {\n // The remaining are not PHP behavior because these values\n // only exist in this exact form in JavaScript\n ret = 'undefined'\n } else if (typeof val === 'function') {\n var funcLines = val.toString()\n .split('\\n')\n ret = ''\n for (var i = 0, fll = funcLines.length; i < fll; i++) {\n ret += (i !== 0 ? '\\n' + thickPad : '') + funcLines[i]\n }\n } else if (val instanceof Date) {\n ret = 'Date(' + val + ')'\n } else if (val instanceof RegExp) {\n ret = 'RegExp(' + val + ')'\n } else if (val.nodeName) {\n // Different than PHP's DOMElement\n switch (val.nodeType) {\n case 1:\n if (typeof val.namespaceURI === 'undefined' ||\n val.namespaceURI === 'http://www.w3.org/1999/xhtml') {\n // Undefined namespace could be plain XML, but namespaceURI not widely supported\n ret = 'HTMLElement(\"' + val.nodeName + '\")'\n } else {\n ret = 'XML Element(\"' + val.nodeName + '\")'\n }\n break\n case 2:\n ret = 'ATTRIBUTE_NODE(' + val.nodeName + ')'\n break\n case 3:\n ret = 'TEXT_NODE(' + val.nodeValue + ')'\n break\n case 4:\n ret = 'CDATA_SECTION_NODE(' + val.nodeValue + ')'\n break\n case 5:\n ret = 'ENTITY_REFERENCE_NODE'\n break\n case 6:\n ret = 'ENTITY_NODE'\n break\n case 7:\n ret = 'PROCESSING_INSTRUCTION_NODE(' + val.nodeName + ':' + val.nodeValue + ')'\n break\n case 8:\n ret = 'COMMENT_NODE(' + val.nodeValue + ')'\n break\n case 9:\n ret = 'DOCUMENT_NODE'\n break\n case 10:\n ret = 'DOCUMENT_TYPE_NODE'\n break\n case 11:\n ret = 'DOCUMENT_FRAGMENT_NODE'\n break\n case 12:\n ret = 'NOTATION_NODE'\n break\n }\n }\n return ret\n }\n\n var _formatArray = function (obj, curDepth, padVal, padChar) {\n if (curDepth > 0) {\n curDepth++\n }\n\n var basePad = _repeatChar(padVal * (curDepth - 1), padChar)\n var thickPad = _repeatChar(padVal * (curDepth + 1), padChar)\n var str = ''\n var val = ''\n\n if (typeof obj === 'object' && obj !== null) {\n if (obj.constructor && _getFuncName(obj.constructor) === 'LOCUTUS_Resource') {\n return obj.var_dump()\n }\n lgth = 0\n for (var someProp in obj) {\n if (obj.hasOwnProperty(someProp)) {\n lgth++\n }\n }\n str += 'array(' + lgth + ') {\\n'\n for (var key in obj) {\n var objVal = obj[key]\n if (typeof objVal === 'object' &&\n objVal !== null &&\n !(objVal instanceof Date) &&\n !(objVal instanceof RegExp) &&\n !objVal.nodeName) {\n str += thickPad\n str += '['\n str += key\n str += '] =>\\n'\n str += thickPad\n str += _formatArray(objVal, curDepth + 1, padVal, padChar)\n } else {\n val = _getInnerVal(objVal, thickPad)\n str += thickPad\n str += '['\n str += key\n str += '] =>\\n'\n str += thickPad\n str += val\n str += '\\n'\n }\n }\n str += basePad + '}\\n'\n } else {\n str = _getInnerVal(obj, thickPad)\n }\n return str\n }\n\n output = _formatArray(arguments[0], 0, padVal, padChar)\n for (i = 1; i < arguments.length; i++) {\n output += '\\n' + _formatArray(arguments[i], 0, padVal, padChar)\n }\n\n echo(output)\n\n // Not how PHP does it, but helps us test:\n return output\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/var/var_export.js b/node_modules/locutus/php/var/var_export.js
deleted file mode 100644
index eec6b3a..0000000
--- a/node_modules/locutus/php/var/var_export.js
+++ /dev/null
@@ -1,121 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function var_export(mixedExpression, boolReturn) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/var_export/
- // original by: Philip Peterson
- // improved by: johnrembo
- // improved by: Brett Zamir (http://brett-zamir.me)
- // input by: Brian Tafoya (http://www.premasolutions.com/)
- // input by: Hans Henrik (http://hanshenrik.tk/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // example 1: var_export(null)
- // returns 1: null
- // example 2: var_export({0: 'Kevin', 1: 'van', 2: 'Zonneveld'}, true)
- // returns 2: "array (\n 0 => 'Kevin',\n 1 => 'van',\n 2 => 'Zonneveld'\n)"
- // example 3: var data = 'Kevin'
- // example 3: var_export(data, true)
- // returns 3: "'Kevin'"
-
- var echo = require('../strings/echo');
- var retstr = '';
- var iret = '';
- var value;
- var cnt = 0;
- var x = [];
- var i = 0;
- var funcParts = [];
- // We use the last argument (not part of PHP) to pass in
- // our indentation level
- var idtLevel = arguments[2] || 2;
- var innerIndent = '';
- var outerIndent = '';
- var getFuncName = function getFuncName(fn) {
- var name = /\W*function\s+([\w$]+)\s*\(/.exec(fn);
- if (!name) {
- return '(Anonymous)';
- }
- return name[1];
- };
-
- var _makeIndent = function _makeIndent(idtLevel) {
- return new Array(idtLevel + 1).join(' ');
- };
- var __getType = function __getType(inp) {
- var i = 0;
- var match;
- var types;
- var cons;
- var type = typeof inp === 'undefined' ? 'undefined' : _typeof(inp);
- if (type === 'object' && inp && inp.constructor && getFuncName(inp.constructor) === 'LOCUTUS_Resource') {
- return 'resource';
- }
- if (type === 'function') {
- return 'function';
- }
- if (type === 'object' && !inp) {
- // Should this be just null?
- return 'null';
- }
- if (type === 'object') {
- if (!inp.constructor) {
- return 'object';
- }
- cons = inp.constructor.toString();
- match = cons.match(/(\w+)\(/);
- if (match) {
- cons = match[1].toLowerCase();
- }
- types = ['boolean', 'number', 'string', 'array'];
- for (i = 0; i < types.length; i++) {
- if (cons === types[i]) {
- type = types[i];
- break;
- }
- }
- }
- return type;
- };
- var type = __getType(mixedExpression);
-
- if (type === null) {
- retstr = 'NULL';
- } else if (type === 'array' || type === 'object') {
- outerIndent = _makeIndent(idtLevel - 2);
- innerIndent = _makeIndent(idtLevel);
- for (i in mixedExpression) {
- value = var_export(mixedExpression[i], 1, idtLevel + 2);
- value = typeof value === 'string' ? value.replace(/</g, '&lt;').replace(/>/g, '&gt;') : value;
- x[cnt++] = innerIndent + i + ' => ' + (__getType(mixedExpression[i]) === 'array' ? '\n' : '') + value;
- }
- iret = x.join(',\n');
- retstr = outerIndent + 'array (\n' + iret + '\n' + outerIndent + ')';
- } else if (type === 'function') {
- funcParts = mixedExpression.toString().match(/function .*?\((.*?)\) \{([\s\S]*)\}/);
-
- // For lambda functions, var_export() outputs such as the following:
- // '\000lambda_1'. Since it will probably not be a common use to
- // expect this (unhelpful) form, we'll use another PHP-exportable
- // construct, create_function() (though dollar signs must be on the
- // variables in JavaScript); if using instead in JavaScript and you
- // are using the namespaced version, note that create_function() will
- // not be available as a global
- retstr = "create_function ('" + funcParts[1] + "', '" + funcParts[2].replace(new RegExp("'", 'g'), "\\'") + "')";
- } else if (type === 'resource') {
- // Resources treated as null for var_export
- retstr = 'NULL';
- } else {
- retstr = typeof mixedExpression !== 'string' ? mixedExpression : "'" + mixedExpression.replace(/(["'])/g, '\\$1').replace(/\0/g, '\\0') + "'";
- }
-
- if (!boolReturn) {
- echo(retstr);
- return null;
- }
-
- return retstr;
-};
-//# sourceMappingURL=var_export.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/var/var_export.js.map b/node_modules/locutus/php/var/var_export.js.map
deleted file mode 100644
index 03812d2..0000000
--- a/node_modules/locutus/php/var/var_export.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/var/var_export.js"],"names":["module","exports","var_export","mixedExpression","boolReturn","echo","require","retstr","iret","value","cnt","x","i","funcParts","idtLevel","arguments","innerIndent","outerIndent","getFuncName","fn","name","exec","_makeIndent","Array","join","__getType","inp","match","types","cons","type","constructor","toString","toLowerCase","length","replace","RegExp"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAqBC,eAArB,EAAsCC,UAAtC,EAAkD;AAAE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,OAAOC,QAAQ,iBAAR,CAAX;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,KAAJ;AACA,MAAIC,MAAM,CAAV;AAC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AACA;AACA;AACApB,aAAS,uBAAuBM,UAAU,CAAV,CAAvB,GAAsC,MAAtC,GACPA,UAAU,CAAV,EAAasB,OAAb,CAAqB,IAAIC,MAAJ,CAAW,GAAX,EAAgB,GAAhB,CAArB,EAA2C,KAA3C,CADO,GAC6C,IADtD;AAED,GAZM,MAYA,IAAIN,SAAS,UAAb,EAAyB;AAC9B;AACAvB,aAAS,MAAT;AACD,GAHM,MAGA;AACLA,aAAS,OAAOJ,eAAP,KAA2B,QAA3B,GAAsCA,eAAtC,GACL,MAAMA,gBAAgBgC,OAAhB,CAAwB,SAAxB,EAAmC,MAAnC,EAA2CA,OAA3C,CAAmD,KAAnD,EAA0D,KAA1D,CAAN,GAAyE,GAD7E;AAED;;AAED,MAAI,CAAC/B,UAAL,EAAiB;AACfC,SAAKE,MAAL;AACA,WAAO,IAAP;AACD;;AAED,SAAOA,MAAP;AACD,CAxHD","file":"var_export.js","sourcesContent":["module.exports = function var_export (mixedExpression, boolReturn) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/var_export/\n // original by: Philip Peterson\n // improved by: johnrembo\n // improved by: Brett Zamir (http://brett-zamir.me)\n // input by: Brian Tafoya (http://www.premasolutions.com/)\n // input by: Hans Henrik (http://hanshenrik.tk/)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: var_export(null)\n // returns 1: null\n // example 2: var_export({0: 'Kevin', 1: 'van', 2: 'Zonneveld'}, true)\n // returns 2: \"array (\\n 0 => 'Kevin',\\n 1 => 'van',\\n 2 => 'Zonneveld'\\n)\"\n // example 3: var data = 'Kevin'\n // example 3: var_export(data, true)\n // returns 3: \"'Kevin'\"\n\n var echo = require('../strings/echo')\n var retstr = ''\n var iret = ''\n var value\n var cnt = 0\n var x = []\n var i = 0\n var funcParts = []\n // We use the last argument (not part of PHP) to pass in\n // our indentation level\n var idtLevel = arguments[2] || 2\n var innerIndent = ''\n var outerIndent = ''\n var getFuncName = function (fn) {\n var name = (/\\W*function\\s+([\\w$]+)\\s*\\(/).exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n\n var _makeIndent = function (idtLevel) {\n return (new Array(idtLevel + 1))\n .join(' ')\n }\n var __getType = function (inp) {\n var i = 0\n var match\n var types\n var cons\n var type = typeof inp\n if (type === 'object' && (inp && inp.constructor) &&\n getFuncName(inp.constructor) === 'LOCUTUS_Resource') {\n return 'resource'\n }\n if (type === 'function') {\n return 'function'\n }\n if (type === 'object' && !inp) {\n // Should this be just null?\n return 'null'\n }\n if (type === 'object') {\n if (!inp.constructor) {\n return 'object'\n }\n cons = inp.constructor.toString()\n match = cons.match(/(\\w+)\\(/)\n if (match) {\n cons = match[1].toLowerCase()\n }\n types = ['boolean', 'number', 'string', 'array']\n for (i = 0; i < types.length; i++) {\n if (cons === types[i]) {\n type = types[i]\n break\n }\n }\n }\n return type\n }\n var type = __getType(mixedExpression)\n\n if (type === null) {\n retstr = 'NULL'\n } else if (type === 'array' || type === 'object') {\n outerIndent = _makeIndent(idtLevel - 2)\n innerIndent = _makeIndent(idtLevel)\n for (i in mixedExpression) {\n value = var_export(mixedExpression[i], 1, idtLevel + 2)\n value = typeof value === 'string' ? value.replace(/</g, '&lt;')\n .replace(/>/g, '&gt;') : value\n x[cnt++] = innerIndent + i + ' => ' +\n (__getType(mixedExpression[i]) === 'array' ? '\\n' : '') + value\n }\n iret = x.join(',\\n')\n retstr = outerIndent + 'array (\\n' + iret + '\\n' + outerIndent + ')'\n } else if (type === 'function') {\n funcParts = mixedExpression.toString().match(/function .*?\\((.*?)\\) \\{([\\s\\S]*)\\}/)\n\n // For lambda functions, var_export() outputs such as the following:\n // '\\000lambda_1'. Since it will probably not be a common use to\n // expect this (unhelpful) form, we'll use another PHP-exportable\n // construct, create_function() (though dollar signs must be on the\n // variables in JavaScript); if using instead in JavaScript and you\n // are using the namespaced version, note that create_function() will\n // not be available as a global\n retstr = \"create_function ('\" + funcParts[1] + \"', '\" +\n funcParts[2].replace(new RegExp(\"'\", 'g'), \"\\\\'\") + \"')\"\n } else if (type === 'resource') {\n // Resources treated as null for var_export\n retstr = 'NULL'\n } else {\n retstr = typeof mixedExpression !== 'string' ? mixedExpression\n : \"'\" + mixedExpression.replace(/([\"'])/g, '\\\\$1').replace(/\\0/g, '\\\\0') + \"'\"\n }\n\n if (!boolReturn) {\n echo(retstr)\n return null\n }\n\n return retstr\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/xdiff/index.js b/node_modules/locutus/php/xdiff/index.js
deleted file mode 100644
index c9aa7b3..0000000
--- a/node_modules/locutus/php/xdiff/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['xdiff_string_diff'] = require('./xdiff_string_diff');
-module.exports['xdiff_string_patch'] = require('./xdiff_string_patch');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/xdiff/index.js.map b/node_modules/locutus/php/xdiff/index.js.map
deleted file mode 100644
index eb448cb..0000000
--- a/node_modules/locutus/php/xdiff/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/xdiff/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,mBAAf,IAAsCC,QAAQ,qBAAR,CAAtC;AACAF,OAAOC,OAAP,CAAe,oBAAf,IAAuCC,QAAQ,sBAAR,CAAvC","file":"index.js","sourcesContent":["module.exports['xdiff_string_diff'] = require('./xdiff_string_diff')\nmodule.exports['xdiff_string_patch'] = require('./xdiff_string_patch')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/xdiff/xdiff_string_diff.js b/node_modules/locutus/php/xdiff/xdiff_string_diff.js
deleted file mode 100644
index 5fb5da0..0000000
--- a/node_modules/locutus/php/xdiff/xdiff_string_diff.js
+++ /dev/null
@@ -1,438 +0,0 @@
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-module.exports = function xdiff_string_diff(oldData, newData, contextLines, minimal) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/xdiff_string_diff
- // original by: Brett Zamir (http://brett-zamir.me)
- // based on: Imgen Tata (http://www.myipdf.com/)
- // bugfixed by: Imgen Tata (http://www.myipdf.com/)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // note 1: The minimal argument is not currently supported
- // example 1: xdiff_string_diff('', 'Hello world!')
- // returns 1: '@@ -0,0 +1,1 @@\n+Hello world!'
-
- // (This code was done by Imgen Tata; I have only reformatted for use in Locutus)
-
- // See http://en.wikipedia.org/wiki/Diff#Unified_format
- var i = 0;
- var j = 0;
- var k = 0;
- var oriHunkStart;
- var newHunkStart;
- var oriHunkEnd;
- var newHunkEnd;
- var oriHunkLineNo;
- var newHunkLineNo;
- var oriHunkSize;
- var newHunkSize;
- var MAX_CONTEXT_LINES = Number.POSITIVE_INFINITY; // Potential configuration
- var MIN_CONTEXT_LINES = 0;
- var DEFAULT_CONTEXT_LINES = 3;
- var HEADER_PREFIX = '@@ '; //
- var HEADER_SUFFIX = ' @@';
- var ORIGINAL_INDICATOR = '-';
- var NEW_INDICATOR = '+';
- var RANGE_SEPARATOR = ',';
- var CONTEXT_INDICATOR = ' ';
- var DELETION_INDICATOR = '-';
- var ADDITION_INDICATOR = '+';
- var oriLines;
- var newLines;
- var NEW_LINE = '\n';
-
- var _trim = function _trim(text) {
- if (typeof text !== 'string') {
- throw new Error('String parameter required');
- }
-
- return text.replace(/(^\s*)|(\s*$)/g, '');
- };
-
- var _verifyType = function _verifyType(type) {
- var args = arguments;
- var argsLen = arguments.length;
- var basicTypes = ['number', 'boolean', 'string', 'function', 'object', 'undefined'];
- var basicType;
- var i;
- var j;
- var typeOfType = typeof type === 'undefined' ? 'undefined' : _typeof(type);
- if (typeOfType !== 'string' && typeOfType !== 'function') {
- throw new Error('Bad type parameter');
- }
-
- if (argsLen < 2) {
- throw new Error('Too few arguments');
- }
-
- if (typeOfType === 'string') {
- type = _trim(type);
-
- if (type === '') {
- throw new Error('Bad type parameter');
- }
-
- for (j = 0; j < basicTypes.length; j++) {
- basicType = basicTypes[j];
-
- if (basicType === type) {
- for (i = 1; i < argsLen; i++) {
- if (_typeof(args[i]) !== type) {
- throw new Error('Bad type');
- }
- }
-
- return;
- }
- }
-
- throw new Error('Bad type parameter');
- }
-
- // Not basic type. we need to use instanceof operator
- for (i = 1; i < argsLen; i++) {
- if (!(args[i] instanceof type)) {
- throw new Error('Bad type');
- }
- }
- };
-
- var _hasValue = function _hasValue(array, value) {
- var i;
- _verifyType(Array, array);
-
- for (i = 0; i < array.length; i++) {
- if (array[i] === value) {
- return true;
- }
- }
-
- return false;
- };
-
- var _areTypeOf = function _areTypeOf(type) {
- var args = arguments;
- var argsLen = arguments.length;
- var basicTypes = ['number', 'boolean', 'string', 'function', 'object', 'undefined'];
- var basicType;
- var i;
- var j;
- var typeOfType = typeof type === 'undefined' ? 'undefined' : _typeof(type);
-
- if (typeOfType !== 'string' && typeOfType !== 'function') {
- throw new Error('Bad type parameter');
- }
-
- if (argsLen < 2) {
- throw new Error('Too few arguments');
- }
-
- if (typeOfType === 'string') {
- type = _trim(type);
-
- if (type === '') {
- return false;
- }
-
- for (j = 0; j < basicTypes.length; j++) {
- basicType = basicTypes[j];
-
- if (basicType === type) {
- for (i = 1; i < argsLen; i++) {
- if (_typeof(args[i]) !== type) {
- return false;
- }
- }
-
- return true;
- }
- }
-
- throw new Error('Bad type parameter');
- }
-
- // Not basic type. we need to use instanceof operator
- for (i = 1; i < argsLen; i++) {
- if (!(args[i] instanceof type)) {
- return false;
- }
- }
-
- return true;
- };
-
- var _getInitializedArray = function _getInitializedArray(arraySize, initValue) {
- var array = [];
- var i;
- _verifyType('number', arraySize);
-
- for (i = 0; i < arraySize; i++) {
- array.push(initValue);
- }
-
- return array;
- };
-
- var _splitIntoLines = function _splitIntoLines(text) {
- _verifyType('string', text);
-
- if (text === '') {
- return [];
- }
- return text.split('\n');
- };
-
- var _isEmptyArray = function _isEmptyArray(obj) {
- return _areTypeOf(Array, obj) && obj.length === 0;
- };
-
- /**
- * Finds longest common sequence between two sequences
- * @see {@link http://wordaligned.org/articles/longest-common-subsequence}
- */
- var _findLongestCommonSequence = function _findLongestCommonSequence(seq1, seq2, seq1IsInLcs, seq2IsInLcs) {
- if (!_areTypeOf(Array, seq1, seq2)) {
- throw new Error('Array parameters are required');
- }
-
- // Deal with edge case
- if (_isEmptyArray(seq1) || _isEmptyArray(seq2)) {
- return [];
- }
-
- // Function to calculate lcs lengths
- var lcsLens = function lcsLens(xs, ys) {
- var i;
- var j;
- var prev;
- var curr = _getInitializedArray(ys.length + 1, 0);
-
- for (i = 0; i < xs.length; i++) {
- prev = curr.slice(0);
- for (j = 0; j < ys.length; j++) {
- if (xs[i] === ys[j]) {
- curr[j + 1] = prev[j] + 1;
- } else {
- curr[j + 1] = Math.max(curr[j], prev[j + 1]);
- }
- }
- }
-
- return curr;
- };
-
- // Function to find lcs and fill in the array to indicate the optimal longest common sequence
- var _findLcs = function _findLcs(xs, xidx, xIsIn, ys) {
- var i;
- var xb;
- var xe;
- var llB;
- var llE;
- var pivot;
- var max;
- var yb;
- var ye;
- var nx = xs.length;
- var ny = ys.length;
-
- if (nx === 0) {
- return [];
- }
- if (nx === 1) {
- if (_hasValue(ys, xs[0])) {
- xIsIn[xidx] = true;
- return [xs[0]];
- }
- return [];
- }
- i = Math.floor(nx / 2);
- xb = xs.slice(0, i);
- xe = xs.slice(i);
- llB = lcsLens(xb, ys);
- llE = lcsLens(xe.slice(0).reverse(), ys.slice(0).reverse());
-
- pivot = 0;
- max = 0;
- for (j = 0; j <= ny; j++) {
- if (llB[j] + llE[ny - j] > max) {
- pivot = j;
- max = llB[j] + llE[ny - j];
- }
- }
- yb = ys.slice(0, pivot);
- ye = ys.slice(pivot);
- return _findLcs(xb, xidx, xIsIn, yb).concat(_findLcs(xe, xidx + i, xIsIn, ye));
- };
-
- // Fill in seq1IsInLcs to find the optimal longest common subsequence of first sequence
- _findLcs(seq1, 0, seq1IsInLcs, seq2);
- // Fill in seq2IsInLcs to find the optimal longest common subsequence
- // of second sequence and return the result
- return _findLcs(seq2, 0, seq2IsInLcs, seq1);
- };
-
- // First, check the parameters
- if (_areTypeOf('string', oldData, newData) === false) {
- return false;
- }
-
- if (oldData === newData) {
- return '';
- }
-
- if (typeof contextLines !== 'number' || contextLines > MAX_CONTEXT_LINES || contextLines < MIN_CONTEXT_LINES) {
- contextLines = DEFAULT_CONTEXT_LINES;
- }
-
- oriLines = _splitIntoLines(oldData);
- newLines = _splitIntoLines(newData);
- var oriLen = oriLines.length;
- var newLen = newLines.length;
- var oriIsInLcs = _getInitializedArray(oriLen, false);
- var newIsInLcs = _getInitializedArray(newLen, false);
- var lcsLen = _findLongestCommonSequence(oriLines, newLines, oriIsInLcs, newIsInLcs).length;
- var unidiff = '';
-
- if (lcsLen === 0) {
- // No common sequence
- unidiff = [HEADER_PREFIX, ORIGINAL_INDICATOR, oriLen > 0 ? '1' : '0', RANGE_SEPARATOR, oriLen, ' ', NEW_INDICATOR, newLen > 0 ? '1' : '0', RANGE_SEPARATOR, newLen, HEADER_SUFFIX].join('');
-
- for (i = 0; i < oriLen; i++) {
- unidiff += NEW_LINE + DELETION_INDICATOR + oriLines[i];
- }
-
- for (j = 0; j < newLen; j++) {
- unidiff += NEW_LINE + ADDITION_INDICATOR + newLines[j];
- }
-
- return unidiff;
- }
-
- var leadingContext = [];
- var trailingContext = [];
- var actualLeadingContext = [];
- var actualTrailingContext = [];
-
- // Regularize leading context by the contextLines parameter
- var regularizeLeadingContext = function regularizeLeadingContext(context) {
- if (context.length === 0 || contextLines === 0) {
- return [];
- }
-
- var contextStartPos = Math.max(context.length - contextLines, 0);
-
- return context.slice(contextStartPos);
- };
-
- // Regularize trailing context by the contextLines parameter
- var regularizeTrailingContext = function regularizeTrailingContext(context) {
- if (context.length === 0 || contextLines === 0) {
- return [];
- }
-
- return context.slice(0, Math.min(contextLines, context.length));
- };
-
- // Skip common lines in the beginning
- while (i < oriLen && oriIsInLcs[i] === true && newIsInLcs[i] === true) {
- leadingContext.push(oriLines[i]);
- i++;
- }
-
- j = i;
- // The index in the longest common sequence
- k = i;
- oriHunkStart = i;
- newHunkStart = j;
- oriHunkEnd = i;
- newHunkEnd = j;
-
- while (i < oriLen || j < newLen) {
- while (i < oriLen && oriIsInLcs[i] === false) {
- i++;
- }
- oriHunkEnd = i;
-
- while (j < newLen && newIsInLcs[j] === false) {
- j++;
- }
- newHunkEnd = j;
-
- // Find the trailing context
- trailingContext = [];
- while (i < oriLen && oriIsInLcs[i] === true && j < newLen && newIsInLcs[j] === true) {
- trailingContext.push(oriLines[i]);
- k++;
- i++;
- j++;
- }
-
- if (k >= lcsLen || // No more in longest common lines
- trailingContext.length >= 2 * contextLines) {
- // Context break found
- if (trailingContext.length < 2 * contextLines) {
- // It must be last block of common lines but not a context break
- trailingContext = [];
-
- // Force break out
- i = oriLen;
- j = newLen;
-
- // Update hunk ends to force output to the end
- oriHunkEnd = oriLen;
- newHunkEnd = newLen;
- }
-
- // Output the diff hunk
-
- // Trim the leading and trailing context block
- actualLeadingContext = regularizeLeadingContext(leadingContext);
- actualTrailingContext = regularizeTrailingContext(trailingContext);
-
- oriHunkStart -= actualLeadingContext.length;
- newHunkStart -= actualLeadingContext.length;
- oriHunkEnd += actualTrailingContext.length;
- newHunkEnd += actualTrailingContext.length;
-
- oriHunkLineNo = oriHunkStart + 1;
- newHunkLineNo = newHunkStart + 1;
- oriHunkSize = oriHunkEnd - oriHunkStart;
- newHunkSize = newHunkEnd - newHunkStart;
-
- // Build header
- unidiff += [HEADER_PREFIX, ORIGINAL_INDICATOR, oriHunkLineNo, RANGE_SEPARATOR, oriHunkSize, ' ', NEW_INDICATOR, newHunkLineNo, RANGE_SEPARATOR, newHunkSize, HEADER_SUFFIX, NEW_LINE].join('');
-
- // Build the diff hunk content
- while (oriHunkStart < oriHunkEnd || newHunkStart < newHunkEnd) {
- if (oriHunkStart < oriHunkEnd && oriIsInLcs[oriHunkStart] === true && newIsInLcs[newHunkStart] === true) {
- // The context line
- unidiff += CONTEXT_INDICATOR + oriLines[oriHunkStart] + NEW_LINE;
- oriHunkStart++;
- newHunkStart++;
- } else if (oriHunkStart < oriHunkEnd && oriIsInLcs[oriHunkStart] === false) {
- // The deletion line
- unidiff += DELETION_INDICATOR + oriLines[oriHunkStart] + NEW_LINE;
- oriHunkStart++;
- } else if (newHunkStart < newHunkEnd && newIsInLcs[newHunkStart] === false) {
- // The additional line
- unidiff += ADDITION_INDICATOR + newLines[newHunkStart] + NEW_LINE;
- newHunkStart++;
- }
- }
-
- // Update hunk position and leading context
- oriHunkStart = i;
- newHunkStart = j;
- leadingContext = trailingContext;
- }
- }
-
- // Trim the trailing new line if it exists
- if (unidiff.length > 0 && unidiff.charAt(unidiff.length) === NEW_LINE) {
- unidiff = unidiff.slice(0, -1);
- }
-
- return unidiff;
-};
-//# sourceMappingURL=xdiff_string_diff.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/xdiff/xdiff_string_diff.js.map b/node_modules/locutus/php/xdiff/xdiff_string_diff.js.map
deleted file mode 100644
index e416386..0000000
--- a/node_modules/locutus/php/xdiff/xdiff_string_diff.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/xdiff/xdiff_string_diff.js"],"names":["module","exports","xdiff_string_diff","oldData","newData","contextLines","minimal","i","j","k","oriHunkStart","newHunkStart","oriHunkEnd","newHunkEnd","oriHunkLineNo","newHunkLineNo","oriHunkSize","newHunkSize","MAX_CONTEXT_LINES","Number","POSITIVE_INFINITY","MIN_CONTEXT_LINES","DEFAULT_CONTEXT_LINES","HEADER_PREFIX","HEADER_SUFFIX","ORIGINAL_INDICATOR","NEW_INDICATOR","RANGE_SEPARATOR","CONTEXT_INDICATOR","DELETION_INDICATOR","ADDITION_INDICATOR","oriLines","newLines","NEW_LINE","_trim","text","Error","replace","_verifyType","type","args","arguments","argsLen","length","basicTypes","basicType","typeOfType","_hasValue","array","value","Array","_areTypeOf","_getInitializedArray","arraySize","initValue","push","_splitIntoLines","split","_isEmptyArray","obj","_findLongestCommonSequence","seq1","seq2","seq1IsInLcs","seq2IsInLcs","lcsLens","xs","ys","prev","curr","slice","Math","max","_findLcs","xidx","xIsIn","xb","xe","llB","llE","pivot","yb","ye","nx","ny","floor","reverse","concat","oriLen","newLen","oriIsInLcs","newIsInLcs","lcsLen","unidiff","join","leadingContext","trailingContext","actualLeadingContext","actualTrailingContext","regularizeLeadingContext","context","contextStartPos","regularizeTrailingContext","min","charAt"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,iBAAT,CAA4BC,OAA5B,EAAqCC,OAArC,EAA8CC,YAA9C,EAA4DC,OAA5D,EAAqE;AAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,YAAJ;AACA,MAAIC,YAAJ;AACA,MAAIC,UAAJ;AACA,MAAIC,UAAJ;AACA,MAAIC,aAAJ;AACA,MAAIC,aAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,oBAAoBC,OAAOC,iBAA/B,CAxBoF,CAwBnC;AACjD,MAAIC,oBAAoB,CAAxB;AACA,MAAIC,wBAAwB,CAA5B;AACA,MAAIC,gBAAgB,KAApB,CA3BoF,CA2B1D;AAC1B,MAAIC,gBAAgB,KAApB;AACA,MAAIC,qBAAqB,GAAzB;AACA,MAAIC,gBAAgB,GAApB;AACA,MAAIC,kBAAkB,GAAtB;AACA,MAAIC,oBAAoB,GAAxB;AACA,MAAIC,qBAAqB,GAAzB;AACA,MAAIC,qBAAqB,GAAzB;AACA,MAAIC,QAAJ;AACA,MAAIC,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CAAlB,CAAV;AACD;;AAED,SAAOuB,OAAP;AACD,CA9cD","file":"xdiff_string_diff.js","sourcesContent":["module.exports = function xdiff_string_diff (oldData, newData, contextLines, minimal) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/xdiff_string_diff\n // original by: Brett Zamir (http://brett-zamir.me)\n // based on: Imgen Tata (http://www.myipdf.com/)\n // bugfixed by: Imgen Tata (http://www.myipdf.com/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // note 1: The minimal argument is not currently supported\n // example 1: xdiff_string_diff('', 'Hello world!')\n // returns 1: '@@ -0,0 +1,1 @@\\n+Hello world!'\n\n // (This code was done by Imgen Tata; I have only reformatted for use in Locutus)\n\n // See http://en.wikipedia.org/wiki/Diff#Unified_format\n var i = 0\n var j = 0\n var k = 0\n var oriHunkStart\n var newHunkStart\n var oriHunkEnd\n var newHunkEnd\n var oriHunkLineNo\n var newHunkLineNo\n var oriHunkSize\n var newHunkSize\n var MAX_CONTEXT_LINES = Number.POSITIVE_INFINITY // Potential configuration\n var MIN_CONTEXT_LINES = 0\n var DEFAULT_CONTEXT_LINES = 3\n var HEADER_PREFIX = '@@ ' //\n var HEADER_SUFFIX = ' @@'\n var ORIGINAL_INDICATOR = '-'\n var NEW_INDICATOR = '+'\n var RANGE_SEPARATOR = ','\n var CONTEXT_INDICATOR = ' '\n var DELETION_INDICATOR = '-'\n var ADDITION_INDICATOR = '+'\n var oriLines\n var newLines\n var NEW_LINE = '\\n'\n\n var _trim = function (text) {\n if (typeof text !== 'string') {\n throw new Error('String parameter required')\n }\n\n return text.replace(/(^\\s*)|(\\s*$)/g, '')\n }\n\n var _verifyType = function (type) {\n var args = arguments\n var argsLen = arguments.length\n var basicTypes = ['number', 'boolean', 'string', 'function', 'object', 'undefined']\n var basicType\n var i\n var j\n var typeOfType = typeof type\n if (typeOfType !== 'string' && typeOfType !== 'function') {\n throw new Error('Bad type parameter')\n }\n\n if (argsLen < 2) {\n throw new Error('Too few arguments')\n }\n\n if (typeOfType === 'string') {\n type = _trim(type)\n\n if (type === '') {\n throw new Error('Bad type parameter')\n }\n\n for (j = 0; j < basicTypes.length; j++) {\n basicType = basicTypes[j]\n\n if (basicType === type) {\n for (i = 1; i < argsLen; i++) {\n if (typeof args[i] !== type) {\n throw new Error('Bad type')\n }\n }\n\n return\n }\n }\n\n throw new Error('Bad type parameter')\n }\n\n // Not basic type. we need to use instanceof operator\n for (i = 1; i < argsLen; i++) {\n if (!(args[i] instanceof type)) {\n throw new Error('Bad type')\n }\n }\n }\n\n var _hasValue = function (array, value) {\n var i\n _verifyType(Array, array)\n\n for (i = 0; i < array.length; i++) {\n if (array[i] === value) {\n return true\n }\n }\n\n return false\n }\n\n var _areTypeOf = function (type) {\n var args = arguments\n var argsLen = arguments.length\n var basicTypes = ['number', 'boolean', 'string', 'function', 'object', 'undefined']\n var basicType\n var i\n var j\n var typeOfType = typeof type\n\n if (typeOfType !== 'string' && typeOfType !== 'function') {\n throw new Error('Bad type parameter')\n }\n\n if (argsLen < 2) {\n throw new Error('Too few arguments')\n }\n\n if (typeOfType === 'string') {\n type = _trim(type)\n\n if (type === '') {\n return false\n }\n\n for (j = 0; j < basicTypes.length; j++) {\n basicType = basicTypes[j]\n\n if (basicType === type) {\n for (i = 1; i < argsLen; i++) {\n if (typeof args[i] !== type) {\n return false\n }\n }\n\n return true\n }\n }\n\n throw new Error('Bad type parameter')\n }\n\n // Not basic type. we need to use instanceof operator\n for (i = 1; i < argsLen; i++) {\n if (!(args[i] instanceof type)) {\n return false\n }\n }\n\n return true\n }\n\n var _getInitializedArray = function (arraySize, initValue) {\n var array = []\n var i\n _verifyType('number', arraySize)\n\n for (i = 0; i < arraySize; i++) {\n array.push(initValue)\n }\n\n return array\n }\n\n var _splitIntoLines = function (text) {\n _verifyType('string', text)\n\n if (text === '') {\n return []\n }\n return text.split('\\n')\n }\n\n var _isEmptyArray = function (obj) {\n return _areTypeOf(Array, obj) && obj.length === 0\n }\n\n /**\n * Finds longest common sequence between two sequences\n * @see {@link http://wordaligned.org/articles/longest-common-subsequence}\n */\n var _findLongestCommonSequence = function (seq1, seq2, seq1IsInLcs, seq2IsInLcs) {\n if (!_areTypeOf(Array, seq1, seq2)) {\n throw new Error('Array parameters are required')\n }\n\n // Deal with edge case\n if (_isEmptyArray(seq1) || _isEmptyArray(seq2)) {\n return []\n }\n\n // Function to calculate lcs lengths\n var lcsLens = function (xs, ys) {\n var i\n var j\n var prev\n var curr = _getInitializedArray(ys.length + 1, 0)\n\n for (i = 0; i < xs.length; i++) {\n prev = curr.slice(0)\n for (j = 0; j < ys.length; j++) {\n if (xs[i] === ys[j]) {\n curr[j + 1] = prev[j] + 1\n } else {\n curr[j + 1] = Math.max(curr[j], prev[j + 1])\n }\n }\n }\n\n return curr\n }\n\n // Function to find lcs and fill in the array to indicate the optimal longest common sequence\n var _findLcs = function (xs, xidx, xIsIn, ys) {\n var i\n var xb\n var xe\n var llB\n var llE\n var pivot\n var max\n var yb\n var ye\n var nx = xs.length\n var ny = ys.length\n\n if (nx === 0) {\n return []\n }\n if (nx === 1) {\n if (_hasValue(ys, xs[0])) {\n xIsIn[xidx] = true\n return [xs[0]]\n }\n return []\n }\n i = Math.floor(nx / 2)\n xb = xs.slice(0, i)\n xe = xs.slice(i)\n llB = lcsLens(xb, ys)\n llE = lcsLens(xe.slice(0)\n .reverse(), ys.slice(0)\n .reverse())\n\n pivot = 0\n max = 0\n for (j = 0; j <= ny; j++) {\n if (llB[j] + llE[ny - j] > max) {\n pivot = j\n max = llB[j] + llE[ny - j]\n }\n }\n yb = ys.slice(0, pivot)\n ye = ys.slice(pivot)\n return _findLcs(xb, xidx, xIsIn, yb).concat(_findLcs(xe, xidx + i, xIsIn, ye))\n }\n\n // Fill in seq1IsInLcs to find the optimal longest common subsequence of first sequence\n _findLcs(seq1, 0, seq1IsInLcs, seq2)\n // Fill in seq2IsInLcs to find the optimal longest common subsequence\n // of second sequence and return the result\n return _findLcs(seq2, 0, seq2IsInLcs, seq1)\n }\n\n // First, check the parameters\n if (_areTypeOf('string', oldData, newData) === false) {\n return false\n }\n\n if (oldData === newData) {\n return ''\n }\n\n if (typeof contextLines !== 'number' ||\n contextLines > MAX_CONTEXT_LINES ||\n contextLines < MIN_CONTEXT_LINES) {\n contextLines = DEFAULT_CONTEXT_LINES\n }\n\n oriLines = _splitIntoLines(oldData)\n newLines = _splitIntoLines(newData)\n var oriLen = oriLines.length\n var newLen = newLines.length\n var oriIsInLcs = _getInitializedArray(oriLen, false)\n var newIsInLcs = _getInitializedArray(newLen, false)\n var lcsLen = _findLongestCommonSequence(oriLines, newLines, oriIsInLcs, newIsInLcs).length\n var unidiff = ''\n\n if (lcsLen === 0) {\n // No common sequence\n unidiff = [\n HEADER_PREFIX,\n ORIGINAL_INDICATOR,\n (oriLen > 0 ? '1' : '0'),\n RANGE_SEPARATOR,\n oriLen,\n ' ',\n NEW_INDICATOR,\n (newLen > 0 ? '1' : '0'),\n RANGE_SEPARATOR,\n newLen,\n HEADER_SUFFIX\n ].join('')\n\n for (i = 0; i < oriLen; i++) {\n unidiff += NEW_LINE + DELETION_INDICATOR + oriLines[i]\n }\n\n for (j = 0; j < newLen; j++) {\n unidiff += NEW_LINE + ADDITION_INDICATOR + newLines[j]\n }\n\n return unidiff\n }\n\n var leadingContext = []\n var trailingContext = []\n var actualLeadingContext = []\n var actualTrailingContext = []\n\n // Regularize leading context by the contextLines parameter\n var regularizeLeadingContext = function (context) {\n if (context.length === 0 || contextLines === 0) {\n return []\n }\n\n var contextStartPos = Math.max(context.length - contextLines, 0)\n\n return context.slice(contextStartPos)\n }\n\n // Regularize trailing context by the contextLines parameter\n var regularizeTrailingContext = function (context) {\n if (context.length === 0 || contextLines === 0) {\n return []\n }\n\n return context.slice(0, Math.min(contextLines, context.length))\n }\n\n // Skip common lines in the beginning\n while (i < oriLen && oriIsInLcs[i] === true && newIsInLcs[i] === true) {\n leadingContext.push(oriLines[i])\n i++\n }\n\n j = i\n // The index in the longest common sequence\n k = i\n oriHunkStart = i\n newHunkStart = j\n oriHunkEnd = i\n newHunkEnd = j\n\n while (i < oriLen || j < newLen) {\n while (i < oriLen && oriIsInLcs[i] === false) {\n i++\n }\n oriHunkEnd = i\n\n while (j < newLen && newIsInLcs[j] === false) {\n j++\n }\n newHunkEnd = j\n\n // Find the trailing context\n trailingContext = []\n while (i < oriLen && oriIsInLcs[i] === true && j < newLen && newIsInLcs[j] === true) {\n trailingContext.push(oriLines[i])\n k++\n i++\n j++\n }\n\n if (k >= lcsLen || // No more in longest common lines\n trailingContext.length >= 2 * contextLines) {\n // Context break found\n if (trailingContext.length < 2 * contextLines) {\n // It must be last block of common lines but not a context break\n trailingContext = []\n\n // Force break out\n i = oriLen\n j = newLen\n\n // Update hunk ends to force output to the end\n oriHunkEnd = oriLen\n newHunkEnd = newLen\n }\n\n // Output the diff hunk\n\n // Trim the leading and trailing context block\n actualLeadingContext = regularizeLeadingContext(leadingContext)\n actualTrailingContext = regularizeTrailingContext(trailingContext)\n\n oriHunkStart -= actualLeadingContext.length\n newHunkStart -= actualLeadingContext.length\n oriHunkEnd += actualTrailingContext.length\n newHunkEnd += actualTrailingContext.length\n\n oriHunkLineNo = oriHunkStart + 1\n newHunkLineNo = newHunkStart + 1\n oriHunkSize = oriHunkEnd - oriHunkStart\n newHunkSize = newHunkEnd - newHunkStart\n\n // Build header\n unidiff += [\n HEADER_PREFIX,\n ORIGINAL_INDICATOR,\n oriHunkLineNo,\n RANGE_SEPARATOR,\n oriHunkSize,\n ' ',\n NEW_INDICATOR,\n newHunkLineNo,\n RANGE_SEPARATOR,\n newHunkSize,\n HEADER_SUFFIX,\n NEW_LINE\n ].join('')\n\n // Build the diff hunk content\n while (oriHunkStart < oriHunkEnd || newHunkStart < newHunkEnd) {\n if (oriHunkStart < oriHunkEnd &&\n oriIsInLcs[oriHunkStart] === true &&\n newIsInLcs[newHunkStart] === true) {\n // The context line\n unidiff += CONTEXT_INDICATOR + oriLines[oriHunkStart] + NEW_LINE\n oriHunkStart++\n newHunkStart++\n } else if (oriHunkStart < oriHunkEnd && oriIsInLcs[oriHunkStart] === false) {\n // The deletion line\n unidiff += DELETION_INDICATOR + oriLines[oriHunkStart] + NEW_LINE\n oriHunkStart++\n } else if (newHunkStart < newHunkEnd && newIsInLcs[newHunkStart] === false) {\n // The additional line\n unidiff += ADDITION_INDICATOR + newLines[newHunkStart] + NEW_LINE\n newHunkStart++\n }\n }\n\n // Update hunk position and leading context\n oriHunkStart = i\n newHunkStart = j\n leadingContext = trailingContext\n }\n }\n\n // Trim the trailing new line if it exists\n if (unidiff.length > 0 && unidiff.charAt(unidiff.length) === NEW_LINE) {\n unidiff = unidiff.slice(0, -1)\n }\n\n return unidiff\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/xdiff/xdiff_string_patch.js b/node_modules/locutus/php/xdiff/xdiff_string_patch.js
deleted file mode 100644
index af40a33..0000000
--- a/node_modules/locutus/php/xdiff/xdiff_string_patch.js
+++ /dev/null
@@ -1,203 +0,0 @@
-'use strict';
-
-module.exports = function xdiff_string_patch(originalStr, patch, flags, errorObj) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/xdiff_string_patch/
- // original by: Brett Zamir (http://brett-zamir.me)
- // improved by: Steven Levithan (stevenlevithan.com)
- // note 1: The XDIFF_PATCH_IGNORESPACE flag and the error argument are not
- // note 1: currently supported.
- // note 2: This has not been tested exhaustively yet.
- // note 3: The errorObj parameter (optional) if used must be passed in as a
- // note 3: object. The errors will then be written by reference into it's `value` property
- // example 1: xdiff_string_patch('', '@@ -0,0 +1,1 @@\n+Hello world!')
- // returns 1: 'Hello world!'
-
- // First two functions were adapted from Steven Levithan, also under an MIT license
- // Adapted from XRegExp 1.5.0
- // (c) 2007-2010 Steven Levithan
- // MIT License
- // <http://xregexp.com>
-
- var _getNativeFlags = function _getNativeFlags(regex) {
- // Proposed for ES4; included in AS3
- return [regex.global ? 'g' : '', regex.ignoreCase ? 'i' : '', regex.multiline ? 'm' : '', regex.extended ? 'x' : '', regex.sticky ? 'y' : ''].join('');
- };
-
- var _cbSplit = function _cbSplit(string, sep) {
- // If separator `s` is not a regex, use the native `split`
- if (!(sep instanceof RegExp)) {
- // Had problems to get it to work here using prototype test
- return String.prototype.split.apply(string, arguments);
- }
- var str = String(string);
- var output = [];
- var lastLastIndex = 0;
- var match;
- var lastLength;
- var limit = Infinity;
- var x = sep._xregexp;
- // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero
- // and restore it to its original value when we're done using the regex
- // Brett paring down
- var s = new RegExp(sep.source, _getNativeFlags(sep) + 'g');
- if (x) {
- s._xregexp = {
- source: x.source,
- captureNames: x.captureNames ? x.captureNames.slice(0) : null
- };
- }
-
- while (match = s.exec(str)) {
- // Run the altered `exec` (required for `lastIndex` fix, etc.)
- if (s.lastIndex > lastLastIndex) {
- output.push(str.slice(lastLastIndex, match.index));
-
- if (match.length > 1 && match.index < str.length) {
- Array.prototype.push.apply(output, match.slice(1));
- }
-
- lastLength = match[0].length;
- lastLastIndex = s.lastIndex;
-
- if (output.length >= limit) {
- break;
- }
- }
-
- if (s.lastIndex === match.index) {
- s.lastIndex++;
- }
- }
-
- if (lastLastIndex === str.length) {
- if (!s.test('') || lastLength) {
- output.push('');
- }
- } else {
- output.push(str.slice(lastLastIndex));
- }
-
- return output.length > limit ? output.slice(0, limit) : output;
- };
-
- var i = 0;
- var ll = 0;
- var ranges = [];
- var lastLinePos = 0;
- var firstChar = '';
- var rangeExp = /^@@\s+-(\d+),(\d+)\s+\+(\d+),(\d+)\s+@@$/;
- var lineBreaks = /\r?\n/;
- var lines = _cbSplit(patch.replace(/(\r?\n)+$/, ''), lineBreaks);
- var origLines = _cbSplit(originalStr, lineBreaks);
- var newStrArr = [];
- var linePos = 0;
- var errors = '';
- var optTemp = 0; // Both string & integer (constant) input is allowed
- var OPTS = {
- // Unsure of actual PHP values, so better to rely on string
- 'XDIFF_PATCH_NORMAL': 1,
- 'XDIFF_PATCH_REVERSE': 2,
- 'XDIFF_PATCH_IGNORESPACE': 4
- };
-
- // Input defaulting & sanitation
- if (typeof originalStr !== 'string' || !patch) {
- return false;
- }
- if (!flags) {
- flags = 'XDIFF_PATCH_NORMAL';
- }
-
- if (typeof flags !== 'number') {
- // Allow for a single string or an array of string flags
- flags = [].concat(flags);
- for (i = 0; i < flags.length; i++) {
- // Resolve string input to bitwise e.g. 'XDIFF_PATCH_NORMAL' becomes 1
- if (OPTS[flags[i]]) {
- optTemp = optTemp | OPTS[flags[i]];
- }
- }
- flags = optTemp;
- }
-
- if (flags & OPTS.XDIFF_PATCH_NORMAL) {
- for (i = 0, ll = lines.length; i < ll; i++) {
- ranges = lines[i].match(rangeExp);
- if (ranges) {
- lastLinePos = linePos;
- linePos = ranges[1] - 1;
- while (lastLinePos < linePos) {
- newStrArr[newStrArr.length] = origLines[lastLinePos++];
- }
- while (lines[++i] && rangeExp.exec(lines[i]) === null) {
- firstChar = lines[i].charAt(0);
- switch (firstChar) {
- case '-':
- // Skip including that line
- ++linePos;
- break;
- case '+':
- newStrArr[newStrArr.length] = lines[i].slice(1);
- break;
- case ' ':
- newStrArr[newStrArr.length] = origLines[linePos++];
- break;
- default:
- // Reconcile with returning errrors arg?
- throw new Error('Unrecognized initial character in unidiff line');
- }
- }
- if (lines[i]) {
- i--;
- }
- }
- }
- while (linePos > 0 && linePos < origLines.length) {
- newStrArr[newStrArr.length] = origLines[linePos++];
- }
- } else if (flags & OPTS.XDIFF_PATCH_REVERSE) {
- // Only differs from above by a few lines
- for (i = 0, ll = lines.length; i < ll; i++) {
- ranges = lines[i].match(rangeExp);
- if (ranges) {
- lastLinePos = linePos;
- linePos = ranges[3] - 1;
- while (lastLinePos < linePos) {
- newStrArr[newStrArr.length] = origLines[lastLinePos++];
- }
- while (lines[++i] && rangeExp.exec(lines[i]) === null) {
- firstChar = lines[i].charAt(0);
- switch (firstChar) {
- case '-':
- newStrArr[newStrArr.length] = lines[i].slice(1);
- break;
- case '+':
- // Skip including that line
- ++linePos;
- break;
- case ' ':
- newStrArr[newStrArr.length] = origLines[linePos++];
- break;
- default:
- // Reconcile with returning errrors arg?
- throw new Error('Unrecognized initial character in unidiff line');
- }
- }
- if (lines[i]) {
- i--;
- }
- }
- }
- while (linePos > 0 && linePos < origLines.length) {
- newStrArr[newStrArr.length] = origLines[linePos++];
- }
- }
-
- if (errorObj) {
- errorObj.value = errors;
- }
-
- return newStrArr.join('\n');
-};
-//# sourceMappingURL=xdiff_string_patch.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/xdiff/xdiff_string_patch.js.map b/node_modules/locutus/php/xdiff/xdiff_string_patch.js.map
deleted file mode 100644
index bf6e88d..0000000
--- a/node_modules/locutus/php/xdiff/xdiff_string_patch.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/xdiff/xdiff_string_patch.js"],"names":["module","exports","xdiff_string_patch","originalStr","patch","flags","errorObj","_getNativeFlags","regex","global","ignoreCase","multiline","extended","sticky","join","_cbSplit","string","sep","RegExp","String","prototype","split","apply","arguments","str","output","lastLastIndex","match","lastLength","limit","Infinity","x","_xregexp","s","source","captureNames","slice","exec","lastIndex","push","index","length","Array","test","i","ll","ranges","lastLinePos","firstChar","rangeExp","lineBreaks","lines","replace","origLines","newStrArr","linePos","errors","optTemp","OPTS","concat","XDIFF_PATCH_NORMAL","charAt","Error","XDIFF_PATCH_REVERSE","value"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,kBAAT,CAA6BC,WAA7B,EAA0CC,KAA1C,EAAiDC,KAAjD,EAAwDC,QAAxD,EAAkE;AAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,kBAAkB,SAAlBA,eAAkB,CAAUC,KAAV,EAAiB;AACrC;AACA,WAAO,CACJA,MAAMC,MAAN,GAAe,GAAf,GAAqB,EADjB,EAEJD,MAAME,UAAN,GAAmB,GAAnB,GAAyB,EAFrB,EAG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Ac;AACZA;AACD;AACF;AACF;AACD,WAAOW,UAAU,CAAV,IAAeA,UAAUF,UAAUZ,MAA1C,EAAkD;AAChDa,gBAAUA,UAAUb,MAApB,IAA8BY,UAAUE,SAAV,CAA9B;AACD;AACF;;AAED,MAAIjD,QAAJ,EAAc;AACZA,aAAS0D,KAAT,GAAiBR,MAAjB;AACD;;AAED,SAAOF,UAAUxC,IAAV,CAAe,IAAf,CAAP;AACD,CA5MD","file":"xdiff_string_patch.js","sourcesContent":["module.exports = function xdiff_string_patch (originalStr, patch, flags, errorObj) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/xdiff_string_patch/\n // original by: Brett Zamir (http://brett-zamir.me)\n // improved by: Steven Levithan (stevenlevithan.com)\n // note 1: The XDIFF_PATCH_IGNORESPACE flag and the error argument are not\n // note 1: currently supported.\n // note 2: This has not been tested exhaustively yet.\n // note 3: The errorObj parameter (optional) if used must be passed in as a\n // note 3: object. The errors will then be written by reference into it's `value` property\n // example 1: xdiff_string_patch('', '@@ -0,0 +1,1 @@\\n+Hello world!')\n // returns 1: 'Hello world!'\n\n // First two functions were adapted from Steven Levithan, also under an MIT license\n // Adapted from XRegExp 1.5.0\n // (c) 2007-2010 Steven Levithan\n // MIT License\n // <http://xregexp.com>\n\n var _getNativeFlags = function (regex) {\n // Proposed for ES4; included in AS3\n return [\n (regex.global ? 'g' : ''),\n (regex.ignoreCase ? 'i' : ''),\n (regex.multiline ? 'm' : ''),\n (regex.extended ? 'x' : ''),\n (regex.sticky ? 'y' : '')\n ].join('')\n }\n\n var _cbSplit = function (string, sep) {\n // If separator `s` is not a regex, use the native `split`\n if (!(sep instanceof RegExp)) {\n // Had problems to get it to work here using prototype test\n return String.prototype.split.apply(string, arguments)\n }\n var str = String(string)\n var output = []\n var lastLastIndex = 0\n var match\n var lastLength\n var limit = Infinity\n var x = sep._xregexp\n // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero\n // and restore it to its original value when we're done using the regex\n // Brett paring down\n var s = new RegExp(sep.source, _getNativeFlags(sep) + 'g')\n if (x) {\n s._xregexp = {\n source: x.source,\n captureNames: x.captureNames ? x.captureNames.slice(0) : null\n }\n }\n\n while ((match = s.exec(str))) {\n // Run the altered `exec` (required for `lastIndex` fix, etc.)\n if (s.lastIndex > lastLastIndex) {\n output.push(str.slice(lastLastIndex, match.index))\n\n if (match.length > 1 && match.index < str.length) {\n Array.prototype.push.apply(output, match.slice(1))\n }\n\n lastLength = match[0].length\n lastLastIndex = s.lastIndex\n\n if (output.length >= limit) {\n break\n }\n }\n\n if (s.lastIndex === match.index) {\n s.lastIndex++\n }\n }\n\n if (lastLastIndex === str.length) {\n if (!s.test('') || lastLength) {\n output.push('')\n }\n } else {\n output.push(str.slice(lastLastIndex))\n }\n\n return output.length > limit ? output.slice(0, limit) : output\n }\n\n var i = 0\n var ll = 0\n var ranges = []\n var lastLinePos = 0\n var firstChar = ''\n var rangeExp = /^@@\\s+-(\\d+),(\\d+)\\s+\\+(\\d+),(\\d+)\\s+@@$/\n var lineBreaks = /\\r?\\n/\n var lines = _cbSplit(patch.replace(/(\\r?\\n)+$/, ''), lineBreaks)\n var origLines = _cbSplit(originalStr, lineBreaks)\n var newStrArr = []\n var linePos = 0\n var errors = ''\n var optTemp = 0 // Both string & integer (constant) input is allowed\n var OPTS = {\n // Unsure of actual PHP values, so better to rely on string\n 'XDIFF_PATCH_NORMAL': 1,\n 'XDIFF_PATCH_REVERSE': 2,\n 'XDIFF_PATCH_IGNORESPACE': 4\n }\n\n // Input defaulting & sanitation\n if (typeof originalStr !== 'string' || !patch) {\n return false\n }\n if (!flags) {\n flags = 'XDIFF_PATCH_NORMAL'\n }\n\n if (typeof flags !== 'number') {\n // Allow for a single string or an array of string flags\n flags = [].concat(flags)\n for (i = 0; i < flags.length; i++) {\n // Resolve string input to bitwise e.g. 'XDIFF_PATCH_NORMAL' becomes 1\n if (OPTS[flags[i]]) {\n optTemp = optTemp | OPTS[flags[i]]\n }\n }\n flags = optTemp\n }\n\n if (flags & OPTS.XDIFF_PATCH_NORMAL) {\n for (i = 0, ll = lines.length; i < ll; i++) {\n ranges = lines[i].match(rangeExp)\n if (ranges) {\n lastLinePos = linePos\n linePos = ranges[1] - 1\n while (lastLinePos < linePos) {\n newStrArr[newStrArr.length] = origLines[lastLinePos++]\n }\n while (lines[++i] && (rangeExp.exec(lines[i])) === null) {\n firstChar = lines[i].charAt(0)\n switch (firstChar) {\n case '-':\n // Skip including that line\n ++linePos\n break\n case '+':\n newStrArr[newStrArr.length] = lines[i].slice(1)\n break\n case ' ':\n newStrArr[newStrArr.length] = origLines[linePos++]\n break\n default:\n // Reconcile with returning errrors arg?\n throw new Error('Unrecognized initial character in unidiff line')\n }\n }\n if (lines[i]) {\n i--\n }\n }\n }\n while (linePos > 0 && linePos < origLines.length) {\n newStrArr[newStrArr.length] = origLines[linePos++]\n }\n } else if (flags & OPTS.XDIFF_PATCH_REVERSE) {\n // Only differs from above by a few lines\n for (i = 0, ll = lines.length; i < ll; i++) {\n ranges = lines[i].match(rangeExp)\n if (ranges) {\n lastLinePos = linePos\n linePos = ranges[3] - 1\n while (lastLinePos < linePos) {\n newStrArr[newStrArr.length] = origLines[lastLinePos++]\n }\n while (lines[++i] && (rangeExp.exec(lines[i])) === null) {\n firstChar = lines[i].charAt(0)\n switch (firstChar) {\n case '-':\n newStrArr[newStrArr.length] = lines[i].slice(1)\n break\n case '+':\n // Skip including that line\n ++linePos\n break\n case ' ':\n newStrArr[newStrArr.length] = origLines[linePos++]\n break\n default:\n // Reconcile with returning errrors arg?\n throw new Error('Unrecognized initial character in unidiff line')\n }\n }\n if (lines[i]) {\n i--\n }\n }\n }\n while (linePos > 0 && linePos < origLines.length) {\n newStrArr[newStrArr.length] = origLines[linePos++]\n }\n }\n\n if (errorObj) {\n errorObj.value = errors\n }\n\n return newStrArr.join('\\n')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/xml/index.js b/node_modules/locutus/php/xml/index.js
deleted file mode 100644
index 8cb435c..0000000
--- a/node_modules/locutus/php/xml/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports['utf8_decode'] = require('./utf8_decode');
-module.exports['utf8_encode'] = require('./utf8_encode');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/xml/index.js.map b/node_modules/locutus/php/xml/index.js.map
deleted file mode 100644
index 3e194be..0000000
--- a/node_modules/locutus/php/xml/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/xml/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC;AACAF,OAAOC,OAAP,CAAe,aAAf,IAAgCC,QAAQ,eAAR,CAAhC","file":"index.js","sourcesContent":["module.exports['utf8_decode'] = require('./utf8_decode')\nmodule.exports['utf8_encode'] = require('./utf8_encode')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/xml/utf8_decode.js b/node_modules/locutus/php/xml/utf8_decode.js
deleted file mode 100644
index d27de52..0000000
--- a/node_modules/locutus/php/xml/utf8_decode.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict';
-
-module.exports = function utf8_decode(strData) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/utf8_decode/
- // original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // input by: Aman Gupta
- // input by: Brett Zamir (http://brett-zamir.me)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Norman "zEh" Fuchs
- // bugfixed by: hitwork
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: kirilloid
- // bugfixed by: w35l3y (http://www.wesley.eti.br)
- // example 1: utf8_decode('Kevin van Zonneveld')
- // returns 1: 'Kevin van Zonneveld'
-
- var tmpArr = [];
- var i = 0;
- var c1 = 0;
- var seqlen = 0;
-
- strData += '';
-
- while (i < strData.length) {
- c1 = strData.charCodeAt(i) & 0xFF;
- seqlen = 0;
-
- // http://en.wikipedia.org/wiki/UTF-8#Codepage_layout
- if (c1 <= 0xBF) {
- c1 = c1 & 0x7F;
- seqlen = 1;
- } else if (c1 <= 0xDF) {
- c1 = c1 & 0x1F;
- seqlen = 2;
- } else if (c1 <= 0xEF) {
- c1 = c1 & 0x0F;
- seqlen = 3;
- } else {
- c1 = c1 & 0x07;
- seqlen = 4;
- }
-
- for (var ai = 1; ai < seqlen; ++ai) {
- c1 = c1 << 0x06 | strData.charCodeAt(ai + i) & 0x3F;
- }
-
- if (seqlen === 4) {
- c1 -= 0x10000;
- tmpArr.push(String.fromCharCode(0xD800 | c1 >> 10 & 0x3FF));
- tmpArr.push(String.fromCharCode(0xDC00 | c1 & 0x3FF));
- } else {
- tmpArr.push(String.fromCharCode(c1));
- }
-
- i += seqlen;
- }
-
- return tmpArr.join('');
-};
-//# sourceMappingURL=utf8_decode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/xml/utf8_decode.js.map b/node_modules/locutus/php/xml/utf8_decode.js.map
deleted file mode 100644
index 3d963ab..0000000
--- a/node_modules/locutus/php/xml/utf8_decode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/xml/utf8_decode.js"],"names":["module","exports","utf8_decode","strData","tmpArr","i","c1","seqlen","length","charCodeAt","ai","push","String","fromCharCode","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAsBC,OAAtB,EAA+B;AAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,SAAS,EAAb;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,SAAS,CAAb;;AAEAJ,aAAW,EAAX;;AAEA,SAAOE,IAAIF,QAAQK,MAAnB,EAA2B;AACzBF,SAAKH,QAAQM,UAAR,CAAmBJ,CAAnB,IAAwB,IAA7B;AACAE,aAAS,CAAT;;AAEA;AACA,QAAID,MAAM,IAAV,EAAgB;AACdA,WAAMA,KAAK,IAAX;AACAC,eAAS,CAAT;AACD,KAHD,MAGO,IAAID,MAAM,IAAV,EAAgB;AACrBA,WAAMA,KAAK,IAAX;AACAC,eAAS,CAAT;AACD,KAHM,MAGA,IAAID,MAAM,IAAV,EAAgB;AACrBA,WAAMA,KAAK,IAAX;AACAC,eAAS,CAAT;AACD,KAHM,MAGA;AACLD,WAAMA,KAAK,IAAX;AACAC,eAAS,CAAT;AACD;;AAED,SAAK,IAAIG,KAAK,CAAd,EAAiBA,KAAKH,MAAtB,EAA8B,EAAEG,EAAhC,EAAoC;AAClCJ,WAAOA,MAAM,IAAP,GAAgBH,QAAQM,UAAR,CAAmBC,KAAKL,CAAxB,IAA6B,IAAnD;AACD;;AAED,QAAIE,WAAW,CAAf,EAAkB;AAChBD,YAAM,OAAN;AACAF,aAAOO,IAAP,CAAYC,OAAOC,YAAP,CAAoB,SAAWP,MAAM,EAAP,GAAa,KAA3C,CAAZ;AACAF,aAAOO,IAAP,CAAYC,OAAOC,YAAP,CAAoB,SAAUP,KAAK,KAAnC,CAAZ;AACD,KAJD,MAIO;AACLF,aAAOO,IAAP,CAAYC,OAAOC,YAAP,CAAoBP,EAApB,CAAZ;AACD;;AAEDD,SAAKE,MAAL;AACD;;AAED,SAAOH,OAAOU,IAAP,CAAY,EAAZ,CAAP;AACD,CAzDD","file":"utf8_decode.js","sourcesContent":["module.exports = function utf8_decode (strData) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/utf8_decode/\n // original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // input by: Aman Gupta\n // input by: Brett Zamir (http://brett-zamir.me)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Norman \"zEh\" Fuchs\n // bugfixed by: hitwork\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: kirilloid\n // bugfixed by: w35l3y (http://www.wesley.eti.br)\n // example 1: utf8_decode('Kevin van Zonneveld')\n // returns 1: 'Kevin van Zonneveld'\n\n var tmpArr = []\n var i = 0\n var c1 = 0\n var seqlen = 0\n\n strData += ''\n\n while (i < strData.length) {\n c1 = strData.charCodeAt(i) & 0xFF\n seqlen = 0\n\n // http://en.wikipedia.org/wiki/UTF-8#Codepage_layout\n if (c1 <= 0xBF) {\n c1 = (c1 & 0x7F)\n seqlen = 1\n } else if (c1 <= 0xDF) {\n c1 = (c1 & 0x1F)\n seqlen = 2\n } else if (c1 <= 0xEF) {\n c1 = (c1 & 0x0F)\n seqlen = 3\n } else {\n c1 = (c1 & 0x07)\n seqlen = 4\n }\n\n for (var ai = 1; ai < seqlen; ++ai) {\n c1 = ((c1 << 0x06) | (strData.charCodeAt(ai + i) & 0x3F))\n }\n\n if (seqlen === 4) {\n c1 -= 0x10000\n tmpArr.push(String.fromCharCode(0xD800 | ((c1 >> 10) & 0x3FF)))\n tmpArr.push(String.fromCharCode(0xDC00 | (c1 & 0x3FF)))\n } else {\n tmpArr.push(String.fromCharCode(c1))\n }\n\n i += seqlen\n }\n\n return tmpArr.join('')\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/php/xml/utf8_encode.js b/node_modules/locutus/php/xml/utf8_encode.js
deleted file mode 100644
index 94bb3eb..0000000
--- a/node_modules/locutus/php/xml/utf8_encode.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-
-module.exports = function utf8_encode(argString) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/utf8_encode/
- // original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: sowberry
- // improved by: Jack
- // improved by: Yves Sucaet
- // improved by: kirilloid
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Ulrich
- // bugfixed by: Rafał Kukawski (http://blog.kukawski.pl)
- // bugfixed by: kirilloid
- // example 1: utf8_encode('Kevin van Zonneveld')
- // returns 1: 'Kevin van Zonneveld'
-
- if (argString === null || typeof argString === 'undefined') {
- return '';
- }
-
- // .replace(/\r\n/g, "\n").replace(/\r/g, "\n");
- var string = argString + '';
- var utftext = '';
- var start;
- var end;
- var stringl = 0;
-
- start = end = 0;
- stringl = string.length;
- for (var n = 0; n < stringl; n++) {
- var c1 = string.charCodeAt(n);
- var enc = null;
-
- if (c1 < 128) {
- end++;
- } else if (c1 > 127 && c1 < 2048) {
- enc = String.fromCharCode(c1 >> 6 | 192, c1 & 63 | 128);
- } else if ((c1 & 0xF800) !== 0xD800) {
- enc = String.fromCharCode(c1 >> 12 | 224, c1 >> 6 & 63 | 128, c1 & 63 | 128);
- } else {
- // surrogate pairs
- if ((c1 & 0xFC00) !== 0xD800) {
- throw new RangeError('Unmatched trail surrogate at ' + n);
- }
- var c2 = string.charCodeAt(++n);
- if ((c2 & 0xFC00) !== 0xDC00) {
- throw new RangeError('Unmatched lead surrogate at ' + (n - 1));
- }
- c1 = ((c1 & 0x3FF) << 10) + (c2 & 0x3FF) + 0x10000;
- enc = String.fromCharCode(c1 >> 18 | 240, c1 >> 12 & 63 | 128, c1 >> 6 & 63 | 128, c1 & 63 | 128);
- }
- if (enc !== null) {
- if (end > start) {
- utftext += string.slice(start, end);
- }
- utftext += enc;
- start = end = n + 1;
- }
- }
-
- if (end > start) {
- utftext += string.slice(start, stringl);
- }
-
- return utftext;
-};
-//# sourceMappingURL=utf8_encode.js.map \ No newline at end of file
diff --git a/node_modules/locutus/php/xml/utf8_encode.js.map b/node_modules/locutus/php/xml/utf8_encode.js.map
deleted file mode 100644
index 373c85f..0000000
--- a/node_modules/locutus/php/xml/utf8_encode.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/xml/utf8_encode.js"],"names":["module","exports","utf8_encode","argString","string","utftext","start","end","stringl","length","n","c1","charCod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AAkB,MAAtB,EAA8B;AAC5B,cAAM,IAAID,UAAJ,CAAe,kCAAkCN,IAAI,CAAtC,CAAf,CAAN;AACD;AACDC,WAAK,CAAC,CAACA,KAAK,KAAN,KAAgB,EAAjB,KAAwBM,KAAK,KAA7B,IAAsC,OAA3C;AACAJ,YAAMC,OAAOC,YAAP,CACHJ,MAAM,EAAP,GAAa,GADT,EACgBA,MAAM,EAAP,GAAa,EAAd,GAAoB,GADlC,EACyCA,MAAM,CAAP,GAAY,EAAb,GAAmB,GAD1D,EACgEA,KAAK,EAAN,GAAY,GAD3E,CAAN;AAGD;AACD,QAAIE,QAAQ,IAAZ,EAAkB;AAChB,UAAIN,MAAMD,KAAV,EAAiB;AACfD,mBAAWD,OAAOc,KAAP,CAAaZ,KAAb,EAAoBC,GAApB,CAAX;AACD;AACDF,iBAAWQ,GAAX;AACAP,cAAQC,MAAMG,IAAI,CAAlB;AACD;AACF;;AAED,MAAIH,MAAMD,KAAV,EAAiB;AACfD,eAAWD,OAAOc,KAAP,CAAaZ,KAAb,EAAoBE,OAApB,CAAX;AACD;;AAED,SAAOH,OAAP;AACD,CAvED","file":"utf8_encode.js","sourcesContent":["module.exports = function utf8_encode (argString) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/utf8_encode/\n // original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: sowberry\n // improved by: Jack\n // improved by: Yves Sucaet\n // improved by: kirilloid\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Ulrich\n // bugfixed by: Rafał Kukawski (http://blog.kukawski.pl)\n // bugfixed by: kirilloid\n // example 1: utf8_encode('Kevin van Zonneveld')\n // returns 1: 'Kevin van Zonneveld'\n\n if (argString === null || typeof argString === 'undefined') {\n return ''\n }\n\n // .replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n var string = (argString + '')\n var utftext = ''\n var start\n var end\n var stringl = 0\n\n start = end = 0\n stringl = string.length\n for (var n = 0; n < stringl; n++) {\n var c1 = string.charCodeAt(n)\n var enc = null\n\n if (c1 < 128) {\n end++\n } else if (c1 > 127 && c1 < 2048) {\n enc = String.fromCharCode(\n (c1 >> 6) | 192, (c1 & 63) | 128\n )\n } else if ((c1 & 0xF800) !== 0xD800) {\n enc = String.fromCharCode(\n (c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128\n )\n } else {\n // surrogate pairs\n if ((c1 & 0xFC00) !== 0xD800) {\n throw new RangeError('Unmatched trail surrogate at ' + n)\n }\n var c2 = string.charCodeAt(++n)\n if ((c2 & 0xFC00) !== 0xDC00) {\n throw new RangeError('Unmatched lead surrogate at ' + (n - 1))\n }\n c1 = ((c1 & 0x3FF) << 10) + (c2 & 0x3FF) + 0x10000\n enc = String.fromCharCode(\n (c1 >> 18) | 240, ((c1 >> 12) & 63) | 128, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128\n )\n }\n if (enc !== null) {\n if (end > start) {\n utftext += string.slice(start, end)\n }\n utftext += enc\n start = end = n + 1\n }\n }\n\n if (end > start) {\n utftext += string.slice(start, stringl)\n }\n\n return utftext\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/python/index.js b/node_modules/locutus/python/index.js
deleted file mode 100644
index 510b938..0000000
--- a/node_modules/locutus/python/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['string'] = require('./string');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/python/index.js.map b/node_modules/locutus/python/index.js.map
deleted file mode 100644
index ca12078..0000000
--- a/node_modules/locutus/python/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/python/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,QAAf,IAA2BC,QAAQ,UAAR,CAA3B","file":"index.js","sourcesContent":["module.exports['string'] = require('./string')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/python/string/capwords.js b/node_modules/locutus/python/string/capwords.js
deleted file mode 100644
index ddd855a..0000000
--- a/node_modules/locutus/python/string/capwords.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = function capwords(str) {
- // discuss at: http://locutus.io/python/capwords/
- // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // improved by: Waldo Malqui Silva (http://waldo.malqui.info)
- // improved by: Robin
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // input by: James (http://www.james-bell.co.uk/)
- // example 1: capwords('kevin van zonneveld')
- // returns 1: 'Kevin Van Zonneveld'
- // example 2: capwords('HELLO WORLD')
- // returns 2: 'HELLO WORLD'
-
- var pattern = /^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g;
- return (str + '').replace(pattern, function ($1) {
- return $1.toUpperCase();
- });
-};
-//# sourceMappingURL=capwords.js.map \ No newline at end of file
diff --git a/node_modules/locutus/python/string/capwords.js.map b/node_modules/locutus/python/string/capwords.js.map
deleted file mode 100644
index ad1ea35..0000000
--- a/node_modules/locutus/python/string/capwords.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/python/string/capwords.js"],"names":["module","exports","capwords","str","pattern","replace","$1","toUpperCase"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAmBC,GAAnB,EAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAU,gDAAd;AACA,SAAO,CAACD,MAAM,EAAP,EAAWE,OAAX,CAAmBD,OAAnB,EAA4B,UAAUE,EAAV,EAAc;AAC/C,WAAOA,GAAGC,WAAH,EAAP;AACD,GAFM,CAAP;AAGD,CAjBD","file":"capwords.js","sourcesContent":["module.exports = function capwords (str) {\n // discuss at: http://locutus.io/python/capwords/\n // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // improved by: Waldo Malqui Silva (http://waldo.malqui.info)\n // improved by: Robin\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // input by: James (http://www.james-bell.co.uk/)\n // example 1: capwords('kevin van zonneveld')\n // returns 1: 'Kevin Van Zonneveld'\n // example 2: capwords('HELLO WORLD')\n // returns 2: 'HELLO WORLD'\n\n var pattern = /^([a-z\\u00E0-\\u00FC])|\\s+([a-z\\u00E0-\\u00FC])/g\n return (str + '').replace(pattern, function ($1) {\n return $1.toUpperCase()\n })\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/python/string/index.js b/node_modules/locutus/python/string/index.js
deleted file mode 100644
index 0a1885d..0000000
--- a/node_modules/locutus/python/string/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['capwords'] = require('./capwords');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/python/string/index.js.map b/node_modules/locutus/python/string/index.js.map
deleted file mode 100644
index ca77bd4..0000000
--- a/node_modules/locutus/python/string/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/python/string/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,UAAf,IAA6BC,QAAQ,YAAR,CAA7B","file":"index.js","sourcesContent":["module.exports['capwords'] = require('./capwords')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/ruby/Math/acos.js b/node_modules/locutus/ruby/Math/acos.js
deleted file mode 100644
index 4073b01..0000000
--- a/node_modules/locutus/ruby/Math/acos.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-
-module.exports = function acos(arg) {
- // discuss at: http://locutus.io/ruby/Math/acos/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // note 1: Sorry about the crippled test.
- // note 1: Needed because precision differs accross platforms.
- // example 1: (acos(0.3) + '').substr(0, 17)
- // returns 1: '1.266103672779499'
-
- return Math.acos(arg);
-};
-//# sourceMappingURL=acos.js.map \ No newline at end of file
diff --git a/node_modules/locutus/ruby/Math/acos.js.map b/node_modules/locutus/ruby/Math/acos.js.map
deleted file mode 100644
index 4558546..0000000
--- a/node_modules/locutus/ruby/Math/acos.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/ruby/Math/acos.js"],"names":["module","exports","acos","arg","Math"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,GAAf,EAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,KAAKF,IAAL,CAAUC,GAAV,CAAP;AACD,CATD","file":"acos.js","sourcesContent":["module.exports = function acos (arg) {\n // discuss at: http://locutus.io/ruby/Math/acos/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // note 1: Sorry about the crippled test.\n // note 1: Needed because precision differs accross platforms.\n // example 1: (acos(0.3) + '').substr(0, 17)\n // returns 1: '1.266103672779499'\n\n return Math.acos(arg)\n}\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/ruby/Math/index.js b/node_modules/locutus/ruby/Math/index.js
deleted file mode 100644
index 2e3ef80..0000000
--- a/node_modules/locutus/ruby/Math/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['acos'] = require('./acos');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/ruby/Math/index.js.map b/node_modules/locutus/ruby/Math/index.js.map
deleted file mode 100644
index c856295..0000000
--- a/node_modules/locutus/ruby/Math/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/ruby/Math/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB","file":"index.js","sourcesContent":["module.exports['acos'] = require('./acos')\n"]} \ No newline at end of file
diff --git a/node_modules/locutus/ruby/index.js b/node_modules/locutus/ruby/index.js
deleted file mode 100644
index 18c66cb..0000000
--- a/node_modules/locutus/ruby/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports['Math'] = require('./Math');
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/locutus/ruby/index.js.map b/node_modules/locutus/ruby/index.js.map
deleted file mode 100644
index 6389ce0..0000000
--- a/node_modules/locutus/ruby/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/ruby/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,CAAe,MAAf,IAAyBC,QAAQ,QAAR,CAAzB","file":"index.js","sourcesContent":["module.exports['Math'] = require('./Math')\n"]} \ No newline at end of file
diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/minimatch/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md
deleted file mode 100644
index ad72b81..0000000
--- a/node_modules/minimatch/README.md
+++ /dev/null
@@ -1,209 +0,0 @@
-# minimatch
-
-A minimal matching utility.
-
-[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch)
-
-
-This is the matching library used internally by npm.
-
-It works by converting glob expressions into JavaScript `RegExp`
-objects.
-
-## Usage
-
-```javascript
-var minimatch = require("minimatch")
-
-minimatch("bar.foo", "*.foo") // true!
-minimatch("bar.foo", "*.bar") // false!
-minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
-```
-
-## Features
-
-Supports these glob features:
-
-* Brace Expansion
-* Extended glob matching
-* "Globstar" `**` matching
-
-See:
-
-* `man sh`
-* `man bash`
-* `man 3 fnmatch`
-* `man 5 gitignore`
-
-## Minimatch Class
-
-Create a minimatch object by instantiating the `minimatch.Minimatch` class.
-
-```javascript
-var Minimatch = require("minimatch").Minimatch
-var mm = new Minimatch(pattern, options)
-```
-
-### Properties
-
-* `pattern` The original pattern the minimatch object represents.
-* `options` The options supplied to the constructor.
-* `set` A 2-dimensional array of regexp or string expressions.
- Each row in the
- array corresponds to a brace-expanded pattern. Each item in the row
- corresponds to a single path-part. For example, the pattern
- `{a,b/c}/d` would expand to a set of patterns like:
-
- [ [ a, d ]
- , [ b, c, d ] ]
-
- If a portion of the pattern doesn't have any "magic" in it
- (that is, it's something like `"foo"` rather than `fo*o?`), then it
- will be left as a string rather than converted to a regular
- expression.
-
-* `regexp` Created by the `makeRe` method. A single regular expression
- expressing the entire pattern. This is useful in cases where you wish
- to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
-* `negate` True if the pattern is negated.
-* `comment` True if the pattern is a comment.
-* `empty` True if the pattern is `""`.
-
-### Methods
-
-* `makeRe` Generate the `regexp` member if necessary, and return it.
- Will return `false` if the pattern is invalid.
-* `match(fname)` Return true if the filename matches the pattern, or
- false otherwise.
-* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
- filename, and match it against a single row in the `regExpSet`. This
- method is mainly for internal use, but is exposed so that it can be
- used by a glob-walker that needs to avoid excessive filesystem calls.
-
-All other methods are internal, and will be called as necessary.
-
-### minimatch(path, pattern, options)
-
-Main export. Tests a path against the pattern using the options.
-
-```javascript
-var isJS = minimatch(file, "*.js", { matchBase: true })
-```
-
-### minimatch.filter(pattern, options)
-
-Returns a function that tests its
-supplied argument, suitable for use with `Array.filter`. Example:
-
-```javascript
-var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
-```
-
-### minimatch.match(list, pattern, options)
-
-Match against the list of
-files, in the style of fnmatch or glob. If nothing is matched, and
-options.nonull is set, then return a list containing the pattern itself.
-
-```javascript
-var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
-```
-
-### minimatch.makeRe(pattern, options)
-
-Make a regular expression object from the pattern.
-
-## Options
-
-All options are `false` by default.
-
-### debug
-
-Dump a ton of stuff to stderr.
-
-### nobrace
-
-Do not expand `{a,b}` and `{1..3}` brace sets.
-
-### noglobstar
-
-Disable `**` matching against multiple folder names.
-
-### dot
-
-Allow patterns to match filenames starting with a period, even if
-the pattern does not explicitly have a period in that spot.
-
-Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
-is set.
-
-### noext
-
-Disable "extglob" style patterns like `+(a|b)`.
-
-### nocase
-
-Perform a case-insensitive match.
-
-### nonull
-
-When a match is not found by `minimatch.match`, return a list containing
-the pattern itself if this option is set. When not set, an empty list
-is returned if there are no matches.
-
-### matchBase
-
-If set, then patterns without slashes will be matched
-against the basename of the path if it contains slashes. For example,
-`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
-
-### nocomment
-
-Suppress the behavior of treating `#` at the start of a pattern as a
-comment.
-
-### nonegate
-
-Suppress the behavior of treating a leading `!` character as negation.
-
-### flipNegate
-
-Returns from negate expressions the same as if they were not negated.
-(Ie, true on a hit, false on a miss.)
-
-
-## Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between minimatch and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.1, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not.
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then minimatch.match returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js
deleted file mode 100644
index 5b5f8cf..0000000
--- a/node_modules/minimatch/minimatch.js
+++ /dev/null
@@ -1,923 +0,0 @@
-module.exports = minimatch
-minimatch.Minimatch = Minimatch
-
-var path = { sep: '/' }
-try {
- path = require('path')
-} catch (er) {}
-
-var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-var expand = require('brace-expansion')
-
-var plTypes = {
- '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
- '?': { open: '(?:', close: ')?' },
- '+': { open: '(?:', close: ')+' },
- '*': { open: '(?:', close: ')*' },
- '@': { open: '(?:', close: ')' }
-}
-
-// any single thing other than /
-// don't need to escape / when using new RegExp()
-var qmark = '[^/]'
-
-// * => any number of characters
-var star = qmark + '*?'
-
-// ** when dots are allowed. Anything goes, except .. and .
-// not (^ or / followed by one or two dots followed by $ or /),
-// followed by anything, any number of times.
-var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
-
-// not a ^ or / followed by a dot,
-// followed by anything, any number of times.
-var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
-
-// characters that need to be escaped in RegExp.
-var reSpecials = charSet('().*{}+?[]^$\\!')
-
-// "abc" -> { a:true, b:true, c:true }
-function charSet (s) {
- return s.split('').reduce(function (set, c) {
- set[c] = true
- return set
- }, {})
-}
-
-// normalizes slashes.
-var slashSplit = /\/+/
-
-minimatch.filter = filter
-function filter (pattern, options) {
- options = options || {}
- return function (p, i, list) {
- return minimatch(p, pattern, options)
- }
-}
-
-function ext (a, b) {
- a = a || {}
- b = b || {}
- var t = {}
- Object.keys(b).forEach(function (k) {
- t[k] = b[k]
- })
- Object.keys(a).forEach(function (k) {
- t[k] = a[k]
- })
- return t
-}
-
-minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return minimatch
-
- var orig = minimatch
-
- var m = function minimatch (p, pattern, options) {
- return orig.minimatch(p, pattern, ext(def, options))
- }
-
- m.Minimatch = function Minimatch (pattern, options) {
- return new orig.Minimatch(pattern, ext(def, options))
- }
-
- return m
-}
-
-Minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return Minimatch
- return minimatch.defaults(def).Minimatch
-}
-
-function minimatch (p, pattern, options) {
- if (typeof pattern !== 'string') {
- throw new TypeError('glob pattern string required')
- }
-
- if (!options) options = {}
-
- // shortcut: comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- return false
- }
-
- // "" only matches ""
- if (pattern.trim() === '') return p === ''
-
- return new Minimatch(pattern, options).match(p)
-}
-
-function Minimatch (pattern, options) {
- if (!(this instanceof Minimatch)) {
- return new Minimatch(pattern, options)
- }
-
- if (typeof pattern !== 'string') {
- throw new TypeError('glob pattern string required')
- }
-
- if (!options) options = {}
- pattern = pattern.trim()
-
- // windows support: need to use /, not \
- if (path.sep !== '/') {
- pattern = pattern.split(path.sep).join('/')
- }
-
- this.options = options
- this.set = []
- this.pattern = pattern
- this.regexp = null
- this.negate = false
- this.comment = false
- this.empty = false
-
- // make the set of regexps etc.
- this.make()
-}
-
-Minimatch.prototype.debug = function () {}
-
-Minimatch.prototype.make = make
-function make () {
- // don't do it more than once.
- if (this._made) return
-
- var pattern = this.pattern
- var options = this.options
-
- // empty patterns and comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- this.comment = true
- return
- }
- if (!pattern) {
- this.empty = true
- return
- }
-
- // step 1: figure out negation, etc.
- this.parseNegate()
-
- // step 2: expand braces
- var set = this.globSet = this.braceExpand()
-
- if (options.debug) this.debug = console.error
-
- this.debug(this.pattern, set)
-
- // step 3: now we have a set, so turn each one into a series of path-portion
- // matching patterns.
- // These will be regexps, except in the case of "**", which is
- // set to the GLOBSTAR object for globstar behavior,
- // and will not contain any / characters
- set = this.globParts = set.map(function (s) {
- return s.split(slashSplit)
- })
-
- this.debug(this.pattern, set)
-
- // glob --> regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this)
-
- this.debug(this.pattern, set)
-
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1
- })
-
- this.debug(this.pattern, set)
-
- this.set = set
-}
-
-Minimatch.prototype.parseNegate = parseNegate
-function parseNegate () {
- var pattern = this.pattern
- var negate = false
- var options = this.options
- var negateOffset = 0
-
- if (options.nonegate) return
-
- for (var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === '!'
- ; i++) {
- negate = !negate
- negateOffset++
- }
-
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
- this.negate = negate
-}
-
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return braceExpand(pattern, options)
-}
-
-Minimatch.prototype.braceExpand = braceExpand
-
-function braceExpand (pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options
- } else {
- options = {}
- }
- }
-
- pattern = typeof pattern === 'undefined'
- ? this.pattern : pattern
-
- if (typeof pattern === 'undefined') {
- throw new TypeError('undefined pattern')
- }
-
- if (options.nobrace ||
- !pattern.match(/\{.*\}/)) {
- // shortcut. no need to expand.
- return [pattern]
- }
-
- return expand(pattern)
-}
-
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse
-var SUBPARSE = {}
-function parse (pattern, isSub) {
- if (pattern.length > 1024 * 64) {
- throw new TypeError('pattern is too long')
- }
-
- var options = this.options
-
- // shortcuts
- if (!options.noglobstar && pattern === '**') return GLOBSTAR
- if (pattern === '') return ''
-
- var re = ''
- var hasMagic = !!options.nocase
- var escaping = false
- // ? => one single character
- var patternListStack = []
- var negativeLists = []
- var stateChar
- var inClass = false
- var reClassStart = -1
- var classStart = -1
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
- : '(?!\\.)'
- var self = this
-
- function clearStateChar () {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case '*':
- re += star
- hasMagic = true
- break
- case '?':
- re += qmark
- hasMagic = true
- break
- default:
- re += '\\' + stateChar
- break
- }
- self.debug('clearStateChar %j %j', stateChar, re)
- stateChar = false
- }
- }
-
- for (var i = 0, len = pattern.length, c
- ; (i < len) && (c = pattern.charAt(i))
- ; i++) {
- this.debug('%s\t%s %s %j', pattern, i, re, c)
-
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c
- escaping = false
- continue
- }
-
- switch (c) {
- case '/':
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
-
- case '\\':
- clearStateChar()
- escaping = true
- continue
-
- // the various stateChar values
- // for the "extglob" stuff.
- case '?':
- case '*':
- case '+':
- case '@':
- case '!':
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
-
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- this.debug(' in class')
- if (c === '!' && i === classStart + 1) c = '^'
- re += c
- continue
- }
-
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- self.debug('call clearStateChar %j', stateChar)
- clearStateChar()
- stateChar = c
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar()
- continue
-
- case '(':
- if (inClass) {
- re += '('
- continue
- }
-
- if (!stateChar) {
- re += '\\('
- continue
- }
-
- patternListStack.push({
- type: stateChar,
- start: i - 1,
- reStart: re.length,
- open: plTypes[stateChar].open,
- close: plTypes[stateChar].close
- })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
- this.debug('plType %j %j', stateChar, re)
- stateChar = false
- continue
-
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)'
- continue
- }
-
- clearStateChar()
- hasMagic = true
- var pl = patternListStack.pop()
- // negation is (?:(?!js)[^/]*)
- // The others are (?:<pattern>)<type>
- re += pl.close
- if (pl.type === '!') {
- negativeLists.push(pl)
- }
- pl.reEnd = re.length
- continue
-
- case '|':
- if (inClass || !patternListStack.length || escaping) {
- re += '\\|'
- escaping = false
- continue
- }
-
- clearStateChar()
- re += '|'
- continue
-
- // these are mostly the same in regexp and glob
- case '[':
- // swallow any state-tracking char before the [
- clearStateChar()
-
- if (inClass) {
- re += '\\' + c
- continue
- }
-
- inClass = true
- classStart = i
- reClassStart = re.length
- re += c
- continue
-
- case ']':
- // a right bracket shall lose its special
- // meaning and represent itself in
- // a bracket expression if it occurs
- // first in the list. -- POSIX.2 2.8.3.2
- if (i === classStart + 1 || !inClass) {
- re += '\\' + c
- escaping = false
- continue
- }
-
- // handle the case where we left a class open.
- // "[z-a]" is valid, equivalent to "\[z-a\]"
- if (inClass) {
- // split where the last [ was, make sure we don't have
- // an invalid re. if so, re-walk the contents of the
- // would-be class to re-translate any characters that
- // were passed through as-is
- // TODO: It would probably be faster to determine this
- // without a try/catch and a new RegExp, but it's tricky
- // to do safely. For now, this is safe and works.
- var cs = pattern.substring(classStart + 1, i)
- try {
- RegExp('[' + cs + ']')
- } catch (er) {
- // not a valid class!
- var sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
- hasMagic = hasMagic || sp[1]
- inClass = false
- continue
- }
- }
-
- // finish up the class.
- hasMagic = true
- inClass = false
- re += c
- continue
-
- default:
- // swallow any state char that wasn't consumed
- clearStateChar()
-
- if (escaping) {
- // no need
- escaping = false
- } else if (reSpecials[c]
- && !(c === '^' && inClass)) {
- re += '\\'
- }
-
- re += c
-
- } // switch
- } // for
-
- // handle the case where we left a class open.
- // "[abc" is valid, equivalent to "\[abc"
- if (inClass) {
- // split where the last [ was, and escape it
- // this is a huge pita. We now have to re-walk
- // the contents of the would-be class to re-translate
- // any characters that were passed through as-is
- cs = pattern.substr(classStart + 1)
- sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
- hasMagic = hasMagic || sp[1]
- }
-
- // handle the case where we had a +( thing at the *end*
- // of the pattern.
- // each pattern list stack adds 3 chars, and we need to go through
- // and escape any | chars that were passed through as-is for the regexp.
- // Go through and escape them, taking care not to double-escape any
- // | chars that were already escaped.
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + pl.open.length)
- this.debug('setting tail', re, pl)
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = '\\'
- }
-
- // need to escape all those slashes *again*, without escaping the
- // one that we need for escaping the | character. As it works out,
- // escaping an even number of slashes can be done by simply repeating
- // it exactly after itself. That's why this trick works.
- //
- // I am sorry that you have to see this.
- return $1 + $1 + $2 + '|'
- })
-
- this.debug('tail=%j\n %s', tail, tail, pl, re)
- var t = pl.type === '*' ? star
- : pl.type === '?' ? qmark
- : '\\' + pl.type
-
- hasMagic = true
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
- }
-
- // handle trailing things that only matter at the very end.
- clearStateChar()
- if (escaping) {
- // trailing \\
- re += '\\\\'
- }
-
- // only need to apply the nodot start if the re starts with
- // something that could conceivably capture a dot
- var addPatternStart = false
- switch (re.charAt(0)) {
- case '.':
- case '[':
- case '(': addPatternStart = true
- }
-
- // Hack to work around lack of negative lookbehind in JS
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
- // like 'a.xyz.yz' doesn't match. So, the first negative
- // lookahead, has to look ALL the way ahead, to the end of
- // the pattern.
- for (var n = negativeLists.length - 1; n > -1; n--) {
- var nl = negativeLists[n]
-
- var nlBefore = re.slice(0, nl.reStart)
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
- var nlAfter = re.slice(nl.reEnd)
-
- nlLast += nlAfter
-
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
- // mean that we should *not* include the ) in the bit that is considered
- // "after" the negated section.
- var openParensBefore = nlBefore.split('(').length - 1
- var cleanAfter = nlAfter
- for (i = 0; i < openParensBefore; i++) {
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
- }
- nlAfter = cleanAfter
-
- var dollar = ''
- if (nlAfter === '' && isSub !== SUBPARSE) {
- dollar = '$'
- }
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
- re = newRe
- }
-
- // if the re is not "" at this point, then we need to make sure
- // it doesn't match against an empty path part.
- // Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) {
- re = '(?=.)' + re
- }
-
- if (addPatternStart) {
- re = patternStart + re
- }
-
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [re, hasMagic]
- }
-
- // skip the regexp for non-magical patterns
- // unescape anything in it, though, so that it'll be
- // an exact match against a file etc.
- if (!hasMagic) {
- return globUnescape(pattern)
- }
-
- var flags = options.nocase ? 'i' : ''
- try {
- var regExp = new RegExp('^' + re + '$', flags)
- } catch (er) {
- // If it was an invalid regular expression, then it can't match
- // anything. This trick looks for a character after the end of
- // the string, which is of course impossible, except in multi-line
- // mode, but it's not a /m regex.
- return new RegExp('$.')
- }
-
- regExp._glob = pattern
- regExp._src = re
-
- return regExp
-}
-
-minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe()
-}
-
-Minimatch.prototype.makeRe = makeRe
-function makeRe () {
- if (this.regexp || this.regexp === false) return this.regexp
-
- // at this point, this.set is a 2d array of partial
- // pattern strings, or "**".
- //
- // It's better to use .match(). This function shouldn't
- // be used, really, but it's pretty convenient sometimes,
- // when you just want to work with a regex.
- var set = this.set
-
- if (!set.length) {
- this.regexp = false
- return this.regexp
- }
- var options = this.options
-
- var twoStar = options.noglobstar ? star
- : options.dot ? twoStarDot
- : twoStarNoDot
- var flags = options.nocase ? 'i' : ''
-
- var re = set.map(function (pattern) {
- return pattern.map(function (p) {
- return (p === GLOBSTAR) ? twoStar
- : (typeof p === 'string') ? regExpEscape(p)
- : p._src
- }).join('\\\/')
- }).join('|')
-
- // must match entire pattern
- // ending in a * or ** will make it less strict.
- re = '^(?:' + re + ')$'
-
- // can match anything, as long as it's not this.
- if (this.negate) re = '^(?!' + re + ').*$'
-
- try {
- this.regexp = new RegExp(re, flags)
- } catch (ex) {
- this.regexp = false
- }
- return this.regexp
-}
-
-minimatch.match = function (list, pattern, options) {
- options = options || {}
- var mm = new Minimatch(pattern, options)
- list = list.filter(function (f) {
- return mm.match(f)
- })
- if (mm.options.nonull && !list.length) {
- list.push(pattern)
- }
- return list
-}
-
-Minimatch.prototype.match = match
-function match (f, partial) {
- this.debug('match', f, this.pattern)
- // short-circuit in the case of busted things.
- // comments, etc.
- if (this.comment) return false
- if (this.empty) return f === ''
-
- if (f === '/' && partial) return true
-
- var options = this.options
-
- // windows: need to use /, not \
- if (path.sep !== '/') {
- f = f.split(path.sep).join('/')
- }
-
- // treat the test path as a set of pathparts.
- f = f.split(slashSplit)
- this.debug(this.pattern, 'split', f)
-
- // just ONE of the pattern sets in this.set needs to match
- // in order for it to be valid. If negating, then just one
- // match means that we have failed.
- // Either way, return on the first hit.
-
- var set = this.set
- this.debug(this.pattern, 'set', set)
-
- // Find the basename of the path by looking for the last non-empty segment
- var filename
- var i
- for (i = f.length - 1; i >= 0; i--) {
- filename = f[i]
- if (filename) break
- }
-
- for (i = 0; i < set.length; i++) {
- var pattern = set[i]
- var file = f
- if (options.matchBase && pattern.length === 1) {
- file = [filename]
- }
- var hit = this.matchOne(file, pattern, partial)
- if (hit) {
- if (options.flipNegate) return true
- return !this.negate
- }
- }
-
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false
- return this.negate
-}
-
-// set partial to true to test if, for example,
-// "/a/b" matches the start of "/*/b/*/d"
-// Partial means, if you run out of file before you run
-// out of pattern, then that's fine, as long as all
-// the parts match.
-Minimatch.prototype.matchOne = function (file, pattern, partial) {
- var options = this.options
-
- this.debug('matchOne',
- { 'this': this, file: file, pattern: pattern })
-
- this.debug('matchOne', file.length, pattern.length)
-
- for (var fi = 0,
- pi = 0,
- fl = file.length,
- pl = pattern.length
- ; (fi < fl) && (pi < pl)
- ; fi++, pi++) {
- this.debug('matchOne loop')
- var p = pattern[pi]
- var f = file[fi]
-
- this.debug(pattern, p, f)
-
- // should be impossible.
- // some invalid regexp stuff in the set.
- if (p === false) return false
-
- if (p === GLOBSTAR) {
- this.debug('GLOBSTAR', [pattern, p, f])
-
- // "**"
- // a/**/b/**/c would match the following:
- // a/b/x/y/z/c
- // a/x/y/z/b/c
- // a/b/x/b/x/c
- // a/b/c
- // To do this, take the rest of the pattern after
- // the **, and see if it would match the file remainder.
- // If so, return success.
- // If not, the ** "swallows" a segment, and try again.
- // This is recursively awful.
- //
- // a/**/b/**/c matching a/b/x/y/z/c
- // - a matches a
- // - doublestar
- // - matchOne(b/x/y/z/c, b/**/c)
- // - b matches b
- // - doublestar
- // - matchOne(x/y/z/c, c) -> no
- // - matchOne(y/z/c, c) -> no
- // - matchOne(z/c, c) -> no
- // - matchOne(c, c) yes, hit
- var fr = fi
- var pr = pi + 1
- if (pr === pl) {
- this.debug('** at the end')
- // a ** at the end will just swallow the rest.
- // We have found a match.
- // however, it will not swallow /.x, unless
- // options.dot is set.
- // . and .. are *never* matched by **, for explosively
- // exponential reasons.
- for (; fi < fl; fi++) {
- if (file[fi] === '.' || file[fi] === '..' ||
- (!options.dot && file[fi].charAt(0) === '.')) return false
- }
- return true
- }
-
- // ok, let's see if we can swallow whatever we can.
- while (fr < fl) {
- var swallowee = file[fr]
-
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
-
- // XXX remove this slice. Just pass the start index.
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- this.debug('globstar found match!', fr, fl, swallowee)
- // found a match.
- return true
- } else {
- // can't swallow "." or ".." ever.
- // can only swallow ".foo" when explicitly asked.
- if (swallowee === '.' || swallowee === '..' ||
- (!options.dot && swallowee.charAt(0) === '.')) {
- this.debug('dot detected!', file, fr, pattern, pr)
- break
- }
-
- // ** swallows a segment, and continue.
- this.debug('globstar swallow a segment, and continue')
- fr++
- }
- }
-
- // no match was found.
- // However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
- if (partial) {
- // ran out of file
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
- if (fr === fl) return true
- }
- return false
- }
-
- // something other than **
- // non-magic patterns just have to match exactly
- // patterns with magic have been turned into regexps.
- var hit
- if (typeof p === 'string') {
- if (options.nocase) {
- hit = f.toLowerCase() === p.toLowerCase()
- } else {
- hit = f === p
- }
- this.debug('string match', p, f, hit)
- } else {
- hit = f.match(p)
- this.debug('pattern match', p, f, hit)
- }
-
- if (!hit) return false
- }
-
- // Note: ending in / means that we'll get a final ""
- // at the end of the pattern. This can only match a
- // corresponding "" at the end of the file.
- // If the file ends in /, then it can only match a
- // a pattern that ends in /, unless the pattern just
- // doesn't have any more for it. But, a/b/ should *not*
- // match "a/b/*", even though "" matches against the
- // [^/]*? pattern, except in partial mode, where it might
- // simply not be reached yet.
- // However, a/b/ should still satisfy a/*
-
- // now either we fell off the end of the pattern, or we're done.
- if (fi === fl && pi === pl) {
- // ran out of pattern and filename at the same time.
- // an exact hit!
- return true
- } else if (fi === fl) {
- // ran out of file, but still had pattern left.
- // this is ok if we're doing the match as part of
- // a glob fs traversal.
- return partial
- } else if (pi === pl) {
- // ran out of pattern, still have file left.
- // this is only acceptable if we're on the very last
- // empty segment of a file with a trailing slash.
- // a/* should match a/b/
- var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
- return emptyFileEnd
- }
-
- // should be unreachable.
- throw new Error('wtf?')
-}
-
-// replace stuff like \* with *
-function globUnescape (s) {
- return s.replace(/\\(.)/g, '$1')
-}
-
-function regExpEscape (s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
-}
diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json
deleted file mode 100644
index 0d935ea..0000000
--- a/node_modules/minimatch/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "_from": "minimatch@3.0.x",
- "_id": "minimatch@3.0.4",
- "_inBundle": false,
- "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "_location": "/minimatch",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "minimatch@3.0.x",
- "name": "minimatch",
- "escapedName": "minimatch",
- "rawSpec": "3.0.x",
- "saveSpec": null,
- "fetchSpec": "3.0.x"
- },
- "_requiredBy": [
- "/twig"
- ],
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
- "_spec": "minimatch@3.0.x",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/twig",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/minimatch/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "deprecated": false,
- "description": "a glob matcher in javascript",
- "devDependencies": {
- "tap": "^10.3.2"
- },
- "engines": {
- "node": "*"
- },
- "files": [
- "minimatch.js"
- ],
- "homepage": "https://github.com/isaacs/minimatch#readme",
- "license": "ISC",
- "main": "minimatch.js",
- "name": "minimatch",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/minimatch.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --cov"
- },
- "version": "3.0.4"
-}
diff --git a/node_modules/twig/.gitmodules b/node_modules/twig/.gitmodules
deleted file mode 100644
index 17a914c..0000000
--- a/node_modules/twig/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "docs/wiki"]
- path = docs/wiki
- url = git://github.com/justjohn/twig.js.wiki.git
diff --git a/node_modules/twig/.npmignore b/node_modules/twig/.npmignore
deleted file mode 100644
index 0989cb8..0000000
--- a/node_modules/twig/.npmignore
+++ /dev/null
@@ -1,12 +0,0 @@
-demos
-tools
-test
-qtest
-src
-.hg
-.git
-.gitignore
-.travis.yml
-.idea
-webpack.config.js
-bower.json
diff --git a/node_modules/twig/CHANGELOG.md b/node_modules/twig/CHANGELOG.md
deleted file mode 100644
index 5784b3b..0000000
--- a/node_modules/twig/CHANGELOG.md
+++ /dev/null
@@ -1,155 +0,0 @@
-Version 0.10.3, released 2016-12-09
------------------------------------
-Minor improvements:
-* Spaceless tag no longer escapes Static values (#435)
-* Inline includes now load (#433)
-* Errors during async fs loading use error callback (#431)
-
-Version 0.10.2, released 2016-11-23
------------------------------------
-Minor improvements:
-* Support 'same as' (#429)
-* Fix windows colon colon namespace (#430)
-
-Version 0.10.1, released 2016-11-18
------------------------------------
-
-Minor improvements:
-* Fixed missing changelog updates
-* Fixed incorrect versions in source
-* Rethrow errors when option to do so is set (#422)
-
-Version 0.10.0, released 2016-10-28
------------------------------------
-Bower is no longer supported
-
-Major improvements:
-* Updated to locutus which replaces phpjs
-* elseif now accepts truthy values (#370)
-* Use PHP style falsy matching (#383)
-* Fix 'not' after binary expressions (#385)
-* Use current context when parsing an include (#395)
-* Correct handling of 'ignore missing' in embed and include (#424)
-
-Minor improvements:
-* Documentation updates
-* Refreshed dependencies
-
-Version 0.9.5, released 2016-05-14
------------------------------------
-
-Minor improvements:
-* Templates that are included via "extends" now populate the parent template context
-
-Version 0.9.4, released 2016-05-13
------------------------------------
-Parentheses parsing has undergone quite a large refactoring, but nothing should have explicitly broken.
-
-Major improvements:
-* Subexpressions are now supported and parsed differently from function parameters
-
-Version 0.9.3, released 2016-05-12
------------------------------------
-Fix missing changelog updates
-
-Version 0.9.2, released 2016-05-12
------------------------------------
-Minor improvements:
-* Empty strings can now be passed to the date filter
-* Twig.expression.resolve keeps the correct context for `this`
-
-Version 0.9.1, released 2016-05-10
------------------------------------
-Fixed changelog versioning
-
-Version 0.9.0, released 2016-05-10
------------------------------------
-Theoretically no breaking changes, but lots of things have changed so it is possible something has slipped through.
-
-Dependencies have been updated. You should run `npm install` to update these.
-
-Major improvements:
-* Webpack is now used for builds
-* phpjs is now a dependency and replaces our reimplementation of PHP functions (#343)
-* Arrays are now cast to booleans unless accessing their contents
-* in/not in operator precedence changed (#344)
-* Expressions can now be keys (#350)
-* The extended ternary operator is now supported (#354)
-* Expressions can now appear after period accessor (#356)
-* The slice shorthand is now supported (#362)
-
-Minor improvements:
-* Twig.exports.renderFile now returns a string rather than a String (#348)
-* The value of context is now cloned when setting a variable to context (#345)
-* Negative numbers are now correctly parsed (#353)
-* The // operator now works correctly (#353)
-
-
-Version 0.8.9, released 2016-03-18
------------------------------
-Dependencies have been updated to current versions. You should run `npm install` to update these. (#313)
-
-Major improvements:
-* Twig's `source` function is now supported (#309)
-* It is possible to add additional parsers using Twig.Templates.registerParser() (currently available: twig, source). If you are using a custom loader, please investigate src/twig.loader.fs.js how to call the requested parser. (#309)
-* `undefined` and `null` values now supported in the `in` operator (#311)
-* Namespaces can now be defined using the '@' symbol (#328)
-
-Minor improvements:
-* Undefined object properties now have the value of `undefined` rather than `null` (#311)
-* Improved browser tests (#325, #310)
-* IE8 fix (#324)
-* Path resolution has been refactored to its own module (#323)
-
-Version 0.8.8, released 2016-02-13
-----------------------------------
-Major improvements:
-* Support for [block shortcuts](http://twig.sensiolabs.org/doc/tags/extends.html#block-shortcuts): `{% block title page_title|title %}` (#304)
-* Define custom template loaders, by registering them via `Twig.Templates.registerLoader()` (#301)
-
-Minor improvements:
-* Some mocha tests didn't work in browsers (#281)
-* Fix Twig.renderFile (#303)
-
-[All issues of this milestone](https://github.com/justjohn/twig.js/issues?q=milestone%3A0.8.8)
-
-Version 0.8.7, released 2016-01-20
-----------------------------------
-Major improvements:
-* The `autoescape` option now supports all strategies which are supported by the `escape` filter (#299)
-
-Minor improvements:
-* The `date` filter now recognises unix timestamps as input, when they are passed as string (#296)
-* The `default` filter now allows to be called without parameters (it will return an empty string in that case) (#295)
-* Normalize provided template paths (this generated problems when using nodejs under Windows) (#252, #300)
-
-Version 0.8.6, released 2016-01-05
-----------------------------------
-Major improvements:
-* The `escape` filter now supports the strategy parameter: `{{ var|escape('css') }}` with the following available strategies: html (default), js, css, url, html_attr. (#289)
-
-Minor improvements:
-* The filter `url_encode` now also encodes apostrophe (as in Twig.php) (#288)
-* Minor bugfixes (#290, #291)
-
-Version 0.8.5, released 2015-12-24
-----------------------------------
-From 0.8.5 on, a summary of changes between each version will be included in the CHANGELOG.md file.
-
-There were some changes to the [Contribution guidelines](https://github.com/justjohn/twig.js/wiki/Contributing): please commit only changes to source files, the files `twig.js` and `twig.min.js` will be rebuilt when a new version gets released. Therefore you need to run `make` after cloning resp. pulling (if you want to use the development version).
-
-Major improvements:
-* Implement `min` and `max` functions (#164)
-* Support for the whitespace control modifier: `{{- -}}` (#266)
-* `sort` filter: try to cast values to match type (numeric values to number, string otherwise) (#278)
-* Support for twig namespaces (#195, #251)
-* Support for expressions as object keys: `{% set foo = { (1 + 1): 'bar' } %}` (#284)
-
-Minor improvements:
-* Allow integer 0 as key in objects: `{ 0: "value" }` (#186)
-* `json_encode` filter: always return objects in order of keys, also ignore the internal key `_keys` for nested objects (#279)
-* `date` filter: update to current strtotime() function from phpjs: now support ISO8601 dates as input on Mozilla Firefox. (#276)
-* Validate template IDs only when caching is enabled (#233, #259)
-* Support xmlhttp.status==0 when using cordova (#240)
-* Improved sub template file loading (#264)
-* Ignore quotes between `{% raw %}` and `{% endraw %}` (#286)
diff --git a/node_modules/twig/LICENSE b/node_modules/twig/LICENSE
deleted file mode 100644
index f2911cd..0000000
--- a/node_modules/twig/LICENSE
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2011-2015, John Roepke and the Twig.js Contributors
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/node_modules/twig/README.md b/node_modules/twig/README.md
deleted file mode 100644
index db7ed80..0000000
--- a/node_modules/twig/README.md
+++ /dev/null
@@ -1,136 +0,0 @@
-[![Stories in Ready](https://badge.waffle.io/twigjs/twig.js.png?label=ready&title=Ready)](https://waffle.io/twigjs/twig.js)
-[![Known Vulnerabilities](https://snyk.io/test/github/twigjs/twig.js/badge.svg)](https://snyk.io/test/github/twigjs/twig.js)
-[![Build Status](https://secure.travis-ci.org/twigjs/twig.js.svg)](http://travis-ci.org/#!/twigjs/twig.js)
-[![NPM version](https://badge.fury.io/js/twig.svg)](http://badge.fury.io/js/twig)
-[![Gitter](https://badges.gitter.im/twigjs/twig.js.svg)](https://gitter.im/twigjs/twig.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-# About
-
-Twig.js is a pure JavaScript implementation of the Twig PHP templating language
-(<http://twig.sensiolabs.org/>)
-
-The goal is to provide a library that is compatible with both browsers and server side JavaScript environments such as node.js.
-
-Twig.js is currently a work in progress and supports a limited subset of the Twig templating language (with more coming).
-
-### Docs
-
-Documentation is available in the [twig.js wiki](https://github.com/twigjs/twig.js/wiki) on Github.
-
-### Feature Support
-
-For a list of supported tags/filters/functions/tests see the [Implementation Notes](https://github.com/twigjs/twig.js/wiki/Implementation-Notes) page on the wiki.
-
-# Install
-
-Download the latest twig.js release from github: https://github.com/twigjs/twig.js/releases or via NPM:
-
- npm install twig --save
-
-## Browser Usage
-
-Include twig.js or twig.min.js in your page, then:
-
-```js
-var template = twig({
- data: 'The {{ baked_good }} is a lie.'
-});
-
-console.log(
- template.render({baked_good: 'cupcake'})
-);
-// outputs: "The cupcake is a lie."
-```
-
-## Node Usage (npm)
-
-You can use twig in your app with
-
- var Twig = require('twig'), // Twig module
- twig = Twig.twig; // Render function
-
-### Usage without Express
-
-If you don't want to use Express, you can render a template with the following method:
-
-```js
-import Twig from 'twig';
-Twig.renderFile('./path/to/someFile.twig', {foo:'bar'}, (err, html) => {
- html; // compiled string
-});
-```
-
-### Usage with Express
-
-Twig is compatible with express 2 and 3. You can create an express app using the twig.js templating language by setting the view engine to twig.
-
-### app.js
-
-**Express 3**
-
-```js
-var Twig = require("twig"),
- express = require('express'),
- app = express();
-
-// This section is optional and used to configure twig.
-app.set("twig options", {
- strict_variables: false
-});
-
-app.get('/', function(req, res){
- res.render('index.twig', {
- message : "Hello World"
- });
-});
-
-app.listen(9999);
-```
-
-## views/index.twig
-
-```html
-Message of the moment: <b>{{ message }}</b>
-```
-
-An [Express 2 Example](https://github.com/twigjs/twig.js/wiki/Express-2) is available on the wiki.
-
-# Contributing
-
-If you have a change you want to make to twig.js, feel free to fork this repository and submit a pull request on Github. The source files are located in src/*.js.
-
-twig.js is built by running `npm run build`
-
-For more details on getting setup, see the [contributing page](https://github.com/twigjs/twig.js/wiki/Contributing) on the wiki.
-
-## Tests
-
-The twig.js tests are written in [Mocha][mocha] and can be invoked with `npm test`.
-
-## License
-
-Twig.js is available under a [BSD 2-Clause License][bsd-2], see the LICENSE file for more information.
-
-## Acknowledgments
-
-See the LICENSES.md file for copies of the referenced licenses.
-
-1. The JavaScript Array fills in src/twig.fills.js are from <https://developer.mozilla.org/> and are available under the [MIT License][mit] or are [public domain][mdn-license].
-
-2. The Date.format function in src/twig.lib.js is from <http://jpaq.org/> and used under a [MIT license][mit-jpaq].
-
-3. The sprintf implementation in src/twig.lib.js used for the format filter is from <http://www.diveintojavascript.com/projects/javascript-sprintf> and used under a [BSD 3-Clause License][bsd-3].
-
-4. The strip_tags implementation in src/twig.lib.js used for the striptags filter is from <http://phpjs.org/functions/strip_tags> and used under and [MIT License][mit-phpjs].
-
-[mit-jpaq]: http://jpaq.org/license/
-[mit-phpjs]: http://phpjs.org/pages/license/#MIT
-[mit]: http://www.opensource.org/licenses/mit-license.php
-[mdn-license]: https://developer.mozilla.org/Project:Copyrights
-
-[bsd-2]: http://www.opensource.org/licenses/BSD-2-Clause
-[bsd-3]: http://www.opensource.org/licenses/BSD-3-Clause
-[cc-by-sa-2.5]: http://creativecommons.org/licenses/by-sa/2.5/ "Creative Commons Attribution-ShareAlike 2.5 License"
-
-[mocha]: http://visionmedia.github.com/mocha/
-[qunit]: http://docs.jquery.com/QUnit
diff --git a/node_modules/twig/bin/twigjs b/node_modules/twig/bin/twigjs
deleted file mode 100755
index cfacb85..0000000
--- a/node_modules/twig/bin/twigjs
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env node
-
-var PATHS = require("../lib/paths")
- , COMPILE = require("../lib/compile")
- , options = COMPILE.defaults
-
- , args = process.argv
- , node = args.shift()
- , thisPath = args.shift().split("/")
- , thisFile = thisPath[thisPath.length-1]
- , files = []
- , arg;
-
-if (args.length == 0) {
- process.stderr.write("ERR: No input files provided\n\n");
- printUsage(process.stderr);
-}
-
-while (args.length > 0) {
- arg = args.shift();
- switch (arg) {
- case "--help":
- printUsage(process.stdout);
- return;
- case "--output":
- case "-o":
- options.output = PATHS.strip_slash(args.shift());
- break;
- case "--pattern":
- case "-p":
- options.pattern = args.shift();
- break;
- case "--module":
- case "-m":
- options.module = args.shift();
- break;
- case "--twig":
- case "-t":
- options.twig = args.shift();
- break;
- default:
- files.push(arg);
- }
-}
-
-COMPILE.compile(options, files);
-
-function printUsage(stream) {
- stream.write("Usage:\n\t");
- stream.write(thisFile + " [options] input.twig | directory ...\n");
- stream.write("\t_______________________________________________________________________________\n\n");
- stream.write("\t" + thisFile + " can take a list of files and/or a directories as input. If a file is\n");
- stream.write("\tprovided, it is compiled, if a directory is provided, all files matching *.twig\n");
- stream.write("\tin the directory are compiled. The pattern can be overridden with --pattern\n\n")
- stream.write("\t--help Print this help message.\n\n");
- stream.write("\t--output ... What directory should twigjs output to. By default twigjs will\n");
- stream.write("\t write to the same directory as the input file.\n\n");
- stream.write("\t--module ... Should the output be written in module format. Supported formats:\n");
- stream.write("\t node: Node.js / CommonJS 1.1 modules\n");
- stream.write("\t amd: RequireJS / Asynchronous modules (requires --twig)\n");
- stream.write("\t cjs2: CommonJS 2.0 draft8 modules (requires --twig)\n\n");
- stream.write("\t--twig ... Used with --module. The location relative to the output directory\n");
- stream.write("\t of twig.js. (used for module dependency resolution).\n\n");
- stream.write("\t--pattern ... If parsing a directory of files, what files should be compiled.\n");
- stream.write("\t Defaults to *.twig.\n\n");
- stream.write("NOTE: This is currently very rough, incomplete and under development.\n\n");
-}
diff --git a/node_modules/twig/docs/docco.css b/node_modules/twig/docs/docco.css
deleted file mode 100644
index b60f6fa..0000000
--- a/node_modules/twig/docs/docco.css
+++ /dev/null
@@ -1,518 +0,0 @@
-/*--------------------- Typography ----------------------------*/
-
-@font-face {
- font-family: 'aller-light';
- src: url('public/fonts/aller-light.eot');
- src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'),
- url('public/fonts/aller-light.woff') format('woff'),
- url('public/fonts/aller-light.ttf') format('truetype');
- font-weight: normal;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'aller-bold';
- src: url('public/fonts/aller-bold.eot');
- src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'),
- url('public/fonts/aller-bold.woff') format('woff'),
- url('public/fonts/aller-bold.ttf') format('truetype');
- font-weight: normal;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'roboto-black';
- src: url('public/fonts/roboto-black.eot');
- src: url('public/fonts/roboto-black.eot?#iefix') format('embedded-opentype'),
- url('public/fonts/roboto-black.woff') format('woff'),
- url('public/fonts/roboto-black.ttf') format('truetype');
- font-weight: normal;
- font-style: normal;
-}
-
-/*--------------------- Layout ----------------------------*/
-html { height: 100%; }
-body {
- font-family: "aller-light";
- font-size: 14px;
- line-height: 18px;
- color: #30404f;
- margin: 0; padding: 0;
- height:100%;
-}
-#container { min-height: 100%; }
-
-a {
- color: #000;
-}
-
-b, strong {
- font-weight: normal;
- font-family: "aller-bold";
-}
-
-p {
- margin: 15px 0 0px;
-}
- .annotation ul, .annotation ol {
- margin: 25px 0;
- }
- .annotation ul li, .annotation ol li {
- font-size: 14px;
- line-height: 18px;
- margin: 10px 0;
- }
-
-h1, h2, h3, h4, h5, h6 {
- color: #112233;
- line-height: 1em;
- font-weight: normal;
- font-family: "roboto-black";
- text-transform: uppercase;
- margin: 30px 0 15px 0;
-}
-
-h1 {
- margin-top: 40px;
-}
-h2 {
- font-size: 1.26em;
-}
-
-hr {
- border: 0;
- background: 1px #ddd;
- height: 1px;
- margin: 20px 0;
-}
-
-pre, tt, code {
- font-size: 12px; line-height: 16px;
- font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
- margin: 0; padding: 0;
-}
- .annotation pre {
- display: block;
- margin: 0;
- padding: 7px 10px;
- background: #fcfcfc;
- -moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
- -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
- box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
- overflow-x: auto;
- }
- .annotation pre code {
- border: 0;
- padding: 0;
- background: transparent;
- }
-
-
-blockquote {
- border-left: 5px solid #ccc;
- margin: 0;
- padding: 1px 0 1px 1em;
-}
- .sections blockquote p {
- font-family: Menlo, Consolas, Monaco, monospace;
- font-size: 12px; line-height: 16px;
- color: #999;
- margin: 10px 0 0;
- white-space: pre-wrap;
- }
-
-ul.sections {
- list-style: none;
- padding:0 0 5px 0;;
- margin:0;
-}
-
-/*
- Force border-box so that % widths fit the parent
- container without overlap because of margin/padding.
-
- More Info : http://www.quirksmode.org/css/box.html
-*/
-ul.sections > li > div {
- -moz-box-sizing: border-box; /* firefox */
- -ms-box-sizing: border-box; /* ie */
- -webkit-box-sizing: border-box; /* webkit */
- -khtml-box-sizing: border-box; /* konqueror */
- box-sizing: border-box; /* css3 */
-}
-
-
-/*---------------------- Jump Page -----------------------------*/
-#jump_to, #jump_page {
- margin: 0;
- background: white;
- -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
- -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
- font: 16px Arial;
- cursor: pointer;
- text-align: right;
- list-style: none;
-}
-
-#jump_to a {
- text-decoration: none;
-}
-
-#jump_to a.large {
- display: none;
-}
-#jump_to a.small {
- font-size: 22px;
- font-weight: bold;
- color: #676767;
-}
-
-#jump_to, #jump_wrapper {
- position: fixed;
- right: 0; top: 0;
- padding: 10px 15px;
- margin:0;
-}
-
-#jump_wrapper {
- display: none;
- padding:0;
-}
-
-#jump_to:hover #jump_wrapper {
- display: block;
-}
-
-#jump_page_wrapper{
- position: fixed;
- right: 0;
- top: 0;
- bottom: 0;
-}
-
-#jump_page {
- padding: 5px 0 3px;
- margin: 0 0 25px 25px;
- max-height: 100%;
- overflow: auto;
-}
-
-#jump_page .source {
- display: block;
- padding: 15px;
- text-decoration: none;
- border-top: 1px solid #eee;
-}
-
-#jump_page .source:hover {
- background: #f5f5ff;
-}
-
-#jump_page .source:first-child {
-}
-
-/*---------------------- Low resolutions (> 320px) ---------------------*/
-@media only screen and (min-width: 320px) {
- .pilwrap { display: none; }
-
- ul.sections > li > div {
- display: block;
- padding:5px 10px 0 10px;
- }
-
- ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
- padding-left: 30px;
- }
-
- ul.sections > li > div.content {
- overflow-x:auto;
- -webkit-box-shadow: inset 0 0 5px #e5e5ee;
- box-shadow: inset 0 0 5px #e5e5ee;
- border: 1px solid #dedede;
- margin:5px 10px 5px 10px;
- padding-bottom: 5px;
- }
-
- ul.sections > li > div.annotation pre {
- margin: 7px 0 7px;
- padding-left: 15px;
- }
-
- ul.sections > li > div.annotation p tt, .annotation code {
- background: #f8f8ff;
- border: 1px solid #dedede;
- font-size: 12px;
- padding: 0 0.2em;
- }
-}
-
-/*---------------------- (> 481px) ---------------------*/
-@media only screen and (min-width: 481px) {
- #container {
- position: relative;
- }
- body {
- background-color: #F5F5FF;
- font-size: 15px;
- line-height: 21px;
- }
- pre, tt, code {
- line-height: 18px;
- }
- p, ul, ol {
- margin: 0 0 15px;
- }
-
-
- #jump_to {
- padding: 5px 10px;
- }
- #jump_wrapper {
- padding: 0;
- }
- #jump_to, #jump_page {
- font: 10px Arial;
- text-transform: uppercase;
- }
- #jump_page .source {
- padding: 5px 10px;
- }
- #jump_to a.large {
- display: inline-block;
- }
- #jump_to a.small {
- display: none;
- }
-
-
-
- #background {
- position: absolute;
- top: 0; bottom: 0;
- width: 350px;
- background: #fff;
- border-right: 1px solid #e5e5ee;
- z-index: -1;
- }
-
- ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
- padding-left: 40px;
- }
-
- ul.sections > li {
- white-space: nowrap;
- }
-
- ul.sections > li > div {
- display: inline-block;
- }
-
- ul.sections > li > div.annotation {
- max-width: 350px;
- min-width: 350px;
- min-height: 5px;
- padding: 13px;
- overflow-x: hidden;
- white-space: normal;
- vertical-align: top;
- text-align: left;
- }
- ul.sections > li > div.annotation pre {
- margin: 15px 0 15px;
- padding-left: 15px;
- }
-
- ul.sections > li > div.content {
- padding: 13px;
- vertical-align: top;
- border: none;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
-
- .pilwrap {
- position: relative;
- display: inline;
- }
-
- .pilcrow {
- font: 12px Arial;
- text-decoration: none;
- color: #454545;
- position: absolute;
- top: 3px; left: -20px;
- padding: 1px 2px;
- opacity: 0;
- -webkit-transition: opacity 0.2s linear;
- }
- .for-h1 .pilcrow {
- top: 47px;
- }
- .for-h2 .pilcrow, .for-h3 .pilcrow, .for-h4 .pilcrow {
- top: 35px;
- }
-
- ul.sections > li > div.annotation:hover .pilcrow {
- opacity: 1;
- }
-}
-
-/*---------------------- (> 1025px) ---------------------*/
-@media only screen and (min-width: 1025px) {
-
- body {
- font-size: 16px;
- line-height: 24px;
- }
-
- #background {
- width: 525px;
- }
- ul.sections > li > div.annotation {
- max-width: 525px;
- min-width: 525px;
- padding: 10px 25px 1px 50px;
- }
- ul.sections > li > div.content {
- padding: 9px 15px 16px 25px;
- }
-}
-
-/*---------------------- Syntax Highlighting -----------------------------*/
-
-td.linenos { background-color: #f0f0f0; padding-right: 10px; }
-span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
-/*
-
-github.com style (c) Vasily Polovnyov <vast@whiteants.net>
-
-*/
-
-pre code {
- display: block; padding: 0.5em;
- color: #000;
- background: #f8f8ff
-}
-
-pre .hljs-comment,
-pre .hljs-template_comment,
-pre .hljs-diff .hljs-header,
-pre .hljs-javadoc {
- color: #408080;
- font-style: italic
-}
-
-pre .hljs-keyword,
-pre .hljs-assignment,
-pre .hljs-literal,
-pre .hljs-css .hljs-rule .hljs-keyword,
-pre .hljs-winutils,
-pre .hljs-javascript .hljs-title,
-pre .hljs-lisp .hljs-title,
-pre .hljs-subst {
- color: #954121;
- /*font-weight: bold*/
-}
-
-pre .hljs-number,
-pre .hljs-hexcolor {
- color: #40a070
-}
-
-pre .hljs-string,
-pre .hljs-tag .hljs-value,
-pre .hljs-phpdoc,
-pre .hljs-tex .hljs-formula {
- color: #219161;
-}
-
-pre .hljs-title,
-pre .hljs-id {
- color: #19469D;
-}
-pre .hljs-params {
- color: #00F;
-}
-
-pre .hljs-javascript .hljs-title,
-pre .hljs-lisp .hljs-title,
-pre .hljs-subst {
- font-weight: normal
-}
-
-pre .hljs-class .hljs-title,
-pre .hljs-haskell .hljs-label,
-pre .hljs-tex .hljs-command {
- color: #458;
- font-weight: bold
-}
-
-pre .hljs-tag,
-pre .hljs-tag .hljs-title,
-pre .hljs-rules .hljs-property,
-pre .hljs-django .hljs-tag .hljs-keyword {
- color: #000080;
- font-weight: normal
-}
-
-pre .hljs-attribute,
-pre .hljs-variable,
-pre .hljs-instancevar,
-pre .hljs-lisp .hljs-body {
- color: #008080
-}
-
-pre .hljs-regexp {
- color: #B68
-}
-
-pre .hljs-class {
- color: #458;
- font-weight: bold
-}
-
-pre .hljs-symbol,
-pre .hljs-ruby .hljs-symbol .hljs-string,
-pre .hljs-ruby .hljs-symbol .hljs-keyword,
-pre .hljs-ruby .hljs-symbol .hljs-keymethods,
-pre .hljs-lisp .hljs-keyword,
-pre .hljs-tex .hljs-special,
-pre .hljs-input_number {
- color: #990073
-}
-
-pre .hljs-builtin,
-pre .hljs-constructor,
-pre .hljs-built_in,
-pre .hljs-lisp .hljs-title {
- color: #0086b3
-}
-
-pre .hljs-preprocessor,
-pre .hljs-pi,
-pre .hljs-doctype,
-pre .hljs-shebang,
-pre .hljs-cdata {
- color: #999;
- font-weight: bold
-}
-
-pre .hljs-deletion {
- background: #fdd
-}
-
-pre .hljs-addition {
- background: #dfd
-}
-
-pre .hljs-diff .hljs-change {
- background: #0086b3
-}
-
-pre .hljs-chunk {
- color: #aaa
-}
-
-pre .hljs-tex .hljs-formula {
- opacity: 0.5;
-}
diff --git a/node_modules/twig/docs/licenses.md b/node_modules/twig/docs/licenses.md
deleted file mode 100644
index 949a254..0000000
--- a/node_modules/twig/docs/licenses.md
+++ /dev/null
@@ -1,177 +0,0 @@
-## LICENSE for the sprintf and vsprintf functions is src/lib/twig.lib.js
-
-
- Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of sprintf() for JavaScript nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-## LICENSE for the Date.format function is src/lib/twig.lib.js
-
- Copyright (c) 2010 Christopher West
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-
-## LICENSE for the strip_tags function in src/twig.lib.js and range function
-## in src/twig.functions.js
-
- This is version: 3.26
- php.js is copyright 2011 Kevin van Zonneveld.
-
- Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
- (http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
- (http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
- Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
- Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
- Rafał Kukawski (http://blog.kukawski.pl), lmeyrick
- (https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
- Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
- L. Rodrigues (http://www.jsfromhell.com), Ash Searle
- (http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
- Erkekjetter, Michael Grier, Rafał Kukawski (http://kukawski.pl), Johnny
- Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
- http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
- Rafał Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
- (http://webdevhobo.blogspot.com/), marrtins, GeekFG
- (http://geekfg.blogspot.com), Andrea Giammarchi
- (http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
- gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
- Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
- (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
- Marc Palau, Kevin van Zonneveld (http://kevin.vanzonneveld.net/), Martin
- (http://www.erlenwiese.de/), Breaking Par Consulting Inc
- (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
- Chris, Mirek Slugen, saulius, Alfonso Jimenez
- (http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
- Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
- Ariede (http://caioariede.com), Robin, Kankrelune
- (http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
- (http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
- Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
- David, Aman Gupta, Michael White, Public Domain
- (http://www.json.org/json2.js), Steven Levithan
- (http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
- Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
- Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
- (http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
- Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
- Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
- (http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
- (http://javascript.crockford.com), madipta, Slawomir Kaniecki,
- ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
- (http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
- Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
- (https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
- Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson Högfeldt
- (http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
- josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
- Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
- (http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
- (http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
- Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
- (http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
- (http://yass.meetcweb.com), Peter-Paul Koch
- (http://www.quirksmode.org/js/beat.html), Olivier Louvignes
- (http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
- Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
- vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
- Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
- (http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
- B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
- (http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
- Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
- Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
- (http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
- Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
- Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
- sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
- Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
- (http://www.premasolutions.com/), Philippe Jausions
- (http://pear.php.net/user/jausions), Aidan Lister
- (http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
- strcmp, Taras Bogach, jpfle, Alexander Ermolaev
- (http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
- dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
- (http://www.pedrotainha.com), James, Arnout Kazemier
- (http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
- FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
- Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
- daniel airton wermann (http://wermann.com.br), Atli Þór, Maximusya, Ryan
- W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
- (http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
- Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
- (http://www.frontierwebdev.com/), Rafał Kukawski, FremyCompany, Matt
- Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
- Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
- (http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
- Russell Walker (http://www.nbill.co.uk/), Jamie Beck
- (http://www.terabit.ca/), setcookie, Michael, YUI Library:
- http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
- http://hacks.bluesmoon.info/strftime/strftime.js, Ben
- (http://benblume.co.uk/), DtTvB
- (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
- meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
- (http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
- Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
- Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
- Bryan
-
- Dual licensed under the MIT (MIT-LICENSE.txt)
- and GPL (GPL-LICENSE.txt) licenses.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
- OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/twig/docs/public/fonts/aller-bold.eot b/node_modules/twig/docs/public/fonts/aller-bold.eot
deleted file mode 100644
index 1b32532..0000000
--- a/node_modules/twig/docs/public/fonts/aller-bold.eot
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/aller-bold.ttf b/node_modules/twig/docs/public/fonts/aller-bold.ttf
deleted file mode 100644
index dc4cc9c..0000000
--- a/node_modules/twig/docs/public/fonts/aller-bold.ttf
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/aller-bold.woff b/node_modules/twig/docs/public/fonts/aller-bold.woff
deleted file mode 100644
index fa16fd0..0000000
--- a/node_modules/twig/docs/public/fonts/aller-bold.woff
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/aller-light.eot b/node_modules/twig/docs/public/fonts/aller-light.eot
deleted file mode 100644
index 40bd654..0000000
--- a/node_modules/twig/docs/public/fonts/aller-light.eot
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/aller-light.ttf b/node_modules/twig/docs/public/fonts/aller-light.ttf
deleted file mode 100644
index c2c7290..0000000
--- a/node_modules/twig/docs/public/fonts/aller-light.ttf
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/aller-light.woff b/node_modules/twig/docs/public/fonts/aller-light.woff
deleted file mode 100644
index 81a09d1..0000000
--- a/node_modules/twig/docs/public/fonts/aller-light.woff
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/novecento-bold.eot b/node_modules/twig/docs/public/fonts/novecento-bold.eot
deleted file mode 100644
index 98a9a7f..0000000
--- a/node_modules/twig/docs/public/fonts/novecento-bold.eot
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/novecento-bold.ttf b/node_modules/twig/docs/public/fonts/novecento-bold.ttf
deleted file mode 100644
index 2af39b0..0000000
--- a/node_modules/twig/docs/public/fonts/novecento-bold.ttf
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/fonts/novecento-bold.woff b/node_modules/twig/docs/public/fonts/novecento-bold.woff
deleted file mode 100644
index de558b5..0000000
--- a/node_modules/twig/docs/public/fonts/novecento-bold.woff
+++ /dev/null
Binary files differ
diff --git a/node_modules/twig/docs/public/stylesheets/normalize.css b/node_modules/twig/docs/public/stylesheets/normalize.css
deleted file mode 100644
index 73abb76..0000000
--- a/node_modules/twig/docs/public/stylesheets/normalize.css
+++ /dev/null
@@ -1,375 +0,0 @@
-/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
-
-/* ==========================================================================
- HTML5 display definitions
- ========================================================================== */
-
-/*
- * Corrects `block` display not defined in IE 8/9.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section,
-summary {
- display: block;
-}
-
-/*
- * Corrects `inline-block` display not defined in IE 8/9.
- */
-
-audio,
-canvas,
-video {
- display: inline-block;
-}
-
-/*
- * Prevents modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-
-/*
- * Addresses styling for `hidden` attribute not present in IE 8/9.
- */
-
-[hidden] {
- display: none;
-}
-
-/* ==========================================================================
- Base
- ========================================================================== */
-
-/*
- * 1. Sets default font family to sans-serif.
- * 2. Prevents iOS text size adjust after orientation change, without disabling
- * user zoom.
- */
-
-html {
- font-family: sans-serif; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
- -ms-text-size-adjust: 100%; /* 2 */
-}
-
-/*
- * Removes default margin.
- */
-
-body {
- margin: 0;
-}
-
-/* ==========================================================================
- Links
- ========================================================================== */
-
-/*
- * Addresses `outline` inconsistency between Chrome and other browsers.
- */
-
-a:focus {
- outline: thin dotted;
-}
-
-/*
- * Improves readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
- outline: 0;
-}
-
-/* ==========================================================================
- Typography
- ========================================================================== */
-
-/*
- * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
- * Safari 5, and Chrome.
- */
-
-h1 {
- font-size: 2em;
-}
-
-/*
- * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
- */
-
-abbr[title] {
- border-bottom: 1px dotted;
-}
-
-/*
- * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
- */
-
-b,
-strong {
- font-weight: bold;
-}
-
-/*
- * Addresses styling not present in Safari 5 and Chrome.
- */
-
-dfn {
- font-style: italic;
-}
-
-/*
- * Addresses styling not present in IE 8/9.
- */
-
-mark {
- background: #ff0;
- color: #000;
-}
-
-
-/*
- * Corrects font family set oddly in Safari 5 and Chrome.
- */
-
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, serif;
- font-size: 1em;
-}
-
-/*
- * Improves readability of pre-formatted text in all browsers.
- */
-
-pre {
- white-space: pre;
- white-space: pre-wrap;
- word-wrap: break-word;
-}
-
-/*
- * Sets consistent quote types.
- */
-
-q {
- quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-/*
- * Addresses inconsistent and variable font size in all browsers.
- */
-
-small {
- font-size: 80%;
-}
-
-/*
- * Prevents `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-
-sup {
- top: -0.5em;
-}
-
-sub {
- bottom: -0.25em;
-}
-
-/* ==========================================================================
- Embedded content
- ========================================================================== */
-
-/*
- * Removes border when inside `a` element in IE 8/9.
- */
-
-img {
- border: 0;
-}
-
-/*
- * Corrects overflow displayed oddly in IE 9.
- */
-
-svg:not(:root) {
- overflow: hidden;
-}
-
-/* ==========================================================================
- Figures
- ========================================================================== */
-
-/*
- * Addresses margin not present in IE 8/9 and Safari 5.
- */
-
-figure {
- margin: 0;
-}
-
-/* ==========================================================================
- Forms
- ========================================================================== */
-
-/*
- * Define consistent border, margin, and padding.
- */
-
-fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
-}
-
-/*
- * 1. Corrects color not being inherited in IE 8/9.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- */
-
-legend {
- border: 0; /* 1 */
- padding: 0; /* 2 */
-}
-
-/*
- * 1. Corrects font family not being inherited in all browsers.
- * 2. Corrects font size not being inherited in all browsers.
- * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
- */
-
-button,
-input,
-select,
-textarea {
- font-family: inherit; /* 1 */
- font-size: 100%; /* 2 */
- margin: 0; /* 3 */
-}
-
-/*
- * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
-button,
-input {
- line-height: normal;
-}
-
-/*
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Corrects inability to style clickable `input` types in iOS.
- * 3. Improves usability and consistency of cursor style between image-type
- * `input` and others.
- */
-
-button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
-}
-
-/*
- * Re-set default cursor for disabled elements.
- */
-
-button[disabled],
-input[disabled] {
- cursor: default;
-}
-
-/*
- * 1. Addresses box sizing set to `content-box` in IE 8/9.
- * 2. Removes excess padding in IE 8/9.
- */
-
-input[type="checkbox"],
-input[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
-}
-
-/*
- * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
- * (include `-moz` to future-proof).
- */
-
-input[type="search"] {
- -webkit-appearance: textfield; /* 1 */
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box; /* 2 */
- box-sizing: content-box;
-}
-
-/*
- * Removes inner padding and search cancel button in Safari 5 and Chrome
- * on OS X.
- */
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-
-/*
- * Removes inner padding and border in Firefox 4+.
- */
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-
-/*
- * 1. Removes default vertical scrollbar in IE 8/9.
- * 2. Improves readability and alignment in all browsers.
- */
-
-textarea {
- overflow: auto; /* 1 */
- vertical-align: top; /* 2 */
-}
-
-/* ==========================================================================
- Tables
- ========================================================================== */
-
-/*
- * Remove most spacing between table cells.
- */
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
-} \ No newline at end of file
diff --git a/node_modules/twig/docs/release checklist.md b/node_modules/twig/docs/release checklist.md
deleted file mode 100644
index 1718c0d..0000000
--- a/node_modules/twig/docs/release checklist.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Steps to release twig.js
-
-## repository
-
-1. Compile list of changes in CHANGELOG.md
-2. Update version in package.json
-3. Update version in bower.json
-4. Update version in src/twig.header.js
-5. `make`, `make docs`, `make test` and commit the changes.
-6. `git tag` new version
-
-## bower
-
-Bower will pick up the new version in bower.json and use the associated git tag.
-
-## npm
-
-To publish the latest version to npmjs.org run this command from the twig.js directory:
-
- npm publish
diff --git a/node_modules/twig/docs/tests.md b/node_modules/twig/docs/tests.md
deleted file mode 100644
index 5afa1b7..0000000
--- a/node_modules/twig/docs/tests.md
+++ /dev/null
@@ -1,3567 +0,0 @@
-# TOC
- - [Twig.js Blocks ->](#twigjs-blocks--)
- - [block function ->](#twigjs-blocks---block-function--)
- - [block shorthand ->](#twigjs-blocks---block-shorthand--)
- - [Twig.js Control Structures ->](#twigjs-control-structures--)
- - [if tag ->](#twigjs-control-structures---if-tag--)
- - [for tag ->](#twigjs-control-structures---for-tag--)
- - [set tag ->](#twigjs-control-structures---set-tag--)
- - [Twig.js Core ->](#twigjs-core--)
- - [Key Notation ->](#twigjs-core---key-notation--)
- - [Context ->](#twigjs-core---context--)
- - [Twig.js Embed ->](#twigjs-embed--)
- - [Twig.js Expressions ->](#twigjs-expressions--)
- - [Basic Operators ->](#twigjs-expressions---basic-operators--)
- - [Comparison Operators ->](#twigjs-expressions---comparison-operators--)
- - [Other Operators ->](#twigjs-expressions---other-operators--)
- - [Twig.js Extensions ->](#twigjs-extensions--)
- - [Twig.js Filters ->](#twigjs-filters--)
- - [url_encode ->](#twigjs-filters---url_encode--)
- - [json_encode ->](#twigjs-filters---json_encode--)
- - [upper ->](#twigjs-filters---upper--)
- - [lower ->](#twigjs-filters---lower--)
- - [capitalize ->](#twigjs-filters---capitalize--)
- - [title ->](#twigjs-filters---title--)
- - [length ->](#twigjs-filters---length--)
- - [sort ->](#twigjs-filters---sort--)
- - [reverse ->](#twigjs-filters---reverse--)
- - [keys ->](#twigjs-filters---keys--)
- - [merge ->](#twigjs-filters---merge--)
- - [join ->](#twigjs-filters---join--)
- - [default ->](#twigjs-filters---default--)
- - [date ->](#twigjs-filters---date--)
- - [replace ->](#twigjs-filters---replace--)
- - [format ->](#twigjs-filters---format--)
- - [striptags ->](#twigjs-filters---striptags--)
- - [escape ->](#twigjs-filters---escape--)
- - [e ->](#twigjs-filters---e--)
- - [nl2br ->](#twigjs-filters---nl2br--)
- - [truncate ->](#twigjs-filters---truncate--)
- - [trim ->](#twigjs-filters---trim--)
- - [number_format ->](#twigjs-filters---number_format--)
- - [slice ->](#twigjs-filters---slice--)
- - [abs ->](#twigjs-filters---abs--)
- - [first ->](#twigjs-filters---first--)
- - [split ->](#twigjs-filters---split--)
- - [batch ->](#twigjs-filters---batch--)
- - [last ->](#twigjs-filters---last--)
- - [raw ->](#twigjs-filters---raw--)
- - [round ->](#twigjs-filters---round--)
- - [Twig.js Loader ->](#twigjs-loader--)
- - [source ->](#twigjs-loader---source--)
- - [Twig.js Include ->](#twigjs-include--)
- - [Twig.js Functions ->](#twigjs-functions--)
- - [Built-in Functions ->](#twigjs-functions---built-in-functions--)
- - [range ->](#twigjs-functions---built-in-functions---range--)
- - [cycle ->](#twigjs-functions---built-in-functions---cycle--)
- - [date ->](#twigjs-functions---built-in-functions---date--)
- - [dump ->](#twigjs-functions---built-in-functions---dump--)
- - [block ->](#twigjs-functions---built-in-functions---block--)
- - [attribute ->](#twigjs-functions---built-in-functions---attribute--)
- - [template_from_string ->](#twigjs-functions---built-in-functions---template_from_string--)
- - [random ->](#twigjs-functions---built-in-functions---random--)
- - [min, max ->](#twigjs-functions---built-in-functions---min-max--)
- - [Twig.js Loaders ->](#twigjs-loaders--)
- - [custom loader ->](#twigjs-loaders---custom-loader--)
- - [Twig.js Macro ->](#twigjs-macro--)
- - [Twig.js Namespaces ->](#twigjs-namespaces--)
- - [Twig.js Optional Functionality ->](#twigjs-optional-functionality--)
- - [Twig.js Parsers ->](#twigjs-parsers--)
- - [custom parser ->](#twigjs-parsers---custom-parser--)
- - [Twig.js Path ->](#twigjs-path--)
- - [relativePath ->](#twigjs-path---relativepath--)
- - [url ->](#twigjs-path---relativepath---url--)
- - [path ->](#twigjs-path---relativepath---path--)
- - [parsePath ->](#twigjs-path---parsepath--)
- - [Twig.js Regression Tests ->](#twigjs-regression-tests--)
- - [Twig.js Tags ->](#twigjs-tags--)
- - [Twig.js Tests ->](#twigjs-tests--)
- - [empty test ->](#twigjs-tests---empty-test--)
- - [odd test ->](#twigjs-tests---odd-test--)
- - [even test ->](#twigjs-tests---even-test--)
- - [divisibleby test ->](#twigjs-tests---divisibleby-test--)
- - [defined test ->](#twigjs-tests---defined-test--)
- - [none test ->](#twigjs-tests---none-test--)
- - [sameas test ->](#twigjs-tests---sameas-test--)
- - [iterable test ->](#twigjs-tests---iterable-test--)
-<a name=""></a>
-
-<a name="twigjs-blocks--"></a>
-# Twig.js Blocks ->
-should load a parent template and render the default values.
-
-```js
-twig({
- id: 'remote-no-extends',
- path: 'test/templates/template.twig',
- async: false
-});
-// Load the template
-twig({ref: 'remote-no-extends'}).render({ }).should.equal( "Default Title - body" );
-```
-
-should understand {% endblock title %} syntax.
-
-```js
-twig({
- id: 'endblock-extended-syntax',
- path: 'test/templates/blocks-extended-syntax.twig',
- async: false
-});
-// Load the template
-twig({ref: 'endblock-extended-syntax'}).render({ }).should.equal( "This is the only thing." );
-```
-
-should load a child template and replace the parent block's content.
-
-```js
-// Test loading a template from a remote endpoint
-twig({
- id: 'child-extends',
- path: 'test/templates/child.twig',
- load: function(template) {
- template.render({ base: "template.twig" }).should.equal( "Other Title - child" );
- done();
- }
-});
-```
-
-should have access to a parent block content.
-
-```js
-// Test loading a template from a remote endpoint
-twig({
- id: 'child-parent',
- path: 'test/templates/child-parent.twig',
- load: function(template) {
- template.render({
- base: "template.twig",
- inner: ':value'
- }).should.equal( "Other Title - body:value:child" );
- done();
- }
-});
-```
-
-should include blocks from another template for horizontal reuse.
-
-```js
-// Test horizontal reuse
-twig({
- id: 'use',
- path: 'test/templates/use.twig',
- load: function(template) {
- // Load the template
- template.render({ place: "diner" }).should.equal("Coming soon to a diner near you!" );
- done();
- }
-});
-```
-
-should allow overriding of included blocks.
-
-```js
-// Test overriding of included blocks
-twig({
- id: 'use-override-block',
- path: 'test/templates/use-override-block.twig',
- load: function(template) {
- // Load the template
- template.render({ place: "diner" }).should.equal("Sorry, can't come to a diner today." );
- done();
- }
-});
-```
-
-should allow overriding of included nested blocks.
-
-```js
-// Test overriding of included blocks
-twig({
- id: 'use-override-nested-block',
- path: 'test/templates/use-override-nested-block.twig',
- load: function(template) {
- // Load the template
- template.render().should.equal("parent:new-child1:new-child2");
- done();
- }
-});
-```
-
-should make the contents of blocks available after they're rendered.
-
-```js
-// Test rendering and loading one block
-twig({
- id: 'blocks',
- path: 'test/templates/blocks.twig',
- load: function(template) {
- // Render the template with the blocks parameter
- template.render({ place: "block" }, {output: 'blocks'}).msg.should.equal("Coming soon to a block near you!" );
- done();
- }
-});
-```
-
-should render nested blocks.
-
-```js
-// Test rendering of blocks within blocks
-twig({
- id: 'blocks-nested',
- path: 'test/templates/blocks-nested.twig',
- load: function(template) {
- template.render({ }).should.equal( "parent:child" )
- done();
- }
-})
-```
-
-should render extended nested blocks.
-
-```js
-// Test rendering of blocks within blocks
-twig({
- id: 'child-blocks-nested',
- path: 'test/templates/child-blocks-nested.twig',
- load: function(template) {
- template.render({ base: "template.twig" }).should.equal( "Default Title - parent:child" );
- done();
- }
-})
-```
-
-should be able to extend to a absolute template path.
-
-```js
-// Test loading a template from a remote endpoint
-twig({
- base: 'test/templates',
- path: 'test/templates/a/child.twig',
- load: function(template) {
- template.render({ base: "b/template.twig" }).should.equal( "Other Title - child" );
- done();
- }
-});
-```
-
-should extends blocks inline.
-
-```js
-twig({
- id: 'inline-parent-template',
- data: 'Title: {% block title %}parent{% endblock %}'
-});
-twig({
- allowInlineIncludes: true,
- data: '{% extends "inline-parent-template" %}{% block title %}child{% endblock %}'
-}).render().should.equal("Title: child");
-```
-
-<a name="twigjs-blocks---block-function--"></a>
-## block function ->
-should render block content from an included block.
-
-```js
-twig({
- path: 'test/templates/block-function.twig',
- load: function(template) {
- template.render({
- base: "block-function-parent.twig",
- val: "abcd"
- })
- .should.equal( "Child content = abcd / Result: Child content = abcd" );
- done();
- }
-})
-```
-
-should render block content from a parent block.
-
-```js
-twig({
- path: 'test/templates/block-parent.twig',
- load: function(template) {
- template.render({
- base: "block-function-parent.twig"
- })
- .should.equal( "parent block / Result: parent block" );
- done();
- }
-})
-```
-
-should render block content with outer context.
-
-```js
-twig({
- path: 'test/templates/block-outer-context.twig',
- load: function(template) {
- template.render({
- base: "block-outer-context.twig",
- items: ["twig", "js", "rocks"]
- })
- .should.equal( "Hello twig!Hello js!Hello rocks!twigjsrocks" );
- done();
- }
-})
-```
-
-should respect changes of the context made before calling the function.
-
-```js
-twig({
- data: '{% set foo = "original" %}{% block test %}{{ foo }}{% endblock %} {% set foo = "changed" %}{{ block("test") }}'
-}).render()
-.should.equal("original changed");
-```
-
-<a name="twigjs-blocks---block-shorthand--"></a>
-## block shorthand ->
-should render block content using shorthand syntax.
-
-```js
-twig({
- data: '{% set prefix = "shorthand" %}{% block title (prefix ~ " - " ~ block_value)|title %}'
-})
-.render({block_value: 'test succeeded'})
-.should.equal('Shorthand - Test Succeeded');
-```
-
-should overload blocks from an extended template using shorthand syntax.
-
-```js
-twig({
- allowInlineIncludes: true,
- data: '{% extends "child-extends" %}{% block title "New Title" %}{% block body "new body uses the " ~ base ~ " template" %}'
-})
-.render({ base: "template.twig" })
-.should.equal( "New Title - new body uses the template.twig template" );
-```
-
-<a name="twigjs-control-structures--"></a>
-# Twig.js Control Structures ->
-<a name="twigjs-control-structures---if-tag--"></a>
-## if tag ->
-should parse the contents of the if block if the expression is true.
-
-```js
-var test_template = twig({data: '{% if test %}true{% endif%}'});
-test_template.render({test: true}).should.equal("true" );
-test_template.render({test: false}).should.equal("" );
-```
-
-should call the if or else blocks based on the expression result.
-
-```js
-var test_template = twig({data: '{% if test %}true{% endif%}'});
-test_template.render({test: true}).should.equal("true" );
-test_template.render({test: false}).should.equal("" );
-```
-
-should support elseif.
-
-```js
-var test_template = twig({data: '{% if test %}1{% elseif other %}2{%else%}3{% endif%}'});
-test_template.render({test: true, other:false}).should.equal("1" );
-test_template.render({test: true, other:true}).should.equal("1" );
-test_template.render({test: false, other:true}).should.equal("2" );
-test_template.render({test: false, other:false}).should.equal("3" );
-```
-
-should be able to nest.
-
-```js
-var test_template = twig({data: '{% if test %}{% if test2 %}true{% else %}false{% endif%}{% else %}not{% endif%}'});
-test_template.render({test: true, test2: true}).should.equal("true" );
-test_template.render({test: true, test2: false}).should.equal("false" );
-test_template.render({test: false, test2: true}).should.equal("not" );
-test_template.render({test: false, test2: false}).should.equal("not" );
-```
-
-should support newlines in if statement.
-
-```js
-var test_template = twig({data: '{% if test or\r\nother %}true{% endif%}'});
-test_template.render({test: true, other: false}).should.equal("true" );
-test_template.render({test: false, other: false}).should.equal("" );
-```
-
-<a name="twigjs-control-structures---for-tag--"></a>
-## for tag ->
-should provide value only for array input.
-
-```js
-var test_template = twig({data: '{% for value in test %}{{ value }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("1234" );
-test_template.render({test: []}).should.equal("" );
-```
-
-should provide both key and value for array input.
-
-```js
-var test_template = twig({data: '{% for key,value in test %}{{key}}:{{ value }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("0:11:22:33:4" );
-test_template.render({test: []}).should.equal("" );
-```
-
-should provide value only for object input.
-
-```js
-var test_template = twig({data: '{% for value in test %}{{ value }}{% endfor %}'});
-test_template.render({test: {one: 1, two: 2, three: 3}}).should.equal("123" );
-test_template.render({test: {}}).should.equal("" );
-```
-
-should provide both key and value for object input.
-
-```js
-var test_template = twig({data: '{% for key, value in test %}{{key}}:{{ value }}{% endfor %}'});
-test_template.render({test: {one: 1, two: 2, three: 3}}).should.equal("one:1two:2three:3" );
-test_template.render({test: {}}).should.equal("" );
-```
-
-should support else if the input is empty.
-
-```js
-var test_template = twig({data: '{% for key,value in test %}{{ value }}{% else %}else{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("1234" );
-test_template.render({test: []}).should.equal("else" );
-```
-
-should be able to nest.
-
-```js
-var test_template = twig({data: '{% for key,list in test %}{% for val in list %}{{ val }}{%endfor %}.{% else %}else{% endfor %}'});
-test_template.render({test: [[1,2],[3,4],[5,6]]}).should.equal("12.34.56." );
-test_template.render({test: []}).should.equal("else" );
-```
-
-should have a loop context item available for arrays.
-
-```js
-var test_template = twig({data: '{% for key,value in test %}{{ loop.index }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("1234" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.index0 }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("0123" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.revindex }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("4321" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.revindex0 }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("3210" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.length }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("4444" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.first }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("truefalsefalsefalse" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.last }}{% endfor %}'});
-test_template.render({test: [1,2,3,4]}).should.equal("falsefalsefalsetrue" );
-```
-
-should have a loop context item available for objects.
-
-```js
-var test_template = twig({data: '{% for key,value in test %}{{ loop.index }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("1234" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.index0 }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("0123" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.revindex }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("4321" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.revindex0 }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("3210" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.length }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("4444" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.first }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("truefalsefalsefalse" );
-test_template = twig({data: '{% for key,value in test %}{{ loop.last }}{% endfor %}'});
-test_template.render({test: {a:1,b:2,c:3,d:4}}).should.equal("falsefalsefalsetrue" );
-```
-
-should have a loop context item available in child loops objects.
-
-```js
-var test_template = twig({data: '{% for value in test %}{% for value in inner %}({{ loop.parent.loop.index }},{{ loop.index }}){% endfor %}{% endfor %}'});
-test_template.render({test: {a:1,b:2}, inner:[1,2,3]}).should.equal("(1,1)(1,2)(1,3)(2,1)(2,2)(2,3)");
-```
-
-should support conditionals on for loops.
-
-```js
-var test_template = twig({data: '{% for value in test if false %}{{ value }},{% endfor %}'});
-test_template.render({test: ["one", "two", "a", "b", "other"]}).should.equal("");
-test_template = twig({data: '{% for value in test if true %}{{ value }}{% endfor %}'});
-test_template.render({test: ["a", "s", "d", "f"]}).should.equal("asdf");
-test_template = twig({data: '{% for value in test if value|length > 2 %}{{ value }},{% endfor %}'});
-test_template.render({test: ["one", "two", "a", "b", "other"]}).should.equal("one,two,other,");
-test_template = twig({data: '{% for key,item in test if item.show %}{{key}}:{{ item.value }},{% endfor %}'});
-test_template.render({test: {
- a: {show:true, value: "one"},
- b: {show:false, value: "two"},
- c: {show:true, value: "three"}}}).should.equal("a:one,c:three,");
-```
-
-<a name="twigjs-control-structures---set-tag--"></a>
-## set tag ->
-should not set the global context from within a for loop.
-
-```js
-var test_template = twig({data: '{% for value in [1] %}{% set foo="right" %}{% endfor %}{{ foo }}'});
-test_template.render().should.equal("");
-```
-
-should set the global context from within a for loop when the variable is initialized outside of the loop.
-
-```js
-var test_template = twig({data: '{% set foo="wrong" %}{% for value in [1] %}{% set foo="right" %}{% endfor %}{{ foo }}'});
-test_template.render().should.equal("right");
-```
-
-should set the global context from within a nested for loop when the variable is initialized outside of the loop.
-
-```js
-var test_template = twig({data: '{% set k = 0 %}{% for i in 0..2 %}{% for j in 0..2 %}{{ k }}{% set k = k + 1 %}{% endfor %}{% endfor %}'});
-test_template.render().should.equal("012345678");
-```
-
-<a name="twigjs-core--"></a>
-# Twig.js Core ->
-should save and load a template by reference.
-
-```js
-// Define and save a template
- twig({
- id: 'test',
- data: '{{ "test" }}'
- });
- // Load and render the template
- twig({ref: 'test'}).render()
- .should.equal("test");
-```
-
-should ignore comments.
-
-```js
-twig({data: 'good {# comment #}morning'}).render().should.equal("good morning");
-twig({data: 'good{#comment#}morning'}).render().should.equal("goodmorning");
-```
-
-should ignore output tags within comments.
-
-```js
-twig({data: 'good {# {{ "Hello" }} #}morning'}).render().should.equal("good morning");
-twig({data: 'good{#c}}om{{m{{ent#}morning'}).render().should.equal("goodmorning");
-```
-
-should ignore logic tags within comments.
-
-```js
-twig({data: 'test {# {% bad syntax if not in comment %} #}test'}).render().should.equal("test test");
-twig({data: '{##}{##}test{# %}}}%}%{%{{% #}pass'}).render().should.equal("testpass");
-```
-
-should ignore quotation marks within comments.
-
-```js
-twig({data: "good {# don't stop #}morning"}).render().should.equal("good morning");
-twig({data: 'good{#"dont stop"#}morning'}).render().should.equal("goodmorning");
-twig({data: 'good {# "don\'t stop" #}morning'}).render().should.equal("good morning");
-twig({data: 'good{#"\'#}morning'}).render().should.equal("goodmorning");
-twig({data: 'good {#"\'"\'"\'#} day'}).render().should.equal("good day");
-twig({data: "a {# ' #}b{# ' #} c"}).render().should.equal("a b c");
-```
-
-should be able to parse output tags with tag ends in strings.
-
-```js
-// Really all we care about here is not throwing exceptions.
-twig({data: '{{ "test" }}'}).render().should.equal("test");
-twig({data: '{{ " }} " }}'}).render().should.equal(" }} ");
-twig({data: '{{ " \\"}} " }}'}).render().should.equal(' "}} ');
-twig({data: "{{ ' }} ' }}"}).render().should.equal(" }} ");
-twig({data: "{{ ' \\'}} ' }}"}).render().should.equal(" '}} ");
-twig({data: '{{ " \'}} " }}'}).render().should.equal(" '}} ");
-twig({data: "{{ ' \"}} ' }}"}).render().should.equal(' "}} ');
-```
-
-should be able to parse whitespace control output tags.
-
-```js
-twig({data: ' {{- "test" -}}'}).render().should.equal("test");
-twig({data: ' {{- "test" -}} '}).render().should.equal("test");
-twig({data: '\n{{- "test" -}}'}).render().should.equal("test");
-twig({data: '{{- "test" -}}\n'}).render().should.equal("test");
-twig({data: '\n{{- "test" -}}\n'}).render().should.equal("test");
-twig({data: '\t{{- "test" -}}\t'}).render().should.equal("test");
-twig({data: '\n\t{{- "test" -}}\n\t'}).render().should.equal("test");
-twig({data: '123\n\t{{- "test" -}}\n\t456'}).render().should.equal("123test456");
-twig({data: '\n{{- orp -}}\n'}).render({ orp: "test"}).should.equal("test");
-twig({data: '\n{{- [1,2 ,1+2 ] -}}\n'}).render().should.equal("1,2,3");
-twig({data: ' {{- "test" -}} {{- "test" -}}'}).render().should.equal("testtest");
-twig({data: '{{ "test" }} {{- "test" -}}'}).render().should.equal("testtest");
-twig({data: '{{- "test" -}} {{ "test" }}'}).render().should.equal("testtest");
-twig({data: '<>{{- "test" -}}<>'}).render().should.equal("<>test<>");
-```
-
-should be able to parse mismatched opening whitespace control output tags.
-
-```js
-twig({data: ' {{- "test" }}'}).render().should.equal("test");
-twig({data: '{{- "test" }}\n'}).render().should.equal("test\n");
-twig({data: '\t{{- "test" }}\t'}).render().should.equal("test\t");
-twig({data: '123\n\t{{- "test" }}\n\t456'}).render().should.equal("123test\n\t456");
-twig({data: '\n{{- [1,2 ,1+2 ] }}\n'}).render().should.equal("1,2,3\n");
-twig({data: ' {{- "test" }} {{- "test" }}'}).render().should.equal("testtest");
-twig({data: '{{ "test" }} {{- "test" }}'}).render().should.equal("testtest");
-twig({data: ' {{- "test" }} {{ "test" }}'}).render().should.equal("test test");
-twig({data: ' {{- "test" }} {{- "test" -}}'}).render().should.equal("testtest");
-twig({data: '<>{{- "test" }}'}).render().should.equal("<>test");
-```
-
-should be able to parse mismatched closing whitespace control output tags.
-
-```js
-twig({data: ' {{ "test" -}}'}).render().should.equal(" test");
-twig({data: '\n{{ "test" -}}\n'}).render().should.equal("\ntest");
-twig({data: '\t{{ "test" -}}\t'}).render().should.equal("\ttest");
-twig({data: '123\n\t{{ "test" -}}\n\t456'}).render().should.equal("123\n\ttest456");
-twig({data: '\n{{ [1,2 ,1+2 ] -}}\n'}).render().should.equal("\n1,2,3");
-twig({data: ' {{ "test" -}} {{ "test" -}}'}).render().should.equal(" testtest");
-twig({data: '{{ "test" }} {{ "test" -}} '}).render().should.equal("test test");
-twig({data: ' {{ "test" -}} {{ "test" }} '}).render().should.equal(" testtest ");
-twig({data: ' {{ "test" -}} {{- "test" -}}'}).render().should.equal(" testtest");
-twig({data: '{{ "test" -}}<>'}).render().should.equal("test<>");
-```
-
-should be able to parse whitespace control logic tags.
-
-```js
-// Newlines directly after logic tokens are ignored
-// So use double newlines
-twig({data: '{%- if true -%}{{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: '{%- if true -%}{{ "test" }}{%- endif -%}'}).render().should.equal("test");
-twig({data: ' {%- if true -%} {{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: '\n{%- if true -%}\n\n{{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: '\n\t{%- if true -%}\n\n\t{{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: '123\n\t{%- if true -%}\n\n\t{{ "test" }}{% endif %}456'}).render().should.equal("123test456");
-twig({data: '\n\t{%- if true -%}\n\n\t{{ [1,2 ,1+2 ] }}{% endif %}'}).render().should.equal("1,2,3");
-twig({data: '<>{%- if true -%}test{% endif %}<>'}).render().should.equal("<>test<>");
-```
-
-should be able to parse mismatched opening whitespace control logic tags.
-
-```js
-twig({data: '{%- if true %}{{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: '{%- if true %}{{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: ' {% if true %} {{ "test" }}{% endif %}'}).render().should.equal(" test");
-twig({data: ' {%- if true %} {{ "test" }}{% endif %}'}).render().should.equal(" test");
-twig({data: '\n{% if true %}\n\n{{ "test" }}{% endif %}'}).render().should.equal("\n\ntest");
-twig({data: '\n{%- if true %}\n\n{{ "test" }}{% endif %}'}).render().should.equal("\ntest");
-twig({data: '\n\t{%- if true %}\n\n\t{{ "test" }}{% endif %}'}).render().should.equal("\n\ttest");
-twig({data: '123\n\t{%- if true %}\n\n\t{{ "test" }}{% endif %}456'}).render().should.equal("123\n\ttest456");
-twig({data: '\n\t{%- if true %}\n\n\t{{ [1,2 ,1+2 ] }}{% endif %}'}).render().should.equal("\n\t1,2,3");
-twig({data: '<>{%- if true %}test{% endif %}'}).render().should.equal("<>test");
-```
-
-should be able to parse mismatched closing whitespace control logic tags.
-
-```js
-twig({data: '{% if true %}{{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: '{% if true -%} {{ "test" }}{% endif %}'}).render().should.equal("test");
-twig({data: ' {% if true -%} {{ "test" }}{% endif %}'}).render().should.equal(" test");
-twig({data: ' {% if true -%} {{ "test" }}{% endif %}'}).render().should.equal(" test");
-twig({data: '\n{% if true %}\n\n{{ "test" }}{% endif %}'}).render().should.equal("\n\ntest");
-twig({data: '\n{% if true -%}\n\n{{ "test" }}{% endif %}'}).render().should.equal("\ntest");
-twig({data: '\n\t{% if true -%}\n\n\t{{ "test" }}{% endif %}'}).render().should.equal("\n\ttest");
-twig({data: '123\n\t{% if true -%}\n\n\t{{ "test" }}{% endif %}456'}).render().should.equal("123\n\ttest456");
-twig({data: '\n\t{% if true -%}\n\n\t{{ [1,2 ,1+2 ] }}{% endif %}'}).render().should.equal("\n\t1,2,3");
-twig({data: '{% if true -%}<>test{% endif %}'}).render().should.equal("<>test");
-```
-
-should be able to output numbers.
-
-```js
-twig({data: '{{ 12 }}'}).render().should.equal( "12" );
-twig({data: '{{ 12.64 }}'}).render().should.equal( "12.64" );
-twig({data: '{{ 0.64 }}'}).render().should.equal("0.64" );
-```
-
-should be able to output booleans.
-
-```js
-twig({data: '{{ true }}'}).render().should.equal( "true" );
-twig({data: '{{ false }}'}).render().should.equal( "false" );
-```
-
-should be able to output strings.
-
-```js
-twig({data: '{{ "double" }}'}).render().should.equal("double");
-twig({data: "{{ 'single' }}"}).render().should.equal('single');
-twig({data: '{{ "dou\'ble" }}'}).render().should.equal("dou'ble");
-twig({data: "{{ 'sin\"gle' }}"}).render().should.equal('sin"gle');
-twig({data: '{{ "dou\\"ble" }}'}).render().should.equal("dou\"ble");
-twig({data: "{{ 'sin\\'gle' }}"}).render().should.equal("sin'gle");
-```
-
-should be able to output strings with newlines.
-
-```js
-twig({data: "{{ 'a\nb\rc\r\nd' }}"}).render().should.equal("a\nb\rc\r\nd");
-```
-
-should be able to output arrays.
-
-```js
-twig({data: '{{ [1] }}'}).render().should.equal("1" );
-twig({data: '{{ [1,2 ,3 ] }}'}).render().should.equal("1,2,3" );
-twig({data: '{{ [1,2 ,3 , val ] }}'}).render({val: 4}).should.equal("1,2,3,4" );
-twig({data: '{{ ["[to",\'the\' ,"string]" ] }}'}).render().should.equal('[to,the,string]' );
-twig({data: '{{ ["[to",\'the\' ,"str\\"ing]" ] }}'}).render().should.equal('[to,the,str"ing]' );
-```
-
-should be able to output parse expressions in an array.
-
-```js
-twig({data: '{{ [1,2 ,1+2 ] }}'}).render().should.equal("1,2,3" );
-twig({data: '{{ [1,2 ,3 , "-", [4,5, 6] ] }}'}).render({val: 4}).should.equal("1,2,3,-,4,5,6" );
-twig({data: '{{ [a,b ,(1+2) * a ] }}'}).render({a:1,b:2}).should.equal("1,2,3" );
-```
-
-should be able to output variables.
-
-```js
-twig({data: '{{ orp }}'}).render({ orp: "test"}).should.equal("test");
-twig({data: '{{ val }}'}).render({ val: function() {
- return "test"
- }}).should.equal("test");
-```
-
-should recognize null.
-
-```js
-twig({data: '{{ null == val }}'}).render({val: null}).should.equal( "true" );
-twig({data: '{{ null == val }}'}).render({val: undefined}).should.equal( "true" );
-twig({data: '{{ null == val }}'}).render({val: "test"}).should.equal( "false" );
-twig({data: '{{ null == val }}'}).render({val: 0}).should.equal( "false" );
-twig({data: '{{ null == val }}'}).render({val: false}).should.equal( "false" );
-```
-
-should recognize object literals.
-
-```js
-twig({data: '{% set at = {"foo": "test", bar: "other", 1:"zip"} %}{{ at.foo ~ at.bar ~ at.1 }}'}).render().should.equal( "testotherzip" );
-```
-
-should allow newlines in object literals.
-
-```js
-twig({data: '{% set at = {\n"foo": "test",\rbar: "other",\r\n1:"zip"\n} %}{{ at.foo ~ at.bar ~ at.1 }}'}).render().should.equal( "testotherzip" );
-```
-
-should recognize null in an object.
-
-```js
-twig({data: '{% set at = {"foo": null} %}{{ at.foo == val }}'}).render({val: null}).should.equal( "true" );
-```
-
-should allow int 0 as a key in an object.
-
-```js
-twig({data: '{% set at = {0: "value"} %}{{ at.0 }}'}).render().should.equal( "value" );
-```
-
-should support set capture.
-
-```js
-twig({data: '{% set foo %}bar{% endset %}{{foo}}'}).render().should.equal( "bar" );
-```
-
-should support raw data.
-
-```js
-twig({
- data: "before {% raw %}{{ test }} {% test2 %} {{{% endraw %} after"
-}).render().should.equal(
- "before {{ test }} {% test2 %} {{ after"
-);
-```
-
-should support raw data using 'verbatim' tag.
-
-```js
-twig({
- data: "before {% verbatim %}{{ test }} {% test2 %} {{{% endverbatim %} after"
-}).render().should.equal(
- "before {{ test }} {% test2 %} {{ after"
-);
-```
-
-<a name="twigjs-core---key-notation--"></a>
-## Key Notation ->
-should support dot key notation.
-
-```js
-twig({data: '{{ key.value }} {{ key.sub.test }}'}).render({
- key: {
- value: "test",
- sub: {
- test: "value"
- }
- }
-}).should.equal("test value");
-```
-
-should support square bracket key notation.
-
-```js
-twig({data: '{{ key["value"] }} {{ key[\'sub\']["test"] }}'}).render({
- key: {
- value: "test",
- sub: {
- test: "value"
- }
- }
-}).should.equal("test value");
-```
-
-should support mixed dot and bracket key notation.
-
-```js
-twig({data: '{{ key["value"] }} {{ key.sub[key.value] }} {{ s.t["u"].v["w"] }}'}).render({
- key: {
- value: "test",
- sub: {
- test: "value"
- }
- },
- s: { t: { u: { v: { w: 'x' } } } }
-}).should.equal("test value x" );
-```
-
-should support dot key notation after a function.
-
-```js
-var test_template = twig({data: '{{ key.fn().value }}'});
-var output = test_template.render({
- key: {
- fn: function() {
- return {
- value: "test"
- }
- }
- }
-});
-output.should.equal("test");
-```
-
-should support bracket key notation after a function.
-
-```js
-var test_template = twig({data: '{{ key.fn()["value"] }}'});
-var output = test_template.render({
- key: {
- fn: function() {
- return {
- value: "test 2"
- }
- }
- }
-});
-output.should.equal("test 2");
-```
-
-should check for getKey methods if a key doesn't exist..
-
-```js
-twig({data: '{{ obj.value }}'}).render({
- obj: {
- getValue: function() {
- return "val";
- },
- isValue: function() {
- return "not val";
- }
- }
-}).should.equal("val");
-```
-
-should check for isKey methods if a key doesn't exist..
-
-```js
-twig({data: '{{ obj.value }}'}).render({
- obj: {
- isValue: function() {
- return "val";
- }
- }
-}).should.equal("val");
-```
-
-should check for getKey methods on prototype objects..
-
-```js
-var object = {
- getValue: function() {
- return "val";
- }
- };
-function Subobj() {};
-Subobj.prototype = object;
-var subobj = new Subobj();
-
- twig({data: '{{ obj.value }}'}).render({
- obj: subobj
- }).should.equal("val");
-```
-
-should return null if a period key doesn't exist..
-
-```js
-twig({data: '{{ obj.value == null }}'}).render({
- obj: {}
-}).should.equal("true");
-```
-
-should return null if a bracket key doesn't exist..
-
-```js
-twig({data: '{{ obj["value"] == null }}'}).render({
- obj: {}
-}).should.equal("true");
-```
-
-<a name="twigjs-core---context--"></a>
-## Context ->
-should be supported.
-
-```js
-twig({data: '{{ _context.value }}'}).render({
- value: "test"
-}).should.equal("test");
-```
-
-should be an object even if it's not passed.
-
-```js
-twig({data: '{{ _context|json_encode }}'}).render().should.equal("{}");
-```
-
-should support {% set %} tag.
-
-```js
-twig({data: '{% set value = "test" %}{{ _context.value }}'}).render().should.equal("test");
-```
-
-should work correctly with properties named dynamically.
-
-```js
-twig({data: '{{ _context[key] }}'}).render({
- key: "value",
- value: "test"
-}).should.equal("test");
-```
-
-should not allow to override context using {% set %}.
-
-```js
-twig({data: '{% set _context = "test" %}{{ _context|json_encode }}'}).render().should.equal('{"_context":"test"}');
-twig({data: '{% set _context = "test" %}{{ _context._context }}'}).render().should.equal("test");
-```
-
-should support autoescape option.
-
-```js
-twig({
- autoescape: true,
- data: '{{ value }}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('&lt;test&gt;&amp;&lt;/test&gt;');
-```
-
-should support autoescape option with alternative strategy.
-
-```js
-twig({
- autoescape: 'js',
- data: '{{ value }}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('\\x3Ctest\\x3E\\x26\\x3C\\x2Ftest\\x3E');
-```
-
-should autoescape parent() output correctly.
-
-```js
-twig({id: 'parent1', data: '{% block body %}<p>{{ value }}</p>{% endblock body %}'});
-twig({
- allowInlineIncludes: true,
- autoescape: true,
- data: '{% extends "parent1" %}{% block body %}{{ parent() }}{% endblock %}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('<p>&lt;test&gt;&amp;&lt;/test&gt;</p>');
-```
-
-should use a correct context in the extended template.
-
-```js
-twig({id: 'parent', data: '{% block body %}{{ value }}{% endblock body %}'});
-twig({
- allowInlineIncludes: true,
- data: '{% extends "parent" %}{% set value = "test" %}{% block body %}{{ parent() }}{% endblock %}'
-}).render().should.equal("test");
-```
-
-should use a correct context in the included template.
-
-```js
-twig({id: 'included', data: '{{ value }}\n{% set value = "inc" %}{{ value }}\n'});
-twig({
- allowInlineIncludes: true,
- data: '{% set value = "test" %}{% for i in [0, 1] %}{% include "included" %}{% endfor %}{{ value }}'
-}).render().should.equal("test\ninc\ntest\ninc\ntest");
-```
-
-<a name="twigjs-embed--"></a>
-# Twig.js Embed ->
-it should load embed and render.
-
-```js
-twig({
- id: 'embed',
- path: 'test/templates/embed-simple.twig',
- async: false
-});
-// Load the template
-twig({ref: 'embed'}).render({ }).trim().should.equal( ['START',
- 'A',
- 'new header',
- 'base footer',
- 'B',
- '',
- 'A',
- 'base header',
- 'base footer',
- 'extended',
- 'B',
- '',
- 'A',
- 'base header',
- 'extended',
- 'base footer',
- 'extended',
- 'B',
- '',
- 'A',
- 'Super cool new header',
- 'Cool footer',
- 'B',
- 'END'].join('\n') );
-```
-
-<a name="twigjs-expressions--"></a>
-# Twig.js Expressions ->
-<a name="twigjs-expressions---basic-operators--"></a>
-## Basic Operators ->
-should parse parenthesis.
-
-```js
-var test_template = twig({data: '{{ a - (b + c) }}'}),
- d = {a: 10, b: 4, c: 2},
- output = test_template.render(d);
-output.should.equal( (d.a - (d.b + d.c)).toString() );
-```
-
-should parse nested parenthesis.
-
-```js
-var test_template = twig({data: '{{ a - ((b) + (1 + c)) }}'}),
- d = {a: 10, b: 4, c: 2},
- output = test_template.render(d);
-output.should.equal( (d.a - (d.b + 1 + d.c)).toString() );
-```
-
-should add numbers.
-
-```js
-var test_template = twig({data: '{{ a + b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal( (pair.a + pair.b).toString() );
-});
-```
-
-should subtract numbers.
-
-```js
-var test_template = twig({data: '{{ a - b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal( (pair.a - pair.b).toString() );
-});
-```
-
-should multiply numbers.
-
-```js
-var test_template = twig({data: '{{ a * b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a * pair.b).toString() );
-});
-```
-
-should divide numbers.
-
-```js
-var test_template = twig({data: '{{ a / b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a / pair.b).toString() );
-});
-```
-
-should divide numbers and return an int result.
-
-```js
-var test_template = twig({data: '{{ a // b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- // Get expected truncated result
- var c = parseInt(pair.a/pair.b);
- output.should.equal(c.toString() );
-});
-```
-
-should raise numbers to a power.
-
-```js
-var test_template = twig({data: '{{ a ** b }}'});
-var pow_test_data = [
- {a: 2, b:3, c: 8}
- , {a: 4, b:.5, c: 2}
- , {a: 5, b: 1, c: 5}
-];
-pow_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal(pair.c.toString() );
-});
-```
-
-should concatanate values.
-
-```js
-twig({data: '{{ "test" ~ a }}'}).render({a:1234}).should.equal("test1234");
-twig({data: '{{ a ~ "test" ~ a }}'}).render({a:1234}).should.equal("1234test1234");
-twig({data: '{{ "this" ~ "test" }}'}).render({a:1234}).should.equal("thistest");
-// Test numbers
-var test_template = twig({data: '{{ a ~ b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal(pair.a.toString() + pair.b.toString());
-});
-// Test strings
-test_template = twig({data: '{{ a ~ b }}'});
-string_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal(pair.a.toString() + pair.b.toString());
-});
-```
-
-should concatenate null and undefined values and not throw an exception.
-
-```js
-twig({data: '{{ a ~ b }}'}).render().should.equal("");
-twig({data: '{{ a ~ b }}'}).render({
- a: null,
- b: null
-}).should.equal("");
-```
-
-should handle multiple chained operations.
-
-```js
-var data = {a: 4.5, b: 10, c: 12, d: -0.25, e:0, f: 65, g: 21, h: -0.0002};
-var test_template = twig({data: '{{a/b+c*d-e+f/g*h}}'});
-var output = test_template.render(data);
-var expected = data.a / data.b + data.c * data.d - data.e + data.f / data.g * data.h;
-output.should.equal(expected.toString());
-```
-
-should handle parenthesis in chained operations.
-
-```js
-var data = {a: 4.5, b: 10, c: 12, d: -0.25, e:0, f: 65, g: 21, h: -0.0002};
-var test_template = twig({data: '{{a /(b+c )*d-(e+f)/(g*h)}}'});
-var output = test_template.render(data);
-var expected = data.a / (data.b + data.c) * data.d - (data.e + data.f) / (data.g * data.h);
-output.should.equal(expected.toString());
-```
-
-<a name="twigjs-expressions---comparison-operators--"></a>
-## Comparison Operators ->
-should support less then.
-
-```js
-var test_template = twig({data: '{{ a < b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a < pair.b).toString() );
-});
-```
-
-should support less then or equal.
-
-```js
-var test_template = twig({data: '{{ a <= b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a <= pair.b).toString() );
-});
-```
-
-should support greater then.
-
-```js
-var test_template = twig({data: '{{ a > b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a > pair.b).toString() );
-});
-```
-
-should support greater then or equal.
-
-```js
-var test_template = twig({data: '{{ a >= b }}'});
-numeric_test_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a >= pair.b).toString() );
-});
-```
-
-should support equals.
-
-```js
-var test_template = twig({data: '{{ a == b }}'});
-boolean_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a == pair.b).toString() );
-});
-equality_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a == pair.b).toString() );
-});
-```
-
-should support not equals.
-
-```js
-var test_template = twig({data: '{{ a != b }}'});
-boolean_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a != pair.b).toString() );
-});
-equality_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a != pair.b).toString() );
-});
-```
-
-should support boolean or.
-
-```js
-var test_template = twig({data: '{{ a or b }}'});
-boolean_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a || pair.b).toString() );
-});
-```
-
-should support boolean and.
-
-```js
-var test_template = twig({data: '{{ a and b }}'});
-boolean_data.forEach(function(pair) {
- var output = test_template.render(pair);
- output.should.equal((pair.a && pair.b).toString() );
-});
-```
-
-should support boolean not.
-
-```js
-var test_template = twig({data: '{{ not a }}'});
-test_template.render({a:false}).should.equal(true.toString());
-test_template.render({a:true}).should.equal(false.toString());
-```
-
-<a name="twigjs-expressions---other-operators--"></a>
-## Other Operators ->
-should support the ternary operator.
-
-```js
-var test_template = twig({data: '{{ a ? b:c }}'})
- , output_t = test_template.render({a: true, b: "one", c: "two"})
- , output_f = test_template.render({a: false, b: "one", c: "two"});
-output_t.should.equal( "one" );
-output_f.should.equal( "two" );
-```
-
-should support the ternary operator with objects in it.
-
-```js
-var test_template2 = twig({data: '{{ (a ? {"a":e+f}:{"a":1}).a }}'})
- , output2 = test_template2.render({a: true, b: false, e: 1, f: 2});
-output2.should.equal( "3" );
-```
-
-should support the ternary operator inside objects.
-
-```js
-var test_template2 = twig({data: '{{ {"b" : a or b ? {"a":e+f}:{"a":1} }.b.a }}'})
- , output2 = test_template2.render({a: false, b: false, e: 1, f: 2});
-output2.should.equal( "1" );
-```
-
-should support in/containment functionality for arrays.
-
-```js
-var test_template = twig({data: '{{ "a" in ["a", "b", "c"] }}'});
-test_template.render().should.equal(true.toString());
-var test_template = twig({data: '{{ "d" in ["a", "b", "c"] }}'});
-test_template.render().should.equal(false.toString());
-```
-
-should support not in/containment functionality for arrays.
-
-```js
-var test_template = twig({data: '{{ "a" not in ["a", "b", "c"] }}'});
-test_template.render().should.equal(false.toString());
-var test_template = twig({data: '{{ "d" not in ["a", "b", "c"] }}'});
-test_template.render().should.equal(true.toString());
-```
-
-should support in/containment functionality for strings.
-
-```js
-var test_template = twig({data: '{{ "at" in "hat" }}'});
-test_template.render().should.equal(true.toString());
-var test_template = twig({data: '{{ "d" in "not" }}'});
-test_template.render().should.equal(false.toString());
-```
-
-should support not in/containment functionality for strings.
-
-```js
-var test_template = twig({data: '{{ "at" not in "hat" }}'});
-test_template.render().should.equal(false.toString());
-var test_template = twig({data: '{{ "d" not in "not" }}'});
-test_template.render().should.equal(true.toString());
-```
-
-should support in/containment functionality for objects.
-
-```js
-var test_template = twig({data: '{{ "value" in {"key" : "value", "2": "other"} }}'});
-test_template.render().should.equal(true.toString());
-var test_template = twig({data: '{{ "d" in {"key_a" : "no"} }}'});
-test_template.render().should.equal(false.toString());
-```
-
-should support not in/containment functionality for objects.
-
-```js
-var test_template = twig({data: '{{ "value" not in {"key" : "value", "2": "other"} }}'});
-test_template.render().should.equal(false.toString());
-var test_template = twig({data: '{{ "d" not in {"key_a" : "no"} }}'});
-test_template.render().should.equal(true.toString());
-```
-
-should support undefined and null for the in operator.
-
-```js
-var test_template = twig({data: '{{ 0 in undefined }} {{ 0 in null }}'});
-test_template.render().should.equal(' ');
-```
-
-should support expressions as object keys.
-
-```js
-var test_template;
-test_template = twig({data: '{% set a = {(foo): "value"} %}{{ a.bar }}'});
-test_template.render({foo: 'bar'}).should.equal('value');
-test_template = twig({data: '{{ {(foo): "value"}.bar }}'});
-test_template.render({foo: 'bar'}).should.equal('value');
-```
-
-<a name="twigjs-extensions--"></a>
-# Twig.js Extensions ->
-should be able to extend a meta-type tag.
-
-```js
-var flags = {};
- Twig.extend(function(Twig) {
- Twig.exports.extendTag({
- type: "flag",
- regex: /^flag\s+(.+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var expression = token.match[1];
-
- // Compile the expression.
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var name = Twig.expression.parse.apply(this, [token.stack, context]),
- output = '';
-
- flags[name] = true;
-
- return {
- chain: false,
- output: output
- };
- }
- });
- });
- var template = twig({data:"{% flag 'enabled' %}"}).render();
- flags.enabled.should.equal(true);
-```
-
-should be able to extend paired tags.
-
-```js
-// demo data
- var App = {
- user: "john",
- users: {
- john: {level: "admin"},
- tom: {level: "user"}
- }
- };
- Twig.extend(function(Twig) {
- // example of extending a tag type that would
- // restrict content to the specified "level"
- Twig.exports.extendTag({
- type: "auth",
- regex: /^auth\s+(.+)$/,
- next: ["endauth"], // match the type of the end tag
- open: true,
- compile: function (token) {
- var expression = token.match[1];
-
- // turn the string expression into tokens.
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var level = Twig.expression.parse.apply(this, [token.stack, context]),
- output = "";
-
- if (App.users[App.currentUser].level == level)
- {
- output = Twig.parse.apply(this, [token.output, context]);
- }
-
- return {
- chain: chain,
- output: output
- };
- }
- });
- Twig.exports.extendTag({
- type: "endauth",
- regex: /^endauth$/,
- next: [ ],
- open: false
- });
- });
- var template = twig({data:"Welcome{% auth 'admin' %} ADMIN{% endauth %}!"});
-
- App.currentUser = "john";
- template.render().should.equal("Welcome ADMIN!");
-
- App.currentUser = "tom";
- template.render().should.equal("Welcome!");
-```
-
-should be able to extend the same tag twice, replacing it.
-
-```js
-var flags = {};
-Twig.extend(function(Twig) {
- Twig.exports.extendTag({
- type: "noop",
- regex: /^noop$/,
- next: [ ],
- open: true,
- parse: function (token, context, chain) {
- return {
- chain: false,
- output: "noop1"
- };
- }
- });
-});
-var result = twig({data:"{% noop %}"}).render();
-result.should.equal("noop1");
-Twig.extend(function(Twig) {
- Twig.exports.extendTag({
- type: "noop",
- regex: /^noop$/,
- next: [ ],
- open: true,
- parse: function (token, context, chain) {
- return {
- chain: false,
- output: "noop2"
- };
- }
- });
-});
-var result = twig({data:"{% noop %}"}).render();
-result.should.equal("noop2");
-```
-
-<a name="twigjs-filters--"></a>
-# Twig.js Filters ->
-should chain.
-
-```js
-var test_template = twig({data: '{{ ["a", "b", "c"]|keys|reverse }}' });
-test_template.render().should.equal("2,1,0");
-```
-
-<a name="twigjs-filters---url_encode--"></a>
-## url_encode ->
-should encode URLs.
-
-```js
-var test_template = twig({data: '{{ "http://google.com/?q=twig.js"|url_encode() }}' });
-test_template.render().should.equal("http%3A%2F%2Fgoogle.com%2F%3Fq%3Dtwig.js" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|url_encode() }}' });
-test_template.render().should.equal("" );
-```
-
-should handle special characters.
-
-```js
-var data = { "foo": "<foo> \\&\"'.,-_?/Ķä€台北[]{}\t\r\n\b\x80" };
-var test_template = twig({data: '{{ foo|url_encode() }}' });
-test_template.render(data).should.equal("%3Cfoo%3E%20%5C%26%22%27.%2C-_%3F%2F%C4%B6%C3%A4%E2%82%AC%E5%8F%B0%E5%8C%97%5B%5D%7B%7D%09%0D%0A%08%C2%80" );
-```
-
-<a name="twigjs-filters---json_encode--"></a>
-## json_encode ->
-should encode strings to json.
-
-```js
-var test_template = twig({data: '{{ test|json_encode }}' });
-test_template.render({test:'value'}).should.equal('"value"' );
-```
-
-should encode numbers to json.
-
-```js
-var test_template = twig({data: '{{ test|json_encode }}' });
-test_template.render({test:21}).should.equal('21' );
-```
-
-should encode arrays to json.
-
-```js
-var test_template = twig({data: '{{ [1,"b",3]|json_encode }}' });
-test_template.render().should.equal('[1,"b",3]' );
-```
-
-should encode objects to json.
-
-```js
-var test_template = twig({data: '{{ {"a":[1,"b",3]}|json_encode }}' });
-test_template.render().should.equal('{"a":[1,"b",3]}' );
-```
-
-should retain key order in an object.
-
-```js
-twig({data: '{{ { "foo": 1, "bar": 2, "baz": 3 }|json_encode }}'}).render().should.equal( '{"foo":1,"bar":2,"baz":3}' );
-```
-
-should not add additional information to objects.
-
-```js
-twig({data: '{{ { "foo": 1, "bar": [1, 2, 3], "baz": { "a": "a", "b": "b" } }|json_encode }}'}).render().should.equal( '{"foo":1,"bar":[1,2,3],"baz":{"a":"a","b":"b"}}' );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|json_encode }}' });
-test_template.render().should.equal("null" );
-```
-
-<a name="twigjs-filters---upper--"></a>
-## upper ->
-should convert text to uppercase.
-
-```js
-var test_template = twig({data: '{{ "hello"|upper }}' });
-test_template.render().should.equal("HELLO" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|upper }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---lower--"></a>
-## lower ->
-should convert text to lowercase.
-
-```js
-var test_template = twig({data: '{{ "HELLO"|lower }}' });
-test_template.render().should.equal("hello" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|lower }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---capitalize--"></a>
-## capitalize ->
-should capitalize the first word in a string.
-
-```js
-var test_template = twig({data: '{{ "hello world"|capitalize }}' });
-test_template.render().should.equal("Hello world" );
-var test_template2 = twig({data: '{{ "HELLO WORLD"|capitalize }}' });
-test_template2.render().should.equal("Hello world" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|capitalize }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---title--"></a>
-## title ->
-should capitalize all the words in a string.
-
-```js
-var test_template = twig({data: '{{ "hello world"|title }}' });
-test_template.render().should.equal("Hello World" );
-var test_template2 = twig({data: '{{ "HELLO WORLD"|title }}' });
-test_template2.render().should.equal("Hello World" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|title }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---length--"></a>
-## length ->
-should determine the length of a string.
-
-```js
-var test_template = twig({data: '{{ "test"|length }}' });
-test_template.render().should.equal("4");
-```
-
-should determine the length of an array.
-
-```js
-var test_template = twig({data: '{{ [1,2,4,76,"tesrt"]|length }}' });
-test_template.render().should.equal("5");
-```
-
-should determine the length of an object.
-
-```js
-var test_template = twig({data: '{{ {"a": "b", "c": "1", "test": "test"}|length }}' });
-test_template.render().should.equal("3");
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|length }}' });
-test_template.render().should.equal("0" );
-```
-
-<a name="twigjs-filters---sort--"></a>
-## sort ->
-should sort an array.
-
-```js
-var test_template = twig({data: '{{ [1,5,2,7]|sort }}' });
-test_template.render().should.equal("1,2,5,7" );
-test_template = twig({data: '{{ ["test","abc",2,7]|sort }}' });
-test_template.render().should.equal("2,7,abc,test" );
-```
-
-should sort an object.
-
-```js
-var test_template = twig({data: "{% set obj = {'c': 1,'d': 5,'t': 2,'e':7}|sort %}{% for key,value in obj|sort %}{{key}}:{{value}} {%endfor %}" });
-test_template.render().should.equal("c:1 t:2 d:5 e:7 " );
-test_template = twig({data: "{% set obj = {'m':'test','z':'abc','a':2,'y':7} %}{% for key,value in obj|sort %}{{key}}:{{value}} {%endfor %}" });
-test_template.render().should.equal("a:2 y:7 z:abc m:test " );
-test_template = twig({data: "{% set obj = {'z':'abc','a':2,'y':7,'m':'test'} %}{% for key,value in obj|sort %}{{key}}:{{value}} {%endfor %}" });
-test_template.render().should.equal("a:2 y:7 z:abc m:test " );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{% set obj = undef|sort %}{% for key, value in obj|sort %}{{key}}:{{value}}{%endfor%}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---reverse--"></a>
-## reverse ->
-should reverse an array.
-
-```js
-var test_template = twig({data: '{{ ["a", "b", "c"]|reverse }}' });
-test_template.render().should.equal("c,b,a" );
-```
-
-should reverse an object.
-
-```js
-
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|reverse }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---keys--"></a>
-## keys ->
-should return the keys of an array.
-
-```js
-var test_template = twig({data: '{{ ["a", "b", "c"]|keys }}' });
-test_template.render().should.equal("0,1,2" );
-```
-
-should return the keys of an object.
-
-```js
-var test_template = twig({data: '{{ {"a": 1, "b": 4, "c": 5}|keys }}' });
-test_template.render().should.equal("a,b,c" );
-test_template = twig({data: '{{ {"0":"a", "1":"b", "2":"c"}|keys }}' });
-test_template.render().should.equal("0,1,2" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|keys }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---merge--"></a>
-## merge ->
-should merge two objects into an object.
-
-```js
-// Object merging
-var test_template = twig({data: '{% set obj= {"a":"test", "b":"1"}|merge({"b":2,"c":3}) %}{% for key in obj|keys|sort %}{{key}}:{{obj[key]}} {%endfor %}' });
-test_template.render().should.equal('a:test b:2 c:3 ' );
-```
-
-should merge two arrays into and array.
-
-```js
-// Array merging
-var test_template = twig({data: '{% set obj= ["a", "b"]|merge(["c", "d"]) %}{% for key in obj|keys|sort %}{{key}}:{{obj[key]}} {%endfor %}' });
-test_template.render().should.equal('0:a 1:b 2:c 3:d ' );
-```
-
-should merge an object and an array into an object.
-
-```js
-// Mixed merging
-var test_template = twig({data: '{% set obj= ["a", "b"]|merge({"a": "c", "3":4}, ["c", "d"]) %}{% for key in obj|keys|sort %}{{key}}:{{obj[key]}} {%endfor %}' });
-test_template.render().should.equal('0:a 1:b 3:4 4:c 5:d a:c ' );
-// Mixed merging(2)
-test_template = twig({data: '{% set obj= {"1":"a", "a":"b"}|merge(["c", "d"]) %}{% for key in obj|keys %}{{key}}:{{obj[key]}} {%endfor %}' });
-test_template.render().should.equal('1:a a:b 2:c 3:d ' );
-```
-
-<a name="twigjs-filters---join--"></a>
-## join ->
-should join all values in an object.
-
-```js
-var test_template = twig({data: '{{ {"a":"1", "b": "b", "c":test}|join("-") }}' });
-test_template.render({"test": "t"}).should.equal("1-b-t" );
-```
-
-should joing all values in an array.
-
-```js
-var test_template = twig({data: '{{ [1,2,4,76]|join }}' });
-test_template.render().should.equal("12476" );
-test_template = twig({data: '{{ [1+ 5,2,4,76]|join("-" ~ ".") }}' });
-test_template.render().should.equal("6-.2-.4-.76" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|join }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---default--"></a>
-## default ->
-should not provide the default value if a key is defined and not empty.
-
-```js
-var test_template = twig({data: '{{ var|default("Not Defined") }}' });
-test_template.render({"var":"value"}).should.equal("value" );
-```
-
-should provide a default value if a key is not defined.
-
-```js
-var test_template = twig({data: '{{ var|default("Not Defined") }}' });
-test_template.render().should.equal("Not Defined" );
-```
-
-should provide a default value if a value is empty.
-
-```js
-var test_template = twig({data: '{{ ""|default("Empty String") }}' });
-test_template.render().should.equal("Empty String" );
-test_template = twig({data: '{{ var.key|default("Empty Key") }}' });
-test_template.render({'var':{}}).should.equal("Empty Key" );
-```
-
-should provide a default value of '' if no parameters are passed and a default key is not defined.
-
-```js
-var test_template = twig({data: '{{ var|default }}' });
-test_template.render().should.equal("");
-```
-
-should provide a default value of '' if no parameters are passed and a value is empty.
-
-```js
-var test_template = twig({data: '{{ ""|default }}' });
-test_template.render().should.equal("");
-test_template = twig({data: '{{ var.key|default }}' });
-test_template.render({'var':{}}).should.equal("");
-```
-
-<a name="twigjs-filters---date--"></a>
-## date ->
-should recognize timestamps.
-
-```js
-var template = twig({data: '{{ 27571323556|date("d/m/Y @ H:i:s") }}'})
- , date = new Date(27571323556000); // 13/09/2843 @ 08:59:16 EST
-template.render().should.equal( stringDate(date) );
-```
-
-should recognize timestamps, when they are passed as string.
-
-```js
-var template = twig({data: '{{ "27571323556"|date("d/m/Y @ H:i:s") }}'})
- , date = new Date(27571323556000); // 13/09/2843 @ 08:59:16 EST
-template.render().should.equal( stringDate(date) );
-```
-
-should recognize string date formats.
-
-```js
-var template = twig({data: '{{ "Tue Aug 14 08:52:15 +0000 2007"|date("d/m/Y @ H:i:s") }}'})
- , date = new Date(1187081535000); // 14/08/2007 @ 04:52:15 EST
-template.render().should.equal( stringDate(date) );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|date("d/m/Y @ H:i:s") }}' });
-var date = new Date();
-test_template.render().should.equal(stringDate(date));
-```
-
-should work with no parameters.
-
-```js
-var test_template = twig({data: '{{ 27571323556|date }}' });
-test_template.render().should.equal(twig({data: '{{ 27571323556|date("F j, Y H:i") }}'}).render());
-```
-
-<a name="twigjs-filters---replace--"></a>
-## replace ->
-should replace strings provided in a map.
-
-```js
-var template = twig({data: '{{ "I like %this% and %that%. Seriously, I like %this% and %that%."|replace({"%this%": foo, "%that%": "bar"}) }}'});
-template.render({foo: "foo"}).should.equal("I like foo and bar. Seriously, I like foo and bar." );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|replace }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---format--"></a>
-## format ->
-should replace formatting tags with parameters.
-
-```js
-var template = twig({data: '{{ "I like %s and %s."|format(foo, "bar") }}'});
-template.render({foo: "foo"}).should.equal("I like foo and bar." );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|format }}' });
-test_template.render().should.equal("" );
-```
-
-should handle positive leading sign without padding.
-
-```js
-var template = twig({data: '{{ "I like positive numbers like %+d."|format(123) }}'});
-template.render({foo: "foo"}).should.equal("I like positive numbers like +123." );
-```
-
-should handle negative leading sign without padding.
-
-```js
-var template = twig({data: '{{ "I like negative numbers like %+d."|format(-123) }}'});
-template.render({foo: "foo"}).should.equal("I like negative numbers like -123." );
-```
-
-should handle positive leading sign with padding zero.
-
-```js
-var template = twig({data: '{{ "I like positive numbers like %+05d."|format(123) }}'});
-template.render({foo: "foo"}).should.equal("I like positive numbers like +0123." );
-```
-
-should handle negative leading sign with padding zero.
-
-```js
-var template = twig({data: '{{ "I like negative numbers like %+05d."|format(-123) }}'});
-template.render({foo: "foo"}).should.equal("I like negative numbers like -0123." );
-```
-
-should handle positive leading sign with padding space.
-
-```js
-var template = twig({data: '{{ "I like positive numbers like %+5d."|format(123) }}'});
-template.render({foo: "foo"}).should.equal("I like positive numbers like +123." );
-```
-
-should handle negative leading sign with padding space.
-
-```js
-var template = twig({data: '{{ "I like negative numbers like %+5d."|format(-123) }}'});
-template.render({foo: "foo"}).should.equal("I like negative numbers like -123." );
-```
-
-<a name="twigjs-filters---striptags--"></a>
-## striptags ->
-should remove tags from a value.
-
-```js
-var template = twig({data: '{{ "<p>Test paragraph.</p><!-- Comment --> <a href=\\"#fragment\\">Other text</a>"|striptags }}'});
-template.render().should.equal("Test paragraph. Other text" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|striptags }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---escape--"></a>
-## escape ->
-should convert unsafe characters to HTML entities.
-
-```js
-var template = twig({data: '{{ "<p>Test paragraph.</p><!-- Comment --> <a href=\'#fragment\'>Other text</a>"|escape }}'});
-template.render().should.equal("&lt;p&gt;Test paragraph.&lt;/p&gt;&lt;!-- Comment --&gt; &lt;a href=&#039;#fragment\&#039;&gt;Other text&lt;/a&gt;" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|escape }}' });
-test_template.render().should.equal("" );
-```
-
-should not escape twice if autoescape is on.
-
-```js
-twig({
- autoescape: true,
- data: '{{ value|escape }}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('&lt;test&gt;&amp;&lt;/test&gt;');
-```
-
-should handle the strategy parameter.
-
-```js
-var data = { "foo": "<foo> \\&\"'.,-_?/Ķä€台北[]{}\t\r\n\b\x80" };
-var test_template = twig({data: 'Default: {{ foo|escape }}' });
-test_template.render(data).should.equal("Default: &lt;foo&gt; \\&amp;&quot;&#039;.,-_?/Ķä€台北[]{}\t\r\n\b\x80" );
-var test_template = twig({data: 'html: {{ foo|escape("html") }}' });
-test_template.render(data).should.equal("html: &lt;foo&gt; \\&amp;&quot;&#039;.,-_?/Ķä€台北[]{}\t\r\n\b\x80" );
-var test_template = twig({data: 'js: {{ foo|escape("js") }}' });
-test_template.render(data).should.equal("js: \\x3Cfoo\\x3E\\x20\\x5C\\x26\\x22\\x27.,\\x2D_\\x3F\\x2F\\u0136\\u00E4\\u20AC\\u53F0\\u5317\\x5B\\x5D\\x7B\\x7D\\x9\\xD\\xA\\x8\\u0080" );
-var test_template = twig({data: 'css: {{ foo|escape("css") }}' });
-test_template.render(data).should.equal("css: \\3C foo\\3E \\20 \\5C \\26 \\22 \\27 \\2E \\2C \\2D \\5F \\3F \\2F \\136 \\E4 \\20AC \\53F0 \\5317 \\5B \\5D \\7B \\7D \\9 \\D \\A \\8 \\80 " );
-var test_template = twig({data: 'url: {{ foo|escape("url") }}' });
-test_template.render(data).should.equal("url: %3Cfoo%3E%20%5C%26%22%27.%2C-_%3F%2F%C4%B6%C3%A4%E2%82%AC%E5%8F%B0%E5%8C%97%5B%5D%7B%7D%09%0D%0A%08%C2%80" );
-var test_template = twig({data: 'html_attr: {{ foo|escape("html_attr") }}' });
-test_template.render(data).should.equal("html_attr: &lt;foo&gt;&#x20;&#x5C;&amp;&quot;&#x27;.,-_&#x3F;&#x2F;&#x0136;&#x00E4;&#x20AC;&#x53F0;&#x5317;&#x5B;&#x5D;&#x7B;&#x7D;&#x09;&#x0D;&#x0A;&#xFFFD;&#x0080;" );
-```
-
-should escape strategy != 'html' if autoescape is on.
-
-```js
-twig({
- autoescape: true,
- data: '{{ value|escape("js") }}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('\\x3Ctest\\x3E\\x26\\x3C\\x2Ftest\\x3E');
-```
-
-should not escape twice if autoescape is not html.
-
-```js
-twig({
- autoescape: 'js',
- data: '{{ value|escape("js") }}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('\\x3Ctest\\x3E\\x26\\x3C\\x2Ftest\\x3E');
-```
-
-should escape twice if escape strategy is different from autoescape option.
-
-```js
-twig({
- autoescape: 'css',
- data: '{{ value|escape("js") }}\n{{ value|escape }}'
-}).render({
- value: "<test>&</test>"
-}).should.equal('\\5C x3Ctest\\5C x3E\\5C x26\\5C x3C\\5C x2Ftest\\5C x3E\n\\26 lt\\3B test\\26 gt\\3B \\26 amp\\3B \\26 lt\\3B \\2F test\\26 gt\\3B ');
-```
-
-<a name="twigjs-filters---e--"></a>
-## e ->
-should alias escape function with e.
-
-```js
-var template = twig({data: '{{ "<p>Test paragraph.</p><!-- Comment --> <a href=\'#fragment\'>Other text</a>"|e }}'});
-template.render().should.equal("&lt;p&gt;Test paragraph.&lt;/p&gt;&lt;!-- Comment --&gt; &lt;a href=&#039;#fragment\&#039;&gt;Other text&lt;/a&gt;" );
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|e }}' });
-test_template.render().should.equal("" );
-```
-
-should not escape twice if autoescape is on.
-
-```js
-var template = twig({
- autoescape: true,
- data: '{{ value|e }}'
-});
-template.render({
- value: "<test>&</test>"
-}).should.equal('&lt;test&gt;&amp;&lt;/test&gt;');
-```
-
-<a name="twigjs-filters---nl2br--"></a>
-## nl2br ->
-should convert newlines into html breaks.
-
-```js
-var template = twig({data: '{{ test|nl2br }}'});
-template.render({ test: 'Line 1\r\nLine 2\nLine 3\rLine 4\n\n' })
- .should.equal("Line 1<br />\nLine 2<br />\nLine 3<br />\nLine 4<br />\n<br />\n");
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|nl2br }}' });
-test_template.render().should.equal("" );
-```
-
-should not escape br tags if autoescape is on.
-
-```js
-twig({
- autoescape: true,
- data: '{{ test|nl2br }}'
-}).render({
- test: '<test>Line 1\nLine2</test>'
-}).should.equal("&lt;test&gt;Line 1<br />\nLine2&lt;/test&gt;");
-```
-
-<a name="twigjs-filters---truncate--"></a>
-## truncate ->
-should truncate string to default size(20) and add default separator.
-
-```js
-var template = twig({data: '{{ test|truncate }}'});
-template.render({test: '01234567890123456789012345678901234567890123456789'}).should.equal("012345678901234567890123456789...");
-```
-
-should truncate string to custom size(10) and add default separator.
-
-```js
-var template = twig({data: '{{ test|truncate(10) }}'});
-template.render({test: '01234567890123456789012345678901234567890123456789'}).should.equal("0123456789...");
-```
-
-should truncate string to custom size(15) with preserve and add default separator.
-
-```js
-var template = twig({data: '{{ test|truncate(15, true) }}'});
-template.render({test: '0123456789 0123456789 0123456789 0123456789 0123456789'}).should.equal("0123456789 0123456789...");
-```
-
-should truncate string to custom size(15) with preserve and add custom(*) separator.
-
-```js
-var template = twig({data: '{{ test|truncate(15, true, "*") }}'});
-template.render({test: '0123456789 0123456789 0123456789 0123456789 0123456789'}).should.equal("0123456789 0123456789*");
-```
-
-<a name="twigjs-filters---trim--"></a>
-## trim ->
-should trim whitespace from strings.
-
-```js
-var template = twig({data: '{{ test|trim }}'});
-template.render({ test: '\r\n Test\n ' }).should.equal("Test");
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|trim }}' });
-test_template.render().should.equal("" );
-```
-
-<a name="twigjs-filters---number_format--"></a>
-## number_format ->
-should round to nearest integer if no parameters.
-
-```js
-var template = twig({data: '{{ 1234.56|number_format }}'});
-template.render().should.equal("1,235");
-```
-
-should have customizable precision.
-
-```js
-var template = twig({data: '{{ 1234.567890123|number_format(4) }}'});
-template.render().should.equal("1,234.5679");
-```
-
-should have a customizable decimal seperator.
-
-```js
-var template = twig({data: '{{ 1234.567890123|number_format(2,",") }}'});
-template.render().should.equal("1,234,57");
-```
-
-should have a customizable thousands seperator.
-
-```js
-var template = twig({data: '{{ 1234.5678|number_format(2,","," ") }}'});
-template.render().should.equal("1 234,57");
-```
-
-should handle blank seperators.
-
-```js
-var template = twig({data: '{{ 1234.5678|number_format(2,"","") }}'});
-template.render().should.equal("123457");
-```
-
-should handle undefined.
-
-```js
-var test_template = twig({data: '{{ undef|number_format }}' });
-test_template.render().should.equal("0");
-```
-
-<a name="twigjs-filters---slice--"></a>
-## slice ->
-should slice a string.
-
-```js
-var test_template = twig({data: "{{ '12345'|slice(1, 2) }}" });
-test_template.render().should.equal("23");
-```
-
-should slice a string to the end.
-
-```js
-var test_template = twig({data: "{{ '12345'|slice(2) }}" });
-test_template.render().should.equal("345");
-```
-
-should slice a string from the start.
-
-```js
-var test_template = twig({data: "{{ '12345'|slice(null, 2) }}" });
-test_template.render().should.equal("12");
-```
-
-should slice a string from a negative offset.
-
-```js
-var test_template = twig({data: "{{ '12345'|slice(-2, 1) }}" });
-test_template.render().should.equal("4");
-```
-
-should slice a string from a negative offset to end of string.
-
-```js
-var test_template = twig({data: "{{ '12345'|slice(-2) }}" });
-test_template.render().should.equal("45");
-```
-
-should slice an array.
-
-```js
-var test_template = twig({data: "{{ [1, 2, 3, 4, 5]|slice(1, 2)|join(',') }}" });
-test_template.render().should.equal("2,3");
-```
-
-should slice an array to the end.
-
-```js
-var test_template = twig({data: "{{ [1, 2, 3, 4, 5]|slice(2)|join(',') }}" });
-test_template.render().should.equal("3,4,5");
-```
-
-should slice an array from the start.
-
-```js
-var test_template = twig({data: "{{ [1, 2, 3, 4, 5]|slice(null, 2)|join(',') }}" });
-test_template.render().should.equal("1,2");
-```
-
-should slice an array from a negative offset.
-
-```js
-var test_template = twig({data: "{{ [1, 2, 3, 4, 5]|slice(-2, 1)|join(',') }}" });
-test_template.render().should.equal("4");
-```
-
-should slice an array from a negative offset to the end of the array.
-
-```js
-var test_template = twig({data: "{{ [1, 2, 3, 4, 5]|slice(-4)|join(',') }}" });
-test_template.render().should.equal("2,3,4,5");
-```
-
-<a name="twigjs-filters---abs--"></a>
-## abs ->
-should convert negative numbers to its absolute value.
-
-```js
-var test_template = twig({data: "{{ '-7.365'|abs }}"});
-test_template.render().should.equal("7.365");
-```
-
-should not alter absolute numbers.
-
-```js
-var test_template = twig({data: "{{ 95|abs }}"});
-test_template.render().should.equal("95");
-```
-
-<a name="twigjs-filters---first--"></a>
-## first ->
-should return first item in array.
-
-```js
-var test_template = twig({data: "{{ ['a', 'b', 'c', 'd']|first }}"});
-test_template.render().should.equal("a");
-```
-
-should return first member of object.
-
-```js
-var test_template = twig({data: "{{ { item1: 'a', item2: 'b', item3: 'c', item4: 'd'}|first }}"});
-test_template.render().should.equal("a");
-```
-
-should not fail when passed empty obj, arr or str.
-
-```js
-var test_template = twig({data: "{{ {}|first }}"});
-test_template.render().should.equal("");
-var test_template = twig({data: "{{ []|first }}"});
-test_template.render().should.equal("");
-var test_template = twig({data: "{{ myemptystr|first }}"});
-test_template.render({myemptystr: ""}).should.equal("");
-```
-
-should return first character in string.
-
-```js
-var test_template = twig({data: "{{ 'abcde'|first }}"});
-test_template.render().should.equal("a");
-```
-
-<a name="twigjs-filters---split--"></a>
-## split ->
-should split string with a separator.
-
-```js
-var test_template = twig({data: "{{ 'one-two-three'|split('-') }}"});
-test_template.render().should.equal("one,two,three");
-```
-
-should split string with a separator and positive limit.
-
-```js
-var test_template = twig({data: "{{ 'one-two-three-four-five'|split('-', 3) }}"});
-test_template.render().should.equal("one,two,three-four-five");
-```
-
-should split string with a separator and negative limit.
-
-```js
-var test_template = twig({data: "{{ 'one-two-three-four-five'|split('-', -2) }}"});
-test_template.render().should.equal("one,two,three");
-```
-
-should split with empty separator.
-
-```js
-var test_template = twig({data: "{{ '123'|split('') }}"});
-test_template.render().should.equal("1,2,3");
-```
-
-should split with empty separator and limit.
-
-```js
-var test_template = twig({data: "{{ 'aabbcc'|split('', 2) }}"});
-test_template.render().should.equal("aa,bb,cc");
-```
-
-<a name="twigjs-filters---batch--"></a>
-## batch ->
-should work with arrays that require filling (with fill specified).
-
-```js
-var test_template = twig({data: "{{ ['a', 'b', 'c', 'd', 'e', 'f', 'g']|batch(3, 'x') }}"});
-test_template.render().should.equal("a,b,c,d,e,f,g,x,x");
-```
-
-should work with arrays that require filling (without fill specified).
-
-```js
-var test_template = twig({data: "{{ ['a', 'b', 'c', 'd', 'e', 'f', 'g']|batch(3) }}"});
-test_template.render().should.equal("a,b,c,d,e,f,g");
-```
-
-should work with arrays that do not require filling (with fill specified).
-
-```js
-var test_template = twig({data: "{{ ['a', 'b', 'c', 'd', 'e', 'f']|batch(3, 'x') }}"});
-test_template.render().should.equal("a,b,c,d,e,f");
-```
-
-should work with arrays that do not require filling (without fill specified).
-
-```js
-var test_template = twig({data: "{{ ['a', 'b', 'c', 'd', 'e', 'f']|batch(3) }}"});
-test_template.render().should.equal("a,b,c,d,e,f");
-```
-
-should return an empty result for an empty array.
-
-```js
-var test_template = twig({data: "{{ []|batch(3, 'x') }}"});
-test_template.render().should.equal("");
-```
-
-<a name="twigjs-filters---last--"></a>
-## last ->
-should return last character in string.
-
-```js
-var test_template = twig({data: "{{ 'abcd'|last }}"});
-test_template.render().should.equal("d");
-```
-
-should return last item in array.
-
-```js
-var test_template = twig({data: "{{ ['a', 'b', 'c', 'd']|last }}"});
-test_template.render().should.equal("d");
-```
-
-should return last item in a sorted object.
-
-```js
-var test_template = twig({data: "{{ {'m':1, 'z':5, 'a':3}|sort|last }}" });
-test_template.render().should.equal("5");
-```
-
-<a name="twigjs-filters---raw--"></a>
-## raw ->
-should output the raw value if autoescape is on.
-
-```js
-var template = twig({
- autoescape: true,
- data: '{{ value|raw }}'
-});
-template.render({
- value: "<test>&</test>"
-}).should.equal('<test>&</test>');
-```
-
-should output the raw value if autoescape is off.
-
-```js
-var template = twig({
- autoescape: false,
- data: '{{ value|raw }}'
-});
-template.render({
- value: "<test>&</test>"
-}).should.equal('<test>&</test>');
-```
-
-<a name="twigjs-filters---round--"></a>
-## round ->
-should round up (common).
-
-```js
-var test_template = twig({data: "{{ 2.7|round }}"});
-test_template.render().should.equal("3");
-```
-
-should round down (common).
-
-```js
-var test_template = twig({data: "{{ 2.1|round }}"});
-test_template.render().should.equal("2");
-```
-
-should truncate input when input decimal places exceeds precision (floor).
-
-```js
-var test_template = twig({data: "{{ 2.1234|round(3, 'floor') }}" });
-test_template.render().should.equal("2.123");
-```
-
-should round up (ceil).
-
-```js
-var test_template = twig({data: "{{ 2.1|round(0, 'ceil') }}" });
-test_template.render().should.equal("3");
-```
-
-should truncate precision when a negative precision is passed (common).
-
-```js
-var test_template = twig({data: "{{ 21.3|round(-1)}}" });
-test_template.render().should.equal("20");
-```
-
-should round up and truncate precision when a negative precision is passed (ceil).
-
-```js
-var test_template = twig({data: "{{ 21.3|round(-1, 'ceil')}}" });
-test_template.render().should.equal("30");
-```
-
-should round down and truncate precision when a negative precision is passed (floor).
-
-```js
-var test_template = twig({data: "{{ 21.3|round(-1, 'ceil')}}" });
-test_template.render().should.equal("30");
-```
-
-<a name="twigjs-loader--"></a>
-# Twig.js Loader ->
-should load a template from the filesystem asynchronously.
-
-```js
-twig({
- id: 'fs-node-async',
- path: 'test/templates/test.twig',
- load: function(template) {
- // Render the template
- template.render({
- test: "yes",
- flag: true
- }).should.equal("Test template = yes\n\nFlag set!");
- done();
- }
-});
-```
-
-should load a template from the filesystem synchronously.
-
-```js
-var template = twig({
- id: 'fs-node-sync',
- path: 'test/templates/test.twig',
- async: false
-});
-// Render the template
-template.render({
- test: "yes",
- flag: true
-}).should.equal("Test template = yes\n\nFlag set!");
-```
-
-<a name="twigjs-loader---source--"></a>
-## source ->
-should load the non-compiled template source code.
-
-```js
-twig({data: '{{ source("test/templates/source.twig") }}'})
- .render()
- .should
- .equal('{% if isUserNew == true %}\n Hello {{ name }}\n{% else %}\n Welcome back {{ name }}\n{% endif %}\n')
-;
-```
-
-should indicate if there was a problem loading the template if 'ignore_missing' is false.
-
-```js
-twig({data: '{{ source("test/templates/non-existing-source.twig", false) }}'})
- .render()
- .should
- .equal('Template "test/templates/non-existing-source.twig" is not defined.')
-;
-```
-
-should NOT indicate if there was a problem loading the template if 'ignore_missing' is true.
-
-```js
-twig({data: '{{ source("test/templates/non-existing-source.twig", true) }}'})
- .render()
- .should
- .equal('')
-;
-```
-
-<a name="twigjs-include--"></a>
-# Twig.js Include ->
-should load an included template with no context.
-
-```js
-twig({
- id: 'include',
- path: 'test/templates/include.twig',
- async: false
-});
-// Load the template
-twig({ref: 'include'}).render({test: 'tst'}).should.equal( "BeforeTest template = tst\n\nAfter" );
-```
-
-should load an included template with additional context.
-
-```js
-twig({
- id: 'include-with',
- path: 'test/templates/include-with.twig',
- async: false
-});
-// Load the template
-twig({ref: 'include-with'}).render({test: 'tst'}).should.equal( "template: before,tst-mid-template: after,tst" );
-```
-
-should load an included template with only additional context.
-
-```js
-twig({
- id: 'include-only',
- path: 'test/templates/include-only.twig',
- async: false
-});
-// Load the template
-twig({ref: 'include-only'}).render({test: 'tst'}).should.equal( "template: before,-mid-template: after," );
-```
-
-<a name="twigjs-functions--"></a>
-# Twig.js Functions ->
-should allow you to define a function.
-
-```js
-twig({data: '{{ square(a) }}'}).render({a:4}).should.equal("16");
-```
-
-should chain with other expressions.
-
-```js
-twig({data: '{{ square(a) + 4 }}'}).render({a:4}).should.equal("20");
-```
-
-should chain with filters.
-
-```js
-twig({data: '{{ echo(a)|default("foo") }}'}).render().should.equal("foo");
-```
-
-should work in for loop expressions.
-
-```js
-twig({data: '{% for i in list(1, 2, 3) %}{{ i }},{% endfor %}'}).render().should.equal("1,2,3,");
-```
-
-should be able to differentiate between a function and a variable.
-
-```js
-twig({data: '{{ square ( square ) + square }}'}).render({square: 2}).should.equal("6");
-```
-
-should work with boolean operations.
-
-```js
-twig({data: '{% if echo(true) or echo(false) %}yes{% endif %}'}).render().should.equal("yes");
-```
-
-should execute functions passed as context values.
-
-```js
-twig({
- data: '{{ value }}'
-}).render({
- value: function() {
- return "test";
- }
-}).should.equal("test");
-```
-
-should execute functions passed as context values with this mapped to the context.
-
-```js
-twig({
- data: '{{ value }}'
-}).render({
- test: "value",
- value: function() {
- return this.test;
- }
-}).should.equal("value");
-```
-
-should execute functions passed as context values with arguments.
-
-```js
-twig({
- data: '{{ value(1, "test") }}'
-}).render({
- value: function(a, b, c) {
- return a + "-" + b + "-" + (c===undefined?"true":"false");
- }
-}).should.equal("1-test-true");
-```
-
-should execute functions passed as context value parameters with this mapped to the context.
-
-```js
-twig({
- data: '{{ value }}'
-}).render({
- test: "value",
- value: function() {
- return this.test;
- }
-}).should.equal("value");
-```
-
-should execute functions passed as context object parameters.
-
-```js
-twig({
- data: '{{ obj.value }}'
-}).render({
- obj: {
- value: function() {
- return "test";
- }
- }
-}).should.equal("test");
-```
-
-should execute functions passed as context object parameters with arguments.
-
-```js
-twig({
- data: '{{ obj.value(1, "test") }}'
-}).render({
- obj: {
- value: function(a, b, c) {
- return a + "-" + b + "-" + (c===undefined?"true":"false");
- }
- }
-}).should.equal("1-test-true");
-```
-
-should execute functions passed as context object parameters.
-
-```js
-twig({
- data: '{{ obj["value"] }}'
-}).render({
- obj: {
- value: function() {
- return "test";
- }
- }
-}).should.equal("test");
-```
-
-should execute functions passed as context object parameters with arguments.
-
-```js
-twig({
- data: '{{ obj["value"](1, "test") }}'
-}).render({
- obj: {
- value: function(a, b, c) {
- return a + "-" + b + "-" + (c===undefined?"true":"false");
- }
- }
-}).should.equal("1-test-true");
-```
-
-<a name="twigjs-functions---built-in-functions--"></a>
-## Built-in Functions ->
-<a name="twigjs-functions---built-in-functions---range--"></a>
-### range ->
-should work over a range of numbers.
-
-```js
-twig({data: '{% for i in range(0, 3) %}{{ i }},{% endfor %}'}).render().should.equal("0,1,2,3,");
-```
-
-should work over a range of letters.
-
-```js
-twig({data: '{% for i in range("a", "c") %}{{ i }},{% endfor %}'}).render().should.equal("a,b,c,");
-```
-
-should work with an interval.
-
-```js
-twig({data: '{% for i in range(1, 15, 3) %}{{ i }},{% endfor %}'}).render().should.equal("1,4,7,10,13,");
-```
-
-should work with .. invocation.
-
-```js
-twig({data: '{% for i in 0..3 %}{{ i }},{% endfor %}'}).render().should.equal("0,1,2,3,");
-twig({data: '{% for i in "a" .. "c" %}{{ i }},{% endfor %}'}).render().should.equal("a,b,c,");
-```
-
-<a name="twigjs-functions---built-in-functions---cycle--"></a>
-### cycle ->
-should cycle through an array of values.
-
-```js
-twig({data: '{% for i in range(0, 3) %}{{ cycle(["odd", "even"], i) }};{% endfor %}'}).render().should.equal("odd;even;odd;even;");
-```
-
-<a name="twigjs-functions---built-in-functions---date--"></a>
-### date ->
-should understand timestamps.
-
-```js
-var date = new Date(946706400 * 1000);
-twig({data: '{{ date(946706400)|date("d/m/Y @ H:i:s") }}'}).render().should.equal(stringDate(date));
-```
-
-should understand relative dates.
-
-```js
-twig({data: '{{ date("+1 day") > date() }}'}).render().should.equal("true");
-twig({data: '{{ date("-1 day") > date() }}'}).render().should.equal("false");
-```
-
-should support 'now' as a date parameter.
-
-```js
-twig({data: '{{ date("now") }}' }).render().should.equal(new Date().toString());
-```
-
-should understand exact dates.
-
-```js
-var date = new Date("June 20, 2010 UTC");
-
-twig({data: '{{ date("June 20, 2010 UTC")|date("d/m/Y @ H:i:s") }}'}).render().should.equal(stringDate(date));
-```
-
-<a name="twigjs-functions---built-in-functions---dump--"></a>
-### dump ->
-should output formatted number.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: 5 }).should.equal('number(5)' + EOL);
-```
-
-should output formatted string.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: "String" }).should.equal('string(6) "String"' + EOL);
-```
-
-should output formatted boolean.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: true }).should.equal('bool(true)' + EOL);
-```
-
-should output formatted null.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: null }).should.equal('NULL' + EOL);
-```
-
-should output formatted object.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: {} }).should.equal('object(0) {' + EOL + '}' + EOL);
-```
-
-should output formatted array.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: [] }).should.equal('object(0) {' + EOL + '}' + EOL);
-```
-
-should output formatted undefined.
-
-```js
-twig({data: '{{ dump(test) }}' }).render({ test: undefined }).should.equal('undefined' + EOL);
-```
-
-<a name="twigjs-functions---built-in-functions---block--"></a>
-### block ->
-should render the content of blocks.
-
-```js
-twig({data: '{% block title %}Content - {{ val }}{% endblock %} Title: {{ block("title") }}'}).render({ val: "test" })
- .should.equal("Content - test Title: Content - test");
-```
-
-shouldn't escape the content of blocks twice.
-
-```js
-twig({
- autoescape: true,
- data: '{% block test %}{{ val }}{% endblock %} {{ block("test") }}'
-}).render({
- val: "te&st"
-}).should.equal("te&amp;st te&amp;st");
-```
-
-<a name="twigjs-functions---built-in-functions---attribute--"></a>
-### attribute ->
-should access attribute of an object.
-
-```js
-twig({data: '{{ attribute(obj, key) }}' }).render({
- obj: { name: "Twig.js"},
- key: "name"
-})
-.should.equal("Twig.js");
-```
-
-should call function of attribute of an object.
-
-```js
-twig({data: '{{ attribute(obj, key, params) }}' }).render({
- obj: {
- name: function(first, last) {
- return first+'.'+last;
- }
- },
- key: "name",
- params: ['Twig', 'js']
- })
- .should.equal("Twig.js");
-```
-
-should return undefined for missing attribute of an object.
-
-```js
-twig({data: '{{ attribute(obj, key, params) }}' }).render({
- obj: {
- name: function(first, last) {
- return first+'.'+last;
- }
- },
- key: "missing",
- params: ['Twig', 'js']
- })
- .should.equal("");
-```
-
-should return element of an array.
-
-```js
-twig({data: '{{ attribute(arr, 0) }}' }).render({
- arr: ['Twig', 'js']
- })
- .should.equal("Twig");
-```
-
-should return undef for array beyond index size.
-
-```js
-twig({data: '{{ attribute(arr, 100) }}' }).render({
- arr: ['Twig', 'js']
- })
- .should.equal("");
-```
-
-<a name="twigjs-functions---built-in-functions---template_from_string--"></a>
-### template_from_string ->
-should load a template from a string.
-
-```js
-twig({data: '{% include template_from_string("{{ value }}") %}'}).render({
- value: 'test'
-})
-.should.equal('test');
-```
-
-should load a template from a variable.
-
-```js
-twig({data: '{% include template_from_string(template) %}'}).render({
- template: '{{ value }}',
- value: 'test'
-})
-.should.equal('test');
-```
-
-<a name="twigjs-functions---built-in-functions---random--"></a>
-### random ->
-should return a random item from a traversable or array.
-
-```js
-var arr = "bcdefghij".split("");
-for (var i = 1; i <= 1000; i++) {
- arr.should.containEql(twig({data: '{{ random(arr) }}'}).render({arr: arr}));
-}
-```
-
-should return a random character from a string.
-
-```js
-var str = "abcdefghij";
-for (var i = 1; i <= 1000; i++) {
- str.should.containEql(twig({data: '{{ random(str) }}'}).render({str: str}));
-}
-```
-
-should return a random integer between 0 and the integer parameter.
-
-```js
-for (var i = 1; i <= 1000; i++) {
- twig({data: '{{ random(10) }}'}).render().should.be.within(0, 10);
-}
-```
-
-should return a random integer between 0 and 2147483647 when no parameters are passed.
-
-```js
-for (var i = 1; i <= 1000; i++) {
- twig({data: '{{ random() }}'}).render().should.be.within(0, 2147483647);
-}
-```
-
-<a name="twigjs-functions---built-in-functions---min-max--"></a>
-### min, max ->
-should support the 'min' function.
-
-```js
-twig({data: '{{ min(2, 1, 3, 5, 4) }}'}).render().should.equal('1');
-twig({data: '{{ min([2, 1, 3, 5, 4]) }}'}).render().should.equal('1');
-twig({data: '{{ min({2:"two", 1:"one", 3:"three", 5:"five", 4:"four"}) }}'}).render().should.equal('five');
-```
-
-should support the 'max' function.
-
-```js
-twig({data: '{{ max([2, 1, 3, 5, 4]) }}'}).render().should.equal('5');
-twig({data: '{{ max(2, 1, 3, 5, 4) }}'}).render().should.equal('5');
-twig({data: '{{ max({2:"two", 1:"one", 3:"three", 5:"five", 4:"four"}) }}'}).render().should.equal('two');
-```
-
-<a name="twigjs-loaders--"></a>
-# Twig.js Loaders ->
-<a name="twigjs-loaders---custom-loader--"></a>
-## custom loader ->
-should define a custom loader.
-
-```js
-Twig.extend(function(Twig) {
- var obj = {
- templates: {
- 'custom_loader_block': '{% block main %}This lets you {% block data %}use blocks{% endblock data %}{% endblock main %}',
- 'custom_loader_simple': 'the value is: {{ value }}',
- 'custom_loader_include': 'include others from the same loader method - {% include "custom_loader_simple" %}',
- 'custom_loader_complex': '{% extends "custom_loader_block" %} {% block data %}extend other templates and {% include "custom_loader_include" %}{% endblock data %}'
- },
- loader: function(location, params, callback, error_callback) {
- params.data = this.templates[location];
- params.allowInlineIncludes = true;
- var template = new Twig.Template(params);
- if (typeof callback === 'function') {
- callback(template);
- }
- return template;
- }
- };
- Twig.Templates.registerLoader('custom', obj.loader, obj);
- Twig.Templates.loaders.should.have.property('custom');
-});
-```
-
-should load a simple template from a custom loader.
-
-```js
-twig({
- method: 'custom',
- name: 'custom_loader_simple'
-}).render({value: 'test succeeded'}).should.equal('the value is: test succeeded');
-```
-
-should load a template that includes another from a custom loader.
-
-```js
-twig({
- method: 'custom',
- name: 'custom_loader_include'
-}).render({value: 'test succeeded'}).should.equal('include others from the same loader method - the value is: test succeeded');
-```
-
-should load a template that extends another from a custom loader.
-
-```js
-twig({
- method: 'custom',
- name: 'custom_loader_complex'
-}).render({value: 'test succeeded'}).should.equal('This lets you extend other templates and include others from the same loader method - the value is: test succeeded');
-```
-
-should remove a registered loader.
-
-```js
-Twig.extend(function(Twig) {
- Twig.Templates.unRegisterLoader('custom');
- Twig.Templates.loaders.should.not.have.property('custom');
-});
-```
-
-<a name="twigjs-macro--"></a>
-# Twig.js Macro ->
-it should load macro.
-
-```js
-twig({
- id: 'macro',
- path: 'test/templates/macro.twig',
- async: false
-});
-// Load the template
-twig({ref: 'macro'}).render({ }).should.equal( '' );
-```
-
-it should import macro.
-
-```js
-twig({
- id: 'import-macro',
- path: 'test/templates/import.twig',
- async: false
-});
-// Load the template
-twig({ref: 'import-macro'}).render({ }).trim().should.equal( "Hello World" );
-```
-
-it should run macro with self reference.
-
-```js
-twig({
- id: 'import-macro-self',
- path: 'test/templates/macro-self.twig',
- async: false
-});
-// Load the template
-twig({ref: 'import-macro-self'}).render({ }).trim().should.equal( '<p><input type="text" name="username" value="" size="20" /></p>' );
-```
-
-it should run wrapped macro with self reference.
-
-```js
-twig({
- id: 'import-wrapped-macro-self',
- path: 'test/templates/macro-wrapped.twig',
- async: false
-});
-// Load the template
-twig({ref: 'import-wrapped-macro-self'}).render({ }).trim().should.equal( '<p><div class="field"><input type="text" name="username" value="" size="20" /></div></p>' );
-```
-
-it should run wrapped macro with context and self reference.
-
-```js
-twig({
- id: 'import-macro-context-self',
- path: 'test/templates/macro-context.twig',
- async: false
-});
-// Load the template
-twig({ref: 'import-macro-context-self'}).render({ 'greetings': 'Howdy' }).trim().should.equal( 'Howdy Twigjs' );
-```
-
-it should run wrapped macro inside blocks.
-
-```js
-twig({
- id: 'import-macro-inside-block',
- path: 'test/templates/macro-blocks.twig',
- async: false
-});
-// Load the template
-twig({ref: 'import-macro-inside-block'}).render({ }).trim().should.equal( 'Welcome <div class="name">Twig Js</div>' );
-```
-
-it should import selected macros from template.
-
-```js
-twig({
- id: 'from-macro-import',
- path: 'test/templates/from.twig',
- async: false
-});
-// Load the template
-twig({ref: 'from-macro-import'}).render({ }).trim().should.equal( 'Twig.js<div class="field"><input type="text" name="text" value="" size="20" /></div><div class="field red"><input type="text" name="password" value="" size="20" /></div>' );
-```
-
-should support inline includes by ID.
-
-```js
-twig({
- id: 'hello',
- data: '{% macro echo(name) %}Hello {{ name }}{% endmacro %}'
-});
-var template = twig({
- allowInlineIncludes: true,
- data: 'template with {% from "hello" import echo %}{{ echo("Twig.js") }}'
- }),
- output = template.render()
-output.should.equal("template with Twig.js");
-```
-
-<a name="twigjs-namespaces--"></a>
-# Twig.js Namespaces ->
-should support namespaces defined with ::.
-
-```js
-twig({
- namespaces: { 'test': 'test/templates/namespaces/' },
- path: 'test/templates/namespaces_::.twig',
- load: function(template) {
- // Render the template
- template.render({
- test: "yes",
- flag: true
- }).should.equal("namespaces");
-
- done();
- }
- });
-```
-
-should support namespaces defined with @.
-
-```js
-twig({
- namespaces: { 'test': 'test/templates/namespaces/' },
- path: 'test/templates/namespaces_@.twig',
- load: function(template) {
- // Render the template
- template.render({
- test: "yes",
- flag: true
- }).should.equal("namespaces");
-
- done();
- }
- });
-```
-
-<a name="twigjs-optional-functionality--"></a>
-# Twig.js Optional Functionality ->
-should support inline includes by ID.
-
-```js
-twig({
- id: 'other',
- data: 'another template'
-});
-var template = twig({
- allowInlineIncludes: true,
- data: 'template with {% include "other" %}'
- }),
- output = template.render()
-output.should.equal("template with another template");
-```
-
-<a name="twigjs-parsers--"></a>
-# Twig.js Parsers ->
-<a name="twigjs-parsers---custom-parser--"></a>
-## custom parser ->
-should define a custom parser.
-
-```js
-Twig.extend(function(Twig) {
- var parser = function(params) {
- return '[CUSTOM PARSER] ' + params.data;
- };
- Twig.Templates.registerParser('custom', parser);
- Twig.Templates.parsers.should.have.property('custom');
-});
-```
-
-should run the data through the custom parser.
-
-```js
-Twig.extend(function(Twig) {
- var params = {
- data: 'This is a test template.'
- };
- var template = Twig.Templates.parsers.custom(params);
- template.should.equal('[CUSTOM PARSER] This is a test template.');
-});
-```
-
-should remove a registered parser.
-
-```js
-Twig.extend(function(Twig) {
- Twig.Templates.unRegisterParser('custom');
- Twig.Templates.parsers.should.not.have.property('custom');
-});
-```
-
-<a name="twigjs-path--"></a>
-# Twig.js Path ->
-<a name="twigjs-path---relativepath--"></a>
-## relativePath ->
-should throw an error if trying to get a relative path in an inline template.
-
-```js
-(function () {
- relativePath({});
-}).should.throw("Cannot extend an inline template.");
-```
-
-should give the full path to a file when file is passed.
-
-```js
-relativePath({ url: "http://www.test.com/test.twig"}, "templates/myFile.twig").should.equal("http://www.test.com/templates/myFile.twig");
-relativePath({ path: "test/test.twig"}, "templates/myFile.twig").should.equal("test/templates/myFile.twig");
-```
-
-should ascend directories.
-
-```js
-relativePath({ url: "http://www.test.com/templates/../test.twig"}, "myFile.twig").should.equal("http://www.test.com/myFile.twig");
-relativePath({ path: "test/templates/../test.twig"}, "myFile.twig").should.equal("test/myFile.twig");
-```
-
-should respect relative directories.
-
-```js
-relativePath({ url: "http://www.test.com/templates/./test.twig"}, "myFile.twig").should.equal("http://www.test.com/templates/myFile.twig");
-relativePath({ path: "test/templates/./test.twig"}, "myFile.twig").should.equal("test/templates/myFile.twig");
-```
-
-<a name="twigjs-path---relativepath---url--"></a>
-### url ->
-should use the url if no base is specified.
-
-```js
-relativePath({ url: "http://www.test.com/test.twig"}).should.equal("http://www.test.com/");
-```
-
-should use the base if base is specified.
-
-```js
-relativePath({ url: "http://www.test.com/test.twig", base: "myTest" }).should.equal("myTest/");
-```
-
-<a name="twigjs-path---relativepath---path--"></a>
-### path ->
-should use the path if no base is specified.
-
-```js
-relativePath({ path: "test/test.twig"}).should.equal("test/");
-```
-
-should use the base if base is specified.
-
-```js
-relativePath({ path: "test/test.twig", base: "myTest" }).should.equal("myTest/");
-```
-
-<a name="twigjs-path---parsepath--"></a>
-## parsePath ->
-should fall back to relativePath if the template has no namespaces defined.
-
-```js
-var relativePathStub = sinon.stub(Twig.path, "relativePath");
-parsePath({ options: {} });
-relativePathStub.should.have.been.called;
-```
-
-<a name="twigjs-regression-tests--"></a>
-# Twig.js Regression Tests ->
-#47 should not match variables starting with not.
-
-```js
-// Define and save a template
-twig({data: '{% for note in notes %}{{note}}{% endfor %}'}).render({notes:['a', 'b', 'c']}).should.equal("abc");
-```
-
-#56 functions work inside parentheses.
-
-```js
-// Define and save a template
-Twig.extendFunction('custom', function(value) {
- return true;
-});
-twig({data: '{% if (custom("val") and custom("val")) %}out{% endif %}'}).render({}).should.equal("out");
-```
-
-#83 Support for trailing commas in arrays.
-
-```js
-twig({data: '{{ [1,2,3,4,] }}'}).render().should.equal("1,2,3,4");
-```
-
-#83 Support for trailing commas in objects.
-
-```js
-twig({data: '{{ {a:1, b:2, c:3, } }}'}).render();
-```
-
-#283 should support quotes between raw tags.
-
-```js
-twig({data: '{% raw %}\n"\n{% endraw %}'}).render().should.equal('"');
-twig({data: "{% raw %}\n'\n{% endraw %}"}).render().should.equal("'");
-```
-
-<a name="twigjs-tags--"></a>
-# Twig.js Tags ->
-should support spaceless.
-
-```js
-twig({
- data: "{% spaceless %}<div>\n <b>b</b> <i>i</i>\n</div>{% endspaceless %}"
-}).render().should.equal(
- "<div><b>b</b><i>i</i></div>"
-);
-```
-
-<a name="twigjs-tests--"></a>
-# Twig.js Tests ->
-<a name="twigjs-tests---empty-test--"></a>
-## empty test ->
-should identify numbers as not empty.
-
-```js
-// number
-twig({data: '{{ 1 is empty }}'}).render().should.equal("false" );
-twig({data: '{{ 0 is empty }}'}).render().should.equal("false" );
-```
-
-should identify empty strings.
-
-```js
-// String
-twig({data: '{{ "" is empty }}'}).render().should.equal("true" );
-twig({data: '{{ "test" is empty }}'}).render().should.equal("false" );
-```
-
-should identify empty arrays.
-
-```js
-// Array
-twig({data: '{{ [] is empty }}'}).render().should.equal("true" );
-twig({data: '{{ ["1"] is empty }}'}).render().should.equal("false" );
-```
-
-should identify empty objects.
-
-```js
-// Object
-twig({data: '{{ {} is empty }}'}).render().should.equal("true" );
-twig({data: '{{ {"a":"b"} is empty }}'}).render().should.equal("false" );
-twig({data: '{{ {"a":"b"} is not empty }}'}).render().should.equal("true" );
-```
-
-<a name="twigjs-tests---odd-test--"></a>
-## odd test ->
-should identify a number as odd.
-
-```js
-twig({data: '{{ (1 + 4) is odd }}'}).render().should.equal("true" );
-twig({data: '{{ 6 is odd }}'}).render().should.equal("false" );
-```
-
-<a name="twigjs-tests---even-test--"></a>
-## even test ->
-should identify a number as even.
-
-```js
-twig({data: '{{ (1 + 4) is even }}'}).render().should.equal("false" );
-twig({data: '{{ 6 is even }}'}).render().should.equal("true" );
-```
-
-<a name="twigjs-tests---divisibleby-test--"></a>
-## divisibleby test ->
-should determine if a number is divisible by the given number.
-
-```js
-twig({data: '{{ 5 is divisibleby(3) }}'}).render().should.equal("false" );
-twig({data: '{{ 6 is divisibleby(3) }}'}).render().should.equal("true" );
-```
-
-<a name="twigjs-tests---defined-test--"></a>
-## defined test ->
-should identify a key as defined if it exists in the render context.
-
-```js
-twig({data: '{{ key is defined }}'}).render().should.equal("false" );
-twig({data: '{{ key is defined }}'}).render({key: "test"}).should.equal( "true" );
-var context = {
- key: {
- foo: "bar",
- nothing: null
- },
- nothing: null
-};
-twig({data: '{{ key.foo is defined }}'}).render(context).should.equal( "true" );
-twig({data: '{{ key.bar is defined }}'}).render(context).should.equal( "false" );
-twig({data: '{{ key.foo.bar is defined }}'}).render(context).should.equal( "false" );
-twig({data: '{{ foo.bar is defined }}'}).render(context).should.equal( "false" );
-twig({data: '{{ nothing is defined }}'}).render(context).should.equal( "true" );
-twig({data: '{{ key.nothing is defined }}'}).render(context).should.equal( "true" );
-```
-
-<a name="twigjs-tests---none-test--"></a>
-## none test ->
-should identify a key as none if it exists in the render context and is null.
-
-```js
-twig({data: '{{ key is none }}'}).render().should.equal("false");
-twig({data: '{{ key is none }}'}).render({key: "test"}).should.equal("false");
-twig({data: '{{ key is none }}'}).render({key: null}).should.equal("true");
-twig({data: '{{ key is null }}'}).render({key: null}).should.equal("true");
-```
-
-<a name="twigjs-tests---sameas-test--"></a>
-## sameas test ->
-should identify the exact same type as true.
-
-```js
-twig({data: '{{ true is sameas(true) }}'}).render().should.equal("true");
-twig({data: '{{ a is sameas(1) }}'}).render({a: 1}).should.equal("true");
-twig({data: '{{ a is sameas("test") }}'}).render({a: "test"}).should.equal("true");
-twig({data: '{{ a is sameas(true) }}'}).render({a: true}).should.equal("true");
-```
-
-should identify the different types as false.
-
-```js
-twig({data: '{{ false is sameas(true) }}'}).render().should.equal("false");
-twig({data: '{{ true is sameas(1) }}'}).render().should.equal("false");
-twig({data: '{{ false is sameas("") }}'}).render().should.equal("false");
-twig({data: '{{ a is sameas(1) }}'}).render({a: "1"}).should.equal("false");
-```
-
-<a name="twigjs-tests---iterable-test--"></a>
-## iterable test ->
-should fail on non-iterable data types.
-
-```js
-twig({data: "{{ val is iterable ? 'ok' : 'ko' }}"}).render(data).should.equal("ko");
-twig({data: "{{ val is iterable ? 'ok' : 'ko' }}"}).render({val: null}).should.equal("ko");
-twig({data: "{{ val is iterable ? 'ok' : 'ko' }}"}).render({}).should.equal("ko");
-```
-
-should pass on iterable data types.
-
-```js
-twig({data: "{{ foo is iterable ? 'ok' : 'ko' }}"}).render(data).should.equal("ok");
-twig({data: "{{ obj is iterable ? 'ok' : 'ko' }}"}).render(data).should.equal("ok");
-```
-
diff --git a/node_modules/twig/docs/twig.html b/node_modules/twig/docs/twig.html
deleted file mode 100644
index 687abbd..0000000
--- a/node_modules/twig/docs/twig.html
+++ /dev/null
@@ -1,11250 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
- <title>twig.js</title>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
- <link rel="stylesheet" media="all" href="docco.css" />
-</head>
-<body>
- <div id="container">
- <div id="background"></div>
-
- <ul class="sections">
-
- <li id="title">
- <div class="annotation">
- <h1>twig.js</h1>
- </div>
- </li>
-
-
-
- <li id="section-1">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-1">&#182;</a>
- </div>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-comment">/**
- * Twig.js 0.8.9
- *
- * @copyright 2011-2015 John Roepke and the Twig.js Contributors
- * @license Available under the BSD 2-Clause License
- * @link https://github.com/justjohn/twig.js
- */</span>
-
-<span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-
- Twig.VERSION = <span class="hljs-string">"0.8.9"</span>;
-
- <span class="hljs-keyword">return</span> Twig;
-})(Twig || {});</pre></div></div>
-
- </li>
-
-
- <li id="section-2">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-2">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- <div class="content"><div class='highlight'><pre>
-<span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-3">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-3">&#182;</a>
- </div>
- <h2 id="twig-core-js">twig.core.js</h2>
-<p>This file handles template level tokenizing, compiling and parsing.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- Twig.trace = <span class="hljs-literal">false</span>;
- Twig.debug = <span class="hljs-literal">false</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-4">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-4">&#182;</a>
- </div>
- <p>Default caching to true for the improved performance it offers</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.cache = <span class="hljs-literal">true</span>;
-
- Twig.placeholders = {
- parent: <span class="hljs-string">"{{|PARENT|}}"</span>
- };
-
- <span class="hljs-comment">/**
- * Fallback for Array.indexOf for IE8 et al
- */</span>
- Twig.indexOf = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">arr, searchElement <span class="hljs-comment">/*, fromIndex */</span> </span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Array</span>.prototype.hasOwnProperty(<span class="hljs-string">"indexOf"</span>)) {
- <span class="hljs-keyword">return</span> arr.indexOf(searchElement);
- }
- <span class="hljs-keyword">if</span> (arr === <span class="hljs-keyword">void</span> <span class="hljs-number">0</span> || arr === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">TypeError</span>();
- }
- <span class="hljs-keyword">var</span> t = <span class="hljs-built_in">Object</span>(arr);
- <span class="hljs-keyword">var</span> len = t.length &gt;&gt;&gt; <span class="hljs-number">0</span>;
- <span class="hljs-keyword">if</span> (len === <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
- <span class="hljs-keyword">var</span> n = <span class="hljs-number">0</span>;
- <span class="hljs-keyword">if</span> (<span class="hljs-built_in">arguments</span>.length &gt; <span class="hljs-number">0</span>) {
- n = <span class="hljs-built_in">Number</span>(<span class="hljs-built_in">arguments</span>[<span class="hljs-number">1</span>]);
- <span class="hljs-keyword">if</span> (n !== n) { <span class="hljs-comment">// shortcut for verifying if it's NaN</span>
- n = <span class="hljs-number">0</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (n !== <span class="hljs-number">0</span> &amp;&amp; n !== <span class="hljs-literal">Infinity</span> &amp;&amp; n !== -<span class="hljs-literal">Infinity</span>) {
- n = (n &gt; <span class="hljs-number">0</span> || <span class="hljs-number">-1</span>) * <span class="hljs-built_in">Math</span>.floor(<span class="hljs-built_in">Math</span>.abs(n));
- }
- }
- <span class="hljs-keyword">if</span> (n &gt;= len) {</pre></div></div>
-
- </li>
-
-
- <li id="section-5">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-5">&#182;</a>
- </div>
- <p>console.log(“indexOf not found1 “, JSON.stringify(searchElement), JSON.stringify(arr));</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
- <span class="hljs-keyword">var</span> k = n &gt;= <span class="hljs-number">0</span> ? n : <span class="hljs-built_in">Math</span>.max(len - <span class="hljs-built_in">Math</span>.abs(n), <span class="hljs-number">0</span>);
- <span class="hljs-keyword">for</span> (; k &lt; len; k++) {
- <span class="hljs-keyword">if</span> (k <span class="hljs-keyword">in</span> t &amp;&amp; t[k] === searchElement) {
- <span class="hljs-keyword">return</span> k;
- }
- }
- <span class="hljs-keyword">if</span> (arr == searchElement) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-6">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-6">&#182;</a>
- </div>
- <p>console.log(“indexOf not found2 “, JSON.stringify(searchElement), JSON.stringify(arr));</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
-
- Twig.forEach = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">arr, callback, thisArg</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Array</span>.prototype.forEach ) {
- <span class="hljs-keyword">return</span> arr.forEach(callback, thisArg);
- }
-
- <span class="hljs-keyword">var</span> T, k;
-
- <span class="hljs-keyword">if</span> ( arr == <span class="hljs-literal">null</span> ) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">TypeError</span>( <span class="hljs-string">" this is null or not defined"</span> );
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-7">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-7">&#182;</a>
- </div>
- <ol>
-<li>Let O be the result of calling ToObject passing the |this| value as the argument.</li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> O = <span class="hljs-built_in">Object</span>(arr);</pre></div></div>
-
- </li>
-
-
- <li id="section-8">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-8">&#182;</a>
- </div>
- <ol>
-<li>Let lenValue be the result of calling the Get internal method of O with the argument “length”.</li>
-<li>Let len be ToUint32(lenValue).</li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> len = O.length &gt;&gt;&gt; <span class="hljs-number">0</span>; <span class="hljs-comment">// Hack to convert O.length to a UInt32</span></pre></div></div>
-
- </li>
-
-
- <li id="section-9">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-9">&#182;</a>
- </div>
- <ol>
-<li>If IsCallable(callback) is false, throw a TypeError exception.
-See: <a href="http://es5.github.com/#x9.11">http://es5.github.com/#x9.11</a></li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> ( {}.toString.call(callback) != <span class="hljs-string">"[object Function]"</span> ) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">TypeError</span>( callback + <span class="hljs-string">" is not a function"</span> );
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-10">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-10">&#182;</a>
- </div>
- <ol>
-<li>If thisArg was supplied, let T be thisArg; else let T be undefined.</li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> ( thisArg ) {
- T = thisArg;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-11">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-11">&#182;</a>
- </div>
- <ol>
-<li>Let k be 0</li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> k = <span class="hljs-number">0</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-12">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-12">&#182;</a>
- </div>
- <ol>
-<li>Repeat, while k &lt; len</li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span>( k &lt; len ) {
-
- <span class="hljs-keyword">var</span> kValue;</pre></div></div>
-
- </li>
-
-
- <li id="section-13">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-13">&#182;</a>
- </div>
- <p>a. Let Pk be ToString(k).
- This is implicit for LHS operands of the in operator
-b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
- This step can be combined with c
-c. If kPresent is true, then</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> ( k <span class="hljs-keyword">in</span> O ) {</pre></div></div>
-
- </li>
-
-
- <li id="section-14">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-14">&#182;</a>
- </div>
- <p>i. Let kValue be the result of calling the Get internal method of O with argument Pk.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> kValue = O[ k ];</pre></div></div>
-
- </li>
-
-
- <li id="section-15">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-15">&#182;</a>
- </div>
- <p>ii. Call the Call internal method of callback with T as the this value and
-argument list containing kValue, k, and O.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> callback.call( T, kValue, k, O );
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-16">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-16">&#182;</a>
- </div>
- <p>d. Increase k by 1.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> k++;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-17">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-17">&#182;</a>
- </div>
- <ol>
-<li>return undefined</li>
-</ol>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> };
-
- Twig.merge = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">target, source, onlyChanged</span>) </span>{
- Twig.forEach(<span class="hljs-built_in">Object</span>.keys(source), <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">key</span>) </span>{
- <span class="hljs-keyword">if</span> (onlyChanged &amp;&amp; !(key <span class="hljs-keyword">in</span> target)) {
- <span class="hljs-keyword">return</span>;
- }
-
- target[key] = source[key]
- });
-
- <span class="hljs-keyword">return</span> target;
- };
-
- <span class="hljs-comment">/**
- * Exception thrown by twig.js.
- */</span>
- Twig.Error = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">message</span>) </span>{
- <span class="hljs-keyword">this</span>.message = message;
- <span class="hljs-keyword">this</span>.name = <span class="hljs-string">"TwigException"</span>;
- <span class="hljs-keyword">this</span>.type = <span class="hljs-string">"TwigException"</span>;
- };
-
- <span class="hljs-comment">/**
- * Get the string representation of a Twig error.
- */</span>
- Twig.Error.prototype.toString = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> output = <span class="hljs-keyword">this</span>.name + <span class="hljs-string">": "</span> + <span class="hljs-keyword">this</span>.message;
-
- <span class="hljs-keyword">return</span> output;
- };
-
- <span class="hljs-comment">/**
- * Wrapper for logging to the console.
- */</span>
- Twig.log = {
- trace: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{<span class="hljs-keyword">if</span> (Twig.trace &amp;&amp; <span class="hljs-built_in">console</span>) {<span class="hljs-built_in">console</span>.log(<span class="hljs-built_in">Array</span>.prototype.slice.call(<span class="hljs-built_in">arguments</span>));}},
- debug: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{<span class="hljs-keyword">if</span> (Twig.debug &amp;&amp; <span class="hljs-built_in">console</span>) {<span class="hljs-built_in">console</span>.log(<span class="hljs-built_in">Array</span>.prototype.slice.call(<span class="hljs-built_in">arguments</span>));}}
- };
-
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">console</span> !== <span class="hljs-string">"undefined"</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">console</span>.error !== <span class="hljs-string">"undefined"</span>) {
- Twig.log.error = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-built_in">console</span>.error.apply(<span class="hljs-built_in">console</span>, <span class="hljs-built_in">arguments</span>);
- }
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">console</span>.log !== <span class="hljs-string">"undefined"</span>) {
- Twig.log.error = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-built_in">console</span>.log.apply(<span class="hljs-built_in">console</span>, <span class="hljs-built_in">arguments</span>);
- }
- }
- } <span class="hljs-keyword">else</span> {
- Twig.log.error = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{};
- }
-
- <span class="hljs-comment">/**
- * Wrapper for child context objects in Twig.
- *
- * @param {Object} context Values to initialize the context with.
- */</span>
- Twig.ChildContext = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">context</span>) </span>{
- <span class="hljs-keyword">var</span> ChildContext = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ChildContext</span>(<span class="hljs-params"></span>) </span>{};
- ChildContext.prototype = context;
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> ChildContext();
- };
-
- <span class="hljs-comment">/**
- * Container for methods related to handling high level template tokens
- * (for example: {{ expression }}, {% logic %}, {# comment #}, raw data)
- */</span>
- Twig.token = {};
-
- <span class="hljs-comment">/**
- * Token types.
- */</span>
- Twig.token.type = {
- output: <span class="hljs-string">'output'</span>,
- logic: <span class="hljs-string">'logic'</span>,
- comment: <span class="hljs-string">'comment'</span>,
- raw: <span class="hljs-string">'raw'</span>,
- output_whitespace_pre: <span class="hljs-string">'output_whitespace_pre'</span>,
- output_whitespace_post: <span class="hljs-string">'output_whitespace_post'</span>,
- output_whitespace_both: <span class="hljs-string">'output_whitespace_both'</span>,
- logic_whitespace_pre: <span class="hljs-string">'logic_whitespace_pre'</span>,
- logic_whitespace_post: <span class="hljs-string">'logic_whitespace_post'</span>,
- logic_whitespace_both: <span class="hljs-string">'logic_whitespace_both'</span>
- };
-
- <span class="hljs-comment">/**
- * Token syntax definitions.
- */</span>
- Twig.token.definitions = [
- {
- type: Twig.token.type.raw,
- open: <span class="hljs-string">'{% raw %}'</span>,
- close: <span class="hljs-string">'{% endraw %}'</span>
- },
- {
- type: Twig.token.type.raw,
- open: <span class="hljs-string">'{% verbatim %}'</span>,
- close: <span class="hljs-string">'{% endverbatim %}'</span>
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-18">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-18">&#182;</a>
- </div>
- <p><em>Whitespace type tokens</em></p>
-<p>These typically take the form <code>{{- expression -}}</code> or <code>{{- expression }}</code> or <code>{{ expression -}}</code>.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.token.type.output_whitespace_pre,
- open: <span class="hljs-string">'{{-'</span>,
- close: <span class="hljs-string">'}}'</span>
- },
- {
- type: Twig.token.type.output_whitespace_post,
- open: <span class="hljs-string">'{{'</span>,
- close: <span class="hljs-string">'-}}'</span>
- },
- {
- type: Twig.token.type.output_whitespace_both,
- open: <span class="hljs-string">'{{-'</span>,
- close: <span class="hljs-string">'-}}'</span>
- },
- {
- type: Twig.token.type.logic_whitespace_pre,
- open: <span class="hljs-string">'{%-'</span>,
- close: <span class="hljs-string">'%}'</span>
- },
- {
- type: Twig.token.type.logic_whitespace_post,
- open: <span class="hljs-string">'{%'</span>,
- close: <span class="hljs-string">'-%}'</span>
- },
- {
- type: Twig.token.type.logic_whitespace_both,
- open: <span class="hljs-string">'{%-'</span>,
- close: <span class="hljs-string">'-%}'</span>
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-19">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-19">&#182;</a>
- </div>
- <p><em>Output type tokens</em></p>
-<p>These typically take the form <code>{{ expression }}</code>.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.token.type.output,
- open: <span class="hljs-string">'{{'</span>,
- close: <span class="hljs-string">'}}'</span>
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-20">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-20">&#182;</a>
- </div>
- <p><em>Logic type tokens</em></p>
-<p>These typically take a form like <code>{% if expression %}</code> or <code>{% endif %}</code></p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.token.type.logic,
- open: <span class="hljs-string">'{%'</span>,
- close: <span class="hljs-string">'%}'</span>
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-21">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-21">&#182;</a>
- </div>
- <p><em>Comment type tokens</em></p>
-<p>These take the form <code>{# anything #}</code></p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.token.type.comment,
- open: <span class="hljs-string">'{#'</span>,
- close: <span class="hljs-string">'#}'</span>
- }
- ];
-
-
- <span class="hljs-comment">/**
- * What characters start "strings" in token definitions. We need this to ignore token close
- * strings inside an expression.
- */</span>
- Twig.token.strings = [<span class="hljs-string">'"'</span>, <span class="hljs-string">"'"</span>];
-
- Twig.token.findStart = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">template</span>) </span>{
- <span class="hljs-keyword">var</span> output = {
- position: <span class="hljs-literal">null</span>,
- close_position: <span class="hljs-literal">null</span>,
- def: <span class="hljs-literal">null</span>
- },
- i,
- token_template,
- first_key_position,
- close_key_position;
-
- <span class="hljs-keyword">for</span> (i=<span class="hljs-number">0</span>;i&lt;Twig.token.definitions.length;i++) {
- token_template = Twig.token.definitions[i];
- first_key_position = template.indexOf(token_template.open);
- close_key_position = template.indexOf(token_template.close);
-
- Twig.log.trace(<span class="hljs-string">"Twig.token.findStart: "</span>, <span class="hljs-string">"Searching for "</span>, token_template.open, <span class="hljs-string">" found at "</span>, first_key_position);</pre></div></div>
-
- </li>
-
-
- <li id="section-22">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-22">&#182;</a>
- </div>
- <p>Special handling for mismatched tokens</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (first_key_position &gt;= <span class="hljs-number">0</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-23">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-23">&#182;</a>
- </div>
- <p>This token matches the template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (token_template.open.length !== token_template.close.length) {</pre></div></div>
-
- </li>
-
-
- <li id="section-24">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-24">&#182;</a>
- </div>
- <p>This token has mismatched closing and opening tags</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (close_key_position &lt; <span class="hljs-number">0</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-25">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-25">&#182;</a>
- </div>
- <p>This token’s closing tag does not match the template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">continue</span>;
- }
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-26">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-26">&#182;</a>
- </div>
- <p>Does this token occur before any other types?</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (first_key_position &gt;= <span class="hljs-number">0</span> &amp;&amp; (output.position === <span class="hljs-literal">null</span> || first_key_position &lt; output.position)) {
- output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (first_key_position &gt;= <span class="hljs-number">0</span> &amp;&amp; output.position !== <span class="hljs-literal">null</span> &amp;&amp; first_key_position === output.position) {
- <span class="hljs-comment">/*This token exactly matches another token,
- greedily match to check if this token has a greater specificity*/</span>
- <span class="hljs-keyword">if</span> (token_template.open.length &gt; output.def.open.length) {</pre></div></div>
-
- </li>
-
-
- <li id="section-27">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-27">&#182;</a>
- </div>
- <p>This token’s opening tag is more specific than the previous match</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (token_template.open.length === output.def.open.length) {
- <span class="hljs-keyword">if</span> (token_template.close.length &gt; output.def.close.length) {</pre></div></div>
-
- </li>
-
-
- <li id="section-28">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-28">&#182;</a>
- </div>
- <p>This token’s opening tag is as specific as the previous match,
-but the closing tag has greater specificity</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (close_key_position &gt;= <span class="hljs-number">0</span> &amp;&amp; close_key_position &lt; output.close_position) {</pre></div></div>
-
- </li>
-
-
- <li id="section-29">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-29">&#182;</a>
- </div>
- <p>This token’s closing tag exists in the template,
-and it occurs sooner than the previous match</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- }
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (close_key_position &gt;= <span class="hljs-number">0</span> &amp;&amp; close_key_position &lt; output.close_position) {</pre></div></div>
-
- </li>
-
-
- <li id="section-30">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-30">&#182;</a>
- </div>
- <p>This token’s closing tag is not more specific than the previous match,
-but it occurs sooner than the previous match</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- }
- }
- }
- }
-
- <span class="hljs-keyword">delete</span> output[<span class="hljs-string">'close_position'</span>];
-
- <span class="hljs-keyword">return</span> output;
- };
-
- Twig.token.findEnd = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">template, token_def, start</span>) </span>{
- <span class="hljs-keyword">var</span> end = <span class="hljs-literal">null</span>,
- found = <span class="hljs-literal">false</span>,
- offset = <span class="hljs-number">0</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-31">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-31">&#182;</a>
- </div>
- <p>String position variables</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> str_pos = <span class="hljs-literal">null</span>,
- str_found = <span class="hljs-literal">null</span>,
- pos = <span class="hljs-literal">null</span>,
- end_offset = <span class="hljs-literal">null</span>,
- this_str_pos = <span class="hljs-literal">null</span>,
- end_str_pos = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-32">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-32">&#182;</a>
- </div>
- <p>For loop variables</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> i,
- l;
-
- <span class="hljs-keyword">while</span> (!found) {
- str_pos = <span class="hljs-literal">null</span>;
- str_found = <span class="hljs-literal">null</span>;
- pos = template.indexOf(token_def.close, offset);
-
- <span class="hljs-keyword">if</span> (pos &gt;= <span class="hljs-number">0</span>) {
- end = pos;
- found = <span class="hljs-literal">true</span>;
- } <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-33">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-33">&#182;</a>
- </div>
- <p>throw an exception</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to find closing bracket '"</span> + token_def.close +
- <span class="hljs-string">"'"</span> + <span class="hljs-string">" opened near template position "</span> + start);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-34">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-34">&#182;</a>
- </div>
- <p>Ignore quotes within comments; just look for the next comment close sequence,
-regardless of what comes before it. <a href="https://github.com/justjohn/twig.js/issues/95">https://github.com/justjohn/twig.js/issues/95</a></p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (token_def.type === Twig.token.type.comment) {
- <span class="hljs-keyword">break</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-35">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-35">&#182;</a>
- </div>
- <p>Ignore quotes within raw tag
-Fixes #283</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (token_def.type === Twig.token.type.raw) {
- <span class="hljs-keyword">break</span>;
- }
-
- l = Twig.token.strings.length;
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>; i &lt; l; i += <span class="hljs-number">1</span>) {
- this_str_pos = template.indexOf(Twig.token.strings[i], offset);
-
- <span class="hljs-keyword">if</span> (this_str_pos &gt; <span class="hljs-number">0</span> &amp;&amp; this_str_pos &lt; pos &amp;&amp;
- (str_pos === <span class="hljs-literal">null</span> || this_str_pos &lt; str_pos)) {
- str_pos = this_str_pos;
- str_found = Twig.token.strings[i];
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-36">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-36">&#182;</a>
- </div>
- <p>We found a string before the end of the token, now find the string’s end and set the search offset to it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (str_pos !== <span class="hljs-literal">null</span>) {
- end_offset = str_pos + <span class="hljs-number">1</span>;
- end = <span class="hljs-literal">null</span>;
- found = <span class="hljs-literal">false</span>;
- <span class="hljs-keyword">while</span> (<span class="hljs-literal">true</span>) {
- end_str_pos = template.indexOf(str_found, end_offset);
- <span class="hljs-keyword">if</span> (end_str_pos &lt; <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-string">"Unclosed string in template"</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-37">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-37">&#182;</a>
- </div>
- <p>Ignore escaped quotes</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (template.substr(end_str_pos - <span class="hljs-number">1</span>, <span class="hljs-number">1</span>) !== <span class="hljs-string">"\\"</span>) {
- offset = end_str_pos + <span class="hljs-number">1</span>;
- <span class="hljs-keyword">break</span>;
- } <span class="hljs-keyword">else</span> {
- end_offset = end_str_pos + <span class="hljs-number">1</span>;
- }
- }
- }
- }
- <span class="hljs-keyword">return</span> end;
- };
-
- <span class="hljs-comment">/**
- * Convert a template into high-level tokens.
- */</span>
- Twig.tokenize = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">template</span>) </span>{
- <span class="hljs-keyword">var</span> tokens = [],</pre></div></div>
-
- </li>
-
-
- <li id="section-38">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-38">&#182;</a>
- </div>
- <p>An offset for reporting errors locations in the template.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> error_offset = <span class="hljs-number">0</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-39">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-39">&#182;</a>
- </div>
- <p>The start and type of the first token found in the template.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> found_token = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-40">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-40">&#182;</a>
- </div>
- <p>The end position of the matched token.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> end = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">while</span> (template.length &gt; <span class="hljs-number">0</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-41">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-41">&#182;</a>
- </div>
- <p>Find the first occurance of any token type in the template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> found_token = Twig.token.findStart(template);
-
- Twig.log.trace(<span class="hljs-string">"Twig.tokenize: "</span>, <span class="hljs-string">"Found token: "</span>, found_token);
-
- <span class="hljs-keyword">if</span> (found_token.position !== <span class="hljs-literal">null</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-42">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-42">&#182;</a>
- </div>
- <p>Add a raw type token for anything before the start of the token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (found_token.position &gt; <span class="hljs-number">0</span>) {
- tokens.push({
- type: Twig.token.type.raw,
- value: template.substring(<span class="hljs-number">0</span>, found_token.position)
- });
- }
- template = template.substr(found_token.position + found_token.def.open.length);
- error_offset += found_token.position + found_token.def.open.length;</pre></div></div>
-
- </li>
-
-
- <li id="section-43">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-43">&#182;</a>
- </div>
- <p>Find the end of the token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> end = Twig.token.findEnd(template, found_token.def, error_offset);
-
- Twig.log.trace(<span class="hljs-string">"Twig.tokenize: "</span>, <span class="hljs-string">"Token ends at "</span>, end);
-
- tokens.push({
- type: found_token.def.type,
- value: template.substring(<span class="hljs-number">0</span>, end).trim()
- });
-
- <span class="hljs-keyword">if</span> (template.substr( end + found_token.def.close.length, <span class="hljs-number">1</span> ) === <span class="hljs-string">"\n"</span>) {
- <span class="hljs-keyword">switch</span> (found_token.def.type) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">"logic_whitespace_pre"</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">"logic_whitespace_post"</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">"logic_whitespace_both"</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">"logic"</span>:</pre></div></div>
-
- </li>
-
-
- <li id="section-44">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-44">&#182;</a>
- </div>
- <p>Newlines directly after logic tokens are ignored</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> end += <span class="hljs-number">1</span>;
- <span class="hljs-keyword">break</span>;
- }
- }
-
- template = template.substr(end + found_token.def.close.length);</pre></div></div>
-
- </li>
-
-
- <li id="section-45">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-45">&#182;</a>
- </div>
- <p>Increment the position in the template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> error_offset += end + found_token.def.close.length;
-
- } <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-46">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-46">&#182;</a>
- </div>
- <p>No more tokens -&gt; add the rest of the template as a raw-type token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> tokens.push({
- type: Twig.token.type.raw,
- value: template
- });
- template = <span class="hljs-string">''</span>;
- }
- }
-
- <span class="hljs-keyword">return</span> tokens;
- };
-
-
- Twig.compile = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">tokens</span>) </span>{
- <span class="hljs-keyword">try</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-47">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-47">&#182;</a>
- </div>
- <p>Output and intermediate stacks</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> output = [],
- stack = [],</pre></div></div>
-
- </li>
-
-
- <li id="section-48">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-48">&#182;</a>
- </div>
- <p>The tokens between open and close tags</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> intermediate_output = [],
-
- token = <span class="hljs-literal">null</span>,
- logic_token = <span class="hljs-literal">null</span>,
- unclosed_token = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-49">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-49">&#182;</a>
- </div>
- <p>Temporary previous token.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> prev_token = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-50">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-50">&#182;</a>
- </div>
- <p>Temporary previous output.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> prev_output = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-51">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-51">&#182;</a>
- </div>
- <p>Temporary previous intermediate output.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> prev_intermediate_output = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-52">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-52">&#182;</a>
- </div>
- <p>The previous token’s template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> prev_template = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-53">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-53">&#182;</a>
- </div>
- <p>Token lookahead</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> next_token = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-54">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-54">&#182;</a>
- </div>
- <p>The output token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> tok_output = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-55">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-55">&#182;</a>
- </div>
- <p>Logic Token values</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> type = <span class="hljs-literal">null</span>,
- open = <span class="hljs-literal">null</span>,
- next = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">var</span> compile_output = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token</span>) </span>{
- Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [token]);
- <span class="hljs-keyword">if</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- intermediate_output.push(token);
- } <span class="hljs-keyword">else</span> {
- output.push(token);
- }
- };
-
- <span class="hljs-keyword">var</span> compile_logic = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-56">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-56">&#182;</a>
- </div>
- <p>Compile the logic token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> logic_token = Twig.logic.compile.apply(<span class="hljs-keyword">this</span>, [token]);
-
- type = logic_token.type;
- open = Twig.logic.handler[type].open;
- next = Twig.logic.handler[type].next;
-
- Twig.log.trace(<span class="hljs-string">"Twig.compile: "</span>, <span class="hljs-string">"Compiled logic token to "</span>, logic_token,
- <span class="hljs-string">" next is: "</span>, next, <span class="hljs-string">" open is : "</span>, open);</pre></div></div>
-
- </li>
-
-
- <li id="section-57">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-57">&#182;</a>
- </div>
- <p>Not a standalone token, check logic stack to see if this is expected</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (open !== <span class="hljs-literal">undefined</span> &amp;&amp; !open) {
- prev_token = stack.pop();
- prev_template = Twig.logic.handler[prev_token.type];
-
- <span class="hljs-keyword">if</span> (Twig.indexOf(prev_template.next, type) &lt; <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(type + <span class="hljs-string">" not expected after a "</span> + prev_token.type);
- }
-
- prev_token.output = prev_token.output || [];
-
- prev_token.output = prev_token.output.concat(intermediate_output);
- intermediate_output = [];
-
- tok_output = {
- type: Twig.token.type.logic,
- token: prev_token
- };
- <span class="hljs-keyword">if</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- intermediate_output.push(tok_output);
- } <span class="hljs-keyword">else</span> {
- output.push(tok_output);
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-58">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-58">&#182;</a>
- </div>
- <p>This token requires additional tokens to complete the logic structure.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (next !== <span class="hljs-literal">undefined</span> &amp;&amp; next.length &gt; <span class="hljs-number">0</span>) {
- Twig.log.trace(<span class="hljs-string">"Twig.compile: "</span>, <span class="hljs-string">"Pushing "</span>, logic_token, <span class="hljs-string">" to logic stack."</span>);
-
- <span class="hljs-keyword">if</span> (stack.length &gt; <span class="hljs-number">0</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-59">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-59">&#182;</a>
- </div>
- <p>Put any currently held output into the output list of the logic operator
-currently at the head of the stack before we push a new one on.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> prev_token = stack.pop();
- prev_token.output = prev_token.output || [];
- prev_token.output = prev_token.output.concat(intermediate_output);
- stack.push(prev_token);
- intermediate_output = [];
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-60">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-60">&#182;</a>
- </div>
- <p>Push the new logic token onto the logic stack</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> stack.push(logic_token);
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (open !== <span class="hljs-literal">undefined</span> &amp;&amp; open) {
- tok_output = {
- type: Twig.token.type.logic,
- token: logic_token
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-61">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-61">&#182;</a>
- </div>
- <p>Standalone token (like {% set … %}</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- intermediate_output.push(tok_output);
- } <span class="hljs-keyword">else</span> {
- output.push(tok_output);
- }
- }
- };
-
- <span class="hljs-keyword">while</span> (tokens.length &gt; <span class="hljs-number">0</span>) {
- token = tokens.shift();
- prev_output = output[output.length - <span class="hljs-number">1</span>];
- prev_intermediate_output = intermediate_output[intermediate_output.length - <span class="hljs-number">1</span>];
- next_token = tokens[<span class="hljs-number">0</span>];
- Twig.log.trace(<span class="hljs-string">"Compiling token "</span>, token);
- <span class="hljs-keyword">switch</span> (token.type) {
- <span class="hljs-keyword">case</span> Twig.token.type.raw:
- <span class="hljs-keyword">if</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- intermediate_output.push(token);
- } <span class="hljs-keyword">else</span> {
- output.push(token);
- }
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> Twig.token.type.logic:
- compile_logic.call(<span class="hljs-keyword">this</span>, token);
- <span class="hljs-keyword">break</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-62">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-62">&#182;</a>
- </div>
- <p>Do nothing, comments should be ignored</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> Twig.token.type.comment:
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> Twig.token.type.output:
- compile_output.call(<span class="hljs-keyword">this</span>, token);
- <span class="hljs-keyword">break</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-63">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-63">&#182;</a>
- </div>
- <p>Kill whitespace ahead and behind this token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> Twig.token.type.logic_whitespace_pre:
- <span class="hljs-keyword">case</span> Twig.token.type.logic_whitespace_post:
- <span class="hljs-keyword">case</span> Twig.token.type.logic_whitespace_both:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_pre:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_post:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_both:
- <span class="hljs-keyword">if</span> (token.type !== Twig.token.type.output_whitespace_post &amp;&amp; token.type !== Twig.token.type.logic_whitespace_post) {
- <span class="hljs-keyword">if</span> (prev_output) {</pre></div></div>
-
- </li>
-
-
- <li id="section-64">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-64">&#182;</a>
- </div>
- <p>If the previous output is raw, pop it off</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (prev_output.type === Twig.token.type.raw) {
- output.pop();</pre></div></div>
-
- </li>
-
-
- <li id="section-65">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-65">&#182;</a>
- </div>
- <p>If the previous output is not just whitespace, trim it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (prev_output.value.match(<span class="hljs-regexp">/^\s*$/</span>) === <span class="hljs-literal">null</span>) {
- prev_output.value = prev_output.value.trim();</pre></div></div>
-
- </li>
-
-
- <li id="section-66">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-66">&#182;</a>
- </div>
- <p>Repush the previous output</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output.push(prev_output);
- }
- }
- }
-
- <span class="hljs-keyword">if</span> (prev_intermediate_output) {</pre></div></div>
-
- </li>
-
-
- <li id="section-67">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-67">&#182;</a>
- </div>
- <p>If the previous intermediate output is raw, pop it off</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (prev_intermediate_output.type === Twig.token.type.raw) {
- intermediate_output.pop();</pre></div></div>
-
- </li>
-
-
- <li id="section-68">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-68">&#182;</a>
- </div>
- <p>If the previous output is not just whitespace, trim it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (prev_intermediate_output.value.match(<span class="hljs-regexp">/^\s*$/</span>) === <span class="hljs-literal">null</span>) {
- prev_intermediate_output.value = prev_intermediate_output.value.trim();</pre></div></div>
-
- </li>
-
-
- <li id="section-69">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-69">&#182;</a>
- </div>
- <p>Repush the previous intermediate output</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> intermediate_output.push(prev_intermediate_output);
- }
- }
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-70">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-70">&#182;</a>
- </div>
- <p>Compile this token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">switch</span> (token.type) {
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_pre:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_post:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_both:
- compile_output.call(<span class="hljs-keyword">this</span>, token);
- <span class="hljs-keyword">break</span>;
- <span class="hljs-keyword">case</span> Twig.token.type.logic_whitespace_pre:
- <span class="hljs-keyword">case</span> Twig.token.type.logic_whitespace_post:
- <span class="hljs-keyword">case</span> Twig.token.type.logic_whitespace_both:
- compile_logic.call(<span class="hljs-keyword">this</span>, token);
- <span class="hljs-keyword">break</span>;
- }
-
- <span class="hljs-keyword">if</span> (token.type !== Twig.token.type.output_whitespace_pre &amp;&amp; token.type !== Twig.token.type.logic_whitespace_pre) {
- <span class="hljs-keyword">if</span> (next_token) {</pre></div></div>
-
- </li>
-
-
- <li id="section-71">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-71">&#182;</a>
- </div>
- <p>If the next token is raw, shift it out</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (next_token.type === Twig.token.type.raw) {
- tokens.shift();</pre></div></div>
-
- </li>
-
-
- <li id="section-72">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-72">&#182;</a>
- </div>
- <p>If the next token is not just whitespace, trim it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (next_token.value.match(<span class="hljs-regexp">/^\s*$/</span>) === <span class="hljs-literal">null</span>) {
- next_token.value = next_token.value.trim();</pre></div></div>
-
- </li>
-
-
- <li id="section-73">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-73">&#182;</a>
- </div>
- <p>Unshift the next token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> tokens.unshift(next_token);
- }
- }
- }
- }
-
- <span class="hljs-keyword">break</span>;
- }
-
- Twig.log.trace(<span class="hljs-string">"Twig.compile: "</span>, <span class="hljs-string">" Output: "</span>, output,
- <span class="hljs-string">" Logic Stack: "</span>, stack,
- <span class="hljs-string">" Pending Output: "</span>, intermediate_output );
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-74">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-74">&#182;</a>
- </div>
- <p>Verify that there are no logic tokens left in the stack.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- unclosed_token = stack.pop();
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">"Unable to find an end tag for "</span> + unclosed_token.type +
- <span class="hljs-string">", expecting one of "</span> + unclosed_token.next);
- }
- <span class="hljs-keyword">return</span> output;
- } <span class="hljs-keyword">catch</span> (ex) {
- Twig.log.error(<span class="hljs-string">"Error compiling twig template "</span> + <span class="hljs-keyword">this</span>.id + <span class="hljs-string">": "</span>);
- <span class="hljs-keyword">if</span> (ex.stack) {
- Twig.log.error(ex.stack);
- } <span class="hljs-keyword">else</span> {
- Twig.log.error(ex.toString());
- }
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.options.rethrow) <span class="hljs-keyword">throw</span> ex;
- }
- };
-
- <span class="hljs-comment">/**
- * Parse a compiled template.
- *
- * @param {Array} tokens The compiled tokens.
- * @param {Object} context The render context.
- *
- * @return {string} The parsed template.
- */</span>
- Twig.parse = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">tokens, context</span>) </span>{
- <span class="hljs-keyword">try</span> {
- <span class="hljs-keyword">var</span> output = [],</pre></div></div>
-
- </li>
-
-
- <li id="section-75">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-75">&#182;</a>
- </div>
- <p>Track logic chains</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> chain = <span class="hljs-literal">true</span>,
- that = <span class="hljs-keyword">this</span>;
-
- Twig.forEach(tokens, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">parseToken</span>(<span class="hljs-params">token</span>) </span>{
- Twig.log.debug(<span class="hljs-string">"Twig.parse: "</span>, <span class="hljs-string">"Parsing token: "</span>, token);
-
- <span class="hljs-keyword">switch</span> (token.type) {
- <span class="hljs-keyword">case</span> Twig.token.type.raw:
- output.push(Twig.filters.raw(token.value));
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> Twig.token.type.logic:
- <span class="hljs-keyword">var</span> logic_token = token.token,
- logic = Twig.logic.parse.apply(that, [logic_token, context, chain]);
-
- <span class="hljs-keyword">if</span> (logic.chain !== <span class="hljs-literal">undefined</span>) {
- chain = logic.chain;
- }
- <span class="hljs-keyword">if</span> (logic.context !== <span class="hljs-literal">undefined</span>) {
- context = logic.context;
- }
- <span class="hljs-keyword">if</span> (logic.output !== <span class="hljs-literal">undefined</span>) {
- output.push(logic.output);
- }
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> Twig.token.type.comment:</pre></div></div>
-
- </li>
-
-
- <li id="section-76">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-76">&#182;</a>
- </div>
- <p>Do nothing, comments should be ignored</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">break</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-77">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-77">&#182;</a>
- </div>
- <p>Fall through whitespace to output</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_pre:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_post:
- <span class="hljs-keyword">case</span> Twig.token.type.output_whitespace_both:
- <span class="hljs-keyword">case</span> Twig.token.type.output:
- Twig.log.debug(<span class="hljs-string">"Twig.parse: "</span>, <span class="hljs-string">"Output token: "</span>, token.stack);</pre></div></div>
-
- </li>
-
-
- <li id="section-78">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-78">&#182;</a>
- </div>
- <p>Parse the given expression in the given context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output.push(Twig.expression.parse.apply(that, [token.stack, context]));
- <span class="hljs-keyword">break</span>;
- }
- });
- <span class="hljs-keyword">return</span> Twig.output.apply(<span class="hljs-keyword">this</span>, [output]);
- } <span class="hljs-keyword">catch</span> (ex) {
- Twig.log.error(<span class="hljs-string">"Error parsing twig template "</span> + <span class="hljs-keyword">this</span>.id + <span class="hljs-string">": "</span>);
- <span class="hljs-keyword">if</span> (ex.stack) {
- Twig.log.error(ex.stack);
- } <span class="hljs-keyword">else</span> {
- Twig.log.error(ex.toString());
- }
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.options.rethrow) <span class="hljs-keyword">throw</span> ex;
-
- <span class="hljs-keyword">if</span> (Twig.debug) {
- <span class="hljs-keyword">return</span> ex.toString();
- }
- }
- };
-
- <span class="hljs-comment">/**
- * Tokenize and compile a string template.
- *
- * @param {string} data The template.
- *
- * @return {Array} The compiled tokens.
- */</span>
- Twig.prepare = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) </span>{
- <span class="hljs-keyword">var</span> tokens, raw_tokens;</pre></div></div>
-
- </li>
-
-
- <li id="section-79">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-79">&#182;</a>
- </div>
- <p>Tokenize</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.log.debug(<span class="hljs-string">"Twig.prepare: "</span>, <span class="hljs-string">"Tokenizing "</span>, data);
- raw_tokens = Twig.tokenize.apply(<span class="hljs-keyword">this</span>, [data]);</pre></div></div>
-
- </li>
-
-
- <li id="section-80">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-80">&#182;</a>
- </div>
- <p>Compile</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.log.debug(<span class="hljs-string">"Twig.prepare: "</span>, <span class="hljs-string">"Compiling "</span>, raw_tokens);
- tokens = Twig.compile.apply(<span class="hljs-keyword">this</span>, [raw_tokens]);
-
- Twig.log.debug(<span class="hljs-string">"Twig.prepare: "</span>, <span class="hljs-string">"Compiled "</span>, tokens);
-
- <span class="hljs-keyword">return</span> tokens;
- };
-
- <span class="hljs-comment">/**
- * Join the output token's stack and escape it if needed
- *
- * @param {Array} Output token's stack
- *
- * @return {string|String} Autoescaped output
- */</span>
- Twig.output = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">output</span>) </span>{
- <span class="hljs-keyword">if</span> (!<span class="hljs-keyword">this</span>.options.autoescape) {
- <span class="hljs-keyword">return</span> output.join(<span class="hljs-string">""</span>);
- }
-
- <span class="hljs-keyword">var</span> strategy = <span class="hljs-string">'html'</span>;
- <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> <span class="hljs-keyword">this</span>.options.autoescape == <span class="hljs-string">'string'</span>)
- strategy = <span class="hljs-keyword">this</span>.options.autoescape;</pre></div></div>
-
- </li>
-
-
- <li id="section-81">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-81">&#182;</a>
- </div>
- <p>[].map would be better but it’s not supported by IE8-</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> escaped_output = [];
- Twig.forEach(output, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">str</span>) </span>{
- <span class="hljs-keyword">if</span> (str &amp;&amp; (str.twig_markup !== <span class="hljs-literal">true</span> &amp;&amp; str.twig_markup != strategy)) {
- str = Twig.filters.escape(str, [ strategy ]);
- }
- escaped_output.push(str);
- });
- <span class="hljs-keyword">return</span> Twig.Markup(escaped_output.join(<span class="hljs-string">""</span>));
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-82">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-82">&#182;</a>
- </div>
- <p>Namespace for template storage and retrieval</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.Templates = {
- <span class="hljs-comment">/**
- * Registered template loaders - use Twig.Templates.registerLoader to add supported loaders
- * @type {Object}
- */</span>
- loaders: {},
-
- <span class="hljs-comment">/**
- * Registered template parsers - use Twig.Templates.registerParser to add supported parsers
- * @type {Object}
- */</span>
- parsers: {},
-
- <span class="hljs-comment">/**
- * Cached / loaded templates
- * @type {Object}
- */</span>
- registry: {}
- };
-
- <span class="hljs-comment">/**
- * Is this id valid for a twig template?
- *
- * @param {string} id The ID to check.
- *
- * @throws {Twig.Error} If the ID is invalid or used.
- * @return {boolean} True if the ID is valid.
- */</span>
- Twig.validateId = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">id</span>) </span>{
- <span class="hljs-keyword">if</span> (id === <span class="hljs-string">"prototype"</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(id + <span class="hljs-string">" is not a valid twig identifier"</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.cache &amp;&amp; Twig.Templates.registry.hasOwnProperty(id)) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"There is already a template with the ID "</span> + id);
- }
- <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
- }
-
- <span class="hljs-comment">/**
- * Register a template loader
- *
- * @example
- * Twig.extend(function(Twig) {
- * Twig.Templates.registerLoader('custom_loader', function(location, params, callback, error_callback) {
- * // ... load the template ...
- * params.data = loadedTemplateData;
- * // create and return the template
- * var template = new Twig.Template(params);
- * if (typeof callback === 'function') {
- * callback(template);
- * }
- * return template;
- * });
- * });
- *
- * @param {String} method_name The method this loader is intended for (ajax, fs)
- * @param {Function} func The function to execute when loading the template
- * @param {Object|undefined} scope Optional scope parameter to bind func to
- *
- * @throws Twig.Error
- *
- * @return {void}
- */</span>
- Twig.Templates.registerLoader = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">method_name, func, scope</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> func !== <span class="hljs-string">'function'</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Unable to add loader for '</span> + method_name + <span class="hljs-string">': Invalid function reference given.'</span>);
- }
- <span class="hljs-keyword">if</span> (scope) {
- func = func.bind(scope);
- }
- <span class="hljs-keyword">this</span>.loaders[method_name] = func;
- };
-
- <span class="hljs-comment">/**
- * Remove a registered loader
- *
- * @param {String} method_name The method name for the loader you wish to remove
- *
- * @return {void}
- */</span>
- Twig.Templates.unRegisterLoader = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">method_name</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.isRegisteredLoader(method_name)) {
- <span class="hljs-keyword">delete</span> <span class="hljs-keyword">this</span>.loaders[method_name];
- }
- };
-
- <span class="hljs-comment">/**
- * See if a loader is registered by its method name
- *
- * @param {String} method_name The name of the loader you are looking for
- *
- * @return {boolean}
- */</span>
- Twig.Templates.isRegisteredLoader = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">method_name</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.loaders.hasOwnProperty(method_name);
- };
-
- <span class="hljs-comment">/**
- * Register a template parser
- *
- * @example
- * Twig.extend(function(Twig) {
- * Twig.Templates.registerParser('custom_parser', function(params) {
- * // this template source can be accessed in params.data
- * var template = params.data
- *
- * // ... custom process that modifies the template
- *
- * // return the parsed template
- * return template;
- * });
- * });
- *
- * @param {String} method_name The method this parser is intended for (twig, source)
- * @param {Function} func The function to execute when parsing the template
- * @param {Object|undefined} scope Optional scope parameter to bind func to
- *
- * @throws Twig.Error
- *
- * @return {void}
- */</span>
- Twig.Templates.registerParser = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">method_name, func, scope</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> func !== <span class="hljs-string">'function'</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Unable to add parser for '</span> + method_name + <span class="hljs-string">': Invalid function regerence given.'</span>);
- }
-
- <span class="hljs-keyword">if</span> (scope) {
- func = func.bind(scope);
- }
-
- <span class="hljs-keyword">this</span>.parsers[method_name] = func;
- };
-
- <span class="hljs-comment">/**
- * Remove a registered parser
- *
- * @param {String} method_name The method name for the parser you wish to remove
- *
- * @return {void}
- */</span>
- Twig.Templates.unRegisterParser = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">method_name</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.isRegisteredParser(method_name)) {
- <span class="hljs-keyword">delete</span> <span class="hljs-keyword">this</span>.parsers[method_name];
- }
- };
-
- <span class="hljs-comment">/**
- * See if a parser is registered by its method name
- *
- * @param {String} method_name The name of the parser you are looking for
- *
- * @return {boolean}
- */</span>
- Twig.Templates.isRegisteredParser = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">method_name</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.parsers.hasOwnProperty(method_name);
- };
-
- <span class="hljs-comment">/**
- * Save a template object to the store.
- *
- * @param {Twig.Template} template The twig.js template to store.
- */</span>
- Twig.Templates.save = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">template</span>) </span>{
- <span class="hljs-keyword">if</span> (template.id === <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to save template with no id"</span>);
- }
- Twig.Templates.registry[template.id] = template;
- };
-
- <span class="hljs-comment">/**
- * Load a previously saved template from the store.
- *
- * @param {string} id The ID of the template to load.
- *
- * @return {Twig.Template} A twig.js template stored with the provided ID.
- */</span>
- Twig.Templates.load = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">id</span>) </span>{
- <span class="hljs-keyword">if</span> (!Twig.Templates.registry.hasOwnProperty(id)) {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
- }
- <span class="hljs-keyword">return</span> Twig.Templates.registry[id];
- };
-
- <span class="hljs-comment">/**
- * Load a template from a remote location using AJAX and saves in with the given ID.
- *
- * Available parameters:
- *
- * async: Should the HTTP request be performed asynchronously.
- * Defaults to true.
- * method: What method should be used to load the template
- * (fs or ajax)
- * parser: What method should be used to parse the template
- * (twig or source)
- * precompiled: Has the template already been compiled.
- *
- * @param {string} location The remote URL to load as a template.
- * @param {Object} params The template parameters.
- * @param {function} callback A callback triggered when the template finishes loading.
- * @param {function} error_callback A callback triggered if an error occurs loading the template.
- *
- *
- */</span>
- Twig.Templates.loadRemote = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">location, params, callback, error_callback</span>) </span>{
- <span class="hljs-keyword">var</span> loader;</pre></div></div>
-
- </li>
-
-
- <li id="section-83">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-83">&#182;</a>
- </div>
- <p>Default to async</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (params.async === <span class="hljs-literal">undefined</span>) {
- params.async = <span class="hljs-literal">true</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-84">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-84">&#182;</a>
- </div>
- <p>Default to the URL so the template is cached.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (params.id === <span class="hljs-literal">undefined</span>) {
- params.id = location;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-85">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-85">&#182;</a>
- </div>
- <p>Check for existing template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (Twig.cache &amp;&amp; Twig.Templates.registry.hasOwnProperty(params.id)) {</pre></div></div>
-
- </li>
-
-
- <li id="section-86">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-86">&#182;</a>
- </div>
- <p>A template is already saved with the given id.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> callback === <span class="hljs-string">'function'</span>) {
- callback(Twig.Templates.registry[params.id]);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-87">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-87">&#182;</a>
- </div>
- <p>TODO: if async, return deferred promise</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> Twig.Templates.registry[params.id];
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-88">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-88">&#182;</a>
- </div>
- <p>if the parser name hasn’t been set, default it to twig</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> params.parser = params.parser || <span class="hljs-string">'twig'</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-89">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-89">&#182;</a>
- </div>
- <p>Assume ‘fs’ if the loader is not defined</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> loader = <span class="hljs-keyword">this</span>.loaders[params.method] || <span class="hljs-keyword">this</span>.loaders.fs;
- <span class="hljs-keyword">return</span> loader.apply(<span class="hljs-keyword">this</span>, <span class="hljs-built_in">arguments</span>);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-90">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-90">&#182;</a>
- </div>
- <p>Determine object type</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">is</span>(<span class="hljs-params">type, obj</span>) </span>{
- <span class="hljs-keyword">var</span> clas = <span class="hljs-built_in">Object</span>.prototype.toString.call(obj).slice(<span class="hljs-number">8</span>, <span class="hljs-number">-1</span>);
- <span class="hljs-keyword">return</span> obj !== <span class="hljs-literal">undefined</span> &amp;&amp; obj !== <span class="hljs-literal">null</span> &amp;&amp; clas === type;
- }
-
- <span class="hljs-comment">/**
- * Create a new twig.js template.
- *
- * Parameters: {
- * data: The template, either pre-compiled tokens or a string template
- * id: The name of this template
- * blocks: Any pre-existing block from a child template
- * }
- *
- * @param {Object} params The template parameters.
- */</span>
- Twig.Template = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"> params </span>) </span>{
- <span class="hljs-keyword">var</span> data = params.data,
- id = params.id,
- blocks = params.blocks,
- macros = params.macros || {},
- base = params.base,
- path = params.path,
- url = params.url,
- name = params.name,
- method = params.method,</pre></div></div>
-
- </li>
-
-
- <li id="section-91">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-91">&#182;</a>
- </div>
- <p>parser options</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> options = params.options;</pre></div></div>
-
- </li>
-
-
- <li id="section-92">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-92">&#182;</a>
- </div>
- <h1 id="what-is-stored-in-a-twig-template">What is stored in a Twig.Template</h1>
-<p>The Twig Template hold several chucks of data.</p>
-<pre><code>{
- id: The token ID (<span class="hljs-keyword">if</span> any)
- tokens: The list <span class="hljs-keyword">of</span> tokens that makes up <span class="hljs-keyword">this</span> template.
- blocks: The list <span class="hljs-keyword">of</span> block <span class="hljs-keyword">this</span> template contains.
- base: The base template (<span class="hljs-keyword">if</span> any)
- options: {
- Compiler/parser options
-
- strict_variables: <span class="hljs-literal">true</span>/<span class="hljs-literal">false</span>
- Should missing variable/keys emit an error message. If <span class="hljs-literal">false</span>, they <span class="hljs-keyword">default</span> to <span class="hljs-literal">null</span>.
- }
-}
-</code></pre>
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">this</span>.id = id;
- <span class="hljs-keyword">this</span>.method = method;
- <span class="hljs-keyword">this</span>.base = base;
- <span class="hljs-keyword">this</span>.path = path;
- <span class="hljs-keyword">this</span>.url = url;
- <span class="hljs-keyword">this</span>.name = name;
- <span class="hljs-keyword">this</span>.macros = macros;
- <span class="hljs-keyword">this</span>.options = options;
-
- <span class="hljs-keyword">this</span>.reset(blocks);
-
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">'String'</span>, data)) {
- <span class="hljs-keyword">this</span>.tokens = Twig.prepare.apply(<span class="hljs-keyword">this</span>, [data]);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">this</span>.tokens = data;
- }
-
- <span class="hljs-keyword">if</span> (id !== <span class="hljs-literal">undefined</span>) {
- Twig.Templates.save(<span class="hljs-keyword">this</span>);
- }
- };
-
- Twig.Template.prototype.reset = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">blocks</span>) </span>{
- Twig.log.debug(<span class="hljs-string">"Twig.Template.reset"</span>, <span class="hljs-string">"Reseting template "</span> + <span class="hljs-keyword">this</span>.id);
- <span class="hljs-keyword">this</span>.blocks = {};
- <span class="hljs-keyword">this</span>.importedBlocks = [];
- <span class="hljs-keyword">this</span>.originalBlockTokens = {};
- <span class="hljs-keyword">this</span>.child = {
- blocks: blocks || {}
- };
- <span class="hljs-keyword">this</span>.extend = <span class="hljs-literal">null</span>;
- };
-
- Twig.Template.prototype.render = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">context, params</span>) </span>{
- params = params || {};
-
- <span class="hljs-keyword">var</span> output,
- url;
-
- <span class="hljs-keyword">this</span>.context = context || {};</pre></div></div>
-
- </li>
-
-
- <li id="section-93">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-93">&#182;</a>
- </div>
- <p>Clear any previous state</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">this</span>.reset();
- <span class="hljs-keyword">if</span> (params.blocks) {
- <span class="hljs-keyword">this</span>.blocks = params.blocks;
- }
- <span class="hljs-keyword">if</span> (params.macros) {
- <span class="hljs-keyword">this</span>.macros = params.macros;
- }
-
- output = Twig.parse.apply(<span class="hljs-keyword">this</span>, [<span class="hljs-keyword">this</span>.tokens, <span class="hljs-keyword">this</span>.context]);</pre></div></div>
-
- </li>
-
-
- <li id="section-94">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-94">&#182;</a>
- </div>
- <p>Does this template extend another</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.extend) {
- <span class="hljs-keyword">var</span> ext_template;</pre></div></div>
-
- </li>
-
-
- <li id="section-95">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-95">&#182;</a>
- </div>
- <p>check if the template is provided inline</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> ( <span class="hljs-keyword">this</span>.options.allowInlineIncludes ) {
- ext_template = Twig.Templates.load(<span class="hljs-keyword">this</span>.extend);
- <span class="hljs-keyword">if</span> ( ext_template ) {
- ext_template.options = <span class="hljs-keyword">this</span>.options;
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-96">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-96">&#182;</a>
- </div>
- <p>check for the template file via include</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (!ext_template) {
- url = Twig.path.parsePath(<span class="hljs-keyword">this</span>, <span class="hljs-keyword">this</span>.extend);
-
- ext_template = Twig.Templates.loadRemote(url, {
- method: <span class="hljs-keyword">this</span>.getLoaderMethod(),
- base: <span class="hljs-keyword">this</span>.base,
- <span class="hljs-keyword">async</span>: <span class="hljs-literal">false</span>,
- id: url,
- options: <span class="hljs-keyword">this</span>.options
- });
- }
-
- <span class="hljs-keyword">this</span>.parent = ext_template;
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.parent.render(<span class="hljs-keyword">this</span>.context, {
- blocks: <span class="hljs-keyword">this</span>.blocks
- });
- }
-
- <span class="hljs-keyword">if</span> (params.output == <span class="hljs-string">'blocks'</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.blocks;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (params.output == <span class="hljs-string">'macros'</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.macros;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> output;
- }
- };
-
- Twig.Template.prototype.importFile = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file</span>) </span>{
- <span class="hljs-keyword">var</span> url, sub_template;
- <span class="hljs-keyword">if</span> (!<span class="hljs-keyword">this</span>.url &amp;&amp; <span class="hljs-keyword">this</span>.options.allowInlineIncludes) {
- file = <span class="hljs-keyword">this</span>.path ? <span class="hljs-keyword">this</span>.path + <span class="hljs-string">'/'</span> + file : file;
- sub_template = Twig.Templates.load(file);
-
- <span class="hljs-keyword">if</span> (!sub_template) {
- sub_template = Twig.Templates.loadRemote(url, {
- id: file,
- method: <span class="hljs-keyword">this</span>.getLoaderMethod(),
- <span class="hljs-keyword">async</span>: <span class="hljs-literal">false</span>,
- options: <span class="hljs-keyword">this</span>.options
- });
-
- <span class="hljs-keyword">if</span> (!sub_template) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to find the template "</span> + file);
- }
- }
-
- sub_template.options = <span class="hljs-keyword">this</span>.options;
-
- <span class="hljs-keyword">return</span> sub_template;
- }
-
- url = Twig.path.parsePath(<span class="hljs-keyword">this</span>, file);</pre></div></div>
-
- </li>
-
-
- <li id="section-97">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-97">&#182;</a>
- </div>
- <p>Load blocks from an external file</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> sub_template = Twig.Templates.loadRemote(url, {
- method: <span class="hljs-keyword">this</span>.getLoaderMethod(),
- base: <span class="hljs-keyword">this</span>.base,
- <span class="hljs-keyword">async</span>: <span class="hljs-literal">false</span>,
- options: <span class="hljs-keyword">this</span>.options,
- id: url
- });
-
- <span class="hljs-keyword">return</span> sub_template;
- };
-
- Twig.Template.prototype.importBlocks = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file, override</span>) </span>{
- <span class="hljs-keyword">var</span> sub_template = <span class="hljs-keyword">this</span>.importFile(file),
- context = <span class="hljs-keyword">this</span>.context,
- that = <span class="hljs-keyword">this</span>,
- key;
-
- override = override || <span class="hljs-literal">false</span>;
-
- sub_template.render(context);</pre></div></div>
-
- </li>
-
-
- <li id="section-98">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-98">&#182;</a>
- </div>
- <p>Mixin blocks</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.forEach(<span class="hljs-built_in">Object</span>.keys(sub_template.blocks), <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{
- <span class="hljs-keyword">if</span> (override || that.blocks[key] === <span class="hljs-literal">undefined</span>) {
- that.blocks[key] = sub_template.blocks[key];
- that.importedBlocks.push(key);
- }
- });
- };
-
- Twig.Template.prototype.importMacros = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file</span>) </span>{
- <span class="hljs-keyword">var</span> url = Twig.path.parsePath(<span class="hljs-keyword">this</span>, file);</pre></div></div>
-
- </li>
-
-
- <li id="section-99">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-99">&#182;</a>
- </div>
- <p>load remote template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> remoteTemplate = Twig.Templates.loadRemote(url, {
- method: <span class="hljs-keyword">this</span>.getLoaderMethod(),
- <span class="hljs-keyword">async</span>: <span class="hljs-literal">false</span>,
- id: url
- });
-
- <span class="hljs-keyword">return</span> remoteTemplate;
- };
-
- Twig.Template.prototype.getLoaderMethod = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.path) {
- <span class="hljs-keyword">return</span> <span class="hljs-string">'fs'</span>;
- }
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.url) {
- <span class="hljs-keyword">return</span> <span class="hljs-string">'ajax'</span>;
- }
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.method || <span class="hljs-string">'fs'</span>;
- };
-
- Twig.Template.prototype.compile = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">options</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-100">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-100">&#182;</a>
- </div>
- <p>compile the template into raw JS</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> Twig.compiler.compile(<span class="hljs-keyword">this</span>, options);
- };
-
- <span class="hljs-comment">/**
- * Create safe output
- *
- * @param {string} Content safe to output
- *
- * @return {String} Content wrapped into a String
- */</span>
-
- Twig.Markup = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">content, strategy</span>) </span>{
- <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> strategy == <span class="hljs-string">'undefined'</span>) {
- strategy = <span class="hljs-literal">true</span>;
- }
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> content === <span class="hljs-string">'string'</span> &amp;&amp; content.length &gt; <span class="hljs-number">0</span>) {
- content = <span class="hljs-keyword">new</span> <span class="hljs-built_in">String</span>(content);
- content.twig_markup = strategy;
- }
- <span class="hljs-keyword">return</span> content;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-}) (Twig || { });
-
-(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta">
- 'use strict'</span>;
-
- Twig.Templates.registerLoader(<span class="hljs-string">'ajax'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">location, params, callback, error_callback</span>) </span>{
- <span class="hljs-keyword">var</span> template,
- xmlhttp,
- precompiled = params.precompiled,
- parser = <span class="hljs-keyword">this</span>.parsers[params.parser] || <span class="hljs-keyword">this</span>.parser.twig;
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> XMLHttpRequest === <span class="hljs-string">"undefined"</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Unsupported platform: Unable to do ajax requests '</span> +
- <span class="hljs-string">'because there is no "XMLHTTPRequest" implementation'</span>);
- }
-
- xmlhttp = <span class="hljs-keyword">new</span> XMLHttpRequest();
- xmlhttp.onreadystatechange = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> data = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">if</span>(xmlhttp.readyState === <span class="hljs-number">4</span>) {
- <span class="hljs-keyword">if</span> (xmlhttp.status === <span class="hljs-number">200</span> || (<span class="hljs-built_in">window</span>.cordova &amp;&amp; xmlhttp.status == <span class="hljs-number">0</span>)) {
- Twig.log.debug(<span class="hljs-string">"Got template "</span>, xmlhttp.responseText);
-
- <span class="hljs-keyword">if</span> (precompiled === <span class="hljs-literal">true</span>) {
- data = <span class="hljs-built_in">JSON</span>.parse(xmlhttp.responseText);
- } <span class="hljs-keyword">else</span> {
- data = xmlhttp.responseText;
- }
-
- params.url = location;
- params.data = data;
-
- template = parser.call(<span class="hljs-keyword">this</span>, params);
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> callback === <span class="hljs-string">'function'</span>) {
- callback(template);
- }
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> error_callback === <span class="hljs-string">'function'</span>) {
- error_callback(xmlhttp);
- }
- }
- }
- };
- xmlhttp.open(<span class="hljs-string">"GET"</span>, location, !!params.async);
- xmlhttp.send();
-
- <span class="hljs-keyword">if</span> (params.async) {</pre></div></div>
-
- </li>
-
-
- <li id="section-101">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-101">&#182;</a>
- </div>
- <p>TODO: return deferred promise</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> template;
- }
- });
-
-}(Twig));(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> 'use strict'</span>;
-
- <span class="hljs-keyword">var</span> fs, path;
-
- <span class="hljs-keyword">try</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-102">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-102">&#182;</a>
- </div>
- <p>require lib dependencies at runtime</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>);
- path = <span class="hljs-built_in">require</span>(<span class="hljs-string">'path'</span>);
- } <span class="hljs-keyword">catch</span> (e) {</pre></div></div>
-
- </li>
-
-
- <li id="section-103">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-103">&#182;</a>
- </div>
- <p>NOTE: this is in a try/catch to avoid errors cross platform</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> }
-
- Twig.Templates.registerLoader(<span class="hljs-string">'fs'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">location, params, callback, error_callback</span>) </span>{
- <span class="hljs-keyword">var</span> template,
- data = <span class="hljs-literal">null</span>,
- precompiled = params.precompiled,
- parser = <span class="hljs-keyword">this</span>.parsers[params.parser] || <span class="hljs-keyword">this</span>.parser.twig;
-
- <span class="hljs-keyword">if</span> (!fs || !path) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Unsupported platform: Unable to load from file '</span> +
- <span class="hljs-string">'because there is no "fs" or "path" implementation'</span>);
- }
-
- <span class="hljs-keyword">var</span> loadTemplateFn = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">err, data</span>) </span>{
- <span class="hljs-keyword">if</span> (err) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> error_callback === <span class="hljs-string">'function'</span>) {
- error_callback(err);
- }
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">if</span> (precompiled === <span class="hljs-literal">true</span>) {
- data = <span class="hljs-built_in">JSON</span>.parse(data);
- }
-
- params.data = data;
- params.path = params.path || location;</pre></div></div>
-
- </li>
-
-
- <li id="section-104">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-104">&#182;</a>
- </div>
- <p>template is in data</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> template = parser.call(<span class="hljs-keyword">this</span>, params);
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> callback === <span class="hljs-string">'function'</span>) {
- callback(template);
- }
- };
- params.path = params.path || location;
-
- <span class="hljs-keyword">if</span> (params.async) {
- fs.stat(params.path, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, stats</span>) </span>{
- <span class="hljs-keyword">if</span> (err || !stats.isFile()) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Unable to find template file '</span> + location);
- }
- fs.readFile(params.path, <span class="hljs-string">'utf8'</span>, loadTemplateFn);
- });</pre></div></div>
-
- </li>
-
-
- <li id="section-105">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-105">&#182;</a>
- </div>
- <p>TODO: return deferred promise</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">if</span> (!fs.statSync(params.path).isFile()) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Unable to find template file '</span> + location);
- }
- data = fs.readFileSync(params.path, <span class="hljs-string">'utf8'</span>);
- loadTemplateFn(<span class="hljs-literal">undefined</span>, data);
- <span class="hljs-keyword">return</span> template
- }
- });
-
-}(Twig));(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">Twig</span>)</span>{
-<span class="hljs-meta"> 'use strict'</span>;
-
- Twig.Templates.registerParser(<span class="hljs-string">'source'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">params</span>) </span>{
- <span class="hljs-keyword">return</span> params.data || <span class="hljs-string">''</span>;
- });
-})(Twig);
-(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">Twig</span>)</span>{
-<span class="hljs-meta"> 'use strict'</span>;
-
- Twig.Templates.registerParser(<span class="hljs-string">'twig'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">params</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> Twig.Template(params);
- });
-})(Twig);</pre></div></div>
-
- </li>
-
-
- <li id="section-106">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-106">&#182;</a>
- </div>
- <p>The following methods are from MDN and are available under a
-<a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a> or are
-<a href="https://developer.mozilla.org/Project:Copyrights">Public Domain</a>.</p>
-<p>See:</p>
-<ul>
-<li><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys">Object.keys - MDN</a></li>
-</ul>
-
- </div>
-
- </li>
-
-
- <li id="section-107">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-107">&#182;</a>
- </div>
- <h2 id="twig-fills-js">twig.fills.js</h2>
-<p>This file contains fills for backwards compatability.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-108">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-108">&#182;</a>
- </div>
- <p>Handle methods that don’t yet exist in every browser</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">if</span> (!<span class="hljs-built_in">String</span>.prototype.trim) {
- <span class="hljs-built_in">String</span>.prototype.trim = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.replace(<span class="hljs-regexp">/^\s+|\s+$/g</span>,<span class="hljs-string">''</span>);
- }
- };
-
- <span class="hljs-keyword">if</span>(!<span class="hljs-built_in">Object</span>.keys) <span class="hljs-built_in">Object</span>.keys = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">o</span>)</span>{
- <span class="hljs-keyword">if</span> (o !== <span class="hljs-built_in">Object</span>(o)) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">TypeError</span>(<span class="hljs-string">'Object.keys called on non-object'</span>);
- }
- <span class="hljs-keyword">var</span> ret = [], p;
- <span class="hljs-keyword">for</span> (p <span class="hljs-keyword">in</span> o) <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Object</span>.prototype.hasOwnProperty.call(o, p)) ret.push(p);
- <span class="hljs-keyword">return</span> ret;
- }
-
-})();</pre></div></div>
-
- </li>
-
-
- <li id="section-109">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-109">&#182;</a>
- </div>
- <h2 id="twig-lib-js">twig.lib.js</h2>
-<p>This file contains 3rd party libraries used within twig.</p>
-<p>Copies of the licenses for the code included here can be found in the
-LICENSES.md file.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
-<span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">Twig</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-110">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-110">&#182;</a>
- </div>
- <p>Namespace for libraries</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.lib = { };
-
- <span class="hljs-comment">/**
- sprintf() for JavaScript 1.0.3
- https://github.com/alexei/sprintf.js
- **/</span>
- <span class="hljs-keyword">var</span> sprintfLib = (<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> re = {
- not_string: <span class="hljs-regexp">/[^s]/</span>,
- number: <span class="hljs-regexp">/[diefg]/</span>,
- json: <span class="hljs-regexp">/[j]/</span>,
- not_json: <span class="hljs-regexp">/[^j]/</span>,
- text: <span class="hljs-regexp">/^[^\x25]+/</span>,
- modulo: <span class="hljs-regexp">/^\x25{2}/</span>,
- placeholder: <span class="hljs-regexp">/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/</span>,
- key: <span class="hljs-regexp">/^([a-z_][a-z_\d]*)/i</span>,
- key_access: <span class="hljs-regexp">/^\.([a-z_][a-z_\d]*)/i</span>,
- index_access: <span class="hljs-regexp">/^\[(\d+)\]/</span>,
- sign: <span class="hljs-regexp">/^[\+\-]/</span>
- }
-
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sprintf</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> key = <span class="hljs-built_in">arguments</span>[<span class="hljs-number">0</span>], cache = sprintf.cache
- <span class="hljs-keyword">if</span> (!(cache[key] &amp;&amp; cache.hasOwnProperty(key))) {
- cache[key] = sprintf.parse(key)
- }
- <span class="hljs-keyword">return</span> sprintf.format.call(<span class="hljs-literal">null</span>, cache[key], <span class="hljs-built_in">arguments</span>)
- }
-
- sprintf.format = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">parse_tree, argv</span>) </span>{
- <span class="hljs-keyword">var</span> cursor = <span class="hljs-number">1</span>, tree_length = parse_tree.length, node_type = <span class="hljs-string">""</span>, arg, output = [], i, k, match, pad, pad_character, pad_length, is_positive = <span class="hljs-literal">true</span>, sign = <span class="hljs-string">""</span>
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>; i &lt; tree_length; i++) {
- node_type = get_type(parse_tree[i])
- <span class="hljs-keyword">if</span> (node_type === <span class="hljs-string">"string"</span>) {
- output[output.length] = parse_tree[i]
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (node_type === <span class="hljs-string">"array"</span>) {
- match = parse_tree[i] <span class="hljs-comment">// convenience purposes only</span>
- <span class="hljs-keyword">if</span> (match[<span class="hljs-number">2</span>]) { <span class="hljs-comment">// keyword argument</span>
- arg = argv[cursor]
- <span class="hljs-keyword">for</span> (k = <span class="hljs-number">0</span>; k &lt; match[<span class="hljs-number">2</span>].length; k++) {
- <span class="hljs-keyword">if</span> (!arg.hasOwnProperty(match[<span class="hljs-number">2</span>][k])) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(sprintf(<span class="hljs-string">"[sprintf] property '%s' does not exist"</span>, match[<span class="hljs-number">2</span>][k]))
- }
- arg = arg[match[<span class="hljs-number">2</span>][k]]
- }
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">1</span>]) { <span class="hljs-comment">// positional argument (explicit)</span>
- arg = argv[match[<span class="hljs-number">1</span>]]
- }
- <span class="hljs-keyword">else</span> { <span class="hljs-comment">// positional argument (implicit)</span>
- arg = argv[cursor++]
- }
-
- <span class="hljs-keyword">if</span> (get_type(arg) == <span class="hljs-string">"function"</span>) {
- arg = arg()
- }
-
- <span class="hljs-keyword">if</span> (re.not_string.test(match[<span class="hljs-number">8</span>]) &amp;&amp; re.not_json.test(match[<span class="hljs-number">8</span>]) &amp;&amp; (get_type(arg) != <span class="hljs-string">"number"</span> &amp;&amp; <span class="hljs-built_in">isNaN</span>(arg))) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">TypeError</span>(sprintf(<span class="hljs-string">"[sprintf] expecting number but found %s"</span>, get_type(arg)))
- }
-
- <span class="hljs-keyword">if</span> (re.number.test(match[<span class="hljs-number">8</span>])) {
- is_positive = arg &gt;= <span class="hljs-number">0</span>
- }
-
- <span class="hljs-keyword">switch</span> (match[<span class="hljs-number">8</span>]) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">"b"</span>:
- arg = arg.toString(<span class="hljs-number">2</span>)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"c"</span>:
- arg = <span class="hljs-built_in">String</span>.fromCharCode(arg)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"d"</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">"i"</span>:
- arg = <span class="hljs-built_in">parseInt</span>(arg, <span class="hljs-number">10</span>)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"j"</span>:
- arg = <span class="hljs-built_in">JSON</span>.stringify(arg, <span class="hljs-literal">null</span>, match[<span class="hljs-number">6</span>] ? <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">6</span>]) : <span class="hljs-number">0</span>)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"e"</span>:
- arg = match[<span class="hljs-number">7</span>] ? arg.toExponential(match[<span class="hljs-number">7</span>]) : arg.toExponential()
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"f"</span>:
- arg = match[<span class="hljs-number">7</span>] ? <span class="hljs-built_in">parseFloat</span>(arg).toFixed(match[<span class="hljs-number">7</span>]) : <span class="hljs-built_in">parseFloat</span>(arg)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"g"</span>:
- arg = match[<span class="hljs-number">7</span>] ? <span class="hljs-built_in">parseFloat</span>(arg).toPrecision(match[<span class="hljs-number">7</span>]) : <span class="hljs-built_in">parseFloat</span>(arg)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"o"</span>:
- arg = arg.toString(<span class="hljs-number">8</span>)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"s"</span>:
- arg = ((arg = <span class="hljs-built_in">String</span>(arg)) &amp;&amp; match[<span class="hljs-number">7</span>] ? arg.substring(<span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>]) : arg)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"u"</span>:
- arg = arg &gt;&gt;&gt; <span class="hljs-number">0</span>
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"x"</span>:
- arg = arg.toString(<span class="hljs-number">16</span>)
- <span class="hljs-keyword">break</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">"X"</span>:
- arg = arg.toString(<span class="hljs-number">16</span>).toUpperCase()
- <span class="hljs-keyword">break</span>
- }
- <span class="hljs-keyword">if</span> (re.json.test(match[<span class="hljs-number">8</span>])) {
- output[output.length] = arg
- }
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">if</span> (re.number.test(match[<span class="hljs-number">8</span>]) &amp;&amp; (!is_positive || match[<span class="hljs-number">3</span>])) {
- sign = is_positive ? <span class="hljs-string">"+"</span> : <span class="hljs-string">"-"</span>
- arg = arg.toString().replace(re.sign, <span class="hljs-string">""</span>)
- }
- <span class="hljs-keyword">else</span> {
- sign = <span class="hljs-string">""</span>
- }
- pad_character = match[<span class="hljs-number">4</span>] ? match[<span class="hljs-number">4</span>] === <span class="hljs-string">"0"</span> ? <span class="hljs-string">"0"</span> : match[<span class="hljs-number">4</span>].charAt(<span class="hljs-number">1</span>) : <span class="hljs-string">" "</span>
- pad_length = match[<span class="hljs-number">6</span>] - (sign + arg).length
- pad = match[<span class="hljs-number">6</span>] ? (pad_length &gt; <span class="hljs-number">0</span> ? str_repeat(pad_character, pad_length) : <span class="hljs-string">""</span>) : <span class="hljs-string">""</span>
- output[output.length] = match[<span class="hljs-number">5</span>] ? sign + arg + pad : (pad_character === <span class="hljs-string">"0"</span> ? sign + pad + arg : pad + sign + arg)
- }
- }
- }
- <span class="hljs-keyword">return</span> output.join(<span class="hljs-string">""</span>)
- }
-
- sprintf.cache = {}
-
- sprintf.parse = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">fmt</span>) </span>{
- <span class="hljs-keyword">var</span> _fmt = fmt, match = [], parse_tree = [], arg_names = <span class="hljs-number">0</span>
- <span class="hljs-keyword">while</span> (_fmt) {
- <span class="hljs-keyword">if</span> ((match = re.text.exec(_fmt)) !== <span class="hljs-literal">null</span>) {
- parse_tree[parse_tree.length] = match[<span class="hljs-number">0</span>]
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ((match = re.modulo.exec(_fmt)) !== <span class="hljs-literal">null</span>) {
- parse_tree[parse_tree.length] = <span class="hljs-string">"%"</span>
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ((match = re.placeholder.exec(_fmt)) !== <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">if</span> (match[<span class="hljs-number">2</span>]) {
- arg_names |= <span class="hljs-number">1</span>
- <span class="hljs-keyword">var</span> field_list = [], replacement_field = match[<span class="hljs-number">2</span>], field_match = []
- <span class="hljs-keyword">if</span> ((field_match = re.key.exec(replacement_field)) !== <span class="hljs-literal">null</span>) {
- field_list[field_list.length] = field_match[<span class="hljs-number">1</span>]
- <span class="hljs-keyword">while</span> ((replacement_field = replacement_field.substring(field_match[<span class="hljs-number">0</span>].length)) !== <span class="hljs-string">""</span>) {
- <span class="hljs-keyword">if</span> ((field_match = re.key_access.exec(replacement_field)) !== <span class="hljs-literal">null</span>) {
- field_list[field_list.length] = field_match[<span class="hljs-number">1</span>]
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ((field_match = re.index_access.exec(replacement_field)) !== <span class="hljs-literal">null</span>) {
- field_list[field_list.length] = field_match[<span class="hljs-number">1</span>]
- }
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">SyntaxError</span>(<span class="hljs-string">"[sprintf] failed to parse named argument key"</span>)
- }
- }
- }
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">SyntaxError</span>(<span class="hljs-string">"[sprintf] failed to parse named argument key"</span>)
- }
- match[<span class="hljs-number">2</span>] = field_list
- }
- <span class="hljs-keyword">else</span> {
- arg_names |= <span class="hljs-number">2</span>
- }
- <span class="hljs-keyword">if</span> (arg_names === <span class="hljs-number">3</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">"[sprintf] mixing positional and named placeholders is not (yet) supported"</span>)
- }
- parse_tree[parse_tree.length] = match
- }
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">SyntaxError</span>(<span class="hljs-string">"[sprintf] unexpected placeholder"</span>)
- }
- _fmt = _fmt.substring(match[<span class="hljs-number">0</span>].length)
- }
- <span class="hljs-keyword">return</span> parse_tree
- }
-
- <span class="hljs-keyword">var</span> vsprintf = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">fmt, argv, _argv</span>) </span>{
- _argv = (argv || []).slice(<span class="hljs-number">0</span>)
- _argv.splice(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, fmt)
- <span class="hljs-keyword">return</span> sprintf.apply(<span class="hljs-literal">null</span>, _argv)
- }
-
- <span class="hljs-comment">/**
- * helpers
- */</span>
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">get_type</span>(<span class="hljs-params">variable</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">Object</span>.prototype.toString.call(variable).slice(<span class="hljs-number">8</span>, <span class="hljs-number">-1</span>).toLowerCase()
- }
-
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">str_repeat</span>(<span class="hljs-params">input, multiplier</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">Array</span>(multiplier + <span class="hljs-number">1</span>).join(input)
- }
-
- <span class="hljs-comment">/**
- * export
- */</span>
- <span class="hljs-keyword">return</span> {
- sprintf: sprintf,
- vsprintf: vsprintf
- }
- })();
-
- <span class="hljs-keyword">var</span> sprintf = sprintfLib.sprintf;
- <span class="hljs-keyword">var</span> vsprintf = sprintfLib.vsprintf;</pre></div></div>
-
- </li>
-
-
- <li id="section-111">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-111">&#182;</a>
- </div>
- <p>Expose to Twig</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.lib.sprintf = sprintf;
- Twig.lib.vsprintf = vsprintf;
-
-
- <span class="hljs-comment">/**
- * jPaq - A fully customizable JavaScript/JScript library
- * http://jpaq.org/
- *
- * Copyright (c) 2011 Christopher West
- * Licensed under the MIT license.
- * http://jpaq.org/license/
- *
- * Version: 1.0.6.0000W
- * Revised: April 6, 2011
- */</span>
- ; (<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> shortDays = <span class="hljs-string">"Sun,Mon,Tue,Wed,Thu,Fri,Sat"</span>.split(<span class="hljs-string">","</span>);
- <span class="hljs-keyword">var</span> fullDays = <span class="hljs-string">"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"</span>.split(<span class="hljs-string">","</span>);
- <span class="hljs-keyword">var</span> shortMonths = <span class="hljs-string">"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"</span>.split(<span class="hljs-string">","</span>);
- <span class="hljs-keyword">var</span> fullMonths = <span class="hljs-string">"January,February,March,April,May,June,July,August,September,October,November,December"</span>.split(<span class="hljs-string">","</span>);
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getOrdinalFor</span>(<span class="hljs-params">intNum</span>) </span>{
- <span class="hljs-keyword">return</span> (((intNum = <span class="hljs-built_in">Math</span>.abs(intNum) % <span class="hljs-number">100</span>) % <span class="hljs-number">10</span> == <span class="hljs-number">1</span> &amp;&amp; intNum != <span class="hljs-number">11</span>) ? <span class="hljs-string">"st"</span>
- : (intNum % <span class="hljs-number">10</span> == <span class="hljs-number">2</span> &amp;&amp; intNum != <span class="hljs-number">12</span>) ? <span class="hljs-string">"nd"</span> : (intNum % <span class="hljs-number">10</span> == <span class="hljs-number">3</span>
- &amp;&amp; intNum != <span class="hljs-number">13</span>) ? <span class="hljs-string">"rd"</span> : <span class="hljs-string">"th"</span>);
- }
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getISO8601Year</span>(<span class="hljs-params">aDate</span>) </span>{
- <span class="hljs-keyword">var</span> d = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(aDate.getFullYear() + <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">4</span>);
- <span class="hljs-keyword">if</span>((d - aDate) / <span class="hljs-number">86400000</span> &lt; <span class="hljs-number">7</span> &amp;&amp; (aDate.getDay() + <span class="hljs-number">6</span>) % <span class="hljs-number">7</span> &lt; (d.getDay() + <span class="hljs-number">6</span>) % <span class="hljs-number">7</span>)
- <span class="hljs-keyword">return</span> d.getFullYear();
- <span class="hljs-keyword">if</span>(aDate.getMonth() &gt; <span class="hljs-number">0</span> || aDate.getDate() &gt;= <span class="hljs-number">4</span>)
- <span class="hljs-keyword">return</span> aDate.getFullYear();
- <span class="hljs-keyword">return</span> aDate.getFullYear() - (((aDate.getDay() + <span class="hljs-number">6</span>) % <span class="hljs-number">7</span> - aDate.getDate() &gt; <span class="hljs-number">2</span>) ? <span class="hljs-number">1</span> : <span class="hljs-number">0</span>);
- }
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getISO8601Week</span>(<span class="hljs-params">aDate</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-112">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-112">&#182;</a>
- </div>
- <p>Get a day during the first week of the year.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> d = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(getISO8601Year(aDate), <span class="hljs-number">0</span>, <span class="hljs-number">4</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-113">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-113">&#182;</a>
- </div>
- <p>Get the first monday of the year.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> d.setDate(d.getDate() - (d.getDay() + <span class="hljs-number">6</span>) % <span class="hljs-number">7</span>);
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">parseInt</span>((aDate - d) / <span class="hljs-number">604800000</span>) + <span class="hljs-number">1</span>;
- }
- Twig.lib.formatDate = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">date, format</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-114">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-114">&#182;</a>
- </div>
- <p>/ <summary>
-/ Gets a string for this date, formatted according to the given format
-/ string.
-/ </summary>
-/ <param name="format" type="String">
-/ The format of the output date string. The format string works in a
-/ nearly identical way to the PHP date function which is highlighted here:
-/ <a href="http://php.net/manual/en/function.date.php">http://php.net/manual/en/function.date.php</a>.
-/ The only difference is the fact that “u” signifies milliseconds
-/ instead of microseconds. The following characters are recognized in
-/ the format parameter string:
-/ d - Day of the month, 2 digits with leading zeros
-/ D - A textual representation of a day, three letters
-/ j - Day of the month without leading zeros
-/ l (lowercase ‘L’) - A full textual representation of the day of the week
-/ N - ISO-8601 numeric representation of the day of the week (starting from 1)
-/ S - English ordinal suffix for the day of the month, 2 characters st,
-/ nd, rd or th. Works well with j.
-/ w - Numeric representation of the day of the week (starting from 0)
-/ z - The day of the year (starting from 0)
-/ W - ISO-8601 week number of year, weeks starting on Monday
-/ F - A full textual representation of a month, such as January or March
-/ m - Numeric representation of a month, with leading zeros
-/ M - A short textual representation of a month, three letters
-/ n - Numeric representation of a month, without leading zeros
-/ t - Number of days in the given month
-/ L - Whether it’s a leap year
-/ o - ISO-8601 year number. This has the same value as Y, except that if
-/ the ISO week number (W) belongs to the previous or next year, that
-/ year is used instead.
-/ Y - A full numeric representation of a year, 4 digits
-/ y - A two digit representation of a year
-/ a - Lowercase Ante meridiem and Post meridiem
-/ A - Uppercase Ante meridiem and Post meridiem
-/ B - Swatch Internet time
-/ g - 12-hour format of an hour without leading zeros
-/ G - 24-hour format of an hour without leading zeros
-/ h - 12-hour format of an hour with leading zeros
-/ H - 24-hour format of an hour with leading zeros
-/ i - Minutes with leading zeros
-/ s - Seconds, with leading zeros
-/ u - Milliseconds
-/ U - Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
-/ </param>
-/ <returns type="String">
-/ Returns the string for this date, formatted according to the given
-/ format string.
-/ </returns>
-If the format was not passed, use the default toString method.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> format !== <span class="hljs-string">"string"</span> || <span class="hljs-regexp">/^\s*$/</span>.test(format))
- <span class="hljs-keyword">return</span> date + <span class="hljs-string">""</span>;
- <span class="hljs-keyword">var</span> jan1st = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(date.getFullYear(), <span class="hljs-number">0</span>, <span class="hljs-number">1</span>);
- <span class="hljs-keyword">var</span> me = date;
- <span class="hljs-keyword">return</span> format.replace(<span class="hljs-regexp">/[dDjlNSwzWFmMntLoYyaABgGhHisuU]/g</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">option</span>) </span>{
- <span class="hljs-keyword">switch</span>(option) {</pre></div></div>
-
- </li>
-
-
- <li id="section-115">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-115">&#182;</a>
- </div>
- <p>Day of the month, 2 digits with leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"d"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + me.getDate()).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-116">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-116">&#182;</a>
- </div>
- <p>A textual representation of a day, three letters</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"D"</span>: <span class="hljs-keyword">return</span> shortDays[me.getDay()];</pre></div></div>
-
- </li>
-
-
- <li id="section-117">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-117">&#182;</a>
- </div>
- <p>Day of the month without leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"j"</span>: <span class="hljs-keyword">return</span> me.getDate();</pre></div></div>
-
- </li>
-
-
- <li id="section-118">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-118">&#182;</a>
- </div>
- <p>A full textual representation of the day of the week</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"l"</span>: <span class="hljs-keyword">return</span> fullDays[me.getDay()];</pre></div></div>
-
- </li>
-
-
- <li id="section-119">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-119">&#182;</a>
- </div>
- <p>ISO-8601 numeric representation of the day of the week</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"N"</span>: <span class="hljs-keyword">return</span> (me.getDay() + <span class="hljs-number">6</span>) % <span class="hljs-number">7</span> + <span class="hljs-number">1</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-120">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-120">&#182;</a>
- </div>
- <p>English ordinal suffix for the day of the month, 2 characters</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"S"</span>: <span class="hljs-keyword">return</span> getOrdinalFor(me.getDate());</pre></div></div>
-
- </li>
-
-
- <li id="section-121">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-121">&#182;</a>
- </div>
- <p>Numeric representation of the day of the week</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"w"</span>: <span class="hljs-keyword">return</span> me.getDay();</pre></div></div>
-
- </li>
-
-
- <li id="section-122">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-122">&#182;</a>
- </div>
- <p>The day of the year (starting from 0)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"z"</span>: <span class="hljs-keyword">return</span> <span class="hljs-built_in">Math</span>.ceil((jan1st - me) / <span class="hljs-number">86400000</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-123">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-123">&#182;</a>
- </div>
- <p>ISO-8601 week number of year, weeks starting on Monday</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"W"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + getISO8601Week(me)).replace(<span class="hljs-regexp">/^.(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-124">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-124">&#182;</a>
- </div>
- <p>A full textual representation of a month, such as January or March</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"F"</span>: <span class="hljs-keyword">return</span> fullMonths[me.getMonth()];</pre></div></div>
-
- </li>
-
-
- <li id="section-125">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-125">&#182;</a>
- </div>
- <p>Numeric representation of a month, with leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"m"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + (me.getMonth() + <span class="hljs-number">1</span>)).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-126">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-126">&#182;</a>
- </div>
- <p>A short textual representation of a month, three letters</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"M"</span>: <span class="hljs-keyword">return</span> shortMonths[me.getMonth()];</pre></div></div>
-
- </li>
-
-
- <li id="section-127">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-127">&#182;</a>
- </div>
- <p>Numeric representation of a month, without leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"n"</span>: <span class="hljs-keyword">return</span> me.getMonth() + <span class="hljs-number">1</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-128">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-128">&#182;</a>
- </div>
- <p>Number of days in the given month</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"t"</span>: <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(me.getFullYear(), me.getMonth() + <span class="hljs-number">1</span>, <span class="hljs-number">-1</span>).getDate();</pre></div></div>
-
- </li>
-
-
- <li id="section-129">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-129">&#182;</a>
- </div>
- <p>Whether it’s a leap year</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"L"</span>: <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(me.getFullYear(), <span class="hljs-number">1</span>, <span class="hljs-number">29</span>).getDate() == <span class="hljs-number">29</span> ? <span class="hljs-number">1</span> : <span class="hljs-number">0</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-130">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-130">&#182;</a>
- </div>
- <p>ISO-8601 year number. This has the same value as Y, except that if the
-ISO week number (W) belongs to the previous or next year, that year is
-used instead.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"o"</span>: <span class="hljs-keyword">return</span> getISO8601Year(me);</pre></div></div>
-
- </li>
-
-
- <li id="section-131">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-131">&#182;</a>
- </div>
- <p>A full numeric representation of a year, 4 digits</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"Y"</span>: <span class="hljs-keyword">return</span> me.getFullYear();</pre></div></div>
-
- </li>
-
-
- <li id="section-132">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-132">&#182;</a>
- </div>
- <p>A two digit representation of a year</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"y"</span>: <span class="hljs-keyword">return</span> (me.getFullYear() + <span class="hljs-string">""</span>).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-133">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-133">&#182;</a>
- </div>
- <p>Lowercase Ante meridiem and Post meridiem</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"a"</span>: <span class="hljs-keyword">return</span> me.getHours() &lt; <span class="hljs-number">12</span> ? <span class="hljs-string">"am"</span> : <span class="hljs-string">"pm"</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-134">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-134">&#182;</a>
- </div>
- <p>Uppercase Ante meridiem and Post meridiem</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"A"</span>: <span class="hljs-keyword">return</span> me.getHours() &lt; <span class="hljs-number">12</span> ? <span class="hljs-string">"AM"</span> : <span class="hljs-string">"PM"</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-135">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-135">&#182;</a>
- </div>
- <p>Swatch Internet time</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"B"</span>: <span class="hljs-keyword">return</span> <span class="hljs-built_in">Math</span>.floor((((me.getUTCHours() + <span class="hljs-number">1</span>) % <span class="hljs-number">24</span>) + me.getUTCMinutes() / <span class="hljs-number">60</span> + me.getUTCSeconds() / <span class="hljs-number">3600</span>) * <span class="hljs-number">1000</span> / <span class="hljs-number">24</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-136">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-136">&#182;</a>
- </div>
- <p>12-hour format of an hour without leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"g"</span>: <span class="hljs-keyword">return</span> me.getHours() % <span class="hljs-number">12</span> != <span class="hljs-number">0</span> ? me.getHours() % <span class="hljs-number">12</span> : <span class="hljs-number">12</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-137">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-137">&#182;</a>
- </div>
- <p>24-hour format of an hour without leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"G"</span>: <span class="hljs-keyword">return</span> me.getHours();</pre></div></div>
-
- </li>
-
-
- <li id="section-138">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-138">&#182;</a>
- </div>
- <p>12-hour format of an hour with leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"h"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + (me.getHours() % <span class="hljs-number">12</span> != <span class="hljs-number">0</span> ? me.getHours() % <span class="hljs-number">12</span> : <span class="hljs-number">12</span>)).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-139">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-139">&#182;</a>
- </div>
- <p>24-hour format of an hour with leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"H"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + me.getHours()).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-140">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-140">&#182;</a>
- </div>
- <p>Minutes with leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"i"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + me.getMinutes()).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-141">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-141">&#182;</a>
- </div>
- <p>Seconds, with leading zeros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"s"</span>: <span class="hljs-keyword">return</span> (<span class="hljs-string">"0"</span> + me.getSeconds()).replace(<span class="hljs-regexp">/^.+(..)$/</span>, <span class="hljs-string">"$1"</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-142">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-142">&#182;</a>
- </div>
- <p>Milliseconds</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"u"</span>: <span class="hljs-keyword">return</span> me.getMilliseconds();</pre></div></div>
-
- </li>
-
-
- <li id="section-143">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-143">&#182;</a>
- </div>
- <p>Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">"U"</span>: <span class="hljs-keyword">return</span> me.getTime() / <span class="hljs-number">1000</span>;
- }
- });
- };
- })();
-
- Twig.lib.strip_tags = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">input, allowed</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-144">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-144">&#182;</a>
- </div>
- <p>Strips HTML and PHP tags from a string</p>
-<p>version: 1109.2015
-discuss at: <a href="http://phpjs.org/functions/strip_tags">http://phpjs.org/functions/strip_tags</a></p>
-<ul>
-<li>original by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)</li>
-<li>improved by: Luke Godfrey</li>
-<li>input by: Pul</li>
-<li>bugfixed by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)</li>
-<li>bugfixed by: Onno Marsman</li>
-<li>input by: Alex</li>
-<li>bugfixed by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)</li>
-<li>input by: Marc Palau</li>
-<li>improved by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)</li>
-<li>input by: Brett Zamir (<a href="http://brett-zamir.me">http://brett-zamir.me</a>)</li>
-<li>bugfixed by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)</li>
-<li>bugfixed by: Eric Nagel</li>
-<li>input by: Bobby Drake</li>
-<li>bugfixed by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)</li>
-<li>bugfixed by: Tomasz Wesolowski</li>
-<li>input by: Evertjan Garretsen</li>
-<li>revised by: Rafał Kukawski (<a href="http://blog.kukawski.pl/">http://blog.kukawski.pl/</a>)</li>
-<li>example 1: strip_tags(‘<p>Kevin</p> <b>van</b> <i>Zonneveld</i>‘, ‘<i><b>‘);</li>
-<li>returns 1: ‘Kevin <b>van</b> <i>Zonneveld</i>‘</li>
-<li>example 2: strip_tags(‘<p>Kevin <img src="someimage.png" onmouseover="someFunction()">van <i>Zonneveld</i></p>‘, ‘<p>‘);</li>
-<li>returns 2: ‘<p>Kevin van Zonneveld</p>‘</li>
-<li>example 3: strip_tags(“<a href='http://kevin.vanzonneveld.net'>Kevin van Zonneveld</a>“, “<a>“);</li>
-<li>returns 3: ‘<a href='http://kevin.vanzonneveld.net'>Kevin van Zonneveld</a>‘</li>
-<li>example 4: strip_tags(‘1 &lt; 5 5 &gt; 1’);</li>
-<li>returns 4: ‘1 &lt; 5 5 &gt; 1’</li>
-<li>example 5: strip_tags(‘1 <br/> 1’);</li>
-<li>returns 5: ‘1 1’</li>
-<li>example 6: strip_tags(‘1 <br/> 1’, ‘<br>‘);</li>
-<li>returns 6: ‘1 1’</li>
-<li>example 7: strip_tags(‘1 <br/> 1’, ‘<br><br/>‘);</li>
-<li>returns 7: ‘1 <br/> 1’</li>
-</ul>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> allowed = (((allowed || <span class="hljs-string">""</span>) + <span class="hljs-string">""</span>).toLowerCase().match(<span class="hljs-regexp">/&lt;[a-z][a-z0-9]*&gt;/g</span>) || []).join(<span class="hljs-string">''</span>); <span class="hljs-comment">// making sure the allowed arg is a string containing only tags in lowercase (&lt;a&gt;&lt;b&gt;&lt;c&gt;)</span>
- <span class="hljs-keyword">var</span> tags = <span class="hljs-regexp">/&lt;\/?([a-z][a-z0-9]*)\b[^&gt;]*&gt;/gi</span>,
- commentsAndPhpTags = <span class="hljs-regexp">/&lt;!--[\s\S]*?--&gt;|&lt;\?(?:php)?[\s\S]*?\?&gt;/gi</span>;
- <span class="hljs-keyword">return</span> input.replace(commentsAndPhpTags, <span class="hljs-string">''</span>).replace(tags, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">$0, $1</span>) </span>{
- <span class="hljs-keyword">return</span> allowed.indexOf(<span class="hljs-string">'&lt;'</span> + $<span class="hljs-number">1.</span>toLowerCase() + <span class="hljs-string">'&gt;'</span>) &gt; <span class="hljs-number">-1</span> ? $<span class="hljs-number">0</span> : <span class="hljs-string">''</span>;
- });
- }
-
- Twig.lib.parseISO8601Date = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">s</span>)</span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-145">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-145">&#182;</a>
- </div>
- <p>Taken from <a href="http://n8v.enteuxis.org/2010/12/parsing-iso-8601-dates-in-javascript/">http://n8v.enteuxis.org/2010/12/parsing-iso-8601-dates-in-javascript/</a>
-parenthese matches:
-year month day hours minutes seconds<br>dotmilliseconds
-tzstring plusminus hours minutes</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> re = <span class="hljs-regexp">/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d+)?(Z|([+-])(\d\d):(\d\d))/</span>;
-
- <span class="hljs-keyword">var</span> d = [];
- d = s.match(re);</pre></div></div>
-
- </li>
-
-
- <li id="section-146">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-146">&#182;</a>
- </div>
- <p>“2010-12-07T11:00:00.000-09:00” parses to:
- [“2010-12-07T11:00:00.000-09:00”, “2010”, “12”, “07”, “11”,
- “00”, “00”, “.000”, “-09:00”, “-“, “09”, “00”]
-“2010-12-07T11:00:00.000Z” parses to:
- [“2010-12-07T11:00:00.000Z”, “2010”, “12”, “07”, “11”,
- “00”, “00”, “.000”, “Z”, undefined, undefined, undefined]</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">if</span> (! d) {
- <span class="hljs-keyword">throw</span> <span class="hljs-string">"Couldn't parse ISO 8601 date string '"</span> + s + <span class="hljs-string">"'"</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-147">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-147">&#182;</a>
- </div>
- <p>parse strings, leading zeros into proper ints</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> a = [<span class="hljs-number">1</span>,<span class="hljs-number">2</span>,<span class="hljs-number">3</span>,<span class="hljs-number">4</span>,<span class="hljs-number">5</span>,<span class="hljs-number">6</span>,<span class="hljs-number">10</span>,<span class="hljs-number">11</span>];
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i <span class="hljs-keyword">in</span> a) {
- d[a[i]] = <span class="hljs-built_in">parseInt</span>(d[a[i]], <span class="hljs-number">10</span>);
- }
- d[<span class="hljs-number">7</span>] = <span class="hljs-built_in">parseFloat</span>(d[<span class="hljs-number">7</span>]);</pre></div></div>
-
- </li>
-
-
- <li id="section-148">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-148">&#182;</a>
- </div>
- <p>Date.UTC(year, month[, date[, hrs[, min[, sec[, ms]]]]])
-note that month is 0-11, not 1-12
-see <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/UTC">https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/UTC</a></p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> ms = <span class="hljs-built_in">Date</span>.UTC(d[<span class="hljs-number">1</span>], d[<span class="hljs-number">2</span>] - <span class="hljs-number">1</span>, d[<span class="hljs-number">3</span>], d[<span class="hljs-number">4</span>], d[<span class="hljs-number">5</span>], d[<span class="hljs-number">6</span>]);</pre></div></div>
-
- </li>
-
-
- <li id="section-149">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-149">&#182;</a>
- </div>
- <p>if there are milliseconds, add them</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (d[<span class="hljs-number">7</span>] &gt; <span class="hljs-number">0</span>) {
- ms += <span class="hljs-built_in">Math</span>.round(d[<span class="hljs-number">7</span>] * <span class="hljs-number">1000</span>);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-150">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-150">&#182;</a>
- </div>
- <p>if there’s a timezone, calculate it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (d[<span class="hljs-number">8</span>] != <span class="hljs-string">"Z"</span> &amp;&amp; d[<span class="hljs-number">10</span>]) {
- <span class="hljs-keyword">var</span> offset = d[<span class="hljs-number">10</span>] * <span class="hljs-number">60</span> * <span class="hljs-number">60</span> * <span class="hljs-number">1000</span>;
- <span class="hljs-keyword">if</span> (d[<span class="hljs-number">11</span>]) {
- offset += d[<span class="hljs-number">11</span>] * <span class="hljs-number">60</span> * <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">if</span> (d[<span class="hljs-number">9</span>] == <span class="hljs-string">"-"</span>) {
- ms -= offset;
- }
- <span class="hljs-keyword">else</span> {
- ms += offset;
- }
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(ms);
- };
-
- Twig.lib.strtotime = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">text, now</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-151">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-151">&#182;</a>
- </div>
- <p> discuss at: <a href="http://phpjs.org/functions/strtotime/">http://phpjs.org/functions/strtotime/</a>
- version: 1109.2016
-original by: Caio Ariede (<a href="http://caioariede.com">http://caioariede.com</a>)
-improved by: Kevin van Zonneveld (<a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a>)
-improved by: Caio Ariede (<a href="http://caioariede.com">http://caioariede.com</a>)
-improved by: A. Matías Quezada (<a href="http://amatiasq.com">http://amatiasq.com</a>)
-improved by: preuter
-improved by: Brett Zamir (<a href="http://brett-zamir.me">http://brett-zamir.me</a>)
-improved by: Mirko Faber
- input by: David
-bugfixed by: Wagner B. Soares
-bugfixed by: Artur Tchernychev
-bugfixed by: Stephan Bösch-Plepelits (<a href="http://github.com/plepe">http://github.com/plepe</a>)
- note: Examples all have a fixed timestamp to prevent tests to fail because of variable time(zones)
- example 1: strtotime(‘+1 day’, 1129633200);
- returns 1: 1129719600
- example 2: strtotime(‘+1 week 2 days 4 hours 2 seconds’, 1129633200);
- returns 2: 1130425202
- example 3: strtotime(‘last month’, 1129633200);
- returns 3: 1127041200
- example 4: strtotime(‘2009-05-04 08:30:00 GMT’);
- returns 4: 1241425800
- example 5: strtotime(‘2009-05-04 08:30:00+00’);
- returns 5: 1241425800
- example 6: strtotime(‘2009-05-04 08:30:00+02:00’);
- returns 6: 1241418600
- example 7: strtotime(‘2009-05-04T08:30:00Z’);
- returns 7: 1241425800</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">var</span> parsed, match, today, year, date, days, ranges, len, times, regex, i, fail = <span class="hljs-literal">false</span>;
-
- <span class="hljs-keyword">if</span> (!text) {
- <span class="hljs-keyword">return</span> fail;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-152">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-152">&#182;</a>
- </div>
- <p>Unecessary spaces</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> text = text.replace(<span class="hljs-regexp">/^\s+|\s+$/g</span>, <span class="hljs-string">''</span>)
- .replace(<span class="hljs-regexp">/\s{2,}/g</span>, <span class="hljs-string">' '</span>)
- .replace(<span class="hljs-regexp">/[\t\r\n]/g</span>, <span class="hljs-string">''</span>)
- .toLowerCase();</pre></div></div>
-
- </li>
-
-
- <li id="section-153">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-153">&#182;</a>
- </div>
- <p>in contrast to php, js Date.parse function interprets:
-dates given as yyyy-mm-dd as in timezone: UTC,
-dates with “.” or “-“ as MDY instead of DMY
-dates with two-digit years differently
-etc…etc…
-…therefore we manually parse lots of common date formats</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> match = text.match(
- <span class="hljs-regexp">/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/</span>);
-
- <span class="hljs-keyword">if</span> (match &amp;&amp; match[<span class="hljs-number">2</span>] === match[<span class="hljs-number">4</span>]) {
- <span class="hljs-keyword">if</span> (match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">1901</span>) {
- <span class="hljs-keyword">switch</span> (match[<span class="hljs-number">2</span>]) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">'-'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-154">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-154">&#182;</a>
- </div>
- <p>YYYY-M-D</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">5</span>] &gt; <span class="hljs-number">31</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(match[<span class="hljs-number">1</span>], <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">3</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">5</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">'.'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-155">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-155">&#182;</a>
- </div>
- <p>YYYY.M.D is not parsed by strtotime()</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> fail;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">'/'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-156">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-156">&#182;</a>
- </div>
- <p>YYYY/M/D</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">5</span>] &gt; <span class="hljs-number">31</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(match[<span class="hljs-number">1</span>], <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">3</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">5</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- }
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">5</span>] &gt; <span class="hljs-number">1901</span>) {
- <span class="hljs-keyword">switch</span> (match[<span class="hljs-number">2</span>]) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">'-'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-157">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-157">&#182;</a>
- </div>
- <p>D-M-YYYY</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">31</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(match[<span class="hljs-number">5</span>], <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">3</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">1</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">'.'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-158">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-158">&#182;</a>
- </div>
- <p>D.M.YYYY</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">31</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(match[<span class="hljs-number">5</span>], <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">3</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">1</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">'/'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-159">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-159">&#182;</a>
- </div>
- <p>M/D/YYYY</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">31</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(match[<span class="hljs-number">5</span>], <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">1</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">3</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- }
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">switch</span> (match[<span class="hljs-number">2</span>]) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">'-'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-160">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-160">&#182;</a>
- </div>
- <p>YY-M-D</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">5</span>] &gt; <span class="hljs-number">31</span> || (match[<span class="hljs-number">1</span>] &lt; <span class="hljs-number">70</span> &amp;&amp; match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">38</span>)) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- year = match[<span class="hljs-number">1</span>] &gt;= <span class="hljs-number">0</span> &amp;&amp; match[<span class="hljs-number">1</span>] &lt;= <span class="hljs-number">38</span> ? +match[<span class="hljs-number">1</span>] + <span class="hljs-number">2000</span> : match[<span class="hljs-number">1</span>];
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(year, <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">3</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">5</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">'.'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-161">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-161">&#182;</a>
- </div>
- <p>D.M.YY or H.MM.SS</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">5</span>] &gt;= <span class="hljs-number">70</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-162">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-162">&#182;</a>
- </div>
- <p>D.M.YY</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">31</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(match[<span class="hljs-number">5</span>], <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">3</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">1</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">if</span> (match[<span class="hljs-number">5</span>] &lt; <span class="hljs-number">60</span> &amp;&amp; !match[<span class="hljs-number">6</span>]) {</pre></div></div>
-
- </li>
-
-
- <li id="section-163">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-163">&#182;</a>
- </div>
- <p>H.MM.SS</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">23</span> || match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">59</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- today = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(today.getFullYear(), today.getMonth(), today.getDate(),
- match[<span class="hljs-number">1</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">3</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">5</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-164">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-164">&#182;</a>
- </div>
- <p>invalid format, cannot be parsed</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> fail;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">'/'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-165">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-165">&#182;</a>
- </div>
- <p>M/D/YY</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">12</span> || match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">31</span> || (match[<span class="hljs-number">5</span>] &lt; <span class="hljs-number">70</span> &amp;&amp; match[<span class="hljs-number">5</span>] &gt; <span class="hljs-number">38</span>)) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- year = match[<span class="hljs-number">5</span>] &gt;= <span class="hljs-number">0</span> &amp;&amp; match[<span class="hljs-number">5</span>] &lt;= <span class="hljs-number">38</span> ? +match[<span class="hljs-number">5</span>] + <span class="hljs-number">2000</span> : match[<span class="hljs-number">5</span>];
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(year, <span class="hljs-built_in">parseInt</span>(match[<span class="hljs-number">1</span>], <span class="hljs-number">10</span>) - <span class="hljs-number">1</span>, match[<span class="hljs-number">3</span>],
- match[<span class="hljs-number">6</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">7</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">8</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">9</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- <span class="hljs-keyword">case</span> <span class="hljs-string">':'</span>:
- {</pre></div></div>
-
- </li>
-
-
- <li id="section-166">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-166">&#182;</a>
- </div>
- <p>HH:MM:SS</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">1</span>] &gt; <span class="hljs-number">23</span> || match[<span class="hljs-number">3</span>] &gt; <span class="hljs-number">59</span> || match[<span class="hljs-number">5</span>] &gt; <span class="hljs-number">59</span>) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- today = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(today.getFullYear(), today.getMonth(), today.getDate(),
- match[<span class="hljs-number">1</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">3</span>] || <span class="hljs-number">0</span>, match[<span class="hljs-number">5</span>] || <span class="hljs-number">0</span>) / <span class="hljs-number">1000</span>;
- }
- }
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-167">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-167">&#182;</a>
- </div>
- <p>other formats and “now” should be parsed by Date.parse()</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (text === <span class="hljs-string">'now'</span>) {
- <span class="hljs-keyword">return</span> now === <span class="hljs-literal">null</span> || <span class="hljs-built_in">isNaN</span>(now) ? <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>()
- .getTime() / <span class="hljs-number">1000</span> | <span class="hljs-number">0</span> : now | <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">if</span> (!<span class="hljs-built_in">isNaN</span>(parsed = <span class="hljs-built_in">Date</span>.parse(text))) {
- <span class="hljs-keyword">return</span> parsed / <span class="hljs-number">1000</span> | <span class="hljs-number">0</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-168">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-168">&#182;</a>
- </div>
- <p>Browsers != Chrome have problems parsing ISO 8601 date strings, as they do
-not accept lower case characters, space, or shortened time zones.
-Therefore, fix these problems and try again.
-Examples:
- 2015-04-15 20:33:59+02
- 2015-04-15 20:33:59z
- 2015-04-15t20:33:59+02:00</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match = text.match(<span class="hljs-regexp">/^([0-9]{4}-[0-9]{2}-[0-9]{2})[ t]([0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?)([\+-][0-9]{2}(:[0-9]{2})?|z)/</span>)) {</pre></div></div>
-
- </li>
-
-
- <li id="section-169">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-169">&#182;</a>
- </div>
- <p>fix time zone information</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">4</span>] == <span class="hljs-string">'z'</span>) {
- match[<span class="hljs-number">4</span>] = <span class="hljs-string">'Z'</span>;
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (match[<span class="hljs-number">4</span>].match(<span class="hljs-regexp">/^([\+-][0-9]{2})$/</span>)) {
- match[<span class="hljs-number">4</span>] = match[<span class="hljs-number">4</span>] + <span class="hljs-string">':00'</span>;
- }
-
- <span class="hljs-keyword">if</span> (!<span class="hljs-built_in">isNaN</span>(parsed = <span class="hljs-built_in">Date</span>.parse(match[<span class="hljs-number">1</span>] + <span class="hljs-string">'T'</span> + match[<span class="hljs-number">2</span>] + match[<span class="hljs-number">4</span>]))) {
- <span class="hljs-keyword">return</span> parsed / <span class="hljs-number">1000</span> | <span class="hljs-number">0</span>;
- }
- }
-
- date = now ? <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(now * <span class="hljs-number">1000</span>) : <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();
- days = {
- <span class="hljs-string">'sun'</span>: <span class="hljs-number">0</span>,
- <span class="hljs-string">'mon'</span>: <span class="hljs-number">1</span>,
- <span class="hljs-string">'tue'</span>: <span class="hljs-number">2</span>,
- <span class="hljs-string">'wed'</span>: <span class="hljs-number">3</span>,
- <span class="hljs-string">'thu'</span>: <span class="hljs-number">4</span>,
- <span class="hljs-string">'fri'</span>: <span class="hljs-number">5</span>,
- <span class="hljs-string">'sat'</span>: <span class="hljs-number">6</span>
- };
- ranges = {
- <span class="hljs-string">'yea'</span>: <span class="hljs-string">'FullYear'</span>,
- <span class="hljs-string">'mon'</span>: <span class="hljs-string">'Month'</span>,
- <span class="hljs-string">'day'</span>: <span class="hljs-string">'Date'</span>,
- <span class="hljs-string">'hou'</span>: <span class="hljs-string">'Hours'</span>,
- <span class="hljs-string">'min'</span>: <span class="hljs-string">'Minutes'</span>,
- <span class="hljs-string">'sec'</span>: <span class="hljs-string">'Seconds'</span>
- };
-
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">lastNext</span>(<span class="hljs-params">type, range, modifier</span>) </span>{
- <span class="hljs-keyword">var</span> diff, day = days[range];
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> day !== <span class="hljs-string">'undefined'</span>) {
- diff = day - date.getDay();
-
- <span class="hljs-keyword">if</span> (diff === <span class="hljs-number">0</span>) {
- diff = <span class="hljs-number">7</span> * modifier;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (diff &gt; <span class="hljs-number">0</span> &amp;&amp; type === <span class="hljs-string">'last'</span>) {
- diff -= <span class="hljs-number">7</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (diff &lt; <span class="hljs-number">0</span> &amp;&amp; type === <span class="hljs-string">'next'</span>) {
- diff += <span class="hljs-number">7</span>;
- }
-
- date.setDate(date.getDate() + diff);
- }
- }
-
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">process</span>(<span class="hljs-params">val</span>) </span>{
- <span class="hljs-keyword">var</span> splt = val.split(<span class="hljs-string">' '</span>), <span class="hljs-comment">// Todo: Reconcile this with regex using \s, taking into account browser issues with split and regexes</span>
- type = splt[<span class="hljs-number">0</span>],
- range = splt[<span class="hljs-number">1</span>].substring(<span class="hljs-number">0</span>, <span class="hljs-number">3</span>),
- typeIsNumber = <span class="hljs-regexp">/\d+/</span>.test(type),
- ago = splt[<span class="hljs-number">2</span>] === <span class="hljs-string">'ago'</span>,
- num = (type === <span class="hljs-string">'last'</span> ? <span class="hljs-number">-1</span> : <span class="hljs-number">1</span>) * (ago ? <span class="hljs-number">-1</span> : <span class="hljs-number">1</span>);
-
- <span class="hljs-keyword">if</span> (typeIsNumber) {
- num *= <span class="hljs-built_in">parseInt</span>(type, <span class="hljs-number">10</span>);
- }
-
- <span class="hljs-keyword">if</span> (ranges.hasOwnProperty(range) &amp;&amp; !splt[<span class="hljs-number">1</span>].match(<span class="hljs-regexp">/^mon(day|\.)?$/i</span>)) {
- <span class="hljs-keyword">return</span> date[<span class="hljs-string">'set'</span> + ranges[range]](date[<span class="hljs-string">'get'</span> + ranges[range]]() + num);
- }
-
- <span class="hljs-keyword">if</span> (range === <span class="hljs-string">'wee'</span>) {
- <span class="hljs-keyword">return</span> date.setDate(date.getDate() + (num * <span class="hljs-number">7</span>));
- }
-
- <span class="hljs-keyword">if</span> (type === <span class="hljs-string">'next'</span> || type === <span class="hljs-string">'last'</span>) {
- lastNext(type, range, num);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (!typeIsNumber) {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
- }
-
- times = <span class="hljs-string">'(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec'</span> +
- <span class="hljs-string">'|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?'</span> +
- <span class="hljs-string">'|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)'</span>;
- regex = <span class="hljs-string">'([+-]?\\d+\\s'</span> + times + <span class="hljs-string">'|'</span> + <span class="hljs-string">'(last|next)\\s'</span> + times + <span class="hljs-string">')(\\sago)?'</span>;
-
- match = text.match(<span class="hljs-keyword">new</span> <span class="hljs-built_in">RegExp</span>(regex, <span class="hljs-string">'gi'</span>));
- <span class="hljs-keyword">if</span> (!match) {
- <span class="hljs-keyword">return</span> fail;
- }
-
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>, len = match.length; i &lt; len; i++) {
- <span class="hljs-keyword">if</span> (!process(match[i])) {
- <span class="hljs-keyword">return</span> fail;
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-170">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-170">&#182;</a>
- </div>
- <p>ECMAScript 5 only
-if (!match.every(process))
- return false;</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">return</span> (date.getTime() / <span class="hljs-number">1000</span>);
- };
-
- Twig.lib.is = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">type, obj</span>) </span>{
- <span class="hljs-keyword">var</span> clas = <span class="hljs-built_in">Object</span>.prototype.toString.call(obj).slice(<span class="hljs-number">8</span>, <span class="hljs-number">-1</span>);
- <span class="hljs-keyword">return</span> obj !== <span class="hljs-literal">undefined</span> &amp;&amp; obj !== <span class="hljs-literal">null</span> &amp;&amp; clas === type;
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-171">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-171">&#182;</a>
- </div>
- <p>shallow-copy an object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.lib.copy = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">src</span>) </span>{
- <span class="hljs-keyword">var</span> target = {},
- key;
- <span class="hljs-keyword">for</span> (key <span class="hljs-keyword">in</span> src)
- target[key] = src[key];
-
- <span class="hljs-keyword">return</span> target;
- };
-
- Twig.lib.replaceAll = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">string, search, replace</span>) </span>{
- <span class="hljs-keyword">return</span> string.split(search).join(replace);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-172">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-172">&#182;</a>
- </div>
- <p>chunk an array (arr) into arrays of (size) items, returns an array of arrays, or an empty array on invalid input</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.lib.chunkArray = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">arr, size</span>) </span>{
- <span class="hljs-keyword">var</span> returnVal = [],
- x = <span class="hljs-number">0</span>,
- len = arr.length;
-
- <span class="hljs-keyword">if</span> (size &lt; <span class="hljs-number">1</span> || !Twig.lib.is(<span class="hljs-string">"Array"</span>, arr)) {
- <span class="hljs-keyword">return</span> [];
- }
-
- <span class="hljs-keyword">while</span> (x &lt; len) {
- returnVal.push(arr.slice(x, x += size));
- }
-
- <span class="hljs-keyword">return</span> returnVal;
- };
-
- Twig.lib.round = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">round</span>(<span class="hljs-params">value, precision, mode</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-173">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-173">&#182;</a>
- </div>
- <p> discuss at: <a href="http://phpjs.org/functions/round/">http://phpjs.org/functions/round/</a>
-original by: Philip Peterson
- revised by: Onno Marsman
- revised by: T.Wild
- revised by: Rafał Kukawski (<a href="http://blog.kukawski.pl/">http://blog.kukawski.pl/</a>)
- input by: Greenseed
- input by: meo
- input by: William
- input by: Josep Sanz (<a href="http://www.ws3.es/">http://www.ws3.es/</a>)
-bugfixed by: Brett Zamir (<a href="http://brett-zamir.me">http://brett-zamir.me</a>)
- note: Great work. Ideas for improvement:
- note: - code more compliant with developer guidelines
- note: - for implementing PHP constant arguments look at
- note: the pathinfo() function, it offers the greatest
- note: flexibility &amp; compatibility possible
- example 1: round(1241757, -3);
- returns 1: 1242000
- example 2: round(3.6);
- returns 2: 4
- example 3: round(2.835, 2);
- returns 3: 2.84
- example 4: round(1.1749999999999, 2);
- returns 4: 1.17
- example 5: round(58551.799999999996, 2);
- returns 5: 58551.8</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">var</span> m, f, isHalf, sgn; <span class="hljs-comment">// helper variables</span>
- precision |= <span class="hljs-number">0</span>; <span class="hljs-comment">// making sure precision is integer</span>
- m = <span class="hljs-built_in">Math</span>.pow(<span class="hljs-number">10</span>, precision);
- value *= m;
- sgn = (value &gt; <span class="hljs-number">0</span>) | -(value &lt; <span class="hljs-number">0</span>); <span class="hljs-comment">// sign of the number</span>
- isHalf = value % <span class="hljs-number">1</span> === <span class="hljs-number">0.5</span> * sgn;
- f = <span class="hljs-built_in">Math</span>.floor(value);
-
- <span class="hljs-keyword">if</span> (isHalf) {
- <span class="hljs-keyword">switch</span> (mode) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">'PHP_ROUND_HALF_DOWN'</span>:
- value = f + (sgn &lt; <span class="hljs-number">0</span>); <span class="hljs-comment">// rounds .5 toward zero</span>
- <span class="hljs-keyword">break</span>;
- <span class="hljs-keyword">case</span> <span class="hljs-string">'PHP_ROUND_HALF_EVEN'</span>:
- value = f + (f % <span class="hljs-number">2</span> * sgn); <span class="hljs-comment">// rouds .5 towards the next even integer</span>
- <span class="hljs-keyword">break</span>;
- <span class="hljs-keyword">case</span> <span class="hljs-string">'PHP_ROUND_HALF_ODD'</span>:
- value = f + !(f % <span class="hljs-number">2</span>); <span class="hljs-comment">// rounds .5 towards the next odd integer</span>
- <span class="hljs-keyword">break</span>;
- <span class="hljs-keyword">default</span>:
- value = f + (sgn &gt; <span class="hljs-number">0</span>); <span class="hljs-comment">// rounds .5 away from zero</span>
- }
- }
-
- <span class="hljs-keyword">return</span> (isHalf ? value : <span class="hljs-built_in">Math</span>.round(value)) / m;
- };
-
- Twig.lib.max = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">max</span>(<span class="hljs-params"></span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-174">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-174">&#182;</a>
- </div>
- <p> discuss at: <a href="http://phpjs.org/functions/max/">http://phpjs.org/functions/max/</a>
-original by: Onno Marsman
- revised by: Onno Marsman
-improved by: Jack
- note: Long code cause we’re aiming for maximum PHP compatibility
- example 1: max(1, 3, 5, 6, 7);
- returns 1: 7
- example 2: max([2, 4, 5]);
- returns 2: 5
- example 3: max(0, ‘hello’);
- returns 3: 0
- example 4: max(‘hello’, 0);
- returns 4: ‘hello’
- example 5: max(-1, ‘hello’);
- returns 5: ‘hello’
- example 6: max([2, 4, 8], [2, 5, 7]);
- returns 6: [2, 5, 7]</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">var</span> ar, retVal, i = <span class="hljs-number">0</span>,
- n = <span class="hljs-number">0</span>,
- argv = <span class="hljs-built_in">arguments</span>,
- argc = argv.length,
- _obj2Array = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">obj</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Object</span>.prototype.toString.call(obj) === <span class="hljs-string">'[object Array]'</span>) {
- <span class="hljs-keyword">return</span> obj;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">var</span> ar = [];
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i <span class="hljs-keyword">in</span> obj) {
- <span class="hljs-keyword">if</span> (obj.hasOwnProperty(i)) {
- ar.push(obj[i]);
- }
- }
- <span class="hljs-keyword">return</span> ar;
- }
- }, <span class="hljs-comment">//function _obj2Array</span>
- _compare = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">current, next</span>) </span>{
- <span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>,
- n = <span class="hljs-number">0</span>,
- tmp = <span class="hljs-number">0</span>,
- nl = <span class="hljs-number">0</span>,
- cl = <span class="hljs-number">0</span>;
-
- <span class="hljs-keyword">if</span> (current === next) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> current === <span class="hljs-string">'object'</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> next === <span class="hljs-string">'object'</span>) {
- current = _obj2Array(current);
- next = _obj2Array(next);
- cl = current.length;
- nl = next.length;
- <span class="hljs-keyword">if</span> (nl &gt; cl) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (nl &lt; cl) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>, n = cl; i &lt; n; ++i) {
- tmp = _compare(current[i], next[i]);
- <span class="hljs-keyword">if</span> (tmp == <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (tmp == <span class="hljs-number">-1</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
- }
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> next === <span class="hljs-string">'object'</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-built_in">isNaN</span>(next) &amp;&amp; !<span class="hljs-built_in">isNaN</span>(current)) {
- <span class="hljs-keyword">if</span> (current == <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> (current &lt; <span class="hljs-number">0</span> ? <span class="hljs-number">1</span> : <span class="hljs-number">-1</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-built_in">isNaN</span>(current) &amp;&amp; !<span class="hljs-built_in">isNaN</span>(next)) {
- <span class="hljs-keyword">if</span> (next == <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> (next &gt; <span class="hljs-number">0</span> ? <span class="hljs-number">1</span> : <span class="hljs-number">-1</span>);
- }
-
- <span class="hljs-keyword">if</span> (next == current) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> (next &gt; current ? <span class="hljs-number">1</span> : <span class="hljs-number">-1</span>);
- }; <span class="hljs-comment">//function _compare</span>
- <span class="hljs-keyword">if</span> (argc === <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'At least one value should be passed to max()'</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (argc === <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> argv[<span class="hljs-number">0</span>] === <span class="hljs-string">'object'</span>) {
- ar = _obj2Array(argv[<span class="hljs-number">0</span>]);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'Wrong parameter count for max()'</span>);
- }
- <span class="hljs-keyword">if</span> (ar.length === <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'Array must contain at least one element for max()'</span>);
- }
- } <span class="hljs-keyword">else</span> {
- ar = argv;
- }
-
- retVal = ar[<span class="hljs-number">0</span>];
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">1</span>, n = ar.length; i &lt; n; ++i) {
- <span class="hljs-keyword">if</span> (_compare(retVal, ar[i]) == <span class="hljs-number">1</span>) {
- retVal = ar[i];
- }
- }
-
- <span class="hljs-keyword">return</span> retVal;
- };
-
- Twig.lib.min = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">min</span>(<span class="hljs-params"></span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-175">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-175">&#182;</a>
- </div>
- <p> discuss at: <a href="http://phpjs.org/functions/min/">http://phpjs.org/functions/min/</a>
-original by: Onno Marsman
- revised by: Onno Marsman
-improved by: Jack
- note: Long code cause we’re aiming for maximum PHP compatibility
- example 1: min(1, 3, 5, 6, 7);
- returns 1: 1
- example 2: min([2, 4, 5]);
- returns 2: 2
- example 3: min(0, ‘hello’);
- returns 3: 0
- example 4: min(‘hello’, 0);
- returns 4: ‘hello’
- example 5: min(-1, ‘hello’);
- returns 5: -1
- example 6: min([2, 4, 8], [2, 5, 7]);
- returns 6: [2, 4, 8]</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">var</span> ar, retVal, i = <span class="hljs-number">0</span>,
- n = <span class="hljs-number">0</span>,
- argv = <span class="hljs-built_in">arguments</span>,
- argc = argv.length,
- _obj2Array = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">obj</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-built_in">Object</span>.prototype.toString.call(obj) === <span class="hljs-string">'[object Array]'</span>) {
- <span class="hljs-keyword">return</span> obj;
- }
- <span class="hljs-keyword">var</span> ar = [];
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i <span class="hljs-keyword">in</span> obj) {
- <span class="hljs-keyword">if</span> (obj.hasOwnProperty(i)) {
- ar.push(obj[i]);
- }
- }
- <span class="hljs-keyword">return</span> ar;
- }, <span class="hljs-comment">//function _obj2Array</span>
- _compare = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">current, next</span>) </span>{
- <span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>,
- n = <span class="hljs-number">0</span>,
- tmp = <span class="hljs-number">0</span>,
- nl = <span class="hljs-number">0</span>,
- cl = <span class="hljs-number">0</span>;
-
- <span class="hljs-keyword">if</span> (current === next) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> current === <span class="hljs-string">'object'</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> next === <span class="hljs-string">'object'</span>) {
- current = _obj2Array(current);
- next = _obj2Array(next);
- cl = current.length;
- nl = next.length;
- <span class="hljs-keyword">if</span> (nl &gt; cl) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (nl &lt; cl) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>, n = cl; i &lt; n; ++i) {
- tmp = _compare(current[i], next[i]);
- <span class="hljs-keyword">if</span> (tmp == <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (tmp == <span class="hljs-number">-1</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- }
- }
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> next === <span class="hljs-string">'object'</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">1</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-built_in">isNaN</span>(next) &amp;&amp; !<span class="hljs-built_in">isNaN</span>(current)) {
- <span class="hljs-keyword">if</span> (current == <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> (current &lt; <span class="hljs-number">0</span> ? <span class="hljs-number">1</span> : <span class="hljs-number">-1</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-built_in">isNaN</span>(current) &amp;&amp; !<span class="hljs-built_in">isNaN</span>(next)) {
- <span class="hljs-keyword">if</span> (next == <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> (next &gt; <span class="hljs-number">0</span> ? <span class="hljs-number">1</span> : <span class="hljs-number">-1</span>);
- }
-
- <span class="hljs-keyword">if</span> (next == current) {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">return</span> (next &gt; current ? <span class="hljs-number">1</span> : <span class="hljs-number">-1</span>);
- }; <span class="hljs-comment">//function _compare</span>
-
- <span class="hljs-keyword">if</span> (argc === <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'At least one value should be passed to min()'</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (argc === <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> argv[<span class="hljs-number">0</span>] === <span class="hljs-string">'object'</span>) {
- ar = _obj2Array(argv[<span class="hljs-number">0</span>]);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'Wrong parameter count for min()'</span>);
- }
-
- <span class="hljs-keyword">if</span> (ar.length === <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'Array must contain at least one element for min()'</span>);
- }
- } <span class="hljs-keyword">else</span> {
- ar = argv;
- }
-
- retVal = ar[<span class="hljs-number">0</span>];
-
- <span class="hljs-keyword">for</span> (i = <span class="hljs-number">1</span>, n = ar.length; i &lt; n; ++i) {
- <span class="hljs-keyword">if</span> (_compare(retVal, ar[i]) == <span class="hljs-number">-1</span>) {
- retVal = ar[i];
- }
- }
-
- <span class="hljs-keyword">return</span> retVal;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-})(Twig || { });</pre></div></div>
-
- </li>
-
-
- <li id="section-176">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-176">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-177">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-177">&#182;</a>
- </div>
- <h2 id="twig-logic-js">twig.logic.js</h2>
-<p>This file handles tokenizing, compiling and parsing logic tokens. {% … %}</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;
-
- <span class="hljs-comment">/**
- * Namespace for logic handling.
- */</span>
- Twig.logic = {};
-
- <span class="hljs-comment">/**
- * Logic token types.
- */</span>
- Twig.logic.type = {
- if_: <span class="hljs-string">'Twig.logic.type.if'</span>,
- endif: <span class="hljs-string">'Twig.logic.type.endif'</span>,
- for_: <span class="hljs-string">'Twig.logic.type.for'</span>,
- endfor: <span class="hljs-string">'Twig.logic.type.endfor'</span>,
- else_: <span class="hljs-string">'Twig.logic.type.else'</span>,
- elseif: <span class="hljs-string">'Twig.logic.type.elseif'</span>,
- set: <span class="hljs-string">'Twig.logic.type.set'</span>,
- setcapture:<span class="hljs-string">'Twig.logic.type.setcapture'</span>,
- endset: <span class="hljs-string">'Twig.logic.type.endset'</span>,
- filter: <span class="hljs-string">'Twig.logic.type.filter'</span>,
- endfilter: <span class="hljs-string">'Twig.logic.type.endfilter'</span>,
- shortblock: <span class="hljs-string">'Twig.logic.type.shortblock'</span>,
- block: <span class="hljs-string">'Twig.logic.type.block'</span>,
- endblock: <span class="hljs-string">'Twig.logic.type.endblock'</span>,
- extends_: <span class="hljs-string">'Twig.logic.type.extends'</span>,
- use: <span class="hljs-string">'Twig.logic.type.use'</span>,
- include: <span class="hljs-string">'Twig.logic.type.include'</span>,
- spaceless: <span class="hljs-string">'Twig.logic.type.spaceless'</span>,
- endspaceless: <span class="hljs-string">'Twig.logic.type.endspaceless'</span>,
- macro: <span class="hljs-string">'Twig.logic.type.macro'</span>,
- endmacro: <span class="hljs-string">'Twig.logic.type.endmacro'</span>,
- import_: <span class="hljs-string">'Twig.logic.type.import'</span>,
- <span class="hljs-keyword">from</span>: <span class="hljs-string">'Twig.logic.type.from'</span>,
- embed: <span class="hljs-string">'Twig.logic.type.embed'</span>,
- endembed: <span class="hljs-string">'Twig.logic.type.endembed'</span>
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-178">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-178">&#182;</a>
- </div>
- <p>Regular expressions for handling logic tokens.</p>
-<p>Properties:</p>
-<pre><code> type: The type of expression this matches
-
- regex: A regular expression that matches the format of the token
-
- next: What logic tokens (if any) pop this token off the logic stack. If empty, the
- logic token is assumed to not require an end tag and isn&#39;t push onto the stack.
-
- open: Does this tag open a logic expression or is it standalone. For example,
- {% endif %} cannot exist without an opening {% if ... %} tag, so open = false.
-</code></pre><p> Functions:</p>
-<pre><code> compile: A <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">that</span> <span class="hljs-title">handles</span> <span class="hljs-title">compiling</span> <span class="hljs-title">the</span> <span class="hljs-title">token</span> <span class="hljs-title">into</span> <span class="hljs-title">an</span> <span class="hljs-title">output</span> <span class="hljs-title">token</span> <span class="hljs-title">ready</span> <span class="hljs-title">for</span>
- <span class="hljs-title">parsing</span> <span class="hljs-title">with</span> <span class="hljs-title">the</span> <span class="hljs-title">parse</span> <span class="hljs-title">function</span>.
-
- <span class="hljs-title">parse</span>: <span class="hljs-title">A</span> <span class="hljs-title">function</span> <span class="hljs-title">that</span> <span class="hljs-title">parses</span> <span class="hljs-title">the</span> <span class="hljs-title">compiled</span> <span class="hljs-title">token</span> <span class="hljs-title">into</span> <span class="hljs-title">output</span> (<span class="hljs-params">HTML / whatever the
- template represents</span>).</span>
-</code></pre>
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.logic.definitions = [
- {
- <span class="hljs-comment">/**
- * If type logic tokens.
- *
- * Format: {% if expression %}
- */</span>
- type: Twig.logic.type.if_,
- regex: <span class="hljs-regexp">/^if\s+([\s\S]+)$/</span>,
- next: [
- Twig.logic.type.else_,
- Twig.logic.type.elseif,
- Twig.logic.type.endif
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = token.match[<span class="hljs-number">1</span>];</pre></div></div>
-
- </li>
-
-
- <li id="section-179">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-179">&#182;</a>
- </div>
- <p>Compile the expression.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> output = <span class="hljs-string">''</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-180">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-180">&#182;</a>
- </div>
- <p>Parse the expression</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> result = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]);</pre></div></div>
-
- </li>
-
-
- <li id="section-181">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-181">&#182;</a>
- </div>
- <p>Start a new logic chain</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> chain = <span class="hljs-literal">true</span>;
-
- <span class="hljs-keyword">if</span> (result) {
- chain = <span class="hljs-literal">false</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-182">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-182">&#182;</a>
- </div>
- <p>parse if output</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context]);
- }
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: output
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * Else if type logic tokens.
- *
- * Format: {% elseif expression %}
- */</span>
- type: Twig.logic.type.elseif,
- regex: <span class="hljs-regexp">/^elseif\s+([^\s].*)$/</span>,
- next: [
- Twig.logic.type.else_,
- Twig.logic.type.elseif,
- Twig.logic.type.endif
- ],
- open: <span class="hljs-literal">false</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = token.match[<span class="hljs-number">1</span>];</pre></div></div>
-
- </li>
-
-
- <li id="section-183">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-183">&#182;</a>
- </div>
- <p>Compile the expression.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> output = <span class="hljs-string">''</span>;
-
- <span class="hljs-keyword">if</span> (chain &amp;&amp; Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]) === <span class="hljs-literal">true</span>) {
- chain = <span class="hljs-literal">false</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-184">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-184">&#182;</a>
- </div>
- <p>parse if output</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context]);
- }
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: output
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * Else if type logic tokens.
- *
- * Format: {% elseif expression %}
- */</span>
- type: Twig.logic.type.else_,
- regex: <span class="hljs-regexp">/^else$/</span>,
- next: [
- Twig.logic.type.endif,
- Twig.logic.type.endfor
- ],
- open: <span class="hljs-literal">false</span>,
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> output = <span class="hljs-string">''</span>;
- <span class="hljs-keyword">if</span> (chain) {
- output = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context]);
- }
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: output
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * End if type logic tokens.
- *
- * Format: {% endif %}
- */</span>
- type: Twig.logic.type.endif,
- regex: <span class="hljs-regexp">/^endif$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/**
- * For type logic tokens.
- *
- * Format: {% for expression %}
- */</span>
- type: Twig.logic.type.for_,
- regex: <span class="hljs-regexp">/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/</span>,
- next: [
- Twig.logic.type.else_,
- Twig.logic.type.endfor
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> key_value = token.match[<span class="hljs-number">1</span>],
- expression = token.match[<span class="hljs-number">2</span>],
- conditional = token.match[<span class="hljs-number">3</span>],
- kv_split = <span class="hljs-literal">null</span>;
-
- token.key_var = <span class="hljs-literal">null</span>;
- token.value_var = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">if</span> (key_value.indexOf(<span class="hljs-string">","</span>) &gt;= <span class="hljs-number">0</span>) {
- kv_split = key_value.split(<span class="hljs-string">','</span>);
- <span class="hljs-keyword">if</span> (kv_split.length === <span class="hljs-number">2</span>) {
- token.key_var = kv_split[<span class="hljs-number">0</span>].trim();
- token.value_var = kv_split[<span class="hljs-number">1</span>].trim();
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Invalid expression in for loop: "</span> + key_value);
- }
- } <span class="hljs-keyword">else</span> {
- token.value_var = key_value;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-185">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-185">&#182;</a>
- </div>
- <p>Valid expressions for a for loop
- for item in expression
- for key,item in expression</p>
-
- </div>
-
- </li>
-
-
- <li id="section-186">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-186">&#182;</a>
- </div>
- <p>Compile the expression.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.expression = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;</pre></div></div>
-
- </li>
-
-
- <li id="section-187">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-187">&#182;</a>
- </div>
- <p>Compile the conditional (if available)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (conditional) {
- token.conditional = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: conditional
- }]).stack;
- }
-
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, continue_chain</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-188">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-188">&#182;</a>
- </div>
- <p>Parse expression</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> result = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.expression, context]),
- output = [],
- len,
- index = <span class="hljs-number">0</span>,
- keyset,
- that = <span class="hljs-keyword">this</span>,
- conditional = token.conditional,
- buildLoop = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">index, len</span>) </span>{
- <span class="hljs-keyword">var</span> isConditional = conditional !== <span class="hljs-literal">undefined</span>;
- <span class="hljs-keyword">return</span> {
- index: index+<span class="hljs-number">1</span>,
- index0: index,
- revindex: isConditional?<span class="hljs-literal">undefined</span>:len-index,
- revindex0: isConditional?<span class="hljs-literal">undefined</span>:len-index<span class="hljs-number">-1</span>,
- first: (index === <span class="hljs-number">0</span>),
- last: isConditional?<span class="hljs-literal">undefined</span>:(index === len<span class="hljs-number">-1</span>),
- length: isConditional?<span class="hljs-literal">undefined</span>:len,
- parent: context
- };
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-189">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-189">&#182;</a>
- </div>
- <p>run once for each iteration of the loop</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> loop = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key, value</span>) </span>{
- <span class="hljs-keyword">var</span> inner_context = Twig.ChildContext(context);
-
- inner_context[token.value_var] = value;
-
- <span class="hljs-keyword">if</span> (token.key_var) {
- inner_context[token.key_var] = key;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-190">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-190">&#182;</a>
- </div>
- <p>Loop object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> inner_context.loop = buildLoop(index, len);
-
- <span class="hljs-keyword">if</span> (conditional === <span class="hljs-literal">undefined</span> ||
- Twig.expression.parse.apply(that, [conditional, inner_context]))
- {
- output.push(Twig.parse.apply(that, [token.output, inner_context]));
- index += <span class="hljs-number">1</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-191">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-191">&#182;</a>
- </div>
- <p>Delete loop-related variables from the context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">delete</span> inner_context[<span class="hljs-string">'loop'</span>];
- <span class="hljs-keyword">delete</span> inner_context[token.value_var];
- <span class="hljs-keyword">delete</span> inner_context[token.key_var];</pre></div></div>
-
- </li>
-
-
- <li id="section-192">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-192">&#182;</a>
- </div>
- <p>Merge in values that exist in context but have changed
-in inner_context.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.merge(context, inner_context, <span class="hljs-literal">true</span>);
- };
-
-
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">'Array'</span>, result)) {
- len = result.length;
- Twig.forEach(result, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">var</span> key = index;
-
- loop(key, value);
- });
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">'Object'</span>, result)) {
- <span class="hljs-keyword">if</span> (result._keys !== <span class="hljs-literal">undefined</span>) {
- keyset = result._keys;
- } <span class="hljs-keyword">else</span> {
- keyset = <span class="hljs-built_in">Object</span>.keys(result);
- }
- len = keyset.length;
- Twig.forEach(keyset, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-193">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-193">&#182;</a>
- </div>
- <p>Ignore the _keys property, it’s internal to twig.js</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (key === <span class="hljs-string">"_keys"</span>) <span class="hljs-keyword">return</span>;
-
- loop(key, result[key]);
- });
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-194">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-194">&#182;</a>
- </div>
- <p>Only allow else statements if no output was generated</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> continue_chain = (output.length === <span class="hljs-number">0</span>);
-
- <span class="hljs-keyword">return</span> {
- chain: continue_chain,
- output: Twig.output.apply(<span class="hljs-keyword">this</span>, [output])
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * End if type logic tokens.
- *
- * Format: {% endif %}
- */</span>
- type: Twig.logic.type.endfor,
- regex: <span class="hljs-regexp">/^endfor$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/**
- * Set type logic tokens.
- *
- * Format: {% set key = expression %}
- */</span>
- type: Twig.logic.type.set,
- regex: <span class="hljs-regexp">/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*([\s\S]+)$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> key = token.match[<span class="hljs-number">1</span>].trim(),
- expression = token.match[<span class="hljs-number">2</span>],</pre></div></div>
-
- </li>
-
-
- <li id="section-195">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-195">&#182;</a>
- </div>
- <p>Compile the expression.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> expression_stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- token.key = key;
- token.expression = expression_stack;
-
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, continue_chain</span>) </span>{
- <span class="hljs-keyword">var</span> value = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.expression, context]),
- key = token.key;
-
- context[key] = value;
-
- <span class="hljs-keyword">return</span> {
- chain: continue_chain,
- context: context
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * Set capture type logic tokens.
- *
- * Format: {% set key %}
- */</span>
- type: Twig.logic.type.setcapture,
- regex: <span class="hljs-regexp">/^set\s+([a-zA-Z0-9_,\s]+)$/</span>,
- next: [
- Twig.logic.type.endset
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> key = token.match[<span class="hljs-number">1</span>].trim();
-
- token.key = key;
-
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, continue_chain</span>) </span>{
-
- <span class="hljs-keyword">var</span> value = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context]),
- key = token.key;</pre></div></div>
-
- </li>
-
-
- <li id="section-196">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-196">&#182;</a>
- </div>
- <p>set on both the global and local context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">this</span>.context[key] = value;
- context[key] = value;
-
- <span class="hljs-keyword">return</span> {
- chain: continue_chain,
- context: context
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * End set type block logic tokens.
- *
- * Format: {% endset %}
- */</span>
- type: Twig.logic.type.endset,
- regex: <span class="hljs-regexp">/^endset$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/**
- * Filter logic tokens.
- *
- * Format: {% filter upper %} or {% filter lower|escape %}
- */</span>
- type: Twig.logic.type.filter,
- regex: <span class="hljs-regexp">/^filter\s+(.+)$/</span>,
- next: [
- Twig.logic.type.endfilter
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = <span class="hljs-string">"|"</span> + token.match[<span class="hljs-number">1</span>].trim();</pre></div></div>
-
- </li>
-
-
- <li id="section-197">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-197">&#182;</a>
- </div>
- <p>Compile the expression.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> unfiltered = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context]),
- stack = [{
- type: Twig.expression.type.string,
- value: unfiltered
- }].concat(token.stack);
-
- <span class="hljs-keyword">var</span> output = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [stack, context]);
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: output
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * End filter logic tokens.
- *
- * Format: {% endfilter %}
- */</span>
- type: Twig.logic.type.endfilter,
- regex: <span class="hljs-regexp">/^endfilter$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/**
- * Block logic tokens.
- *
- * Format: {% block title %}
- */</span>
- type: Twig.logic.type.block,
- regex: <span class="hljs-regexp">/^block\s+([a-zA-Z0-9_]+)$/</span>,
- next: [
- Twig.logic.type.endblock
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- token.block = token.match[<span class="hljs-number">1</span>].trim();
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> block_output,
- output,
- isImported = Twig.indexOf(<span class="hljs-keyword">this</span>.importedBlocks, token.block) &gt; <span class="hljs-number">-1</span>,
- hasParent = <span class="hljs-keyword">this</span>.blocks[token.block] &amp;&amp; Twig.indexOf(<span class="hljs-keyword">this</span>.blocks[token.block], Twig.placeholders.parent) &gt; <span class="hljs-number">-1</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-198">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-198">&#182;</a>
- </div>
- <p>Don’t override previous blocks unless they’re imported with “use”
-Loops should be exempted as well.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.blocks[token.block] === <span class="hljs-literal">undefined</span> || isImported || hasParent || context.loop || token.overwrite) {
- <span class="hljs-keyword">if</span> (token.expression) {</pre></div></div>
-
- </li>
-
-
- <li id="section-199">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-199">&#182;</a>
- </div>
- <p>Short blocks have output as an expression on the open tag (no body)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> block_output = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.string,
- value: Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context])
- }, context]);
- } <span class="hljs-keyword">else</span> {
- block_output = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.string,
- value: Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context])
- }, context]);
- }
-
- <span class="hljs-keyword">if</span> (isImported) {</pre></div></div>
-
- </li>
-
-
- <li id="section-200">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-200">&#182;</a>
- </div>
- <p>once the block is overridden, remove it from the list of imported blocks</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">this</span>.importedBlocks.splice(<span class="hljs-keyword">this</span>.importedBlocks.indexOf(token.block), <span class="hljs-number">1</span>);
- }
-
- <span class="hljs-keyword">if</span> (hasParent) {
- <span class="hljs-keyword">this</span>.blocks[token.block] = Twig.Markup(<span class="hljs-keyword">this</span>.blocks[token.block].replace(Twig.placeholders.parent, block_output));
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">this</span>.blocks[token.block] = block_output;
- }
-
- <span class="hljs-keyword">this</span>.originalBlockTokens[token.block] = {
- type: token.type,
- block: token.block,
- output: token.output,
- overwrite: <span class="hljs-literal">true</span>
- };
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-201">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-201">&#182;</a>
- </div>
- <p>Check if a child block has been set from a template extending this one.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.child.blocks[token.block]) {
- output = <span class="hljs-keyword">this</span>.child.blocks[token.block];
- } <span class="hljs-keyword">else</span> {
- output = <span class="hljs-keyword">this</span>.blocks[token.block];
- }
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: output
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * Block shorthand logic tokens.
- *
- * Format: {% block title expression %}
- */</span>
- type: Twig.logic.type.shortblock,
- regex: <span class="hljs-regexp">/^block\s+([a-zA-Z0-9_]+)\s+(.+)$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- token.expression = token.match[<span class="hljs-number">2</span>].trim();
-
- token.output = Twig.expression.compile({
- type: Twig.expression.type.expression,
- value: token.expression
- }).stack;
-
- token.block = token.match[<span class="hljs-number">1</span>].trim();
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">return</span> Twig.logic.handler[Twig.logic.type.block].parse.apply(<span class="hljs-keyword">this</span>, <span class="hljs-built_in">arguments</span>);
- }
- },
- {
- <span class="hljs-comment">/**
- * End block logic tokens.
- *
- * Format: {% endblock %}
- */</span>
- type: Twig.logic.type.endblock,
- regex: <span class="hljs-regexp">/^endblock(?:\s+([a-zA-Z0-9_]+))?$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/**
- * Block logic tokens.
- *
- * Format: {% extends "template.twig" %}
- */</span>
- type: Twig.logic.type.extends_,
- regex: <span class="hljs-regexp">/^extends\s+(.+)$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = token.match[<span class="hljs-number">1</span>].trim();
- <span class="hljs-keyword">delete</span> token.match;
-
- token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-202">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-202">&#182;</a>
- </div>
- <p>Resolve filename</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> file = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]);</pre></div></div>
-
- </li>
-
-
- <li id="section-203">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-203">&#182;</a>
- </div>
- <p>Set parent template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">this</span>.extend = file;
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: <span class="hljs-string">''</span>
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * Block logic tokens.
- *
- * Format: {% use "template.twig" %}
- */</span>
- type: Twig.logic.type.use,
- regex: <span class="hljs-regexp">/^use\s+(.+)$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = token.match[<span class="hljs-number">1</span>].trim();
- <span class="hljs-keyword">delete</span> token.match;
-
- token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-204">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-204">&#182;</a>
- </div>
- <p>Resolve filename</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> file = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]);</pre></div></div>
-
- </li>
-
-
- <li id="section-205">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-205">&#182;</a>
- </div>
- <p>Import blocks</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">this</span>.importBlocks(file);
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: <span class="hljs-string">''</span>
- };
- }
- },
- {
- <span class="hljs-comment">/**
- * Block logic tokens.
- *
- * Format: {% includes "template.twig" [with {some: 'values'} only] %}
- */</span>
- type: Twig.logic.type.include,
- regex: <span class="hljs-regexp">/^include\s+(ignore missing\s+)?(.+?)\s*(?:with\s+([\S\s]+?))?\s*(only)?$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> match = token.match,
- includeMissing = match[<span class="hljs-number">1</span>] !== <span class="hljs-literal">undefined</span>,
- expression = match[<span class="hljs-number">2</span>].trim(),
- withContext = match[<span class="hljs-number">3</span>],
- only = ((match[<span class="hljs-number">4</span>] !== <span class="hljs-literal">undefined</span>) &amp;&amp; match[<span class="hljs-number">4</span>].length);
-
- <span class="hljs-keyword">delete</span> token.match;
-
- token.only = only;
- token.includeMissing = includeMissing;
-
- token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- <span class="hljs-keyword">if</span> (withContext !== <span class="hljs-literal">undefined</span>) {
- token.withStack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: withContext.trim()
- }]).stack;
- }
-
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-206">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-206">&#182;</a>
- </div>
- <p>Resolve filename</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> innerContext = {},
- withContext,
- i,
- template;
-
- <span class="hljs-keyword">if</span> (!token.only) {
- innerContext = Twig.ChildContext(context);
- }
-
- <span class="hljs-keyword">if</span> (token.withStack !== <span class="hljs-literal">undefined</span>) {
- withContext = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.withStack, context]);
-
- <span class="hljs-keyword">for</span> (i <span class="hljs-keyword">in</span> withContext) {
- <span class="hljs-keyword">if</span> (withContext.hasOwnProperty(i))
- innerContext[i] = withContext[i];
- }
- }
-
- <span class="hljs-keyword">var</span> file = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, innerContext]);
-
- <span class="hljs-keyword">if</span> (file <span class="hljs-keyword">instanceof</span> Twig.Template) {
- template = file;
- } <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-207">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-207">&#182;</a>
- </div>
- <p>Import file</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> template = <span class="hljs-keyword">this</span>.importFile(file);
- }
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: template.render(innerContext)
- };
- }
- },
- {
- type: Twig.logic.type.spaceless,
- regex: <span class="hljs-regexp">/^spaceless$/</span>,
- next: [
- Twig.logic.type.endspaceless
- ],
- open: <span class="hljs-literal">true</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-208">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-208">&#182;</a>
- </div>
- <p>Parse the html and return it without any spaces between tags</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> <span class="hljs-comment">// Parse the output without any filter</span>
- unfiltered = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, context]),</pre></div></div>
-
- </li>
-
-
- <li id="section-209">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-209">&#182;</a>
- </div>
- <p>A regular expression to find closing and opening tags with spaces between them</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> rBetweenTagSpaces = <span class="hljs-regexp">/&gt;\s+&lt;/g</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-210">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-210">&#182;</a>
- </div>
- <p>Replace all space between closing and opening html tags</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> output = unfiltered.replace(rBetweenTagSpaces,<span class="hljs-string">'&gt;&lt;'</span>).trim();
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: output
- };
- }
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-211">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-211">&#182;</a>
- </div>
- <p>Add the {% endspaceless %} token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.logic.type.endspaceless,
- regex: <span class="hljs-regexp">/^endspaceless$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/**
- * Macro logic tokens.
- *
- * Format: {% maro input(name, value, type, size) %}
- *
- */</span>
- type: Twig.logic.type.macro,
- regex: <span class="hljs-regexp">/^macro\s+([a-zA-Z0-9_]+)\s*\(\s*((?:[a-zA-Z0-9_]+(?:,\s*)?)*)\s*\)$/</span>,
- next: [
- Twig.logic.type.endmacro
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> macroName = token.match[<span class="hljs-number">1</span>],
- parameters = token.match[<span class="hljs-number">2</span>].split(<span class="hljs-regexp">/[\s,]+/</span>);</pre></div></div>
-
- </li>
-
-
- <li id="section-212">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-212">&#182;</a>
- </div>
- <p>TODO: Clean up duplicate check</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i=<span class="hljs-number">0</span>; i&lt;parameters.length; i++) {
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> j=<span class="hljs-number">0</span>; j&lt;parameters.length; j++){
- <span class="hljs-keyword">if</span> (parameters[i] === parameters[j] &amp;&amp; i !== j) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Duplicate arguments for parameter: "</span>+ parameters[i]);
- }
- }
- }
-
- token.macroName = macroName;
- token.parameters = parameters;
-
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> template = <span class="hljs-keyword">this</span>;
- <span class="hljs-keyword">this</span>.macros[token.macroName] = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-213">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-213">&#182;</a>
- </div>
- <p>Pass global context and other macros</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> macroContext = {
- _self: template.macros
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-214">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-214">&#182;</a>
- </div>
- <p>Add parameters from context to macroContext</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i=<span class="hljs-number">0</span>; i&lt;token.parameters.length; i++) {
- <span class="hljs-keyword">var</span> prop = token.parameters[i];
- <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">arguments</span>[i] !== <span class="hljs-string">'undefined'</span>) {
- macroContext[prop] = <span class="hljs-built_in">arguments</span>[i];
- } <span class="hljs-keyword">else</span> {
- macroContext[prop] = <span class="hljs-literal">undefined</span>;
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-215">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-215">&#182;</a>
- </div>
- <p>Render</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> Twig.parse.apply(template, [token.output, macroContext])
- };
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: <span class="hljs-string">''</span>
- };
-
- }
- },
- {
- <span class="hljs-comment">/**
- * End macro logic tokens.
- *
- * Format: {% endmacro %}
- */</span>
- type: Twig.logic.type.endmacro,
- regex: <span class="hljs-regexp">/^endmacro$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- },
- {
- <span class="hljs-comment">/*
- * import logic tokens.
- *
- * Format: {% import "template.twig" as form %}
- */</span>
- type: Twig.logic.type.import_,
- regex: <span class="hljs-regexp">/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = token.match[<span class="hljs-number">1</span>].trim(),
- contextName = token.match[<span class="hljs-number">2</span>].trim();
- <span class="hljs-keyword">delete</span> token.match;
-
- token.expression = expression;
- token.contextName = contextName;
-
- token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">if</span> (token.expression !== <span class="hljs-string">"_self"</span>) {
- <span class="hljs-keyword">var</span> file = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]);
- <span class="hljs-keyword">var</span> template = <span class="hljs-keyword">this</span>.importFile(file || token.expression);
- context[token.contextName] = template.render({}, {output: <span class="hljs-string">'macros'</span>});
- }
- <span class="hljs-keyword">else</span> {
- context[token.contextName] = <span class="hljs-keyword">this</span>.macros;
- }
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: <span class="hljs-string">''</span>
- }
-
- }
- },
- {
- <span class="hljs-comment">/*
- * from logic tokens.
- *
- * Format: {% from "template.twig" import func as form %}
- */</span>
- type: Twig.logic.type.from,
- regex: <span class="hljs-regexp">/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/</span>,
- next: [ ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = token.match[<span class="hljs-number">1</span>].trim(),
- macroExpressions = token.match[<span class="hljs-number">2</span>].trim().split(<span class="hljs-regexp">/[ ,]+/</span>),
- macroNames = {};
-
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i=<span class="hljs-number">0</span>; i&lt;macroExpressions.length; i++) {
- <span class="hljs-keyword">var</span> res = macroExpressions[i];</pre></div></div>
-
- </li>
-
-
- <li id="section-216">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-216">&#182;</a>
- </div>
- <p>match function as variable</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> macroMatch = res.match(<span class="hljs-regexp">/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/</span>);
- <span class="hljs-keyword">if</span> (macroMatch) {
- macroNames[macroMatch[<span class="hljs-number">1</span>].trim()] = macroMatch[<span class="hljs-number">2</span>].trim();
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (res.match(<span class="hljs-regexp">/^([a-zA-Z0-9_]+)$/</span>)) {
- macroNames[res] = res;
- }
- <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-217">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-217">&#182;</a>
- </div>
- <p>ignore import</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> }
-
- }
-
- <span class="hljs-keyword">delete</span> token.match;
-
- token.expression = expression;
- token.macroNames = macroNames;
-
- token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> macros;
-
- <span class="hljs-keyword">if</span> (token.expression !== <span class="hljs-string">"_self"</span>) {
- <span class="hljs-keyword">var</span> file = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]);
- <span class="hljs-keyword">var</span> template = <span class="hljs-keyword">this</span>.importFile(file || token.expression);
- macros = template.render({}, {output: <span class="hljs-string">'macros'</span>});
- }
- <span class="hljs-keyword">else</span> {
- macros = <span class="hljs-keyword">this</span>.macros;
- }
-
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> macroName <span class="hljs-keyword">in</span> token.macroNames) {
- <span class="hljs-keyword">if</span> (macros.hasOwnProperty(macroName)) {
- context[token.macroNames[macroName]] = macros[macroName];
- }
- }
-
- <span class="hljs-keyword">return</span> {
- chain: chain,
- output: <span class="hljs-string">''</span>
- }
-
- }
- },
- {
- <span class="hljs-comment">/**
- * The embed tag combines the behaviour of include and extends.
- * It allows you to include another template's contents, just like include does.
- *
- * Format: {% embed "template.twig" [with {some: 'values'} only] %}
- */</span>
- type: Twig.logic.type.embed,
- regex: <span class="hljs-regexp">/^embed\s+(ignore missing\s+)?(.+?)\s*(?:with\s+(.+?))?\s*(only)?$/</span>,
- next: [
- Twig.logic.type.endembed
- ],
- open: <span class="hljs-literal">true</span>,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- <span class="hljs-keyword">var</span> match = token.match,
- includeMissing = match[<span class="hljs-number">1</span>] !== <span class="hljs-literal">undefined</span>,
- expression = match[<span class="hljs-number">2</span>].trim(),
- withContext = match[<span class="hljs-number">3</span>],
- only = ((match[<span class="hljs-number">4</span>] !== <span class="hljs-literal">undefined</span>) &amp;&amp; match[<span class="hljs-number">4</span>].length);
-
- <span class="hljs-keyword">delete</span> token.match;
-
- token.only = only;
- token.includeMissing = includeMissing;
-
- token.stack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- <span class="hljs-keyword">if</span> (withContext !== <span class="hljs-literal">undefined</span>) {
- token.withStack = Twig.expression.compile.apply(<span class="hljs-keyword">this</span>, [{
- type: Twig.expression.type.expression,
- value: withContext.trim()
- }]).stack;
- }
-
- <span class="hljs-keyword">return</span> token;
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-218">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-218">&#182;</a>
- </div>
- <p>Resolve filename</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> innerContext = {},
- withContext,
- i,
- template;
-
- <span class="hljs-keyword">if</span> (!token.only) {
- <span class="hljs-keyword">for</span> (i <span class="hljs-keyword">in</span> context) {
- <span class="hljs-keyword">if</span> (context.hasOwnProperty(i))
- innerContext[i] = context[i];
- }
- }
-
- <span class="hljs-keyword">if</span> (token.withStack !== <span class="hljs-literal">undefined</span>) {
- withContext = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.withStack, context]);
-
- <span class="hljs-keyword">for</span> (i <span class="hljs-keyword">in</span> withContext) {
- <span class="hljs-keyword">if</span> (withContext.hasOwnProperty(i))
- innerContext[i] = withContext[i];
- }
- }
-
- <span class="hljs-keyword">var</span> file = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, innerContext]);
-
- <span class="hljs-keyword">if</span> (file <span class="hljs-keyword">instanceof</span> Twig.Template) {
- template = file;
- } <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-219">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-219">&#182;</a>
- </div>
- <p>Import file</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> template = <span class="hljs-keyword">this</span>.importFile(file);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-220">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-220">&#182;</a>
- </div>
- <p>reset previous blocks</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">this</span>.blocks = {};</pre></div></div>
-
- </li>
-
-
- <li id="section-221">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-221">&#182;</a>
- </div>
- <p>parse tokens. output will be not used</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> output = Twig.parse.apply(<span class="hljs-keyword">this</span>, [token.output, innerContext]);</pre></div></div>
-
- </li>
-
-
- <li id="section-222">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-222">&#182;</a>
- </div>
- <p>render tempalte with blocks defined in embed block</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> {
- chain: chain,
- output: template.render(innerContext, {<span class="hljs-string">'blocks'</span>:<span class="hljs-keyword">this</span>.blocks})
- };
- }
- },
- <span class="hljs-comment">/* Add the {% endembed %} token
- *
- */</span>
- {
- type: Twig.logic.type.endembed,
- regex: <span class="hljs-regexp">/^endembed$/</span>,
- next: [ ],
- open: <span class="hljs-literal">false</span>
- }
-
- ];
-
-
- <span class="hljs-comment">/**
- * Registry for logic handlers.
- */</span>
- Twig.logic.handler = {};
-
- <span class="hljs-comment">/**
- * Define a new token type, available at Twig.logic.type.{type}
- */</span>
- Twig.logic.extendType = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">type, value</span>) </span>{
- value = value || (<span class="hljs-string">"Twig.logic.type"</span> + type);
- Twig.logic.type[type] = value;
- };
-
- <span class="hljs-comment">/**
- * Extend the logic parsing functionality with a new token definition.
- *
- * // Define a new tag
- * Twig.logic.extend({
- * type: Twig.logic.type.{type},
- * // The pattern to match for this token
- * regex: ...,
- * // What token types can follow this token, leave blank if any.
- * next: [ ... ]
- * // Create and return compiled version of the token
- * compile: function(token) { ... }
- * // Parse the compiled token with the context provided by the render call
- * // and whether this token chain is complete.
- * parse: function(token, context, chain) { ... }
- * });
- *
- * @param {Object} definition The new logic expression.
- */</span>
- Twig.logic.extend = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">definition</span>) </span>{
-
- <span class="hljs-keyword">if</span> (!definition.type) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to extend logic definition. No type provided for "</span> + definition);
- } <span class="hljs-keyword">else</span> {
- Twig.logic.extendType(definition.type);
- }
- Twig.logic.handler[definition.type] = definition;
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-223">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-223">&#182;</a>
- </div>
- <p>Extend with built-in expressions</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> (Twig.logic.definitions.length &gt; <span class="hljs-number">0</span>) {
- Twig.logic.extend(Twig.logic.definitions.shift());
- }
-
- <span class="hljs-comment">/**
- * Compile a logic token into an object ready for parsing.
- *
- * @param {Object} raw_token An uncompiled logic token.
- *
- * @return {Object} A compiled logic token, ready for parsing.
- */</span>
- Twig.logic.compile = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">raw_token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = raw_token.value.trim(),
- token = Twig.logic.tokenize.apply(<span class="hljs-keyword">this</span>, [expression]),
- token_template = Twig.logic.handler[token.type];</pre></div></div>
-
- </li>
-
-
- <li id="section-224">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-224">&#182;</a>
- </div>
- <p>Check if the token needs compiling</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (token_template.compile) {
- token = token_template.compile.apply(<span class="hljs-keyword">this</span>, [token]);
- Twig.log.trace(<span class="hljs-string">"Twig.logic.compile: "</span>, <span class="hljs-string">"Compiled logic token to "</span>, token);
- }
-
- <span class="hljs-keyword">return</span> token;
- };
-
- <span class="hljs-comment">/**
- * Tokenize logic expressions. This function matches token expressions against regular
- * expressions provided in token definitions provided with Twig.logic.extend.
- *
- * @param {string} expression the logic token expression to tokenize
- * (i.e. what's between {% and %})
- *
- * @return {Object} The matched token with type set to the token type and match to the regex match.
- */</span>
- Twig.logic.tokenize = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">expression</span>) </span>{
- <span class="hljs-keyword">var</span> token = {},
- token_template_type = <span class="hljs-literal">null</span>,
- token_type = <span class="hljs-literal">null</span>,
- token_regex = <span class="hljs-literal">null</span>,
- regex_array = <span class="hljs-literal">null</span>,
- regex = <span class="hljs-literal">null</span>,
- match = <span class="hljs-literal">null</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-225">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-225">&#182;</a>
- </div>
- <p>Ignore whitespace around expressions.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> expression = expression.trim();
-
- <span class="hljs-keyword">for</span> (token_template_type <span class="hljs-keyword">in</span> Twig.logic.handler) {
- <span class="hljs-keyword">if</span> (Twig.logic.handler.hasOwnProperty(token_template_type)) {</pre></div></div>
-
- </li>
-
-
- <li id="section-226">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-226">&#182;</a>
- </div>
- <p>Get the type and regex for this template type</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token_type = Twig.logic.handler[token_template_type].type;
- token_regex = Twig.logic.handler[token_template_type].regex;</pre></div></div>
-
- </li>
-
-
- <li id="section-227">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-227">&#182;</a>
- </div>
- <p>Handle multiple regular expressions per type.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex_array = [];
- <span class="hljs-keyword">if</span> (token_regex <span class="hljs-keyword">instanceof</span> <span class="hljs-built_in">Array</span>) {
- regex_array = token_regex;
- } <span class="hljs-keyword">else</span> {
- regex_array.push(token_regex);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-228">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-228">&#182;</a>
- </div>
- <p>Check regular expressions in the order they were specified in the definition.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> (regex_array.length &gt; <span class="hljs-number">0</span>) {
- regex = regex_array.shift();
- match = regex.exec(expression.trim());
- <span class="hljs-keyword">if</span> (match !== <span class="hljs-literal">null</span>) {
- token.type = token_type;
- token.match = match;
- Twig.log.trace(<span class="hljs-string">"Twig.logic.tokenize: "</span>, <span class="hljs-string">"Matched a "</span>, token_type, <span class="hljs-string">" regular expression of "</span>, match);
- <span class="hljs-keyword">return</span> token;
- }
- }
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-229">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-229">&#182;</a>
- </div>
- <p>No regex matches</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to parse '"</span> + expression.trim() + <span class="hljs-string">"'"</span>);
- };
-
- <span class="hljs-comment">/**
- * Parse a logic token within a given context.
- *
- * What are logic chains?
- * Logic chains represent a series of tokens that are connected,
- * for example:
- * {% if ... %} {% else %} {% endif %}
- *
- * The chain parameter is used to signify if a chain is open of closed.
- * open:
- * More tokens in this chain should be parsed.
- * closed:
- * This token chain has completed parsing and any additional
- * tokens (else, elseif, etc...) should be ignored.
- *
- * @param {Object} token The compiled token.
- * @param {Object} context The render context.
- * @param {boolean} chain Is this an open logic chain. If false, that means a
- * chain is closed and no further cases should be parsed.
- */</span>
- Twig.logic.parse = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token, context, chain</span>) </span>{
- <span class="hljs-keyword">var</span> output = <span class="hljs-string">''</span>,
- token_template;
-
- context = context || { };
-
- Twig.log.debug(<span class="hljs-string">"Twig.logic.parse: "</span>, <span class="hljs-string">"Parsing logic token "</span>, token);
-
- token_template = Twig.logic.handler[token.type];
-
- <span class="hljs-keyword">if</span> (token_template.parse) {
- output = token_template.parse.apply(<span class="hljs-keyword">this</span>, [token, context, chain]);
- }
- <span class="hljs-keyword">return</span> output;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-})(Twig || { });</pre></div></div>
-
- </li>
-
-
- <li id="section-230">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-230">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-231">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-231">&#182;</a>
- </div>
- <h2 id="twig-expression-js">twig.expression.js</h2>
-<p>This file handles tokenizing, compiling and parsing expressions.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;
-
- <span class="hljs-comment">/**
- * Namespace for expression handling.
- */</span>
- Twig.expression = { };
-
- <span class="hljs-comment">/**
- * Reserved word that can't be used as variable names.
- */</span>
- Twig.expression.reservedWords = [
- <span class="hljs-string">"true"</span>, <span class="hljs-string">"false"</span>, <span class="hljs-string">"null"</span>, <span class="hljs-string">"TRUE"</span>, <span class="hljs-string">"FALSE"</span>, <span class="hljs-string">"NULL"</span>, <span class="hljs-string">"_context"</span>
- ];
-
- <span class="hljs-comment">/**
- * The type of tokens used in expressions.
- */</span>
- Twig.expression.type = {
- comma: <span class="hljs-string">'Twig.expression.type.comma'</span>,
- operator: {
- unary: <span class="hljs-string">'Twig.expression.type.operator.unary'</span>,
- binary: <span class="hljs-string">'Twig.expression.type.operator.binary'</span>
- },
- string: <span class="hljs-string">'Twig.expression.type.string'</span>,
- bool: <span class="hljs-string">'Twig.expression.type.bool'</span>,
- array: {
- start: <span class="hljs-string">'Twig.expression.type.array.start'</span>,
- end: <span class="hljs-string">'Twig.expression.type.array.end'</span>
- },
- object: {
- start: <span class="hljs-string">'Twig.expression.type.object.start'</span>,
- end: <span class="hljs-string">'Twig.expression.type.object.end'</span>
- },
- parameter: {
- start: <span class="hljs-string">'Twig.expression.type.parameter.start'</span>,
- end: <span class="hljs-string">'Twig.expression.type.parameter.end'</span>
- },
- key: {
- period: <span class="hljs-string">'Twig.expression.type.key.period'</span>,
- brackets: <span class="hljs-string">'Twig.expression.type.key.brackets'</span>
- },
- filter: <span class="hljs-string">'Twig.expression.type.filter'</span>,
- _function: <span class="hljs-string">'Twig.expression.type._function'</span>,
- variable: <span class="hljs-string">'Twig.expression.type.variable'</span>,
- number: <span class="hljs-string">'Twig.expression.type.number'</span>,
- _null: <span class="hljs-string">'Twig.expression.type.null'</span>,
- context: <span class="hljs-string">'Twig.expression.type.context'</span>,
- test: <span class="hljs-string">'Twig.expression.type.test'</span>
- };
-
- Twig.expression.set = {</pre></div></div>
-
- </li>
-
-
- <li id="section-232">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-232">&#182;</a>
- </div>
- <p>What can follow an expression (in general)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> operations: [
- Twig.expression.type.filter,
- Twig.expression.type.operator.unary,
- Twig.expression.type.operator.binary,
- Twig.expression.type.array.end,
- Twig.expression.type.object.end,
- Twig.expression.type.parameter.end,
- Twig.expression.type.comma,
- Twig.expression.type.test
- ],
- expressions: [
- Twig.expression.type._function,
- Twig.expression.type.bool,
- Twig.expression.type.string,
- Twig.expression.type.variable,
- Twig.expression.type.number,
- Twig.expression.type._null,
- Twig.expression.type.context,
- Twig.expression.type.parameter.start,
- Twig.expression.type.array.start,
- Twig.expression.type.object.start
- ]
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-233">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-233">&#182;</a>
- </div>
- <p>Most expressions allow a ‘.’ or ‘[‘ after them, so we provide a convenience set</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.expression.set.operations_extended = Twig.expression.set.operations.concat([
- Twig.expression.type.key.period,
- Twig.expression.type.key.brackets]);</pre></div></div>
-
- </li>
-
-
- <li id="section-234">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-234">&#182;</a>
- </div>
- <p>Some commonly used compile and parse functions.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.expression.fn = {
- compile: {
- push: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- output.push(token);
- },
- push_both: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- output.push(token);
- stack.push(token);
- }
- },
- parse: {
- push: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- stack.push(token);
- },
- push_value: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- stack.push(token.value);
- }
- }
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-235">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-235">&#182;</a>
- </div>
- <p>The regular expressions and compile/parse logic used to match tokens in expressions.</p>
-<p>Properties:</p>
-<pre><code> type: The type <span class="hljs-keyword">of</span> expression <span class="hljs-keyword">this</span> matches
-
- regex: One or more regular expressions that matche the format <span class="hljs-keyword">of</span> the token.
-
- next: Valid tokens that can occur next <span class="hljs-keyword">in</span> the expression.
-</code></pre><p>Functions:</p>
-<pre><code> compile: A <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">that</span> <span class="hljs-title">compiles</span> <span class="hljs-title">the</span> <span class="hljs-title">raw</span> <span class="hljs-title">regular</span> <span class="hljs-title">expression</span> <span class="hljs-title">match</span> <span class="hljs-title">into</span> <span class="hljs-title">a</span> <span class="hljs-title">token</span>.
-
- <span class="hljs-title">parse</span>: <span class="hljs-title">A</span> <span class="hljs-title">function</span> <span class="hljs-title">that</span> <span class="hljs-title">parses</span> <span class="hljs-title">the</span> <span class="hljs-title">compiled</span> <span class="hljs-title">token</span> <span class="hljs-title">into</span> <span class="hljs-title">output</span>.</span>
-</code></pre>
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.expression.definitions = [
- {
- type: Twig.expression.type.test,
- regex: <span class="hljs-regexp">/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*)/</span>,
- next: Twig.expression.set.operations.concat([Twig.expression.type.parameter.start]),
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- token.filter = token.match[<span class="hljs-number">2</span>];
- token.modifier = token.match[<span class="hljs-number">1</span>];
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">delete</span> token.value;
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> value = stack.pop(),
- params = token.params &amp;&amp; Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context]),
- result = Twig.test(token.filter, value, params);
-
- <span class="hljs-keyword">if</span> (token.modifier == <span class="hljs-string">'not'</span>) {
- stack.push(!result);
- } <span class="hljs-keyword">else</span> {
- stack.push(result);
- }
- }
- },
- {
- type: Twig.expression.type.comma,</pre></div></div>
-
- </li>
-
-
- <li id="section-236">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-236">&#182;</a>
- </div>
- <p>Match a comma</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^,/</span>,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.array.end, Twig.expression.type.object.end]),
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> i = stack.length - <span class="hljs-number">1</span>,
- stack_token;
-
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">delete</span> token.value;</pre></div></div>
-
- </li>
-
-
- <li id="section-237">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-237">&#182;</a>
- </div>
- <p>pop tokens off the stack until the start of the object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span>(;i &gt;= <span class="hljs-number">0</span>; i--) {
- stack_token = stack.pop();
- <span class="hljs-keyword">if</span> (stack_token.type === Twig.expression.type.object.start
- || stack_token.type === Twig.expression.type.parameter.start
- || stack_token.type === Twig.expression.type.array.start) {
- stack.push(stack_token);
- <span class="hljs-keyword">break</span>;
- }
- output.push(stack_token);
- }
- output.push(token);
- }
- },
- {
- type: Twig.expression.type.operator.binary,</pre></div></div>
-
- </li>
-
-
- <li id="section-238">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-238">&#182;</a>
- </div>
- <p>Match any of +, <em>, /, -, %, ~, &lt;, &lt;=, &gt;, &gt;=, !=, ==, *</em>, ?, :, and, or, not</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/(^[\+\-~%\?\:]|^[!=]==?|^[!&lt;&gt;]=?|^\*\*?|^\/\/?|^and\s+|^or\s+|^in\s+|^not in\s+|^\.\.)/</span>,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.operator.unary]),
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">delete</span> token.match;
-
- token.value = token.value.trim();
- <span class="hljs-keyword">var</span> value = token.value,
- operator = Twig.expression.operator.lookup(value, token);
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Operator: "</span>, operator, <span class="hljs-string">" from "</span>, value);
-
- <span class="hljs-keyword">while</span> (stack.length &gt; <span class="hljs-number">0</span> &amp;&amp;
- (stack[stack.length<span class="hljs-number">-1</span>].type == Twig.expression.type.operator.unary || stack[stack.length<span class="hljs-number">-1</span>].type == Twig.expression.type.operator.binary) &amp;&amp;
- (
- (operator.associativity === Twig.expression.operator.leftToRight &amp;&amp;
- operator.precidence &gt;= stack[stack.length<span class="hljs-number">-1</span>].precidence) ||
-
- (operator.associativity === Twig.expression.operator.rightToLeft &amp;&amp;
- operator.precidence &gt; stack[stack.length<span class="hljs-number">-1</span>].precidence)
- )
- ) {
- <span class="hljs-keyword">var</span> temp = stack.pop();
- output.push(temp);
- }
-
- <span class="hljs-keyword">if</span> (value === <span class="hljs-string">":"</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-239">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-239">&#182;</a>
- </div>
- <p>Check if this is a ternary or object key being set</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (stack[stack.length - <span class="hljs-number">1</span>] &amp;&amp; stack[stack.length<span class="hljs-number">-1</span>].value === <span class="hljs-string">"?"</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-240">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-240">&#182;</a>
- </div>
- <p>Continue as normal for a ternary</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> } <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-241">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-241">&#182;</a>
- </div>
- <p>This is not a ternary so we push the token to the output where it can be handled
- when the assocated object is closed.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> key_token = output.pop();
-
- <span class="hljs-keyword">if</span> (key_token.type === Twig.expression.type.string ||
- key_token.type === Twig.expression.type.variable) {
- token.key = key_token.value;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (key_token.type === Twig.expression.type.number) {</pre></div></div>
-
- </li>
-
-
- <li id="section-242">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-242">&#182;</a>
- </div>
- <p>Convert integer keys into string keys</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.key = key_token.value.toString();
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (key_token.type === Twig.expression.type.parameter.end &amp;&amp;
- key_token.expression) {
- token.params = key_token.params;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unexpected value before ':' of "</span> + key_token.type + <span class="hljs-string">" = "</span> + key_token.value);
- }
-
- output.push(token);
- <span class="hljs-keyword">return</span>;
- }
- } <span class="hljs-keyword">else</span> {
- stack.push(operator);
- }
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">if</span> (token.key) {</pre></div></div>
-
- </li>
-
-
- <li id="section-243">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-243">&#182;</a>
- </div>
- <p>handle ternary ‘:’ operator</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> stack.push(token);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (token.params) {</pre></div></div>
-
- </li>
-
-
- <li id="section-244">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-244">&#182;</a>
- </div>
- <p>handle “{(expression):value}”</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.key = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context]);
- stack.push(token);
- <span class="hljs-keyword">delete</span>(token.params);
- } <span class="hljs-keyword">else</span> {
- Twig.expression.operator.parse(token.value, stack);
- }
- }
- },
- {
- type: Twig.expression.type.operator.unary,</pre></div></div>
-
- </li>
-
-
- <li id="section-245">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-245">&#182;</a>
- </div>
- <p>Match any of not</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/(^not\s+)/</span>,
- next: Twig.expression.set.expressions,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">delete</span> token.match;
-
- token.value = token.value.trim();
- <span class="hljs-keyword">var</span> value = token.value,
- operator = Twig.expression.operator.lookup(value, token);
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Operator: "</span>, operator, <span class="hljs-string">" from "</span>, value);
-
- <span class="hljs-keyword">while</span> (stack.length &gt; <span class="hljs-number">0</span> &amp;&amp;
- (stack[stack.length<span class="hljs-number">-1</span>].type == Twig.expression.type.operator.unary || stack[stack.length<span class="hljs-number">-1</span>].type == Twig.expression.type.operator.binary) &amp;&amp;
- (
- (operator.associativity === Twig.expression.operator.leftToRight &amp;&amp;
- operator.precidence &gt;= stack[stack.length<span class="hljs-number">-1</span>].precidence) ||
-
- (operator.associativity === Twig.expression.operator.rightToLeft &amp;&amp;
- operator.precidence &gt; stack[stack.length<span class="hljs-number">-1</span>].precidence)
- )
- ) {
- <span class="hljs-keyword">var</span> temp = stack.pop();
- output.push(temp);
- }
-
- stack.push(operator);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- Twig.expression.operator.parse(token.value, stack);
- }
- },
- {
- <span class="hljs-comment">/**
- * Match a string. This is anything between a pair of single or double quotes.
- */</span>
- type: Twig.expression.type.string,</pre></div></div>
-
- </li>
-
-
- <li id="section-246">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-246">&#182;</a>
- </div>
- <p>See: <a href="http://blog.stevenlevithan.com/archives/match-quoted-string">http://blog.stevenlevithan.com/archives/match-quoted-string</a></p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^(["'])(?:(?=(\\?))\2[\s\S])*?\1/</span>,
- next: Twig.expression.set.operations,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> value = token.value;
- <span class="hljs-keyword">delete</span> token.match</pre></div></div>
-
- </li>
-
-
- <li id="section-247">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-247">&#182;</a>
- </div>
- <p>Remove the quotes from the string</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (value.substring(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) === <span class="hljs-string">'"'</span>) {
- value = value.replace(<span class="hljs-string">'\\"'</span>, <span class="hljs-string">'"'</span>);
- } <span class="hljs-keyword">else</span> {
- value = value.replace(<span class="hljs-string">"\\'"</span>, <span class="hljs-string">"'"</span>);
- }
- token.value = value.substring(<span class="hljs-number">1</span>, value.length<span class="hljs-number">-1</span>).replace( <span class="hljs-regexp">/\\n/g</span>, <span class="hljs-string">"\n"</span> ).replace( <span class="hljs-regexp">/\\r/g</span>, <span class="hljs-string">"\r"</span> );
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"String value: "</span>, token.value);
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- },
- {
- <span class="hljs-comment">/**
- * Match a parameter set start.
- */</span>
- type: Twig.expression.type.parameter.start,
- regex: <span class="hljs-regexp">/^\(/</span>,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.parameter.end]),
- compile: Twig.expression.fn.compile.push_both,
- parse: Twig.expression.fn.parse.push
- },
- {
- <span class="hljs-comment">/**
- * Match a parameter set end.
- */</span>
- type: Twig.expression.type.parameter.end,
- regex: <span class="hljs-regexp">/^\)/</span>,
- next: Twig.expression.set.operations_extended,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> stack_token,
- end_token = token;
-
- stack_token = stack.pop();
- <span class="hljs-keyword">while</span>(stack.length &gt; <span class="hljs-number">0</span> &amp;&amp; stack_token.type != Twig.expression.type.parameter.start) {
- output.push(stack_token);
- stack_token = stack.pop();
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-248">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-248">&#182;</a>
- </div>
- <p>Move contents of parens into preceding filter</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> param_stack = [];
- <span class="hljs-keyword">while</span>(token.type !== Twig.expression.type.parameter.start) {</pre></div></div>
-
- </li>
-
-
- <li id="section-249">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-249">&#182;</a>
- </div>
- <p>Add token to arguments stack</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> param_stack.unshift(token);
- token = output.pop();
- }
- param_stack.unshift(token);
-
- <span class="hljs-keyword">var</span> is_expression = <span class="hljs-literal">false</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-250">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-250">&#182;</a>
- </div>
- <p>Get the token preceding the parameters</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token = output[output.length<span class="hljs-number">-1</span>];
-
- <span class="hljs-keyword">if</span> (token === <span class="hljs-literal">undefined</span> ||
- (token.type !== Twig.expression.type._function &amp;&amp;
- token.type !== Twig.expression.type.filter &amp;&amp;
- token.type !== Twig.expression.type.test &amp;&amp;
- token.type !== Twig.expression.type.key.brackets &amp;&amp;
- token.type !== Twig.expression.type.key.period)) {
-
- end_token.expression = <span class="hljs-literal">true</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-251">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-251">&#182;</a>
- </div>
- <p>remove start and end token from stack</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> param_stack.pop();
- param_stack.shift();
-
- end_token.params = param_stack;
-
- output.push(end_token);
-
- } <span class="hljs-keyword">else</span> {
- end_token.expression = <span class="hljs-literal">false</span>;
- token.params = param_stack;
- }
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> new_array = [],
- array_ended = <span class="hljs-literal">false</span>,
- value = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">if</span> (token.expression) {
- value = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context])
- stack.push(value);
-
- } <span class="hljs-keyword">else</span> {
-
- <span class="hljs-keyword">while</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- value = stack.pop();</pre></div></div>
-
- </li>
-
-
- <li id="section-252">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-252">&#182;</a>
- </div>
- <p>Push values into the array until the start of the array</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (value &amp;&amp; value.type &amp;&amp; value.type == Twig.expression.type.parameter.start) {
- array_ended = <span class="hljs-literal">true</span>;
- <span class="hljs-keyword">break</span>;
- }
- new_array.unshift(value);
- }
-
- <span class="hljs-keyword">if</span> (!array_ended) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Expected end of parameter set."</span>);
- }
-
- stack.push(new_array);
- }
- }
- },
- {
- <span class="hljs-comment">/**
- * Match an array start.
- */</span>
- type: Twig.expression.type.array.start,
- regex: <span class="hljs-regexp">/^\[/</span>,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.array.end]),
- compile: Twig.expression.fn.compile.push_both,
- parse: Twig.expression.fn.parse.push
- },
- {
- <span class="hljs-comment">/**
- * Match an array end.
- */</span>
- type: Twig.expression.type.array.end,
- regex: <span class="hljs-regexp">/^\]/</span>,
- next: Twig.expression.set.operations_extended,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> i = stack.length - <span class="hljs-number">1</span>,
- stack_token;</pre></div></div>
-
- </li>
-
-
- <li id="section-253">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-253">&#182;</a>
- </div>
- <p>pop tokens off the stack until the start of the object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span>(;i &gt;= <span class="hljs-number">0</span>; i--) {
- stack_token = stack.pop();
- <span class="hljs-keyword">if</span> (stack_token.type === Twig.expression.type.array.start) {
- <span class="hljs-keyword">break</span>;
- }
- output.push(stack_token);
- }
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> new_array = [],
- array_ended = <span class="hljs-literal">false</span>,
- value = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">while</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- value = stack.pop();</pre></div></div>
-
- </li>
-
-
- <li id="section-254">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-254">&#182;</a>
- </div>
- <p>Push values into the array until the start of the array</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (value.type &amp;&amp; value.type == Twig.expression.type.array.start) {
- array_ended = <span class="hljs-literal">true</span>;
- <span class="hljs-keyword">break</span>;
- }
- new_array.unshift(value);
- }
- <span class="hljs-keyword">if</span> (!array_ended) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Expected end of array."</span>);
- }
-
- stack.push(new_array);
- }
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-255">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-255">&#182;</a>
- </div>
- <p>Token that represents the start of a hash map ‘}’</p>
-<p>Hash maps take the form:
- { “key”: ‘value’, “another_key”: item }</p>
-<p>Keys must be quoted (either single or double) and values can be any expression.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.expression.type.object.start,
- regex: <span class="hljs-regexp">/^\{/</span>,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.object.end]),
- compile: Twig.expression.fn.compile.push_both,
- parse: Twig.expression.fn.parse.push
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-256">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-256">&#182;</a>
- </div>
- <p>Token that represents the end of a Hash Map ‘}’</p>
-<p>This is where the logic for building the internal
-representation of a hash map is defined.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.expression.type.object.end,
- regex: <span class="hljs-regexp">/^\}/</span>,
- next: Twig.expression.set.operations_extended,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> i = stack.length<span class="hljs-number">-1</span>,
- stack_token;</pre></div></div>
-
- </li>
-
-
- <li id="section-257">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-257">&#182;</a>
- </div>
- <p>pop tokens off the stack until the start of the object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span>(;i &gt;= <span class="hljs-number">0</span>; i--) {
- stack_token = stack.pop();
- <span class="hljs-keyword">if</span> (stack_token &amp;&amp; stack_token.type === Twig.expression.type.object.start) {
- <span class="hljs-keyword">break</span>;
- }
- output.push(stack_token);
- }
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">end_token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> new_object = {},
- object_ended = <span class="hljs-literal">false</span>,
- token = <span class="hljs-literal">null</span>,
- token_key = <span class="hljs-literal">null</span>,
- has_value = <span class="hljs-literal">false</span>,
- value = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">while</span> (stack.length &gt; <span class="hljs-number">0</span>) {
- token = stack.pop();</pre></div></div>
-
- </li>
-
-
- <li id="section-258">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-258">&#182;</a>
- </div>
- <p>Push values into the array until the start of the object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (token &amp;&amp; token.type &amp;&amp; token.type === Twig.expression.type.object.start) {
- object_ended = <span class="hljs-literal">true</span>;
- <span class="hljs-keyword">break</span>;
- }
- <span class="hljs-keyword">if</span> (token &amp;&amp; token.type &amp;&amp; (token.type === Twig.expression.type.operator.binary || token.type === Twig.expression.type.operator.unary) &amp;&amp; token.key) {
- <span class="hljs-keyword">if</span> (!has_value) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Missing value for key '"</span> + token.key + <span class="hljs-string">"' in object definition."</span>);
- }
- new_object[token.key] = value;</pre></div></div>
-
- </li>
-
-
- <li id="section-259">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-259">&#182;</a>
- </div>
- <p>Preserve the order that elements are added to the map
-This is necessary since JavaScript objects don’t
-guarantee the order of keys</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (new_object._keys === <span class="hljs-literal">undefined</span>) new_object._keys = [];
- new_object._keys.unshift(token.key);</pre></div></div>
-
- </li>
-
-
- <li id="section-260">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-260">&#182;</a>
- </div>
- <p>reset value check</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> value = <span class="hljs-literal">null</span>;
- has_value = <span class="hljs-literal">false</span>;
-
- } <span class="hljs-keyword">else</span> {
- has_value = <span class="hljs-literal">true</span>;
- value = token;
- }
- }
- <span class="hljs-keyword">if</span> (!object_ended) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unexpected end of object."</span>);
- }
-
- stack.push(new_object);
- }
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-261">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-261">&#182;</a>
- </div>
- <p>Token representing a filter</p>
-<p>Filters can follow any expression and take the form:
- expression|filter(optional, args)</p>
-<p>Filter parsing is done in the Twig.filters namespace.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.expression.type.filter,</pre></div></div>
-
- </li>
-
-
- <li id="section-262">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-262">&#182;</a>
- </div>
- <p>match a | then a letter or <em>, then any number of letters, numbers, </em> or -</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/</span>,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- token.value = token.match[<span class="hljs-number">1</span>];
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> input = stack.pop(),
- params = token.params &amp;&amp; Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context]);
-
- stack.push(Twig.filter.apply(<span class="hljs-keyword">this</span>, [token.value, input, params]));
- }
- },
- {
- type: Twig.expression.type._function,</pre></div></div>
-
- </li>
-
-
- <li id="section-263">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-263">&#182;</a>
- </div>
- <p>match any letter or <em>, then any number of letters, numbers, </em> or - followed by (</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/</span>,
- next: Twig.expression.type.parameter.start,
- transform: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">match, tokens</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-string">'('</span>;
- },
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> fn = token.match[<span class="hljs-number">1</span>];
- token.fn = fn;</pre></div></div>
-
- </li>
-
-
- <li id="section-264">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-264">&#182;</a>
- </div>
- <p>cleanup token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">delete</span> token.value;
-
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> params = token.params &amp;&amp; Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context]),
- fn = token.fn,
- value;
-
- <span class="hljs-keyword">if</span> (Twig.functions[fn]) {</pre></div></div>
-
- </li>
-
-
- <li id="section-265">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-265">&#182;</a>
- </div>
- <p>Get the function from the built-in functions</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> value = Twig.functions[fn].apply(<span class="hljs-keyword">this</span>, params);
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> context[fn] == <span class="hljs-string">'function'</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-266">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-266">&#182;</a>
- </div>
- <p>Get the function from the user/context defined functions</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> value = context[fn].apply(context, params);
-
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(fn + <span class="hljs-string">' function does not exist and is not defined in the context'</span>);
- }
-
- stack.push(value);
- }
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-267">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-267">&#182;</a>
- </div>
- <p>Token representing a variable.</p>
-<p>Variables can contain letters, numbers, underscores and
-dashes, but must start with a letter or underscore.</p>
-<p>Variables are retrieved from the render context and take
-the value of ‘undefined’ if the given variable doesn’t
-exist in the context.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> {
- type: Twig.expression.type.variable,</pre></div></div>
-
- </li>
-
-
- <li id="section-268">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-268">&#182;</a>
- </div>
- <p>match any letter or <em>, then any number of letters, numbers, </em> or -</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^[a-zA-Z_][a-zA-Z0-9_]*/</span>,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: Twig.expression.fn.compile.push,
- validate: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">match, tokens</span>) </span>{
- <span class="hljs-keyword">return</span> (Twig.indexOf(Twig.expression.reservedWords, match[<span class="hljs-number">0</span>]) &lt; <span class="hljs-number">0</span>);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-269">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-269">&#182;</a>
- </div>
- <p>Get the variable from the context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> value = Twig.expression.resolve(context[token.value], context);
- stack.push(value);
- }
- },
- {
- type: Twig.expression.type.key.period,
- regex: <span class="hljs-regexp">/^\.([a-zA-Z0-9_]+)/</span>,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- token.key = token.match[<span class="hljs-number">1</span>];
- <span class="hljs-keyword">delete</span> token.match;
- <span class="hljs-keyword">delete</span> token.value;
-
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- <span class="hljs-keyword">var</span> params = token.params &amp;&amp; Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context]),
- key = token.key,
- object = stack.pop(),
- value;
-
- <span class="hljs-keyword">if</span> (object === <span class="hljs-literal">null</span> || object === <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.options.strict_variables) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Can't access a key "</span> + key + <span class="hljs-string">" on an null or undefined object."</span>);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
- }
- }
-
- <span class="hljs-keyword">var</span> capitalize = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{<span class="hljs-keyword">return</span> value.substr(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>).toUpperCase() + value.substr(<span class="hljs-number">1</span>);};</pre></div></div>
-
- </li>
-
-
- <li id="section-270">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-270">&#182;</a>
- </div>
- <p>Get the variable from the context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> object === <span class="hljs-string">'object'</span> &amp;&amp; key <span class="hljs-keyword">in</span> object) {
- value = object[key];
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (object[<span class="hljs-string">"get"</span>+capitalize(key)] !== <span class="hljs-literal">undefined</span>) {
- value = object[<span class="hljs-string">"get"</span>+capitalize(key)];
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (object[<span class="hljs-string">"is"</span>+capitalize(key)] !== <span class="hljs-literal">undefined</span>) {
- value = object[<span class="hljs-string">"is"</span>+capitalize(key)];
- } <span class="hljs-keyword">else</span> {
- value = <span class="hljs-literal">undefined</span>;
- }
- stack.push(Twig.expression.resolve(value, object, params));
- }
- },
- {
- type: Twig.expression.type.key.brackets,
- regex: <span class="hljs-regexp">/^\[([^\]]*)\]/</span>,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">var</span> match = token.match[<span class="hljs-number">1</span>];
- <span class="hljs-keyword">delete</span> token.value;
- <span class="hljs-keyword">delete</span> token.match;</pre></div></div>
-
- </li>
-
-
- <li id="section-271">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-271">&#182;</a>
- </div>
- <p>The expression stack for the key</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token.stack = Twig.expression.compile({
- value: match
- }).stack;
-
- output.push(token);
- },
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-272">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-272">&#182;</a>
- </div>
- <p>Evaluate key</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> params = token.params &amp;&amp; Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.params, context]),
- key = Twig.expression.parse.apply(<span class="hljs-keyword">this</span>, [token.stack, context]),
- object = stack.pop(),
- value;
-
- <span class="hljs-keyword">if</span> (object === <span class="hljs-literal">null</span> || object === <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.options.strict_variables) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Can't access a key "</span> + key + <span class="hljs-string">" on an null or undefined object."</span>);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-273">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-273">&#182;</a>
- </div>
- <p>Get the variable from the context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> object === <span class="hljs-string">'object'</span> &amp;&amp; key <span class="hljs-keyword">in</span> object) {
- value = object[key];
- } <span class="hljs-keyword">else</span> {
- value = <span class="hljs-literal">null</span>;
- }
- stack.push(Twig.expression.resolve(value, object, params));
- }
- },
- {
- <span class="hljs-comment">/**
- * Match a null value.
- */</span>
- type: Twig.expression.type._null,</pre></div></div>
-
- </li>
-
-
- <li id="section-274">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-274">&#182;</a>
- </div>
- <p>match a number</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^(null|NULL|none|NONE)/</span>,
- next: Twig.expression.set.operations,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- <span class="hljs-keyword">delete</span> token.match;
- token.value = <span class="hljs-literal">null</span>;
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- },
- {
- <span class="hljs-comment">/**
- * Match the context
- */</span>
- type: Twig.expression.type.context,
- regex: <span class="hljs-regexp">/^_context/</span>,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: Twig.expression.fn.compile.push,
- parse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, context</span>) </span>{
- stack.push(context);
- }
- },
- {
- <span class="hljs-comment">/**
- * Match a number (integer or decimal)
- */</span>
- type: Twig.expression.type.number,</pre></div></div>
-
- </li>
-
-
- <li id="section-275">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-275">&#182;</a>
- </div>
- <p>match a number</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> regex: <span class="hljs-regexp">/^\-?\d+(\.\d+)?/</span>,
- next: Twig.expression.set.operations,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- token.value = <span class="hljs-built_in">Number</span>(token.value);
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- },
- {
- <span class="hljs-comment">/**
- * Match a boolean
- */</span>
- type: Twig.expression.type.bool,
- regex: <span class="hljs-regexp">/^(true|TRUE|false|FALSE)/</span>,
- next: Twig.expression.set.operations,
- compile: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">token, stack, output</span>) </span>{
- token.value = (token.match[<span class="hljs-number">0</span>].toLowerCase( ) === <span class="hljs-string">"true"</span>);
- <span class="hljs-keyword">delete</span> token.match;
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- }
- ];
-
- <span class="hljs-comment">/**
- * Resolve a context value.
- *
- * If the value is a function, it is executed with a context parameter.
- *
- * @param {string} key The context object key.
- * @param {Object} context The render context.
- */</span>
- Twig.expression.resolve = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, context, params</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> value == <span class="hljs-string">'function'</span>) {
- <span class="hljs-keyword">return</span> value.apply(context, params || []);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> value;
- }
- };
-
- <span class="hljs-comment">/**
- * Registry for logic handlers.
- */</span>
- Twig.expression.handler = {};
-
- <span class="hljs-comment">/**
- * Define a new expression type, available at Twig.logic.type.{type}
- *
- * @param {string} type The name of the new type.
- */</span>
- Twig.expression.extendType = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">type</span>) </span>{
- Twig.expression.type[type] = <span class="hljs-string">"Twig.expression.type."</span> + type;
- };
-
- <span class="hljs-comment">/**
- * Extend the expression parsing functionality with a new definition.
- *
- * Token definitions follow this format:
- * {
- * type: One of Twig.expression.type.[type], either pre-defined or added using
- * Twig.expression.extendType
- *
- * next: Array of types from Twig.expression.type that can follow this token,
- *
- * regex: A regex or array of regex's that should match the token.
- *
- * compile: function(token, stack, output) called when this token is being compiled.
- * Should return an object with stack and output set.
- *
- * parse: function(token, stack, context) called when this token is being parsed.
- * Should return an object with stack and context set.
- * }
- *
- * @param {Object} definition A token definition.
- */</span>
- Twig.expression.extend = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">definition</span>) </span>{
- <span class="hljs-keyword">if</span> (!definition.type) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to extend logic definition. No type provided for "</span> + definition);
- }
- Twig.expression.handler[definition.type] = definition;
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-276">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-276">&#182;</a>
- </div>
- <p>Extend with built-in expressions</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> (Twig.expression.definitions.length &gt; <span class="hljs-number">0</span>) {
- Twig.expression.extend(Twig.expression.definitions.shift());
- }
-
- <span class="hljs-comment">/**
- * Break an expression into tokens defined in Twig.expression.definitions.
- *
- * @param {string} expression The string to tokenize.
- *
- * @return {Array} An array of tokens.
- */</span>
- Twig.expression.tokenize = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">expression</span>) </span>{
- <span class="hljs-keyword">var</span> tokens = [],</pre></div></div>
-
- </li>
-
-
- <li id="section-277">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-277">&#182;</a>
- </div>
- <p>Keep an offset of the location in the expression for error messages.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> exp_offset = <span class="hljs-number">0</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-278">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-278">&#182;</a>
- </div>
- <p>The valid next tokens of the previous token</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> next = <span class="hljs-literal">null</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-279">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-279">&#182;</a>
- </div>
- <p>Match information</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> type, regex, regex_array,</pre></div></div>
-
- </li>
-
-
- <li id="section-280">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-280">&#182;</a>
- </div>
- <p>The possible next token for the match</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token_next,</pre></div></div>
-
- </li>
-
-
- <li id="section-281">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-281">&#182;</a>
- </div>
- <p>Has a match been found from the definitions</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> match_found, invalid_matches = [], match_function;
-
- match_function = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> match = <span class="hljs-built_in">Array</span>.prototype.slice.apply(<span class="hljs-built_in">arguments</span>),
- string = match.pop(),
- offset = match.pop();
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.tokenize"</span>,
- <span class="hljs-string">"Matched a "</span>, type, <span class="hljs-string">" regular expression of "</span>, match);
-
- <span class="hljs-keyword">if</span> (next &amp;&amp; Twig.indexOf(next, type) &lt; <span class="hljs-number">0</span>) {
- invalid_matches.push(
- type + <span class="hljs-string">" cannot follow a "</span> + tokens[tokens.length - <span class="hljs-number">1</span>].type +
- <span class="hljs-string">" at template:"</span> + exp_offset + <span class="hljs-string">" near '"</span> + match[<span class="hljs-number">0</span>].substring(<span class="hljs-number">0</span>, <span class="hljs-number">20</span>) +
- <span class="hljs-string">"...'"</span>
- );</pre></div></div>
-
- </li>
-
-
- <li id="section-282">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-282">&#182;</a>
- </div>
- <p>Not a match, don’t change the expression</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> match[<span class="hljs-number">0</span>];
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-283">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-283">&#182;</a>
- </div>
- <p>Validate the token if a validation function is provided</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (Twig.expression.handler[type].validate &amp;&amp;
- !Twig.expression.handler[type].validate(match, tokens)) {
- <span class="hljs-keyword">return</span> match[<span class="hljs-number">0</span>];
- }
-
- invalid_matches = [];
-
- tokens.push({
- type: type,
- value: match[<span class="hljs-number">0</span>],
- match: match
- });
-
- match_found = <span class="hljs-literal">true</span>;
- next = token_next;
- exp_offset += match[<span class="hljs-number">0</span>].length;</pre></div></div>
-
- </li>
-
-
- <li id="section-284">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-284">&#182;</a>
- </div>
- <p>Does the token need to return output back to the expression string
-e.g. a function match of cycle( might return the ‘(‘ back to the expression
-This allows look-ahead to differentiate between token types (e.g. functions and variable names)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (Twig.expression.handler[type].transform) {
- <span class="hljs-keyword">return</span> Twig.expression.handler[type].transform(match, tokens);
- }
- <span class="hljs-keyword">return</span> <span class="hljs-string">''</span>;
- };
-
- Twig.log.debug(<span class="hljs-string">"Twig.expression.tokenize"</span>, <span class="hljs-string">"Tokenizing expression "</span>, expression);
-
- <span class="hljs-keyword">while</span> (expression.length &gt; <span class="hljs-number">0</span>) {
- expression = expression.trim();
- <span class="hljs-keyword">for</span> (type <span class="hljs-keyword">in</span> Twig.expression.handler) {
- <span class="hljs-keyword">if</span> (Twig.expression.handler.hasOwnProperty(type)) {
- token_next = Twig.expression.handler[type].next;
- regex = Twig.expression.handler[type].regex;</pre></div></div>
-
- </li>
-
-
- <li id="section-285">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-285">&#182;</a>
- </div>
- <p>Twig.log.trace(“Checking type “, type, “ on “, expression);</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (regex <span class="hljs-keyword">instanceof</span> <span class="hljs-built_in">Array</span>) {
- regex_array = regex;
- } <span class="hljs-keyword">else</span> {
- regex_array = [regex];
- }
-
- match_found = <span class="hljs-literal">false</span>;
- <span class="hljs-keyword">while</span> (regex_array.length &gt; <span class="hljs-number">0</span>) {
- regex = regex_array.pop();
- expression = expression.replace(regex, match_function);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-286">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-286">&#182;</a>
- </div>
- <p>An expression token has been matched. Break the for loop and start trying to
- match the next template (if expression isn’t empty.)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (match_found) {
- <span class="hljs-keyword">break</span>;
- }
- }
- }
- <span class="hljs-keyword">if</span> (!match_found) {
- <span class="hljs-keyword">if</span> (invalid_matches.length &gt; <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(invalid_matches.join(<span class="hljs-string">" OR "</span>));
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to parse '"</span> + expression + <span class="hljs-string">"' at template position"</span> + exp_offset);
- }
- }
- }
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.tokenize"</span>, <span class="hljs-string">"Tokenized to "</span>, tokens);
- <span class="hljs-keyword">return</span> tokens;
- };
-
- <span class="hljs-comment">/**
- * Compile an expression token.
- *
- * @param {Object} raw_token The uncompiled token.
- *
- * @return {Object} The compiled token.
- */</span>
- Twig.expression.compile = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">raw_token</span>) </span>{
- <span class="hljs-keyword">var</span> expression = raw_token.value,</pre></div></div>
-
- </li>
-
-
- <li id="section-287">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-287">&#182;</a>
- </div>
- <p>Tokenize expression</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> tokens = Twig.expression.tokenize(expression),
- token = <span class="hljs-literal">null</span>,
- output = [],
- stack = [],
- token_template = <span class="hljs-literal">null</span>;
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Compiling "</span>, expression);</pre></div></div>
-
- </li>
-
-
- <li id="section-288">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-288">&#182;</a>
- </div>
- <p>Push tokens into RPN stack using the Sunting-yard algorithm
-See <a href="http://en.wikipedia.org/wiki/Shunting_yard_algorithm">http://en.wikipedia.org/wiki/Shunting_yard_algorithm</a></p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">while</span> (tokens.length &gt; <span class="hljs-number">0</span>) {
- token = tokens.shift();
- token_template = Twig.expression.handler[token.type];
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Compiling "</span>, token);</pre></div></div>
-
- </li>
-
-
- <li id="section-289">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-289">&#182;</a>
- </div>
- <p>Compile the template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> token_template.compile &amp;&amp; token_template.compile(token, stack, output);
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Stack is"</span>, stack);
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Output is"</span>, output);
- }
-
- <span class="hljs-keyword">while</span>(stack.length &gt; <span class="hljs-number">0</span>) {
- output.push(stack.pop());
- }
-
- Twig.log.trace(<span class="hljs-string">"Twig.expression.compile: "</span>, <span class="hljs-string">"Final output is"</span>, output);
-
- raw_token.stack = output;
- <span class="hljs-keyword">delete</span> raw_token.value;
-
- <span class="hljs-keyword">return</span> raw_token;
- };
-
-
- <span class="hljs-comment">/**
- * Parse an RPN expression stack within a context.
- *
- * @param {Array} tokens An array of compiled expression tokens.
- * @param {Object} context The render context to parse the tokens with.
- *
- * @return {Object} The result of parsing all the tokens. The result
- * can be anything, String, Array, Object, etc... based on
- * the given expression.
- */</span>
- Twig.expression.parse = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">tokens, context</span>) </span>{
- <span class="hljs-keyword">var</span> that = <span class="hljs-keyword">this</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-290">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-290">&#182;</a>
- </div>
- <p>If the token isn’t an array, make it one.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (!(tokens <span class="hljs-keyword">instanceof</span> <span class="hljs-built_in">Array</span>)) {
- tokens = [tokens];
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-291">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-291">&#182;</a>
- </div>
- <p>The output stack</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> stack = [],
- token_template = <span class="hljs-literal">null</span>;
-
- Twig.forEach(tokens, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">token</span>) </span>{
- token_template = Twig.expression.handler[token.type];
-
- token_template.parse &amp;&amp; token_template.parse.apply(that, [token, stack, context]);
- });</pre></div></div>
-
- </li>
-
-
- <li id="section-292">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-292">&#182;</a>
- </div>
- <p>Pop the final value off the stack</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> stack.pop();
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-})( Twig || { } );</pre></div></div>
-
- </li>
-
-
- <li id="section-293">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-293">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-294">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-294">&#182;</a>
- </div>
- <h2 id="twig-expression-operator-js">twig.expression.operator.js</h2>
-<p>This file handles operator lookups and parsing.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;
-
- <span class="hljs-comment">/**
- * Operator associativity constants.
- */</span>
- Twig.expression.operator = {
- leftToRight: <span class="hljs-string">'leftToRight'</span>,
- rightToLeft: <span class="hljs-string">'rightToLeft'</span>
- };
-
- <span class="hljs-keyword">var</span> containment = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">a, b</span>) </span>{
- <span class="hljs-keyword">if</span> (b === <span class="hljs-literal">undefined</span> || b === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (b.indexOf !== <span class="hljs-literal">undefined</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-295">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-295">&#182;</a>
- </div>
- <p>String</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> a === b || a !== <span class="hljs-string">''</span> &amp;&amp; b.indexOf(a) &gt; <span class="hljs-number">-1</span>;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">var</span> el;
- <span class="hljs-keyword">for</span> (el <span class="hljs-keyword">in</span> b) {
- <span class="hljs-keyword">if</span> (b.hasOwnProperty(el) &amp;&amp; b[el] === a) {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
- }
- }
- <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
- }
- };
-
- <span class="hljs-comment">/**
- * Get the precidence and associativity of an operator. These follow the order that C/C++ use.
- * See http://en.wikipedia.org/wiki/Operators_in_C_and_C++ for the table of values.
- */</span>
- Twig.expression.operator.lookup = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">operator, token</span>) </span>{
- <span class="hljs-keyword">switch</span> (operator) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">".."</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'not in'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'in'</span>:
- token.precidence = <span class="hljs-number">20</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">','</span>:
- token.precidence = <span class="hljs-number">18</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-296">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-296">&#182;</a>
- </div>
- <p>Ternary</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> <span class="hljs-string">'?'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">':'</span>:
- token.precidence = <span class="hljs-number">16</span>;
- token.associativity = Twig.expression.operator.rightToLeft;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'or'</span>:
- token.precidence = <span class="hljs-number">14</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'and'</span>:
- token.precidence = <span class="hljs-number">13</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'=='</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'!='</span>:
- token.precidence = <span class="hljs-number">9</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&lt;'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&lt;='</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&gt;'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&gt;='</span>:
- token.precidence = <span class="hljs-number">8</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'~'</span>: <span class="hljs-comment">// String concatination</span>
- <span class="hljs-keyword">case</span> <span class="hljs-string">'+'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'-'</span>:
- token.precidence = <span class="hljs-number">6</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'//'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'**'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'*'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'/'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'%'</span>:
- token.precidence = <span class="hljs-number">5</span>;
- token.associativity = Twig.expression.operator.leftToRight;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'not'</span>:
- token.precidence = <span class="hljs-number">3</span>;
- token.associativity = Twig.expression.operator.rightToLeft;
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">default</span>:
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(operator + <span class="hljs-string">" is an unknown operator."</span>);
- }
- token.operator = operator;
- <span class="hljs-keyword">return</span> token;
- };
-
- <span class="hljs-comment">/**
- * Handle operations on the RPN stack.
- *
- * Returns the updated stack.
- */</span>
- Twig.expression.operator.parse = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">operator, stack</span>) </span>{
- Twig.log.trace(<span class="hljs-string">"Twig.expression.operator.parse: "</span>, <span class="hljs-string">"Handling "</span>, operator);
- <span class="hljs-keyword">var</span> a, b, c;
- <span class="hljs-keyword">switch</span> (operator) {
- <span class="hljs-keyword">case</span> <span class="hljs-string">':'</span>:</pre></div></div>
-
- </li>
-
-
- <li id="section-297">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-297">&#182;</a>
- </div>
- <p>Ignore</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'?'</span>:
- c = stack.pop(); <span class="hljs-comment">// false expr</span>
- b = stack.pop(); <span class="hljs-comment">// true expr</span>
- a = stack.pop(); <span class="hljs-comment">// conditional</span>
- <span class="hljs-keyword">if</span> (a) {
- stack.push(b);
- } <span class="hljs-keyword">else</span> {
- stack.push(c);
- }
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'+'</span>:
- b = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- a = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- stack.push(a + b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'-'</span>:
- b = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- a = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- stack.push(a - b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'*'</span>:
- b = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- a = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- stack.push(a * b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'/'</span>:
- b = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- a = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- stack.push(a / b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'//'</span>:
- b = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- a = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- stack.push(<span class="hljs-built_in">parseInt</span>(a / b));
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'%'</span>:
- b = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- a = <span class="hljs-built_in">parseFloat</span>(stack.pop());
- stack.push(a % b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'~'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push( (a != <span class="hljs-literal">null</span> ? a.toString() : <span class="hljs-string">""</span>)
- + (b != <span class="hljs-literal">null</span> ? b.toString() : <span class="hljs-string">""</span>) );
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'not'</span>:
- <span class="hljs-keyword">case</span> <span class="hljs-string">'!'</span>:
- stack.push(!stack.pop());
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&lt;'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a &lt; b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&lt;='</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a &lt;= b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&gt;'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a &gt; b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'&gt;='</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a &gt;= b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'==='</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a === b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'=='</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a == b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'!=='</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a !== b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'!='</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a != b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'or'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a || b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'and'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(a &amp;&amp; b);
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'**'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push(<span class="hljs-built_in">Math</span>.pow(a, b));
- <span class="hljs-keyword">break</span>;
-
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'not in'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push( !containment(a, b) );
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'in'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push( containment(a, b) );
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">case</span> <span class="hljs-string">'..'</span>:
- b = stack.pop();
- a = stack.pop();
- stack.push( Twig.functions.range(a, b) );
- <span class="hljs-keyword">break</span>;
-
- <span class="hljs-keyword">default</span>:
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(operator + <span class="hljs-string">" is an unknown operator."</span>);
- }
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-})( Twig || { } );</pre></div></div>
-
- </li>
-
-
- <li id="section-298">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-298">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-299">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-299">&#182;</a>
- </div>
- <h2 id="twig-filters-js">twig.filters.js</h2>
-<p>This file handles parsing filters.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-300">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-300">&#182;</a>
- </div>
- <p>Determine object type</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">is</span>(<span class="hljs-params">type, obj</span>) </span>{
- <span class="hljs-keyword">var</span> clas = <span class="hljs-built_in">Object</span>.prototype.toString.call(obj).slice(<span class="hljs-number">8</span>, <span class="hljs-number">-1</span>);
- <span class="hljs-keyword">return</span> obj !== <span class="hljs-literal">undefined</span> &amp;&amp; obj !== <span class="hljs-literal">null</span> &amp;&amp; clas === type;
- }
-
- Twig.filters = {</pre></div></div>
-
- </li>
-
-
- <li id="section-301">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-301">&#182;</a>
- </div>
- <p>String Filters</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> upper: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> value !== <span class="hljs-string">"string"</span> ) {
- <span class="hljs-keyword">return</span> value;
- }
-
- <span class="hljs-keyword">return</span> value.toUpperCase();
- },
- lower: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> value !== <span class="hljs-string">"string"</span> ) {
- <span class="hljs-keyword">return</span> value;
- }
-
- <span class="hljs-keyword">return</span> value.toLowerCase();
- },
- capitalize: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> value !== <span class="hljs-string">"string"</span> ) {
- <span class="hljs-keyword">return</span> value;
- }
-
- <span class="hljs-keyword">return</span> value.substr(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>).toUpperCase() + value.toLowerCase().substr(<span class="hljs-number">1</span>);
- },
- title: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> value !== <span class="hljs-string">"string"</span> ) {
- <span class="hljs-keyword">return</span> value;
- }
-
- <span class="hljs-keyword">return</span> value.toLowerCase().replace( <span class="hljs-regexp">/(^|\s)([a-z])/g</span> , <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">m, p1, p2</span>)</span>{
- <span class="hljs-keyword">return</span> p1 + p2.toUpperCase();
- });
- },
- length: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Array"</span>, value) || <span class="hljs-keyword">typeof</span> value === <span class="hljs-string">"string"</span>) {
- <span class="hljs-keyword">return</span> value.length;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Object"</span>, value)) {
- <span class="hljs-keyword">if</span> (value._keys === <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">Object</span>.keys(value).length;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> value._keys.length;
- }
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
- }
- },</pre></div></div>
-
- </li>
-
-
- <li id="section-302">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-302">&#182;</a>
- </div>
- <p>Array/Object Filters</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> reverse: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Array"</span>, value)) {
- <span class="hljs-keyword">return</span> value.reverse();
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"String"</span>, value)) {
- <span class="hljs-keyword">return</span> value.split(<span class="hljs-string">""</span>).reverse().join(<span class="hljs-string">""</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Object"</span>, value)) {
- <span class="hljs-keyword">var</span> keys = value._keys || <span class="hljs-built_in">Object</span>.keys(value).reverse();
- value._keys = keys;
- <span class="hljs-keyword">return</span> value;
- }
- },
- sort: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Array"</span>, value)) {
- <span class="hljs-keyword">return</span> value.sort();
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (is(<span class="hljs-string">'Object'</span>, value)) {</pre></div></div>
-
- </li>
-
-
- <li id="section-303">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-303">&#182;</a>
- </div>
- <p>Sorting objects isn’t obvious since the order of
-returned keys isn’t guaranteed in JavaScript.
-Because of this we use a “hidden” key called _keys to
-store the keys in the order we want to return them.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">delete</span> value._keys;
- <span class="hljs-keyword">var</span> keys = <span class="hljs-built_in">Object</span>.keys(value),
- sorted_keys = keys.sort(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">a, b</span>) </span>{
- <span class="hljs-keyword">var</span> a1, a2;</pre></div></div>
-
- </li>
-
-
- <li id="section-304">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-304">&#182;</a>
- </div>
- <p>if a and b are comparable, we’re fine :-)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span>((value[a] &gt; value[b]) == !(value[a] &lt;= value[b])) {
- <span class="hljs-keyword">return</span> value[a] &gt; value[b] ? <span class="hljs-number">1</span> :
- value[a] &lt; value[b] ? <span class="hljs-number">-1</span> :
- <span class="hljs-number">0</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-305">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-305">&#182;</a>
- </div>
- <p>if a and b can be parsed as numbers, we can compare
-their numeric value</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(!<span class="hljs-built_in">isNaN</span>(a1 = <span class="hljs-built_in">parseFloat</span>(value[a])) &amp;&amp;
- !<span class="hljs-built_in">isNaN</span>(b1 = <span class="hljs-built_in">parseFloat</span>(value[b]))) {
- <span class="hljs-keyword">return</span> a1 &gt; b1 ? <span class="hljs-number">1</span> :
- a1 &lt; b1 ? <span class="hljs-number">-1</span> :
- <span class="hljs-number">0</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-306">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-306">&#182;</a>
- </div>
- <p>if one of the values is a string, we convert the
-other value to string as well</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> value[a] == <span class="hljs-string">'string'</span>) {
- <span class="hljs-keyword">return</span> value[a] &gt; value[b].toString() ? <span class="hljs-number">1</span> :
- value[a] &lt; value[b].toString() ? <span class="hljs-number">-1</span> :
- <span class="hljs-number">0</span>;
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> value[b] == <span class="hljs-string">'string'</span>) {
- <span class="hljs-keyword">return</span> value[a].toString() &gt; value[b] ? <span class="hljs-number">1</span> :
- value[a].toString() &lt; value[b] ? <span class="hljs-number">-1</span> :
- <span class="hljs-number">0</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-307">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-307">&#182;</a>
- </div>
- <p>everything failed - return ‘null’ as sign, that
-the values are not comparable</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
- }
- });
- value._keys = sorted_keys;
- <span class="hljs-keyword">return</span> value;
- }
- },
- keys: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">var</span> keyset = value._keys || <span class="hljs-built_in">Object</span>.keys(value),
- output = [];
-
- Twig.forEach(keyset, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{
- <span class="hljs-keyword">if</span> (key === <span class="hljs-string">"_keys"</span>) <span class="hljs-keyword">return</span>; <span class="hljs-comment">// Ignore the _keys property</span>
- <span class="hljs-keyword">if</span> (value.hasOwnProperty(key)) {
- output.push(key);
- }
- });
- <span class="hljs-keyword">return</span> output;
- },
- url_encode: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">var</span> result = <span class="hljs-built_in">encodeURIComponent</span>(value);
- result = result.replace(<span class="hljs-string">"'"</span>, <span class="hljs-string">"%27"</span>);
- <span class="hljs-keyword">return</span> result;
- },
- join: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">var</span> join_str = <span class="hljs-string">""</span>,
- output = [],
- keyset = <span class="hljs-literal">null</span>;
-
- <span class="hljs-keyword">if</span> (params &amp;&amp; params[<span class="hljs-number">0</span>]) {
- join_str = params[<span class="hljs-number">0</span>];
- }
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Array"</span>, value)) {
- output = value;
- } <span class="hljs-keyword">else</span> {
- keyset = value._keys || <span class="hljs-built_in">Object</span>.keys(value);
- Twig.forEach(keyset, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{
- <span class="hljs-keyword">if</span> (key === <span class="hljs-string">"_keys"</span>) <span class="hljs-keyword">return</span>; <span class="hljs-comment">// Ignore the _keys property</span>
- <span class="hljs-keyword">if</span> (value.hasOwnProperty(key)) {
- output.push(value[key]);
- }
- });
- }
- <span class="hljs-keyword">return</span> output.join(join_str);
- },
- <span class="hljs-string">"default"</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (params !== <span class="hljs-literal">undefined</span> &amp;&amp; params.length &gt; <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"default filter expects one argument"</span>);
- }
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span> || value === <span class="hljs-string">''</span> ) {
- <span class="hljs-keyword">if</span> (params === <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-string">''</span>;
- }
-
- <span class="hljs-keyword">return</span> params[<span class="hljs-number">0</span>];
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> value;
- }
- },
- json_encode: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span>(value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">return</span> <span class="hljs-string">"null"</span>;
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ((<span class="hljs-keyword">typeof</span> value == <span class="hljs-string">'object'</span>) &amp;&amp; (is(<span class="hljs-string">"Array"</span>, value))) {
- output = [];
-
- Twig.forEach(value, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">v</span>) </span>{
- output.push(Twig.filters.json_encode(v));
- });
-
- <span class="hljs-keyword">return</span> <span class="hljs-string">"["</span> + output.join(<span class="hljs-string">","</span>) + <span class="hljs-string">"]"</span>;
- }
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> value == <span class="hljs-string">'object'</span>) {
- <span class="hljs-keyword">var</span> keyset = value._keys || <span class="hljs-built_in">Object</span>.keys(value),
- output = [];
-
- Twig.forEach(keyset, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{
- output.push(<span class="hljs-built_in">JSON</span>.stringify(key) + <span class="hljs-string">":"</span> + Twig.filters.json_encode(value[key]));
- });
-
- <span class="hljs-keyword">return</span> <span class="hljs-string">"{"</span> + output.join(<span class="hljs-string">","</span>) + <span class="hljs-string">"}"</span>;
- }
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">JSON</span>.stringify(value);
- }
- },
- merge: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">var</span> obj = [],
- arr_index = <span class="hljs-number">0</span>,
- keyset = [];</pre></div></div>
-
- </li>
-
-
- <li id="section-308">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-308">&#182;</a>
- </div>
- <p>Check to see if all the objects being merged are arrays</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (!is(<span class="hljs-string">"Array"</span>, value)) {</pre></div></div>
-
- </li>
-
-
- <li id="section-309">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-309">&#182;</a>
- </div>
- <p>Create obj as an Object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> obj = { };
- } <span class="hljs-keyword">else</span> {
- Twig.forEach(params, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">param</span>) </span>{
- <span class="hljs-keyword">if</span> (!is(<span class="hljs-string">"Array"</span>, param)) {
- obj = { };
- }
- });
- }
- <span class="hljs-keyword">if</span> (!is(<span class="hljs-string">"Array"</span>, obj)) {
- obj._keys = [];
- }
-
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Array"</span>, value)) {
- Twig.forEach(value, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">val</span>) </span>{
- <span class="hljs-keyword">if</span> (obj._keys) obj._keys.push(arr_index);
- obj[arr_index] = val;
- arr_index++;
- });
- } <span class="hljs-keyword">else</span> {
- keyset = value._keys || <span class="hljs-built_in">Object</span>.keys(value);
- Twig.forEach(keyset, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{
- obj[key] = value[key];
- obj._keys.push(key);</pre></div></div>
-
- </li>
-
-
- <li id="section-310">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-310">&#182;</a>
- </div>
- <p>Handle edge case where a number index in an object is greater than
- the array counter. In such a case, the array counter is increased
- one past the index.</p>
-<p>Example {{ [“a”, “b”]|merge({“4”:”value”}, [“c”, “d”])
-Without this, d would have an index of “4” and overwrite the value
- of “value”</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> int_key = <span class="hljs-built_in">parseInt</span>(key, <span class="hljs-number">10</span>);
- <span class="hljs-keyword">if</span> (!<span class="hljs-built_in">isNaN</span>(int_key) &amp;&amp; int_key &gt;= arr_index) {
- arr_index = int_key + <span class="hljs-number">1</span>;
- }
- });
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-311">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-311">&#182;</a>
- </div>
- <p>mixin the merge arrays</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.forEach(params, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">param</span>) </span>{
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Array"</span>, param)) {
- Twig.forEach(param, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">val</span>) </span>{
- <span class="hljs-keyword">if</span> (obj._keys) obj._keys.push(arr_index);
- obj[arr_index] = val;
- arr_index++;
- });
- } <span class="hljs-keyword">else</span> {
- keyset = param._keys || <span class="hljs-built_in">Object</span>.keys(param);
- Twig.forEach(keyset, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">key</span>) </span>{
- <span class="hljs-keyword">if</span> (!obj[key]) obj._keys.push(key);
- obj[key] = param[key];
-
- <span class="hljs-keyword">var</span> int_key = <span class="hljs-built_in">parseInt</span>(key, <span class="hljs-number">10</span>);
- <span class="hljs-keyword">if</span> (!<span class="hljs-built_in">isNaN</span>(int_key) &amp;&amp; int_key &gt;= arr_index) {
- arr_index = int_key + <span class="hljs-number">1</span>;
- }
- });
- }
- });
- <span class="hljs-keyword">if</span> (params.length === <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Filter merge expects at least one parameter"</span>);
- }
-
- <span class="hljs-keyword">return</span> obj;
- },
- date: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">var</span> date = Twig.functions.date(value);
- <span class="hljs-keyword">var</span> format = params &amp;&amp; params.length ? params[<span class="hljs-number">0</span>] : <span class="hljs-string">'F j, Y H:i'</span>;
- <span class="hljs-keyword">return</span> Twig.lib.formatDate(date, format);
- },
-
- date_modify: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">return</span>;
- }
- <span class="hljs-keyword">if</span> (params === <span class="hljs-literal">undefined</span> || params.length !== <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"date_modify filter expects 1 argument"</span>);
- }
-
- <span class="hljs-keyword">var</span> modifyText = params[<span class="hljs-number">0</span>], time;
-
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Date"</span>, value)) {
- time = Twig.lib.strtotime(modifyText, value.getTime() / <span class="hljs-number">1000</span>);
- }
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"String"</span>, value)) {
- time = Twig.lib.strtotime(modifyText, Twig.lib.strtotime(value));
- }
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Number"</span>, value)) {
- time = Twig.lib.strtotime(modifyText, value);
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(time * <span class="hljs-number">1000</span>);
- },
-
- replace: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span>||value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">var</span> pairs = params[<span class="hljs-number">0</span>],
- tag;
- <span class="hljs-keyword">for</span> (tag <span class="hljs-keyword">in</span> pairs) {
- <span class="hljs-keyword">if</span> (pairs.hasOwnProperty(tag) &amp;&amp; tag !== <span class="hljs-string">"_keys"</span>) {
- value = Twig.lib.replaceAll(value, tag, pairs[tag]);
- }
- }
- <span class="hljs-keyword">return</span> value;
- },
-
- format: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">return</span> Twig.lib.vsprintf(value, params);
- },
-
- striptags: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">return</span> Twig.lib.strip_tags(value);
- },
-
- <span class="hljs-built_in">escape</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span>|| value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">var</span> strategy = <span class="hljs-string">"html"</span>;
- <span class="hljs-keyword">if</span>(params &amp;&amp; params.length &amp;&amp; params[<span class="hljs-number">0</span>] !== <span class="hljs-literal">true</span>)
- strategy = params[<span class="hljs-number">0</span>];
-
- <span class="hljs-keyword">if</span>(strategy == <span class="hljs-string">"html"</span>) {
- <span class="hljs-keyword">var</span> raw_value = value.toString().replace(<span class="hljs-regexp">/&amp;/g</span>, <span class="hljs-string">"&amp;amp;"</span>)
- .replace(<span class="hljs-regexp">/&lt;/g</span>, <span class="hljs-string">"&amp;lt;"</span>)
- .replace(<span class="hljs-regexp">/&gt;/g</span>, <span class="hljs-string">"&amp;gt;"</span>)
- .replace(<span class="hljs-regexp">/"/g</span>, <span class="hljs-string">"&amp;quot;"</span>)
- .replace(<span class="hljs-regexp">/'/g</span>, <span class="hljs-string">"&amp;#039;"</span>);
- <span class="hljs-keyword">return</span> Twig.Markup(raw_value, <span class="hljs-string">'html'</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(strategy == <span class="hljs-string">"js"</span>) {
- <span class="hljs-keyword">var</span> raw_value = value.toString();
- <span class="hljs-keyword">var</span> result = <span class="hljs-string">""</span>;
-
- <span class="hljs-keyword">for</span>(<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; raw_value.length; i++) {
- <span class="hljs-keyword">if</span>(raw_value[i].match(<span class="hljs-regexp">/^[a-zA-Z0-9,\._]$/</span>))
- result += raw_value[i];
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">var</span> char_code = raw_value.charCodeAt(i);
-
- <span class="hljs-keyword">if</span>(char_code &lt; <span class="hljs-number">0x80</span>)
- result += <span class="hljs-string">"\\x"</span> + char_code.toString(<span class="hljs-number">16</span>).toUpperCase();
- <span class="hljs-keyword">else</span>
- result += Twig.lib.sprintf(<span class="hljs-string">"\\u%04s"</span>, char_code.toString(<span class="hljs-number">16</span>).toUpperCase());
- }
- }
-
- <span class="hljs-keyword">return</span> Twig.Markup(result, <span class="hljs-string">'js'</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(strategy == <span class="hljs-string">"css"</span>) {
- <span class="hljs-keyword">var</span> raw_value = value.toString();
- <span class="hljs-keyword">var</span> result = <span class="hljs-string">""</span>;
-
- <span class="hljs-keyword">for</span>(<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; raw_value.length; i++) {
- <span class="hljs-keyword">if</span>(raw_value[i].match(<span class="hljs-regexp">/^[a-zA-Z0-9]$/</span>))
- result += raw_value[i];
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">var</span> char_code = raw_value.charCodeAt(i);
- result += <span class="hljs-string">"\\"</span> + char_code.toString(<span class="hljs-number">16</span>).toUpperCase() + <span class="hljs-string">" "</span>;
- }
- }
-
- <span class="hljs-keyword">return</span> Twig.Markup(result, <span class="hljs-string">'css'</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(strategy == <span class="hljs-string">"url"</span>) {
- <span class="hljs-keyword">var</span> result = Twig.filters.url_encode(value);
- <span class="hljs-keyword">return</span> Twig.Markup(result, <span class="hljs-string">'url'</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(strategy == <span class="hljs-string">"html_attr"</span>) {
- <span class="hljs-keyword">var</span> raw_value = value.toString();
- <span class="hljs-keyword">var</span> result = <span class="hljs-string">""</span>;
-
- <span class="hljs-keyword">for</span>(<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; raw_value.length; i++) {
- <span class="hljs-keyword">if</span>(raw_value[i].match(<span class="hljs-regexp">/^[a-zA-Z0-9,\.\-_]$/</span>))
- result += raw_value[i];
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(raw_value[i].match(<span class="hljs-regexp">/^[&amp;&lt;&gt;"]$/</span>))
- result += raw_value[i].replace(<span class="hljs-regexp">/&amp;/g</span>, <span class="hljs-string">"&amp;amp;"</span>)
- .replace(<span class="hljs-regexp">/&lt;/g</span>, <span class="hljs-string">"&amp;lt;"</span>)
- .replace(<span class="hljs-regexp">/&gt;/g</span>, <span class="hljs-string">"&amp;gt;"</span>)
- .replace(<span class="hljs-regexp">/"/g</span>, <span class="hljs-string">"&amp;quot;"</span>);
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">var</span> char_code = raw_value.charCodeAt(i);</pre></div></div>
-
- </li>
-
-
- <li id="section-312">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-312">&#182;</a>
- </div>
- <p>The following replaces characters undefined in HTML with
-the hex entity for the Unicode replacement character.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span>(char_code &lt;= <span class="hljs-number">0x1f</span> &amp;&amp; char_code != <span class="hljs-number">0x09</span> &amp;&amp; char_code != <span class="hljs-number">0x0a</span> &amp;&amp; char_code != <span class="hljs-number">0x0d</span>)
- result += <span class="hljs-string">"&amp;#xFFFD;"</span>;
- <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(char_code &lt; <span class="hljs-number">0x80</span>)
- result += Twig.lib.sprintf(<span class="hljs-string">"&amp;#x%02s;"</span>, char_code.toString(<span class="hljs-number">16</span>).toUpperCase());
- <span class="hljs-keyword">else</span>
- result += Twig.lib.sprintf(<span class="hljs-string">"&amp;#x%04s;"</span>, char_code.toString(<span class="hljs-number">16</span>).toUpperCase());
- }
- }
-
- <span class="hljs-keyword">return</span> Twig.Markup(result, <span class="hljs-string">'html_attr'</span>);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"escape strategy unsupported"</span>);
- }
- },
-
- <span class="hljs-comment">/* Alias of escape */</span>
- <span class="hljs-string">"e"</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">return</span> Twig.filters.escape(value, params);
- },
-
- nl2br: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
- <span class="hljs-keyword">var</span> linebreak_tag = <span class="hljs-string">"BACKSLASH_n_replace"</span>,
- br = <span class="hljs-string">"&lt;br /&gt;"</span> + linebreak_tag;
-
- value = Twig.filters.escape(value)
- .replace(<span class="hljs-regexp">/\r\n/g</span>, br)
- .replace(<span class="hljs-regexp">/\r/g</span>, br)
- .replace(<span class="hljs-regexp">/\n/g</span>, br);
-
- value = Twig.lib.replaceAll(value, linebreak_tag, <span class="hljs-string">"\n"</span>);
-
- <span class="hljs-keyword">return</span> Twig.Markup(value);
- },
-
- <span class="hljs-comment">/**
- * Adapted from: http://phpjs.org/functions/number_format:481
- */</span>
- number_format: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">var</span> number = value,
- decimals = (params &amp;&amp; params[<span class="hljs-number">0</span>]) ? params[<span class="hljs-number">0</span>] : <span class="hljs-literal">undefined</span>,
- dec = (params &amp;&amp; params[<span class="hljs-number">1</span>] !== <span class="hljs-literal">undefined</span>) ? params[<span class="hljs-number">1</span>] : <span class="hljs-string">"."</span>,
- sep = (params &amp;&amp; params[<span class="hljs-number">2</span>] !== <span class="hljs-literal">undefined</span>) ? params[<span class="hljs-number">2</span>] : <span class="hljs-string">","</span>;
-
- number = (number + <span class="hljs-string">''</span>).replace(<span class="hljs-regexp">/[^0-9+\-Ee.]/g</span>, <span class="hljs-string">''</span>);
- <span class="hljs-keyword">var</span> n = !<span class="hljs-built_in">isFinite</span>(+number) ? <span class="hljs-number">0</span> : +number,
- prec = !<span class="hljs-built_in">isFinite</span>(+decimals) ? <span class="hljs-number">0</span> : <span class="hljs-built_in">Math</span>.abs(decimals),
- s = <span class="hljs-string">''</span>,
- toFixedFix = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">n, prec</span>) </span>{
- <span class="hljs-keyword">var</span> k = <span class="hljs-built_in">Math</span>.pow(<span class="hljs-number">10</span>, prec);
- <span class="hljs-keyword">return</span> <span class="hljs-string">''</span> + <span class="hljs-built_in">Math</span>.round(n * k) / k;
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-313">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-313">&#182;</a>
- </div>
- <p>Fix for IE parseFloat(0.55).toFixed(0) = 0;</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> s = (prec ? toFixedFix(n, prec) : <span class="hljs-string">''</span> + <span class="hljs-built_in">Math</span>.round(n)).split(<span class="hljs-string">'.'</span>);
- <span class="hljs-keyword">if</span> (s[<span class="hljs-number">0</span>].length &gt; <span class="hljs-number">3</span>) {
- s[<span class="hljs-number">0</span>] = s[<span class="hljs-number">0</span>].replace(<span class="hljs-regexp">/\B(?=(?:\d{3})+(?!\d))/g</span>, sep);
- }
- <span class="hljs-keyword">if</span> ((s[<span class="hljs-number">1</span>] || <span class="hljs-string">''</span>).length &lt; prec) {
- s[<span class="hljs-number">1</span>] = s[<span class="hljs-number">1</span>] || <span class="hljs-string">''</span>;
- s[<span class="hljs-number">1</span>] += <span class="hljs-keyword">new</span> <span class="hljs-built_in">Array</span>(prec - s[<span class="hljs-number">1</span>].length + <span class="hljs-number">1</span>).join(<span class="hljs-string">'0'</span>);
- }
- <span class="hljs-keyword">return</span> s.join(dec);
- },
-
- trim: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span>|| value === <span class="hljs-literal">null</span>){
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">var</span> str = Twig.filters.escape( <span class="hljs-string">''</span> + value ),
- whitespace;
- <span class="hljs-keyword">if</span> ( params &amp;&amp; params[<span class="hljs-number">0</span>] ) {
- whitespace = <span class="hljs-string">''</span> + params[<span class="hljs-number">0</span>];
- } <span class="hljs-keyword">else</span> {
- whitespace = <span class="hljs-string">' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000'</span>;
- }
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; str.length; i++) {
- <span class="hljs-keyword">if</span> (whitespace.indexOf(str.charAt(i)) === <span class="hljs-number">-1</span>) {
- str = str.substring(i);
- <span class="hljs-keyword">break</span>;
- }
- }
- <span class="hljs-keyword">for</span> (i = str.length - <span class="hljs-number">1</span>; i &gt;= <span class="hljs-number">0</span>; i--) {
- <span class="hljs-keyword">if</span> (whitespace.indexOf(str.charAt(i)) === <span class="hljs-number">-1</span>) {
- str = str.substring(<span class="hljs-number">0</span>, i + <span class="hljs-number">1</span>);
- <span class="hljs-keyword">break</span>;
- }
- }
- <span class="hljs-keyword">return</span> whitespace.indexOf(str.charAt(<span class="hljs-number">0</span>)) === <span class="hljs-number">-1</span> ? str : <span class="hljs-string">''</span>;
- },
-
- truncate: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">var</span> length = <span class="hljs-number">30</span>,
- preserve = <span class="hljs-literal">false</span>,
- separator = <span class="hljs-string">'...'</span>;
-
- value = value + <span class="hljs-string">''</span>;
- <span class="hljs-keyword">if</span> (params) {
- <span class="hljs-keyword">if</span> (params[<span class="hljs-number">0</span>]) {
- length = params[<span class="hljs-number">0</span>];
- }
- <span class="hljs-keyword">if</span> (params[<span class="hljs-number">1</span>]) {
- preserve = params[<span class="hljs-number">1</span>];
- }
- <span class="hljs-keyword">if</span> (params[<span class="hljs-number">2</span>]) {
- separator = params[<span class="hljs-number">2</span>];
- }
- }
-
- <span class="hljs-keyword">if</span> (value.length &gt; length) {
-
- <span class="hljs-keyword">if</span> (preserve) {
- length = value.indexOf(<span class="hljs-string">' '</span>, length);
- <span class="hljs-keyword">if</span> (length === <span class="hljs-number">-1</span>) {
- <span class="hljs-keyword">return</span> value;
- }
- }
-
- value = value.substr(<span class="hljs-number">0</span>, length) + separator;
- }
-
- <span class="hljs-keyword">return</span> value;
- },
-
- slice: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">return</span>;
- }
- <span class="hljs-keyword">if</span> (params === <span class="hljs-literal">undefined</span> || params.length &lt; <span class="hljs-number">1</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"slice filter expects at least 1 argument"</span>);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-314">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-314">&#182;</a>
- </div>
- <p>default to start of string</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> start = params[<span class="hljs-number">0</span>] || <span class="hljs-number">0</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-315">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-315">&#182;</a>
- </div>
- <p>default to length of string</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> length = params.length &gt; <span class="hljs-number">1</span> ? params[<span class="hljs-number">1</span>] : value.length;</pre></div></div>
-
- </li>
-
-
- <li id="section-316">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-316">&#182;</a>
- </div>
- <p>handle negative start values</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> startIndex = start &gt;= <span class="hljs-number">0</span> ? start : <span class="hljs-built_in">Math</span>.max( value.length + start, <span class="hljs-number">0</span> );
-
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Array"</span>, value)) {
- <span class="hljs-keyword">var</span> output = [];
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = startIndex; i &lt; startIndex + length &amp;&amp; i &lt; value.length; i++) {
- output.push(value[i]);
- }
- <span class="hljs-keyword">return</span> output;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"String"</span>, value)) {
- <span class="hljs-keyword">return</span> value.substr(startIndex, length);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"slice filter expects value to be an array or string"</span>);
- }
- },
-
- abs: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">return</span>;
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">Math</span>.abs(value);
- },
-
- first: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Array"</span>, value)) {
- <span class="hljs-keyword">return</span> value[<span class="hljs-number">0</span>];
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (is(<span class="hljs-string">"Object"</span>, value)) {
- <span class="hljs-keyword">if</span> (<span class="hljs-string">'_keys'</span> <span class="hljs-keyword">in</span> value) {
- <span class="hljs-keyword">return</span> value[value._keys[<span class="hljs-number">0</span>]];
- }
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> value === <span class="hljs-string">"string"</span> ) {
- <span class="hljs-keyword">return</span> value.substr(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>);
- }
-
- <span class="hljs-keyword">return</span>;
- },
-
- split: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">undefined</span> || value === <span class="hljs-literal">null</span>) {
- <span class="hljs-keyword">return</span>;
- }
- <span class="hljs-keyword">if</span> (params === <span class="hljs-literal">undefined</span> || params.length &lt; <span class="hljs-number">1</span> || params.length &gt; <span class="hljs-number">2</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"split filter expects 1 or 2 argument"</span>);
- }
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"String"</span>, value)) {
- <span class="hljs-keyword">var</span> delimiter = params[<span class="hljs-number">0</span>],
- limit = params[<span class="hljs-number">1</span>],
- split = value.split(delimiter);
-
- <span class="hljs-keyword">if</span> (limit === <span class="hljs-literal">undefined</span>) {
-
- <span class="hljs-keyword">return</span> split;
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (limit &lt; <span class="hljs-number">0</span>) {
-
- <span class="hljs-keyword">return</span> value.split(delimiter, split.length + limit);
-
- } <span class="hljs-keyword">else</span> {
-
- <span class="hljs-keyword">var</span> limitedSplit = [];
-
- <span class="hljs-keyword">if</span> (delimiter == <span class="hljs-string">''</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-317">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-317">&#182;</a>
- </div>
- <p>empty delimiter
-“aabbcc”|split(‘’, 2)
- -&gt; [‘aa’, ‘bb’, ‘cc’]</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">while</span>(split.length &gt; <span class="hljs-number">0</span>) {
- <span class="hljs-keyword">var</span> temp = <span class="hljs-string">""</span>;
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i=<span class="hljs-number">0</span>; i&lt;limit &amp;&amp; split.length &gt; <span class="hljs-number">0</span>; i++) {
- temp += split.shift();
- }
- limitedSplit.push(temp);
- }
-
- } <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-318">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-318">&#182;</a>
- </div>
- <p>non-empty delimiter
-“one,two,three,four,five”|split(‘,’, 3)
- -&gt; [‘one’, ‘two’, ‘three,four,five’]</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i=<span class="hljs-number">0</span>; i&lt;limit<span class="hljs-number">-1</span> &amp;&amp; split.length &gt; <span class="hljs-number">0</span>; i++) {
- limitedSplit.push(split.shift());
- }
-
- <span class="hljs-keyword">if</span> (split.length &gt; <span class="hljs-number">0</span>) {
- limitedSplit.push(split.join(delimiter));
- }
- }
-
- <span class="hljs-keyword">return</span> limitedSplit;
- }
-
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"split filter expects value to be a string"</span>);
- }
- },
- last: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">'Object'</span>, value)) {
- <span class="hljs-keyword">var</span> keys;
-
- <span class="hljs-keyword">if</span> (value._keys === <span class="hljs-literal">undefined</span>) {
- keys = <span class="hljs-built_in">Object</span>.keys(value);
- } <span class="hljs-keyword">else</span> {
- keys = value._keys;
- }
-
- <span class="hljs-keyword">return</span> value[keys[keys.length - <span class="hljs-number">1</span>]];
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-319">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-319">&#182;</a>
- </div>
- <p>string|array</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> value[value.length - <span class="hljs-number">1</span>];
- },
- raw: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> Twig.Markup(value);
- },
- batch: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">items, params</span>) </span>{
- <span class="hljs-keyword">var</span> size = params.shift(),
- fill = params.shift(),
- result,
- last,
- missing;
-
- <span class="hljs-keyword">if</span> (!Twig.lib.is(<span class="hljs-string">"Array"</span>, items)) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"batch filter expects items to be an array"</span>);
- }
-
- <span class="hljs-keyword">if</span> (!Twig.lib.is(<span class="hljs-string">"Number"</span>, size)) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"batch filter expects size to be a number"</span>);
- }
-
- size = <span class="hljs-built_in">Math</span>.ceil(size);
-
- result = Twig.lib.chunkArray(items, size);
-
- <span class="hljs-keyword">if</span> (fill &amp;&amp; items.length % size != <span class="hljs-number">0</span>) {
- last = result.pop();
- missing = size - last.length;
-
- <span class="hljs-keyword">while</span> (missing--) {
- last.push(fill);
- }
-
- result.push(last);
- }
-
- <span class="hljs-keyword">return</span> result;
- },
- round: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- params = params || [];
-
- <span class="hljs-keyword">var</span> precision = params.length &gt; <span class="hljs-number">0</span> ? params[<span class="hljs-number">0</span>] : <span class="hljs-number">0</span>,
- method = params.length &gt; <span class="hljs-number">1</span> ? params[<span class="hljs-number">1</span>] : <span class="hljs-string">"common"</span>;
-
- value = <span class="hljs-built_in">parseFloat</span>(value);
-
- <span class="hljs-keyword">if</span>(precision &amp;&amp; !Twig.lib.is(<span class="hljs-string">"Number"</span>, precision)) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"round filter expects precision to be a number"</span>);
- }
-
- <span class="hljs-keyword">if</span> (method === <span class="hljs-string">"common"</span>) {
- <span class="hljs-keyword">return</span> Twig.lib.round(value, precision);
- }
-
- <span class="hljs-keyword">if</span>(!Twig.lib.is(<span class="hljs-string">"Function"</span>, <span class="hljs-built_in">Math</span>[method])) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"round filter expects method to be 'floor', 'ceil', or 'common'"</span>);
- }
-
- <span class="hljs-keyword">return</span> <span class="hljs-built_in">Math</span>[method](value * <span class="hljs-built_in">Math</span>.pow(<span class="hljs-number">10</span>, precision)) / <span class="hljs-built_in">Math</span>.pow(<span class="hljs-number">10</span>, precision);
- }
- };
-
- Twig.filter = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">filter, value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (!Twig.filters[filter]) {
- <span class="hljs-keyword">throw</span> <span class="hljs-string">"Unable to find filter "</span> + filter;
- }
- <span class="hljs-keyword">return</span> Twig.filters[filter].apply(<span class="hljs-keyword">this</span>, [value, params]);
- };
-
- Twig.filter.extend = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">filter, definition</span>) </span>{
- Twig.filters[filter] = definition;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-})(Twig || { });</pre></div></div>
-
- </li>
-
-
- <li id="section-320">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-320">&#182;</a>
- </div>
- <pre><code>Twig.js
- <span class="hljs-number">2012</span> Hadrien Lanneau
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-321">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-321">&#182;</a>
- </div>
- <h2 id="twig-functions-js">twig.functions.js</h2>
-<p>This file handles parsing filters.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
- <span class="hljs-comment">/**
- * @constant
- * @type {string}
- */</span>
- <span class="hljs-keyword">var</span> TEMPLATE_NOT_FOUND_MESSAGE = <span class="hljs-string">'Template "{name}" is not defined.'</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-322">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-322">&#182;</a>
- </div>
- <p>Determine object type</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">is</span>(<span class="hljs-params">type, obj</span>) </span>{
- <span class="hljs-keyword">var</span> clas = <span class="hljs-built_in">Object</span>.prototype.toString.call(obj).slice(<span class="hljs-number">8</span>, <span class="hljs-number">-1</span>);
- <span class="hljs-keyword">return</span> obj !== <span class="hljs-literal">undefined</span> &amp;&amp; obj !== <span class="hljs-literal">null</span> &amp;&amp; clas === type;
- }
-
- Twig.functions = {</pre></div></div>
-
- </li>
-
-
- <li id="section-323">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-323">&#182;</a>
- </div>
- <p> attribute, block, constant, date, dump, parent, random,.</p>
-
- </div>
-
- </li>
-
-
- <li id="section-324">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-324">&#182;</a>
- </div>
- <p>Range function from <a href="http://phpjs.org/functions/range:499">http://phpjs.org/functions/range:499</a>
-Used under an MIT License</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> range: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">low, high, step</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-325">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-325">&#182;</a>
- </div>
- <p><a href="http://kevin.vanzonneveld.net">http://kevin.vanzonneveld.net</a></p>
-<ul>
-<li>original by: Waldo Malqui Silva</li>
-<li>example 1: range ( 0, 12 );</li>
-<li>returns 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]</li>
-<li>example 2: range( 0, 100, 10 );</li>
-<li>returns 2: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]</li>
-<li>example 3: range( ‘a’, ‘i’ );</li>
-<li>returns 3: [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’]</li>
-<li>example 4: range( ‘c’, ‘a’ );</li>
-<li>returns 4: [‘c’, ‘b’, ‘a’]</li>
-</ul>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> matrix = [];
- <span class="hljs-keyword">var</span> inival, endval, plus;
- <span class="hljs-keyword">var</span> walker = step || <span class="hljs-number">1</span>;
- <span class="hljs-keyword">var</span> chars = <span class="hljs-literal">false</span>;
-
- <span class="hljs-keyword">if</span> (!<span class="hljs-built_in">isNaN</span>(low) &amp;&amp; !<span class="hljs-built_in">isNaN</span>(high)) {
- inival = <span class="hljs-built_in">parseInt</span>(low, <span class="hljs-number">10</span>);
- endval = <span class="hljs-built_in">parseInt</span>(high, <span class="hljs-number">10</span>);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-built_in">isNaN</span>(low) &amp;&amp; <span class="hljs-built_in">isNaN</span>(high)) {
- chars = <span class="hljs-literal">true</span>;
- inival = low.charCodeAt(<span class="hljs-number">0</span>);
- endval = high.charCodeAt(<span class="hljs-number">0</span>);
- } <span class="hljs-keyword">else</span> {
- inival = (<span class="hljs-built_in">isNaN</span>(low) ? <span class="hljs-number">0</span> : low);
- endval = (<span class="hljs-built_in">isNaN</span>(high) ? <span class="hljs-number">0</span> : high);
- }
-
- plus = ((inival &gt; endval) ? <span class="hljs-literal">false</span> : <span class="hljs-literal">true</span>);
- <span class="hljs-keyword">if</span> (plus) {
- <span class="hljs-keyword">while</span> (inival &lt;= endval) {
- matrix.push(((chars) ? <span class="hljs-built_in">String</span>.fromCharCode(inival) : inival));
- inival += walker;
- }
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">while</span> (inival &gt;= endval) {
- matrix.push(((chars) ? <span class="hljs-built_in">String</span>.fromCharCode(inival) : inival));
- inival -= walker;
- }
- }
-
- <span class="hljs-keyword">return</span> matrix;
- },
- cycle: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">arr, i</span>) </span>{
- <span class="hljs-keyword">var</span> pos = i % arr.length;
- <span class="hljs-keyword">return</span> arr[pos];
- },
- dump: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">var</span> EOL = <span class="hljs-string">'\n'</span>,
- indentChar = <span class="hljs-string">' '</span>,
- indentTimes = <span class="hljs-number">0</span>,
- out = <span class="hljs-string">''</span>,
- args = <span class="hljs-built_in">Array</span>.prototype.slice.call(<span class="hljs-built_in">arguments</span>),
- indent = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">times</span>) </span>{
- <span class="hljs-keyword">var</span> ind = <span class="hljs-string">''</span>;
- <span class="hljs-keyword">while</span> (times &gt; <span class="hljs-number">0</span>) {
- times--;
- ind += indentChar;
- }
- <span class="hljs-keyword">return</span> ind;
- },
- displayVar = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">variable</span>) </span>{
- out += indent(indentTimes);
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span>(variable) === <span class="hljs-string">'object'</span>) {
- dumpVar(variable);
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span>(variable) === <span class="hljs-string">'function'</span>) {
- out += <span class="hljs-string">'function()'</span> + EOL;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span>(variable) === <span class="hljs-string">'string'</span>) {
- out += <span class="hljs-string">'string('</span> + variable.length + <span class="hljs-string">') "'</span> + variable + <span class="hljs-string">'"'</span> + EOL;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span>(variable) === <span class="hljs-string">'number'</span>) {
- out += <span class="hljs-string">'number('</span> + variable + <span class="hljs-string">')'</span> + EOL;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span>(variable) === <span class="hljs-string">'boolean'</span>) {
- out += <span class="hljs-string">'bool('</span> + variable + <span class="hljs-string">')'</span> + EOL;
- }
- },
- dumpVar = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">variable</span>) </span>{
- <span class="hljs-keyword">var</span> i;
- <span class="hljs-keyword">if</span> (variable === <span class="hljs-literal">null</span>) {
- out += <span class="hljs-string">'NULL'</span> + EOL;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (variable === <span class="hljs-literal">undefined</span>) {
- out += <span class="hljs-string">'undefined'</span> + EOL;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> variable === <span class="hljs-string">'object'</span>) {
- out += indent(indentTimes) + <span class="hljs-keyword">typeof</span>(variable);
- indentTimes++;
- out += <span class="hljs-string">'('</span> + (<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">obj</span>) </span>{
- <span class="hljs-keyword">var</span> size = <span class="hljs-number">0</span>, key;
- <span class="hljs-keyword">for</span> (key <span class="hljs-keyword">in</span> obj) {
- <span class="hljs-keyword">if</span> (obj.hasOwnProperty(key)) {
- size++;
- }
- }
- <span class="hljs-keyword">return</span> size;
- })(variable) + <span class="hljs-string">') {'</span> + EOL;
- <span class="hljs-keyword">for</span> (i <span class="hljs-keyword">in</span> variable) {
- out += indent(indentTimes) + <span class="hljs-string">'['</span> + i + <span class="hljs-string">']=&gt; '</span> + EOL;
- displayVar(variable[i]);
- }
- indentTimes--;
- out += indent(indentTimes) + <span class="hljs-string">'}'</span> + EOL;
- } <span class="hljs-keyword">else</span> {
- displayVar(variable);
- }
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-326">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-326">&#182;</a>
- </div>
- <p>handle no argument case by dumping the entire render context</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (args.length == <span class="hljs-number">0</span>) args.push(<span class="hljs-keyword">this</span>.context);
-
- Twig.forEach(args, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">variable</span>) </span>{
- dumpVar(variable);
- });
-
- <span class="hljs-keyword">return</span> out;
- },
- date: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">date, time</span>) </span>{
- <span class="hljs-keyword">var</span> dateObj;
- <span class="hljs-keyword">if</span> (date === <span class="hljs-literal">undefined</span>) {
- dateObj = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Date"</span>, date)) {
- dateObj = date;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"String"</span>, date)) {
- <span class="hljs-keyword">if</span> (date.match(<span class="hljs-regexp">/^[0-9]+$/</span>)) {
- dateObj = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(date * <span class="hljs-number">1000</span>);
- }
- <span class="hljs-keyword">else</span> {
- dateObj = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(Twig.lib.strtotime(date) * <span class="hljs-number">1000</span>);
- }
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">"Number"</span>, date)) {</pre></div></div>
-
- </li>
-
-
- <li id="section-327">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-327">&#182;</a>
- </div>
- <p>timestamp</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> dateObj = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(date * <span class="hljs-number">1000</span>);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to parse date "</span> + date);
- }
- <span class="hljs-keyword">return</span> dateObj;
- },
- block: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">block</span>) </span>{
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.originalBlockTokens[block]) {
- <span class="hljs-keyword">return</span> Twig.logic.parse.apply(<span class="hljs-keyword">this</span>, [<span class="hljs-keyword">this</span>.originalBlockTokens[block], <span class="hljs-keyword">this</span>.context]).output;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.blocks[block];
- }
- },
- parent: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-328">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-328">&#182;</a>
- </div>
- <p>Add a placeholder</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> Twig.placeholders.parent;
- },
- attribute: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">object, method, params</span>) </span>{
- <span class="hljs-keyword">if</span> (Twig.lib.is(<span class="hljs-string">'Object'</span>, object)) {
- <span class="hljs-keyword">if</span> (object.hasOwnProperty(method)) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> object[method] === <span class="hljs-string">"function"</span>) {
- <span class="hljs-keyword">return</span> object[method].apply(<span class="hljs-literal">undefined</span>, params);
- }
- <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> object[method];
- }
- }
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-329">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-329">&#182;</a>
- </div>
- <p>Array will return element 0-index</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> object[method] || <span class="hljs-literal">undefined</span>;
- },
- max: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">values</span>) </span>{
- <span class="hljs-keyword">if</span>(Twig.lib.is(<span class="hljs-string">"Object"</span>, values)) {
- <span class="hljs-keyword">delete</span> values[<span class="hljs-string">"_keys"</span>];
- <span class="hljs-keyword">return</span> Twig.lib.max(values);
- }
-
- <span class="hljs-keyword">return</span> Twig.lib.max.apply(<span class="hljs-literal">null</span>, <span class="hljs-built_in">arguments</span>);
- },
- min: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">values</span>) </span>{
- <span class="hljs-keyword">if</span>(Twig.lib.is(<span class="hljs-string">"Object"</span>, values)) {
- <span class="hljs-keyword">delete</span> values[<span class="hljs-string">"_keys"</span>];
- <span class="hljs-keyword">return</span> Twig.lib.min(values);
- }
-
- <span class="hljs-keyword">return</span> Twig.lib.min.apply(<span class="hljs-literal">null</span>, <span class="hljs-built_in">arguments</span>);
- },
- template_from_string: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">template</span>) </span>{
- <span class="hljs-keyword">if</span> (template === <span class="hljs-literal">undefined</span>) {
- template = <span class="hljs-string">''</span>;
- }
- <span class="hljs-keyword">return</span> Twig.Templates.parsers.twig({
- options: <span class="hljs-keyword">this</span>.options,
- data: template
- });
- },
- random: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">var</span> LIMIT_INT31 = <span class="hljs-number">0x80000000</span>;
-
- <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getRandomNumber</span>(<span class="hljs-params">n</span>) </span>{
- <span class="hljs-keyword">var</span> random = <span class="hljs-built_in">Math</span>.floor(<span class="hljs-built_in">Math</span>.random() * LIMIT_INT31);
- <span class="hljs-keyword">var</span> limits = [<span class="hljs-number">0</span>, n];
- <span class="hljs-keyword">var</span> min = <span class="hljs-built_in">Math</span>.min.apply(<span class="hljs-literal">null</span>, limits),
- max = <span class="hljs-built_in">Math</span>.max.apply(<span class="hljs-literal">null</span>, limits);
- <span class="hljs-keyword">return</span> min + <span class="hljs-built_in">Math</span>.floor((max - min + <span class="hljs-number">1</span>) * random / LIMIT_INT31);
- }
-
- <span class="hljs-keyword">if</span>(Twig.lib.is(<span class="hljs-string">"Number"</span>, value)) {
- <span class="hljs-keyword">return</span> getRandomNumber(value);
- }
-
- <span class="hljs-keyword">if</span>(Twig.lib.is(<span class="hljs-string">"String"</span>, value)) {
- <span class="hljs-keyword">return</span> value.charAt(getRandomNumber(value.length<span class="hljs-number">-1</span>));
- }
-
- <span class="hljs-keyword">if</span>(Twig.lib.is(<span class="hljs-string">"Array"</span>, value)) {
- <span class="hljs-keyword">return</span> value[getRandomNumber(value.length<span class="hljs-number">-1</span>)];
- }
-
- <span class="hljs-keyword">if</span>(Twig.lib.is(<span class="hljs-string">"Object"</span>, value)) {
- <span class="hljs-keyword">var</span> keys = <span class="hljs-built_in">Object</span>.keys(value);
- <span class="hljs-keyword">return</span> value[keys[getRandomNumber(keys.length<span class="hljs-number">-1</span>)]];
- }
-
- <span class="hljs-keyword">return</span> getRandomNumber(LIMIT_INT31<span class="hljs-number">-1</span>);
- },
-
- <span class="hljs-comment">/**
- * Returns the content of a template without rendering it
- * @param {string} name
- * @param {boolean} [ignore_missing=false]
- * @returns {string}
- */</span>
- source: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">name, ignore_missing</span>) </span>{
- <span class="hljs-keyword">var</span> templateSource;
- <span class="hljs-keyword">var</span> templateFound = <span class="hljs-literal">false</span>;
- <span class="hljs-keyword">var</span> isNodeEnvironment = <span class="hljs-keyword">typeof</span> <span class="hljs-built_in">module</span> !== <span class="hljs-string">'undefined'</span> &amp;&amp; <span class="hljs-keyword">typeof</span> <span class="hljs-built_in">module</span>.exports !== <span class="hljs-string">'undefined'</span> &amp;&amp; <span class="hljs-keyword">typeof</span> <span class="hljs-built_in">window</span> === <span class="hljs-string">'undefined'</span>;
- <span class="hljs-keyword">var</span> loader;
- <span class="hljs-keyword">var</span> path;</pre></div></div>
-
- </li>
-
-
- <li id="section-330">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-330">&#182;</a>
- </div>
- <p>if we are running in a node.js environment, set the loader to ‘fs’ and ensure the
-path is relative to the CWD of the running script
-else, set the loader to ‘ajax’ and set the path to the value of name</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (isNodeEnvironment) {
- loader = <span class="hljs-string">'fs'</span>;
- path = __dirname + <span class="hljs-string">'/'</span> + name;
- } <span class="hljs-keyword">else</span> {
- loader = <span class="hljs-string">'ajax'</span>;
- path = name;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-331">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-331">&#182;</a>
- </div>
- <p>build the params object</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> params = {
- id: name,
- path: path,
- method: loader,
- parser: <span class="hljs-string">'source'</span>,
- <span class="hljs-keyword">async</span>: <span class="hljs-literal">false</span>,
- fetchTemplateSource: <span class="hljs-literal">true</span>
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-332">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-332">&#182;</a>
- </div>
- <p>default ignore_missing to false</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> ignore_missing === <span class="hljs-string">'undefined'</span>) {
- ignore_missing = <span class="hljs-literal">false</span>;
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-333">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-333">&#182;</a>
- </div>
- <p>try to load the remote template</p>
-<p>on exception, log it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">try</span> {
- templateSource = Twig.Templates.loadRemote(name, params);</pre></div></div>
-
- </li>
-
-
- <li id="section-334">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-334">&#182;</a>
- </div>
- <p>if the template is undefined or null, set the template to an empty string and do NOT flip the
-boolean indicating we found the template</p>
-<p>else, all is good! flip the boolean indicating we found the template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> templateSource === <span class="hljs-string">'undefined'</span> || templateSource === <span class="hljs-literal">null</span>) {
- templateSource = <span class="hljs-string">''</span>;
- } <span class="hljs-keyword">else</span> {
- templateFound = <span class="hljs-literal">true</span>;
- }
- } <span class="hljs-keyword">catch</span> (e) {
- Twig.log.debug(<span class="hljs-string">'Twig.functions.source: '</span>, <span class="hljs-string">'Problem loading template '</span>, e);
- }</pre></div></div>
-
- </li>
-
-
- <li id="section-335">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-335">&#182;</a>
- </div>
- <p>if the template was NOT found AND we are not ignoring missing templates, return the same message
-that is returned by the PHP implementation of the twig source() function</p>
-<p>else, return the template source</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (!templateFound &amp;&amp; !ignore_missing) {
- <span class="hljs-keyword">return</span> TEMPLATE_NOT_FOUND_MESSAGE.replace(<span class="hljs-string">'{name}'</span>, name);
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">return</span> templateSource;
- }
- }
- };
-
- Twig._function = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">_function, value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (!Twig.functions[_function]) {
- <span class="hljs-keyword">throw</span> <span class="hljs-string">"Unable to find function "</span> + _function;
- }
- <span class="hljs-keyword">return</span> Twig.functions[_function](value, params);
- };
-
- Twig._function.extend = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">_function, definition</span>) </span>{
- Twig.functions[_function] = definition;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-
-})(Twig || { });</pre></div></div>
-
- </li>
-
-
- <li id="section-336">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-336">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-337">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-337">&#182;</a>
- </div>
- <h2 id="twig-path-js">twig.path.js</h2>
-<p>This file handles path parsing</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;
-
- <span class="hljs-comment">/**
- * Namespace for path handling.
- */</span>
- Twig.path = {};
-
- <span class="hljs-comment">/**
- * Generate the canonical version of a url based on the given base path and file path and in
- * the previously registered namespaces.
- *
- * @param {string} template The Twig Template
- * @param {string} file The file path, may be relative and may contain namespaces.
- *
- * @return {string} The canonical version of the path
- */</span>
- Twig.path.parsePath = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">template, file</span>) </span>{
- <span class="hljs-keyword">var</span> namespaces = <span class="hljs-literal">null</span>,
- file = file || <span class="hljs-string">""</span>;
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> template === <span class="hljs-string">'object'</span> &amp;&amp; <span class="hljs-keyword">typeof</span> template.options === <span class="hljs-string">'object'</span>) {
- namespaces = template.options.namespaces;
- }
-
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> namespaces === <span class="hljs-string">'object'</span> &amp;&amp; (file.indexOf(<span class="hljs-string">'::'</span>) &gt; <span class="hljs-number">0</span>) || file.indexOf(<span class="hljs-string">'@'</span>) &gt;= <span class="hljs-number">0</span>){
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> k <span class="hljs-keyword">in</span> namespaces){
- <span class="hljs-keyword">if</span> (namespaces.hasOwnProperty(k)) {
- file = file.replace(k + <span class="hljs-string">'::'</span>, namespaces[k]);
- file = file.replace(<span class="hljs-string">'@'</span> + k, namespaces[k]);
- }
- }
-
- <span class="hljs-keyword">return</span> file;
- }
-
- <span class="hljs-keyword">return</span> Twig.path.relativePath(template, file);
- };
-
- <span class="hljs-comment">/**
- * Generate the relative canonical version of a url based on the given base path and file path.
- *
- * @param {Twig.Template} template The Twig.Template.
- * @param {string} file The file path, relative to the base path.
- *
- * @return {string} The canonical version of the path.
- */</span>
- Twig.path.relativePath = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">template, file</span>) </span>{
- <span class="hljs-keyword">var</span> base,
- base_path,
- sep_chr = <span class="hljs-string">"/"</span>,
- new_path = [],
- file = file || <span class="hljs-string">""</span>,
- val;
-
- <span class="hljs-keyword">if</span> (template.url) {
- <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> template.base !== <span class="hljs-string">'undefined'</span>) {
- base = template.base + ((template.base.charAt(template.base.length<span class="hljs-number">-1</span>) === <span class="hljs-string">'/'</span>) ? <span class="hljs-string">''</span> : <span class="hljs-string">'/'</span>);
- } <span class="hljs-keyword">else</span> {
- base = template.url;
- }
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (template.path) {</pre></div></div>
-
- </li>
-
-
- <li id="section-338">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-338">&#182;</a>
- </div>
- <p>Get the system-specific path separator</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> path = <span class="hljs-built_in">require</span>(<span class="hljs-string">"path"</span>),
- sep = path.sep || sep_chr,
- relative = <span class="hljs-keyword">new</span> <span class="hljs-built_in">RegExp</span>(<span class="hljs-string">"^\\.{1,2}"</span> + sep.replace(<span class="hljs-string">"\\"</span>, <span class="hljs-string">"\\\\"</span>));
- file = file.replace(<span class="hljs-regexp">/\//g</span>, sep);
-
- <span class="hljs-keyword">if</span> (template.base !== <span class="hljs-literal">undefined</span> &amp;&amp; file.match(relative) == <span class="hljs-literal">null</span>) {
- file = file.replace(template.base, <span class="hljs-string">''</span>);
- base = template.base + sep;
- } <span class="hljs-keyword">else</span> {
- base = path.normalize(template.path);
- }
-
- base = base.replace(sep+sep, sep);
- sep_chr = sep;
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ((template.name || template.id) &amp;&amp; template.method &amp;&amp; template.method !== <span class="hljs-string">'fs'</span> &amp;&amp; template.method !== <span class="hljs-string">'ajax'</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-339">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-339">&#182;</a>
- </div>
- <p>Custom registered loader</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> base = template.base || template.name || template.id;
- } <span class="hljs-keyword">else</span> {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Cannot extend an inline template."</span>);
- }
-
- base_path = base.split(sep_chr);</pre></div></div>
-
- </li>
-
-
- <li id="section-340">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-340">&#182;</a>
- </div>
- <p>Remove file from url</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> base_path.pop();
- base_path = base_path.concat(file.split(sep_chr));
-
- <span class="hljs-keyword">while</span> (base_path.length &gt; <span class="hljs-number">0</span>) {
- val = base_path.shift();
- <span class="hljs-keyword">if</span> (val == <span class="hljs-string">"."</span>) {</pre></div></div>
-
- </li>
-
-
- <li id="section-341">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-341">&#182;</a>
- </div>
- <p>Ignore</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (val == <span class="hljs-string">".."</span> &amp;&amp; new_path.length &gt; <span class="hljs-number">0</span> &amp;&amp; new_path[new_path.length<span class="hljs-number">-1</span>] != <span class="hljs-string">".."</span>) {
- new_path.pop();
- } <span class="hljs-keyword">else</span> {
- new_path.push(val);
- }
- }
-
- <span class="hljs-keyword">return</span> new_path.join(sep_chr);
- };
-
- <span class="hljs-keyword">return</span> Twig;
-}) (Twig || { });</pre></div></div>
-
- </li>
-
-
- <li id="section-342">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-342">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-343">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-343">&#182;</a>
- </div>
- <h2 id="twig-tests-js">twig.tests.js</h2>
-<p>This file handles expression tests. (is empty, is not defined, etc…)</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;
- Twig.tests = {
- empty: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">if</span> (value === <span class="hljs-literal">null</span> || value === <span class="hljs-literal">undefined</span>) <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-344">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-344">&#182;</a>
- </div>
- <p>Handler numbers</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> value === <span class="hljs-string">"number"</span>) <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>; <span class="hljs-comment">// numbers are never "empty"</span></pre></div></div>
-
- </li>
-
-
- <li id="section-345">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-345">&#182;</a>
- </div>
- <p>Handle strings and arrays</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (value.length &amp;&amp; value.length &gt; <span class="hljs-number">0</span>) <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;</pre></div></div>
-
- </li>
-
-
- <li id="section-346">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-346">&#182;</a>
- </div>
- <p>Handle objects</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> key <span class="hljs-keyword">in</span> value) {
- <span class="hljs-keyword">if</span> (value.hasOwnProperty(key)) <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
- }
- <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
- },
- odd: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> value % <span class="hljs-number">2</span> === <span class="hljs-number">1</span>;
- },
- even: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> value % <span class="hljs-number">2</span> === <span class="hljs-number">0</span>;
- },
- divisibleby: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">return</span> value % params[<span class="hljs-number">0</span>] === <span class="hljs-number">0</span>;
- },
- defined: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> value !== <span class="hljs-literal">undefined</span>;
- },
- none: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> value === <span class="hljs-literal">null</span>;
- },
- <span class="hljs-string">'null'</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>.none(value); <span class="hljs-comment">// Alias of none</span>
- },
- sameas: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value, params</span>) </span>{
- <span class="hljs-keyword">return</span> value === params[<span class="hljs-number">0</span>];
- },
- iterable: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
- <span class="hljs-keyword">return</span> value &amp;&amp; (Twig.lib.is(<span class="hljs-string">"Array"</span>, value) || Twig.lib.is(<span class="hljs-string">"Object"</span>, value));
- }
- <span class="hljs-comment">/*
- constant ?
- */</span>
- };
-
- Twig.test = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">test, value, params</span>) </span>{
- <span class="hljs-keyword">if</span> (!Twig.tests[test]) {
- <span class="hljs-keyword">throw</span> <span class="hljs-string">"Test "</span> + test + <span class="hljs-string">" is not defined."</span>;
- }
- <span class="hljs-keyword">return</span> Twig.tests[test](value, params);
- };
-
- Twig.test.extend = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">test, definition</span>) </span>{
- Twig.tests[test] = definition;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-})( Twig || { } );</pre></div></div>
-
- </li>
-
-
- <li id="section-347">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-347">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-348">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-348">&#182;</a>
- </div>
- <h2 id="twig-exports-js">twig.exports.js</h2>
-<p>This file provides extension points and other hooks into the twig functionality.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
-<span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
-<span class="hljs-meta"> "use strict"</span>;
- Twig.exports = {
- VERSION: Twig.VERSION
- };
-
- <span class="hljs-comment">/**
- * Create and compile a twig.js template.
- *
- * @param {Object} param Paramteres for creating a Twig template.
- *
- * @return {Twig.Template} A Twig template ready for rendering.
- */</span>
- Twig.exports.twig = <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">twig</span>(<span class="hljs-params">params</span>) </span>{
-<span class="hljs-meta"> 'use strict'</span>;
- <span class="hljs-keyword">var</span> id = params.id,
- options = {
- strict_variables: params.strict_variables || <span class="hljs-literal">false</span>,</pre></div></div>
-
- </li>
-
-
- <li id="section-349">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-349">&#182;</a>
- </div>
- <p>TODO: turn autoscape on in the next major version</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> autoescape: params.autoescape != <span class="hljs-literal">null</span> &amp;&amp; params.autoescape || <span class="hljs-literal">false</span>,
- allowInlineIncludes: params.allowInlineIncludes || <span class="hljs-literal">false</span>,
- rethrow: params.rethrow || <span class="hljs-literal">false</span>,
- namespaces: params.namespaces
- };
-
- <span class="hljs-keyword">if</span> (Twig.cache &amp;&amp; id) {
- Twig.validateId(id);
- }
-
- <span class="hljs-keyword">if</span> (params.debug !== <span class="hljs-literal">undefined</span>) {
- Twig.debug = params.debug;
- }
- <span class="hljs-keyword">if</span> (params.trace !== <span class="hljs-literal">undefined</span>) {
- Twig.trace = params.trace;
- }
-
- <span class="hljs-keyword">if</span> (params.data !== <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">return</span> Twig.Templates.parsers.twig({
- data: params.data,
- path: params.hasOwnProperty(<span class="hljs-string">'path'</span>) ? params.path : <span class="hljs-literal">undefined</span>,
- <span class="hljs-built_in">module</span>: params.module,
- id: id,
- options: options
- });
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (params.ref !== <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">if</span> (params.id !== <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Both ref and id cannot be set on a twig.js template."</span>);
- }
- <span class="hljs-keyword">return</span> Twig.Templates.load(params.ref);
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (params.method !== <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">if</span> (!Twig.Templates.isRegisteredLoader(params.method)) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">'Loader for "'</span> + params.method + <span class="hljs-string">'" is not defined.'</span>);
- }
- <span class="hljs-keyword">return</span> Twig.Templates.loadRemote(params.name || params.href || params.path || id || <span class="hljs-literal">undefined</span>, {
- id: id,
- method: params.method,
- parser: params.parser || <span class="hljs-string">'twig'</span>,
- base: params.base,
- <span class="hljs-built_in">module</span>: params.module,
- precompiled: params.precompiled,
- <span class="hljs-keyword">async</span>: params.async,
- options: options
-
- }, params.load, params.error);
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (params.href !== <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">return</span> Twig.Templates.loadRemote(params.href, {
- id: id,
- method: <span class="hljs-string">'ajax'</span>,
- parser: params.parser || <span class="hljs-string">'twig'</span>,
- base: params.base,
- <span class="hljs-built_in">module</span>: params.module,
- precompiled: params.precompiled,
- <span class="hljs-keyword">async</span>: params.async,
- options: options
-
- }, params.load, params.error);
-
- } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (params.path !== <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">return</span> Twig.Templates.loadRemote(params.path, {
- id: id,
- method: <span class="hljs-string">'fs'</span>,
- parser: params.parser || <span class="hljs-string">'twig'</span>,
- base: params.base,
- <span class="hljs-built_in">module</span>: params.module,
- precompiled: params.precompiled,
- <span class="hljs-keyword">async</span>: params.async,
- options: options
-
- }, params.load, params.error);
- }
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-350">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-350">&#182;</a>
- </div>
- <p>Extend Twig with a new filter.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.extendFilter = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">filter, definition</span>) </span>{
- Twig.filter.extend(filter, definition);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-351">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-351">&#182;</a>
- </div>
- <p>Extend Twig with a new function.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.extendFunction = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">fn, definition</span>) </span>{
- Twig._function.extend(fn, definition);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-352">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-352">&#182;</a>
- </div>
- <p>Extend Twig with a new test.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.extendTest = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">test, definition</span>) </span>{
- Twig.test.extend(test, definition);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-353">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-353">&#182;</a>
- </div>
- <p>Extend Twig with a new definition.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.extendTag = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">definition</span>) </span>{
- Twig.logic.extend(definition);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-354">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-354">&#182;</a>
- </div>
- <p>Provide an environment for extending Twig core.
-Calls fn with the internal Twig object.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.extend = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">fn</span>) </span>{
- fn(Twig);
- };
-
-
- <span class="hljs-comment">/**
- * Provide an extension for use with express 2.
- *
- * @param {string} markup The template markup.
- * @param {array} options The express options.
- *
- * @return {string} The rendered template.
- */</span>
- Twig.exports.compile = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">markup, options</span>) </span>{
- <span class="hljs-keyword">var</span> id = options.filename,
- path = options.filename,
- template;</pre></div></div>
-
- </li>
-
-
- <li id="section-355">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-355">&#182;</a>
- </div>
- <p>Try to load the template from the cache</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> template = <span class="hljs-keyword">new</span> Twig.Template({
- data: markup,
- path: path,
- id: id,
- options: options.settings[<span class="hljs-string">'twig options'</span>]
- }); <span class="hljs-comment">// Twig.Templates.load(id) ||</span>
-
- <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">context</span>) </span>{
- <span class="hljs-keyword">return</span> template.render(context);
- };
- };
-
- <span class="hljs-comment">/**
- * Provide an extension for use with express 3.
- *
- * @param {string} path The location of the template file on disk.
- * @param {Object|Function} The options or callback.
- * @param {Function} fn callback.
- *
- * @throws Twig.Error
- */</span>
- Twig.exports.renderFile = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">path, options, fn</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-356">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-356">&#182;</a>
- </div>
- <p>handle callback in options</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> options === <span class="hljs-string">'function'</span>) {
- fn = options;
- options = {};
- }
-
- options = options || {};
-
- <span class="hljs-keyword">var</span> settings = options.settings || {};
-
- <span class="hljs-keyword">var</span> params = {
- path: path,
- base: settings.views,
- load: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">template</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-357">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-357">&#182;</a>
- </div>
- <p>render and return template</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> fn(<span class="hljs-literal">null</span>, template.render(options));
- }
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-358">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-358">&#182;</a>
- </div>
- <p>mixin any options provided to the express app.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> view_options = settings[<span class="hljs-string">'twig options'</span>];
-
- <span class="hljs-keyword">if</span> (view_options) {
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> option <span class="hljs-keyword">in</span> view_options) {
- <span class="hljs-keyword">if</span> (view_options.hasOwnProperty(option)) {
- params[option] = view_options[option];
- }
- }
- }
-
- Twig.exports.twig(params);
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-359">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-359">&#182;</a>
- </div>
- <p>Express 3 handler</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.__express = Twig.exports.renderFile;
-
- <span class="hljs-comment">/**
- * Shoud Twig.js cache templates.
- * Disable during development to see changes to templates without
- * reloading, and disable in production to improve performance.
- *
- * @param {boolean} cache
- */</span>
- Twig.exports.cache = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">cache</span>) </span>{
- Twig.cache = cache;
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-360">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-360">&#182;</a>
- </div>
- <p>We need to export the path module so we can effectively test it</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.exports.path = Twig.path;
-
- <span class="hljs-keyword">return</span> Twig;
-}) (Twig || { });</pre></div></div>
-
- </li>
-
-
- <li id="section-361">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-361">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-362">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-362">&#182;</a>
- </div>
- <h2 id="twig-compiler-js">twig.compiler.js</h2>
-<p>This file handles compiling templates into JS</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> Twig = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Twig</span>) </span>{
- <span class="hljs-comment">/**
- * Namespace for compilation.
- */</span>
- Twig.compiler = {
- <span class="hljs-built_in">module</span>: {}
- };</pre></div></div>
-
- </li>
-
-
- <li id="section-363">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-363">&#182;</a>
- </div>
- <p>Compile a Twig Template to output.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> Twig.compiler.compile = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">template, options</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-364">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-364">&#182;</a>
- </div>
- <p>Get tokens</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> tokens = <span class="hljs-built_in">JSON</span>.stringify(template.tokens)
- , id = template.id
- , output;
-
- <span class="hljs-keyword">if</span> (options.module) {
- <span class="hljs-keyword">if</span> (Twig.compiler.module[options.module] === <span class="hljs-literal">undefined</span>) {
- <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Twig.Error(<span class="hljs-string">"Unable to find module type "</span> + options.module);
- }
- output = Twig.compiler.module[options.module](id, tokens, options.twig);
- } <span class="hljs-keyword">else</span> {
- output = Twig.compiler.wrap(id, tokens);
- }
- <span class="hljs-keyword">return</span> output;
- };
-
- Twig.compiler.module = {
- amd: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">id, tokens, pathToTwig</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-string">'define(["'</span> + pathToTwig + <span class="hljs-string">'"], function (Twig) {\n\tvar twig, templates;\ntwig = Twig.twig;\ntemplates = '</span> + Twig.compiler.wrap(id, tokens) + <span class="hljs-string">'\n\treturn templates;\n});'</span>;
- }
- , node: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">id, tokens</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-string">'var twig = require("twig").twig;\n'</span>
- + <span class="hljs-string">'exports.template = '</span> + Twig.compiler.wrap(id, tokens)
- }
- , cjs2: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">id, tokens, pathToTwig</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-string">'module.declare([{ twig: "'</span> + pathToTwig + <span class="hljs-string">'" }], function (require, exports, module) {\n'</span>
- + <span class="hljs-string">'\tvar twig = require("twig").twig;\n'</span>
- + <span class="hljs-string">'\texports.template = '</span> + Twig.compiler.wrap(id, tokens)
- + <span class="hljs-string">'\n});'</span>
- }
- };
-
- Twig.compiler.wrap = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">id, tokens</span>) </span>{
- <span class="hljs-keyword">return</span> <span class="hljs-string">'twig({id:"'</span>+id.replace(<span class="hljs-string">'"'</span>, <span class="hljs-string">'\\"'</span>)+<span class="hljs-string">'", data:'</span>+tokens+<span class="hljs-string">', precompiled: true});\n'</span>;
- };
-
- <span class="hljs-keyword">return</span> Twig;
-})(Twig || {});</pre></div></div>
-
- </li>
-
-
- <li id="section-365">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-365">&#182;</a>
- </div>
- <pre><code>Twig.js
-Available under the BSD <span class="hljs-number">2</span>-Clause License
-https:<span class="hljs-comment">//github.com/justjohn/twig.js</span>
-</code></pre>
- </div>
-
- </li>
-
-
- <li id="section-366">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-366">&#182;</a>
- </div>
- <h2 id="twig-module-js">twig.module.js</h2>
-<p>Provide a CommonJS/AMD/Node module export.</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre>
-<span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">module</span> !== <span class="hljs-string">'undefined'</span> &amp;&amp; <span class="hljs-built_in">module</span>.declare) {</pre></div></div>
-
- </li>
-
-
- <li id="section-367">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-367">&#182;</a>
- </div>
- <p>Provide a CommonJS Modules/2.0 draft 8 module</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-built_in">module</span>.declare([], <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">require, exports, module</span>) </span>{</pre></div></div>
-
- </li>
-
-
- <li id="section-368">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-368">&#182;</a>
- </div>
- <p>Add exports from the Twig exports</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> (key <span class="hljs-keyword">in</span> Twig.exports) {
- <span class="hljs-keyword">if</span> (Twig.exports.hasOwnProperty(key)) {
- exports[key] = Twig.exports[key];
- }
- }
- });
-} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> define == <span class="hljs-string">'function'</span> &amp;&amp; define.amd) {
- define(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
- <span class="hljs-keyword">return</span> Twig.exports;
- });
-} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">module</span> !== <span class="hljs-string">'undefined'</span> &amp;&amp; <span class="hljs-built_in">module</span>.exports) {</pre></div></div>
-
- </li>
-
-
- <li id="section-369">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-369">&#182;</a>
- </div>
- <p>Provide a CommonJS Modules/1.1 module</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-built_in">module</span>.exports = Twig.exports;
-} <span class="hljs-keyword">else</span> {</pre></div></div>
-
- </li>
-
-
- <li id="section-370">
- <div class="annotation">
-
- <div class="pilwrap ">
- <a class="pilcrow" href="#section-370">&#182;</a>
- </div>
- <p>Export for browser use</p>
-
- </div>
-
- <div class="content"><div class='highlight'><pre> <span class="hljs-built_in">window</span>.twig = Twig.exports.twig;
- <span class="hljs-built_in">window</span>.Twig = Twig.exports;
-}</pre></div></div>
-
- </li>
-
- </ul>
- </div>
-</body>
-</html>
diff --git a/node_modules/twig/lib/compile.js b/node_modules/twig/lib/compile.js
deleted file mode 100644
index 15a6ebe..0000000
--- a/node_modules/twig/lib/compile.js
+++ /dev/null
@@ -1,99 +0,0 @@
-var Twig = require("../twig")
- , twig = Twig.twig
- , PATHS = require("./paths")
- , MINIMATCH = require("minimatch")
- , FS = require("fs")
- , WALK = require("walk");
-
-exports.defaults = {
- compress: false
- , pattern: "*\\.twig"
- , recursive: false
-};
-
-exports.compile = function(options, files) {
- // Create output template directory if necessary
- if (options.output) {
- PATHS.mkdir(options.output);
- }
-
- files.forEach(function(file) {
- FS.stat(file, function(err, stats) {
- if (stats.isDirectory()) {
- parseTemplateFolder(file, options.pattern);
- } else if (stats.isFile()) {
- parseTemplateFile(file);
- } else {
- console.log("ERROR " + file + ": Unable to stat file");
- }
- });
- });
-
- function parseTemplateFolder(directory, pattern) {
- directory = PATHS.strip_slash(directory);
-
- // Get the files in the directory
- // Walker options
- var walker = WALK.walk(directory, { followLinks: false })
- , files = [];
-
- walker.on('file', function(root, stat, next) {
- // normalize (remove / from end if present)
- root = PATHS.strip_slash(root);
-
- // match against file pattern
- var name = stat.name
- , file = root + '/' + name;
- if (MINIMATCH(name, pattern)) {
- parseTemplateFile(file, directory);
- files.push(file);
- }
- next();
- });
-
- walker.on('end', function() {
- // console.log(files);
- });
- }
-
- function parseTemplateFile(file, base) {
- if (base) base = PATHS.strip_slash(base);
- var split_file = file.split("/")
- , output_file_name = split_file.pop()
- , output_file_base = PATHS.findBase(file)
- , output_directory = options.output
- , output_base = PATHS.removePath(base, output_file_base)
- , output_id
- , output_file;
-
- if (output_directory) {
- // Create template directory
- if (output_base !== "") {
- PATHS.mkdir(output_directory + "/" + output_base);
- output_base += "/";
- }
- output_id = output_directory + "/" + output_base + output_file_name;
- output_file = output_id + ".js"
- } else {
- output_id = file;
- output_file = output_id + ".js"
- }
-
- var tpl = twig({
- id: output_id
- , path: file
- , load: function(template) {
- // compile!
- var output = template.compile(options);
-
- FS.writeFile(output_file, output, 'utf8', function(err) {
- if (err) {
- console.log("Unable to compile " + file + ", error " + err);
- } else {
- console.log("Compiled " + file + "\t-> " + output_file);
- }
- });
- }
- });
- }
-}; \ No newline at end of file
diff --git a/node_modules/twig/lib/paths.js b/node_modules/twig/lib/paths.js
deleted file mode 100644
index 6e61c5a..0000000
--- a/node_modules/twig/lib/paths.js
+++ /dev/null
@@ -1,86 +0,0 @@
-var FS = require("fs")
- , sep_chr = '/';
-
-exports.relativePath = function(base, file) {
- var base_path = exports.normalize(base.split(sep_chr)),
- new_path = [],
- val;
-
- // Remove file from url
- base_path.pop();
- base_path = base_path.concat(file.split(sep_chr));
-
- while (base_path.length > 0) {
- val = base_path.shift();
- if (val == ".") {
- // Ignore
- } else if (val == ".." && new_path.length > 0 && new_path[new_path.length-1] != "..") {
- new_path.pop();
- } else {
- new_path.push(val);
- }
- }
-
- return new_path.join(sep_chr);
-};
-
-exports.findBase = function(file) {
- var paths = exports.normalize(file.split(sep_chr));
- // we want everything before the file
- if (paths.length > 1) {
- // get rid of the filename
- paths.pop();
- return paths.join(sep_chr) + sep_chr;
- } else {
- // we're in the file directory
- return "";
- }
-};
-
-exports.removePath = function(path, file) {
- if (!path) return "";
-
- var base_path = exports.normalize(path.split(sep_chr))
- , file_path = exports.normalize(file.split(sep_chr))
- , val
- , file_val;
-
- // strip base path off of file path
- while(base_path.length > 0) {
- val = base_path.shift();
- if (val !== '') {
- file_val = file_path.shift();
- }
- }
- return file_path.join(sep_chr);
-};
-
-exports.normalize = function(file_arr) {
- var new_arr = []
- , val;
- while(file_arr.length > 0) {
- val = file_arr.shift();
- if (val !== '') {
- new_arr.push(val);
- }
- }
- return new_arr;
-};
-
-exports.strip_slash = function(path) {
- if (path.substr(-1) == '/') path = path.substring(0, path.length-1);
- return path;
-};
-
-exports.mkdir = function(dir) {
- try {
- FS.mkdirSync(dir);
- } catch (err) {
- if (err.code == "EEXIST") {
- // ignore if it's a "EEXIST" exeption
- } else {
- console.log(err);
- throw err;
- }
- }
-};
diff --git a/node_modules/twig/package.json b/node_modules/twig/package.json
deleted file mode 100644
index 082cbfe..0000000
--- a/node_modules/twig/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_from": "twig@~0.10.3",
- "_id": "twig@0.10.3",
- "_inBundle": false,
- "_integrity": "sha1-Z2BOCOGSDr8vr4CpAeJWGJyKPGc=",
- "_location": "/twig",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "twig@~0.10.3",
- "name": "twig",
- "escapedName": "twig",
- "rawSpec": "~0.10.3",
- "saveSpec": null,
- "fetchSpec": "~0.10.3"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/twig/-/twig-0.10.3.tgz",
- "_shasum": "67604e08e1920ebf2faf80a901e256189c8a3c67",
- "_spec": "twig@~0.10.3",
- "_where": "/home/marvin/IdeaProjects/untitled",
- "author": {
- "name": "John Roepke",
- "email": "john@justjohn.us",
- "url": "http://john.sh/"
- },
- "bin": {
- "twigjs": "./bin/twigjs"
- },
- "browser": {
- "fs": false
- },
- "bugs": {
- "url": "https://github.com/twigjs/twig.js/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "locutus": "^2.0.5",
- "minimatch": "3.0.x",
- "walk": "2.3.x"
- },
- "deprecated": false,
- "description": "JS port of the Twig templating language.",
- "devDependencies": {
- "chai": "^3.5.0",
- "mocha": "3.1.x",
- "should": "11.1.x",
- "sinon": "^1.17.6",
- "sinon-chai": "^2.8.0",
- "tokenizer": "1.1.x",
- "webpack": "^1.13.3"
- },
- "engines": {
- "node": "*"
- },
- "homepage": "https://github.com/twigjs/twig.js",
- "licenses": [
- {
- "type": "BSD-2-Clause",
- "url": "https://raw.github.com/twigjs/twig.js/master/LICENSE"
- }
- ],
- "main": "twig.js",
- "name": "twig",
- "repository": {
- "type": "git",
- "url": "git://github.com/twigjs/twig.js.git"
- },
- "scripts": {
- "build": "npm run build-node && npm run build-browser",
- "build-browser": "WEBPACK_ENV=browser webpack",
- "build-node": "webpack",
- "postversion": "git push origin master && git push origin master --tags",
- "preversion": "npm test && git diff --exit-code --quiet",
- "test": "npm run build && mocha -r should"
- },
- "version": "0.10.3"
-}
diff --git a/node_modules/twig/test-ext/checkout.sh b/node_modules/twig/test-ext/checkout.sh
deleted file mode 100755
index 514b286..0000000
--- a/node_modules/twig/test-ext/checkout.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-if [ ! -d $DIR/twig.php ]; then
- git clone git://github.com/fabpot/Twig.git $DIR/twig.php
-else
- cd $DIR/twig.php
- git pull
-fi
diff --git a/node_modules/twig/test-ext/test.original.js b/node_modules/twig/test-ext/test.original.js
deleted file mode 100644
index 27304e2..0000000
--- a/node_modules/twig/test-ext/test.original.js
+++ /dev/null
@@ -1,314 +0,0 @@
-/*jshint node: true */
-
-( function( ) {
- "use strict";
- var fs = require( "fs" ),
- path = require("path"),
- twigPhpDir = "test-ext/twig.php",
-
- runTest = function( ) {
- describe( "Twig original test ->", function( ) {
- var
- Twig = Twig || require("../twig"),
- twig = twig || Twig.twig,
- walk = function( dir, done ) {
- var results = [],
- list = fs.readdirSync( dir ),
- i = 0;
-
- ( function next( ) {
- var file = list[i++],
- stat;
- if ( !file ) {
- return done( null, results );
- }
-
- file = dir + '/' + file;
- stat = fs.statSync( file );
- if ( stat && stat.isDirectory( ) ) {
- walk( file, function( err, res ) {
- results = results.concat( res );
- next( );
- } );
- } else {
- results.push( file );
- next( );
- }
- } )( );
- },
- testFile = function( filepath ) {
- var tmp = fs.readFileSync( filepath, "utf8" ),
- tmp2 = tmp.split( /^--/gm ),
- res = {};
-
- tmp2.forEach( function( data ) {
- if ( !data ) {
- return;
- }
-
- var name = ( "" + data.match( /^[A-Z]+--/ ) || "" ).replace( /--$/, '' );
-
- if ( name ) {
- res[ name ] = data.substring( name.length + 3 ).trim( );
- }
- } );
-
- res.filepath = filepath;
-
- return res;
- };
-
- walk( twigPhpDir + "/test", function( err, files ) {
- var testFiles = [];
-
- files.forEach( function( filepath ) {
- if ( filepath.substring( filepath.length - 5 ) === ".test" ) {
- testFiles.push( testFile( filepath ) );
- }
- } );
-
- testFiles.forEach( function( data, idx ) {
- var Tokenizer = require( "tokenizer" ),
- t = new Tokenizer( ),
- res,
- str = data.DATA,
- currentObject
- ;
-
- if ( !data.DATA || data.DATA.match( /^class|\$|^date_default_timezone_set|new Twig|new SimpleXMLElement|new ArrayObject|new ArrayIterator/ ) ) {
- if ( data.EXCEPTION ) {
- it( data.filepath + " -> " + data.TEST.trim( ), function( ) {
- try {
- twig( {
- "data" : data.TEMPLATE.trim( )
- } )
- .render( res )
- .trim( );
- } catch( exp ) {
- return;
- }
-
- throw "Should have thrown an exception: " + data.EXCEPTION;
- } );
- } else {
- it( data.filepath + " -> " + data.TEST.trim( ), function( ) {
- throw "Unsupported";
- } );
- }
- delete testFiles[ idx ];
- return;
- }
-
- t.on( "token", function( token, type ) {
- // console.log( token, type, res, currentObject );
-
- var tmpObject,
- match,
- tmpLength,
- tmpString,
- parentObject,
- i
- ;
-
- if ( type === 'symbol' ) {
- if ( token === "return" ) {
- return;
- }
- }
-
- if ( type === "whitespace" ) {
- return;
- }
-
- if ( type === "semicolon" ) {
- return;
- }
-
- if ( type === 'array' ) {
- if ( !currentObject ) {
-
- currentObject = {
- "type" : "array",
- "keys" : [],
- "values" : []
- };
- } else {
- tmpObject = currentObject;
- currentObject = {
- "type" : "array",
- "keys" : [],
- "values" : [],
- "parent" : tmpObject
- };
- }
-
- return;
- }
-
- if ( type === "string" ) {
- match = token.match( /^'(([^']*| \\')*)'$/ );
- if ( match && match[1] ) {
- tmpString = match[1];
- } else {
- match = token.match( /^"(([^"]*| \\")*)"$/ );
- if ( match && match[1] ) {
- tmpString = match[1];
- }
- }
-
- if ( tmpString ) {
- currentObject.last_value = tmpString.replace( /\\n/g, "\n" ).replace( /\\r/g, "\r" );
- return;
- }
- }
-
- if ( type === "number" ) {
- currentObject.last_value = parseFloat( token, 10 );
- return;
- }
-
- if ( type === "comma" ) {
- if ( currentObject.last_value ) {
- if ( currentObject.type === "array" ) {
- tmpLength = currentObject.values.length;
- currentObject.keys.push( tmpLength );
- currentObject.values.push( currentObject.last_value );
- delete currentObject.last_value;
-
- return;
- } else if ( currentObject.type === "object" ) {
- currentObject.keys.push( currentObject.last_key );
- currentObject.values.push( currentObject.last_value );
- delete currentObject.last_key;
- delete currentObject.last_value;
- return;
- }
- }
- }
-
- if ( type === "key-label" ) {
- currentObject.type = "object";
- currentObject.last_key = currentObject.last_value;
- delete currentObject.last_value;
-
- return;
- }
-
- if ( type === "end-object" ) {
- if ( currentObject.type === "array" ) {
- if ( currentObject.last_value ) {
- tmpLength = currentObject.values.length;
- currentObject.keys.push( tmpLength );
- currentObject.values.push( currentObject.last_value );
- delete currentObject.last_value;
- }
- } else if ( currentObject.type === "object" ) {
- if ( currentObject.last_key && currentObject.last_value ) {
- currentObject.keys.push( currentObject.last_key );
- currentObject.values.push( currentObject.last_value );
- delete currentObject.last_key;
- delete currentObject.last_value;
- }
- }
-
- if ( currentObject.type === "array" ) {
- tmpObject = [];
- } else if ( currentObject.type === "object" ) {
- tmpObject = {};
- }
-
- for ( i = 0; i < currentObject.values.length; i+=1 ) {
- tmpObject[ currentObject.keys[i] ] = currentObject.values[i];
- }
-
- if ( currentObject.parent ) {
- parentObject = currentObject.parent;
- delete currentObject.parent;
- delete currentObject.last_key;
- delete currentObject.last_value;
- currentObject = parentObject;
- currentObject.last_value = tmpObject;
- } else {
- res = tmpObject;
- currentObject = undefined;
- }
-
- return;
- }
- } );
-
- t.on( "end", function( ) {
- /*
- if ( data.TEST.trim( ) === 'Twig supports the in operator' ) {
- console.log( data.TEST.trim( ), res, data.DATA );
- console.log( "data.TEMPLATE" );
- console.log( data.TEMPLATE );
- console.log( data.TEMPLATE.substr( -1 ) );
- console.log( "data.EXPECT" );
- console.log( data.EXPECT );
- console.log( "data.RESULT" );
- console.log(
- twig( {
- "data" : data.TEMPLATE
- } )
- .render( res )
- );
- }
- */
-
- it( data.filepath + " -> " + data.TEST.trim( ), function( ) {
- twig( {
- "data" : data.TEMPLATE.trim( )
- } )
- .render( res )
- .trim( )
- .should
- .equal( data.EXPECT );
- } );
- } );
-
- t.on( "error", function( err ) {
- // console.log( err );
- } );
-
- t.addRule( /^'([^']|\\')*'$/, 'string' );
- t.addRule( /^"([^"]|\\")*"$/, 'string' );
- t.addRule( /^'([^']|\\')*$/, 'maybe-string' );
- t.addRule( /^"([^"]|\\")*$/, 'maybe-string' );
- t.addRule( /^=$/, 'equal' );
- t.addRule( /^=>$/, 'key-label' );
- t.addRule( /^-\?\d+(\.\d+)?$/, 'number' );
- t.addRule( /^\d+$/, 'number' );
- t.addRule( /^\d+\.$/, 'maybe-float' );
- t.addRule( /^(true|false)$/, 'bool' );
- t.addRule( /^null$/, 'null' );
- t.addRule( /^array\s*\($/, 'array' );
- t.addRule( /^\($/, 'begin-object' );
- t.addRule( /^\)$/, 'end-object' );
- t.addRule( /^\[$/, 'begin-array' );
- t.addRule( /^\]$/, 'end-array' );
- t.addRule( /^,$/, 'comma' );
- t.addRule( /^'$/, 'ping' );
- t.addRule( /^;$/, 'semicolon' );
- t.addRule( /^"$/, 'double-ping' );
- t.addRule( /^\w+$/, "symbol" );
- t.addRule( /^(\s)+$/, 'whitespace' );
-
- t.write( str + " " );
- t.end( );
- } );
- } );
- } );
- },
-
- setup = function( ) {
- var existsSync = fs.existsSync || path.existsSync;
-
- if ( existsSync( twigPhpDir ) ) {
- runTest( );
- return;
- }
- };
-
- setup( );
-} )( );
diff --git a/node_modules/twig/twig.js b/node_modules/twig/twig.js
deleted file mode 100644
index d860b59..0000000
--- a/node_modules/twig/twig.js
+++ /dev/null
@@ -1,7223 +0,0 @@
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory((function webpackLoadOptionalExternalModule() { try { return require("fs"); } catch(e) {} }()), require("path"));
- else if(typeof define === 'function' && define.amd)
- define(["fs", "path"], factory);
- else if(typeof exports === 'object')
- exports["Twig"] = factory((function webpackLoadOptionalExternalModule() { try { return require("fs"); } catch(e) {} }()), require("path"));
- else
- root["Twig"] = factory(root["fs"], root["path"]);
-})(this, function(__WEBPACK_EXTERNAL_MODULE_19__, __WEBPACK_EXTERNAL_MODULE_20__) {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
-/******/ // Flag the module as loaded
-/******/ module.loaded = true;
-
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-
-
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
- /**
- * Twig.js
- *
- * @copyright 2011-2016 John Roepke and the Twig.js Contributors
- * @license Available under the BSD 2-Clause License
- * @link https://github.com/twigjs/twig.js
- */
-
- var Twig = {
- VERSION: '0.10.2'
- };
-
- __webpack_require__(1)(Twig);
- __webpack_require__(2)(Twig);
- __webpack_require__(3)(Twig);
- __webpack_require__(5)(Twig);
- __webpack_require__(6)(Twig);
- __webpack_require__(7)(Twig);
- __webpack_require__(17)(Twig);
- __webpack_require__(18)(Twig);
- __webpack_require__(21)(Twig);
- __webpack_require__(22)(Twig);
- __webpack_require__(23)(Twig);
- __webpack_require__(24)(Twig);
- __webpack_require__(25)(Twig);
- __webpack_require__(26)(Twig);
-
- module.exports = Twig.exports;
-
-
-/***/ },
-/* 1 */
-/***/ function(module, exports) {
-
- // ## twig.core.js
- //
- // This file handles template level tokenizing, compiling and parsing.
- module.exports = function (Twig) {
- "use strict";
-
- Twig.trace = false;
- Twig.debug = false;
-
- // Default caching to true for the improved performance it offers
- Twig.cache = true;
-
- Twig.placeholders = {
- parent: "{{|PARENT|}}"
- };
-
- /**
- * Fallback for Array.indexOf for IE8 et al
- */
- Twig.indexOf = function (arr, searchElement /*, fromIndex */ ) {
- if (Array.prototype.hasOwnProperty("indexOf")) {
- return arr.indexOf(searchElement);
- }
- if (arr === void 0 || arr === null) {
- throw new TypeError();
- }
- var t = Object(arr);
- var len = t.length >>> 0;
- if (len === 0) {
- return -1;
- }
- var n = 0;
- if (arguments.length > 0) {
- n = Number(arguments[1]);
- if (n !== n) { // shortcut for verifying if it's NaN
- n = 0;
- } else if (n !== 0 && n !== Infinity && n !== -Infinity) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- }
- if (n >= len) {
- // console.log("indexOf not found1 ", JSON.stringify(searchElement), JSON.stringify(arr));
- return -1;
- }
- var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
- for (; k < len; k++) {
- if (k in t && t[k] === searchElement) {
- return k;
- }
- }
- if (arr == searchElement) {
- return 0;
- }
- // console.log("indexOf not found2 ", JSON.stringify(searchElement), JSON.stringify(arr));
-
- return -1;
- }
-
- Twig.forEach = function (arr, callback, thisArg) {
- if (Array.prototype.forEach ) {
- return arr.forEach(callback, thisArg);
- }
-
- var T, k;
-
- if ( arr == null ) {
- throw new TypeError( " this is null or not defined" );
- }
-
- // 1. Let O be the result of calling ToObject passing the |this| value as the argument.
- var O = Object(arr);
-
- // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
- // 3. Let len be ToUint32(lenValue).
- var len = O.length >>> 0; // Hack to convert O.length to a UInt32
-
- // 4. If IsCallable(callback) is false, throw a TypeError exception.
- // See: http://es5.github.com/#x9.11
- if ( {}.toString.call(callback) != "[object Function]" ) {
- throw new TypeError( callback + " is not a function" );
- }
-
- // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
- if ( thisArg ) {
- T = thisArg;
- }
-
- // 6. Let k be 0
- k = 0;
-
- // 7. Repeat, while k < len
- while( k < len ) {
-
- var kValue;
-
- // a. Let Pk be ToString(k).
- // This is implicit for LHS operands of the in operator
- // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
- // This step can be combined with c
- // c. If kPresent is true, then
- if ( k in O ) {
-
- // i. Let kValue be the result of calling the Get internal method of O with argument Pk.
- kValue = O[ k ];
-
- // ii. Call the Call internal method of callback with T as the this value and
- // argument list containing kValue, k, and O.
- callback.call( T, kValue, k, O );
- }
- // d. Increase k by 1.
- k++;
- }
- // 8. return undefined
- };
-
- Twig.merge = function(target, source, onlyChanged) {
- Twig.forEach(Object.keys(source), function (key) {
- if (onlyChanged && !(key in target)) {
- return;
- }
-
- target[key] = source[key]
- });
-
- return target;
- };
-
- /**
- * Exception thrown by twig.js.
- */
- Twig.Error = function(message) {
- this.message = message;
- this.name = "TwigException";
- this.type = "TwigException";
- };
-
- /**
- * Get the string representation of a Twig error.
- */
- Twig.Error.prototype.toString = function() {
- var output = this.name + ": " + this.message;
-
- return output;
- };
-
- /**
- * Wrapper for logging to the console.
- */
- Twig.log = {
- trace: function() {if (Twig.trace && console) {console.log(Array.prototype.slice.call(arguments));}},
- debug: function() {if (Twig.debug && console) {console.log(Array.prototype.slice.call(arguments));}}
- };
-
-
- if (typeof console !== "undefined") {
- if (typeof console.error !== "undefined") {
- Twig.log.error = function() {
- console.error.apply(console, arguments);
- }
- } else if (typeof console.log !== "undefined") {
- Twig.log.error = function() {
- console.log.apply(console, arguments);
- }
- }
- } else {
- Twig.log.error = function(){};
- }
-
- /**
- * Wrapper for child context objects in Twig.
- *
- * @param {Object} context Values to initialize the context with.
- */
- Twig.ChildContext = function(context) {
- var ChildContext = function ChildContext() {};
- ChildContext.prototype = context;
- return new ChildContext();
- };
-
- /**
- * Container for methods related to handling high level template tokens
- * (for example: {{ expression }}, {% logic %}, {# comment #}, raw data)
- */
- Twig.token = {};
-
- /**
- * Token types.
- */
- Twig.token.type = {
- output: 'output',
- logic: 'logic',
- comment: 'comment',
- raw: 'raw',
- output_whitespace_pre: 'output_whitespace_pre',
- output_whitespace_post: 'output_whitespace_post',
- output_whitespace_both: 'output_whitespace_both',
- logic_whitespace_pre: 'logic_whitespace_pre',
- logic_whitespace_post: 'logic_whitespace_post',
- logic_whitespace_both: 'logic_whitespace_both'
- };
-
- /**
- * Token syntax definitions.
- */
- Twig.token.definitions = [
- {
- type: Twig.token.type.raw,
- open: '{% raw %}',
- close: '{% endraw %}'
- },
- {
- type: Twig.token.type.raw,
- open: '{% verbatim %}',
- close: '{% endverbatim %}'
- },
- // *Whitespace type tokens*
- //
- // These typically take the form `{{- expression -}}` or `{{- expression }}` or `{{ expression -}}`.
- {
- type: Twig.token.type.output_whitespace_pre,
- open: '{{-',
- close: '}}'
- },
- {
- type: Twig.token.type.output_whitespace_post,
- open: '{{',
- close: '-}}'
- },
- {
- type: Twig.token.type.output_whitespace_both,
- open: '{{-',
- close: '-}}'
- },
- {
- type: Twig.token.type.logic_whitespace_pre,
- open: '{%-',
- close: '%}'
- },
- {
- type: Twig.token.type.logic_whitespace_post,
- open: '{%',
- close: '-%}'
- },
- {
- type: Twig.token.type.logic_whitespace_both,
- open: '{%-',
- close: '-%}'
- },
- // *Output type tokens*
- //
- // These typically take the form `{{ expression }}`.
- {
- type: Twig.token.type.output,
- open: '{{',
- close: '}}'
- },
- // *Logic type tokens*
- //
- // These typically take a form like `{% if expression %}` or `{% endif %}`
- {
- type: Twig.token.type.logic,
- open: '{%',
- close: '%}'
- },
- // *Comment type tokens*
- //
- // These take the form `{# anything #}`
- {
- type: Twig.token.type.comment,
- open: '{#',
- close: '#}'
- }
- ];
-
-
- /**
- * What characters start "strings" in token definitions. We need this to ignore token close
- * strings inside an expression.
- */
- Twig.token.strings = ['"', "'"];
-
- Twig.token.findStart = function (template) {
- var output = {
- position: null,
- close_position: null,
- def: null
- },
- i,
- token_template,
- first_key_position,
- close_key_position;
-
- for (i=0;i<Twig.token.definitions.length;i++) {
- token_template = Twig.token.definitions[i];
- first_key_position = template.indexOf(token_template.open);
- close_key_position = template.indexOf(token_template.close);
-
- Twig.log.trace("Twig.token.findStart: ", "Searching for ", token_template.open, " found at ", first_key_position);
-
- //Special handling for mismatched tokens
- if (first_key_position >= 0) {
- //This token matches the template
- if (token_template.open.length !== token_template.close.length) {
- //This token has mismatched closing and opening tags
- if (close_key_position < 0) {
- //This token's closing tag does not match the template
- continue;
- }
- }
- }
- // Does this token occur before any other types?
- if (first_key_position >= 0 && (output.position === null || first_key_position < output.position)) {
- output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- } else if (first_key_position >= 0 && output.position !== null && first_key_position === output.position) {
- /*This token exactly matches another token,
- greedily match to check if this token has a greater specificity*/
- if (token_template.open.length > output.def.open.length) {
- //This token's opening tag is more specific than the previous match
- output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- } else if (token_template.open.length === output.def.open.length) {
- if (token_template.close.length > output.def.close.length) {
- //This token's opening tag is as specific as the previous match,
- //but the closing tag has greater specificity
- if (close_key_position >= 0 && close_key_position < output.close_position) {
- //This token's closing tag exists in the template,
- //and it occurs sooner than the previous match
- output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- }
- } else if (close_key_position >= 0 && close_key_position < output.close_position) {
- //This token's closing tag is not more specific than the previous match,
- //but it occurs sooner than the previous match
- output.position = first_key_position;
- output.def = token_template;
- output.close_position = close_key_position;
- }
- }
- }
- }
-
- delete output['close_position'];
-
- return output;
- };
-
- Twig.token.findEnd = function (template, token_def, start) {
- var end = null,
- found = false,
- offset = 0,
-
- // String position variables
- str_pos = null,
- str_found = null,
- pos = null,
- end_offset = null,
- this_str_pos = null,
- end_str_pos = null,
-
- // For loop variables
- i,
- l;
-
- while (!found) {
- str_pos = null;
- str_found = null;
- pos = template.indexOf(token_def.close, offset);
-
- if (pos >= 0) {
- end = pos;
- found = true;
- } else {
- // throw an exception
- throw new Twig.Error("Unable to find closing bracket '" + token_def.close +
- "'" + " opened near template position " + start);
- }
-
- // Ignore quotes within comments; just look for the next comment close sequence,
- // regardless of what comes before it. https://github.com/justjohn/twig.js/issues/95
- if (token_def.type === Twig.token.type.comment) {
- break;
- }
- // Ignore quotes within raw tag
- // Fixes #283
- if (token_def.type === Twig.token.type.raw) {
- break;
- }
-
- l = Twig.token.strings.length;
- for (i = 0; i < l; i += 1) {
- this_str_pos = template.indexOf(Twig.token.strings[i], offset);
-
- if (this_str_pos > 0 && this_str_pos < pos &&
- (str_pos === null || this_str_pos < str_pos)) {
- str_pos = this_str_pos;
- str_found = Twig.token.strings[i];
- }
- }
-
- // We found a string before the end of the token, now find the string's end and set the search offset to it
- if (str_pos !== null) {
- end_offset = str_pos + 1;
- end = null;
- found = false;
- while (true) {
- end_str_pos = template.indexOf(str_found, end_offset);
- if (end_str_pos < 0) {
- throw "Unclosed string in template";
- }
- // Ignore escaped quotes
- if (template.substr(end_str_pos - 1, 1) !== "\\") {
- offset = end_str_pos + 1;
- break;
- } else {
- end_offset = end_str_pos + 1;
- }
- }
- }
- }
- return end;
- };
-
- /**
- * Convert a template into high-level tokens.
- */
- Twig.tokenize = function (template) {
- var tokens = [],
- // An offset for reporting errors locations in the template.
- error_offset = 0,
-
- // The start and type of the first token found in the template.
- found_token = null,
- // The end position of the matched token.
- end = null;
-
- while (template.length > 0) {
- // Find the first occurance of any token type in the template
- found_token = Twig.token.findStart(template);
-
- Twig.log.trace("Twig.tokenize: ", "Found token: ", found_token);
-
- if (found_token.position !== null) {
- // Add a raw type token for anything before the start of the token
- if (found_token.position > 0) {
- tokens.push({
- type: Twig.token.type.raw,
- value: template.substring(0, found_token.position)
- });
- }
- template = template.substr(found_token.position + found_token.def.open.length);
- error_offset += found_token.position + found_token.def.open.length;
-
- // Find the end of the token
- end = Twig.token.findEnd(template, found_token.def, error_offset);
-
- Twig.log.trace("Twig.tokenize: ", "Token ends at ", end);
-
- tokens.push({
- type: found_token.def.type,
- value: template.substring(0, end).trim()
- });
-
- if (template.substr( end + found_token.def.close.length, 1 ) === "\n") {
- switch (found_token.def.type) {
- case "logic_whitespace_pre":
- case "logic_whitespace_post":
- case "logic_whitespace_both":
- case "logic":
- // Newlines directly after logic tokens are ignored
- end += 1;
- break;
- }
- }
-
- template = template.substr(end + found_token.def.close.length);
-
- // Increment the position in the template
- error_offset += end + found_token.def.close.length;
-
- } else {
- // No more tokens -> add the rest of the template as a raw-type token
- tokens.push({
- type: Twig.token.type.raw,
- value: template
- });
- template = '';
- }
- }
-
- return tokens;
- };
-
-
- Twig.compile = function (tokens) {
- try {
-
- // Output and intermediate stacks
- var output = [],
- stack = [],
- // The tokens between open and close tags
- intermediate_output = [],
-
- token = null,
- logic_token = null,
- unclosed_token = null,
- // Temporary previous token.
- prev_token = null,
- // Temporary previous output.
- prev_output = null,
- // Temporary previous intermediate output.
- prev_intermediate_output = null,
- // The previous token's template
- prev_template = null,
- // Token lookahead
- next_token = null,
- // The output token
- tok_output = null,
-
- // Logic Token values
- type = null,
- open = null,
- next = null;
-
- var compile_output = function(token) {
- Twig.expression.compile.apply(this, [token]);
- if (stack.length > 0) {
- intermediate_output.push(token);
- } else {
- output.push(token);
- }
- };
-
- var compile_logic = function(token) {
- // Compile the logic token
- logic_token = Twig.logic.compile.apply(this, [token]);
-
- type = logic_token.type;
- open = Twig.logic.handler[type].open;
- next = Twig.logic.handler[type].next;
-
- Twig.log.trace("Twig.compile: ", "Compiled logic token to ", logic_token,
- " next is: ", next, " open is : ", open);
-
- // Not a standalone token, check logic stack to see if this is expected
- if (open !== undefined && !open) {
- prev_token = stack.pop();
- prev_template = Twig.logic.handler[prev_token.type];
-
- if (Twig.indexOf(prev_template.next, type) < 0) {
- throw new Error(type + " not expected after a " + prev_token.type);
- }
-
- prev_token.output = prev_token.output || [];
-
- prev_token.output = prev_token.output.concat(intermediate_output);
- intermediate_output = [];
-
- tok_output = {
- type: Twig.token.type.logic,
- token: prev_token
- };
- if (stack.length > 0) {
- intermediate_output.push(tok_output);
- } else {
- output.push(tok_output);
- }
- }
-
- // This token requires additional tokens to complete the logic structure.
- if (next !== undefined && next.length > 0) {
- Twig.log.trace("Twig.compile: ", "Pushing ", logic_token, " to logic stack.");
-
- if (stack.length > 0) {
- // Put any currently held output into the output list of the logic operator
- // currently at the head of the stack before we push a new one on.
- prev_token = stack.pop();
- prev_token.output = prev_token.output || [];
- prev_token.output = prev_token.output.concat(intermediate_output);
- stack.push(prev_token);
- intermediate_output = [];
- }
-
- // Push the new logic token onto the logic stack
- stack.push(logic_token);
-
- } else if (open !== undefined && open) {
- tok_output = {
- type: Twig.token.type.logic,
- token: logic_token
- };
- // Standalone token (like {% set ... %}
- if (stack.length > 0) {
- intermediate_output.push(tok_output);
- } else {
- output.push(tok_output);
- }
- }
- };
-
- while (tokens.length > 0) {
- token = tokens.shift();
- prev_output = output[output.length - 1];
- prev_intermediate_output = intermediate_output[intermediate_output.length - 1];
- next_token = tokens[0];
- Twig.log.trace("Compiling token ", token);
- switch (token.type) {
- case Twig.token.type.raw:
- if (stack.length > 0) {
- intermediate_output.push(token);
- } else {
- output.push(token);
- }
- break;
-
- case Twig.token.type.logic:
- compile_logic.call(this, token);
- break;
-
- // Do nothing, comments should be ignored
- case Twig.token.type.comment:
- break;
-
- case Twig.token.type.output:
- compile_output.call(this, token);
- break;
-
- //Kill whitespace ahead and behind this token
- case Twig.token.type.logic_whitespace_pre:
- case Twig.token.type.logic_whitespace_post:
- case Twig.token.type.logic_whitespace_both:
- case Twig.token.type.output_whitespace_pre:
- case Twig.token.type.output_whitespace_post:
- case Twig.token.type.output_whitespace_both:
- if (token.type !== Twig.token.type.output_whitespace_post && token.type !== Twig.token.type.logic_whitespace_post) {
- if (prev_output) {
- //If the previous output is raw, pop it off
- if (prev_output.type === Twig.token.type.raw) {
- output.pop();
-
- //If the previous output is not just whitespace, trim it
- if (prev_output.value.match(/^\s*$/) === null) {
- prev_output.value = prev_output.value.trim();
- //Repush the previous output
- output.push(prev_output);
- }
- }
- }
-
- if (prev_intermediate_output) {
- //If the previous intermediate output is raw, pop it off
- if (prev_intermediate_output.type === Twig.token.type.raw) {
- intermediate_output.pop();
-
- //If the previous output is not just whitespace, trim it
- if (prev_intermediate_output.value.match(/^\s*$/) === null) {
- prev_intermediate_output.value = prev_intermediate_output.value.trim();
- //Repush the previous intermediate output
- intermediate_output.push(prev_intermediate_output);
- }
- }
- }
- }
-
- //Compile this token
- switch (token.type) {
- case Twig.token.type.output_whitespace_pre:
- case Twig.token.type.output_whitespace_post:
- case Twig.token.type.output_whitespace_both:
- compile_output.call(this, token);
- break;
- case Twig.token.type.logic_whitespace_pre:
- case Twig.token.type.logic_whitespace_post:
- case Twig.token.type.logic_whitespace_both:
- compile_logic.call(this, token);
- break;
- }
-
- if (token.type !== Twig.token.type.output_whitespace_pre && token.type !== Twig.token.type.logic_whitespace_pre) {
- if (next_token) {
- //If the next token is raw, shift it out
- if (next_token.type === Twig.token.type.raw) {
- tokens.shift();
-
- //If the next token is not just whitespace, trim it
- if (next_token.value.match(/^\s*$/) === null) {
- next_token.value = next_token.value.trim();
- //Unshift the next token
- tokens.unshift(next_token);
- }
- }
- }
- }
-
- break;
- }
-
- Twig.log.trace("Twig.compile: ", " Output: ", output,
- " Logic Stack: ", stack,
- " Pending Output: ", intermediate_output );
- }
-
- // Verify that there are no logic tokens left in the stack.
- if (stack.length > 0) {
- unclosed_token = stack.pop();
- throw new Error("Unable to find an end tag for " + unclosed_token.type +
- ", expecting one of " + unclosed_token.next);
- }
- return output;
- } catch (ex) {
- if (this.options.rethrow) {
- throw ex
- }
- else {
- Twig.log.error("Error compiling twig template " + this.id + ": ");
- if (ex.stack) {
- Twig.log.error(ex.stack);
- } else {
- Twig.log.error(ex.toString());
- }
- }
- }
- };
-
- /**
- * Parse a compiled template.
- *
- * @param {Array} tokens The compiled tokens.
- * @param {Object} context The render context.
- *
- * @return {string} The parsed template.
- */
- Twig.parse = function (tokens, context) {
- try {
- var output = [],
- // Track logic chains
- chain = true,
- that = this;
-
- Twig.forEach(tokens, function parseToken(token) {
- Twig.log.debug("Twig.parse: ", "Parsing token: ", token);
-
- switch (token.type) {
- case Twig.token.type.raw:
- output.push(Twig.filters.raw(token.value));
- break;
-
- case Twig.token.type.logic:
- var logic_token = token.token,
- logic = Twig.logic.parse.apply(that, [logic_token, context, chain]);
-
- if (logic.chain !== undefined) {
- chain = logic.chain;
- }
- if (logic.context !== undefined) {
- context = logic.context;
- }
- if (logic.output !== undefined) {
- output.push(logic.output);
- }
- break;
-
- case Twig.token.type.comment:
- // Do nothing, comments should be ignored
- break;
-
- //Fall through whitespace to output
- case Twig.token.type.output_whitespace_pre:
- case Twig.token.type.output_whitespace_post:
- case Twig.token.type.output_whitespace_both:
- case Twig.token.type.output:
- Twig.log.debug("Twig.parse: ", "Output token: ", token.stack);
- // Parse the given expression in the given context
- output.push(Twig.expression.parse.apply(that, [token.stack, context]));
- break;
- }
- });
- return Twig.output.apply(this, [output]);
- } catch (ex) {
- if (this.options.rethrow) {
- throw ex;
- }
- else {
- Twig.log.error("Error parsing twig template " + this.id + ": ");
- if (ex.stack) {
- Twig.log.error(ex.stack);
- } else {
- Twig.log.error(ex.toString());
- }
-
- if (Twig.debug) {
- return ex.toString();
- }
- }
- }
- };
-
- /**
- * Tokenize and compile a string template.
- *
- * @param {string} data The template.
- *
- * @return {Array} The compiled tokens.
- */
- Twig.prepare = function(data) {
- var tokens, raw_tokens;
-
- // Tokenize
- Twig.log.debug("Twig.prepare: ", "Tokenizing ", data);
- raw_tokens = Twig.tokenize.apply(this, [data]);
-
- // Compile
- Twig.log.debug("Twig.prepare: ", "Compiling ", raw_tokens);
- tokens = Twig.compile.apply(this, [raw_tokens]);
-
- Twig.log.debug("Twig.prepare: ", "Compiled ", tokens);
-
- return tokens;
- };
-
- /**
- * Join the output token's stack and escape it if needed
- *
- * @param {Array} Output token's stack
- *
- * @return {string|String} Autoescaped output
- */
- Twig.output = function(output) {
- if (!this.options.autoescape) {
- return output.join("");
- }
-
- var strategy = 'html';
- if(typeof this.options.autoescape == 'string')
- strategy = this.options.autoescape;
-
- // [].map would be better but it's not supported by IE8-
- var escaped_output = [];
- Twig.forEach(output, function (str) {
- if (str && (str.twig_markup !== true && str.twig_markup != strategy)) {
- str = Twig.filters.escape(str, [ strategy ]);
- }
- escaped_output.push(str);
- });
- return Twig.Markup(escaped_output.join(""));
- }
-
- // Namespace for template storage and retrieval
- Twig.Templates = {
- /**
- * Registered template loaders - use Twig.Templates.registerLoader to add supported loaders
- * @type {Object}
- */
- loaders: {},
-
- /**
- * Registered template parsers - use Twig.Templates.registerParser to add supported parsers
- * @type {Object}
- */
- parsers: {},
-
- /**
- * Cached / loaded templates
- * @type {Object}
- */
- registry: {}
- };
-
- /**
- * Is this id valid for a twig template?
- *
- * @param {string} id The ID to check.
- *
- * @throws {Twig.Error} If the ID is invalid or used.
- * @return {boolean} True if the ID is valid.
- */
- Twig.validateId = function(id) {
- if (id === "prototype") {
- throw new Twig.Error(id + " is not a valid twig identifier");
- } else if (Twig.cache && Twig.Templates.registry.hasOwnProperty(id)) {
- throw new Twig.Error("There is already a template with the ID " + id);
- }
- return true;
- }
-
- /**
- * Register a template loader
- *
- * @example
- * Twig.extend(function(Twig) {
- * Twig.Templates.registerLoader('custom_loader', function(location, params, callback, error_callback) {
- * // ... load the template ...
- * params.data = loadedTemplateData;
- * // create and return the template
- * var template = new Twig.Template(params);
- * if (typeof callback === 'function') {
- * callback(template);
- * }
- * return template;
- * });
- * });
- *
- * @param {String} method_name The method this loader is intended for (ajax, fs)
- * @param {Function} func The function to execute when loading the template
- * @param {Object|undefined} scope Optional scope parameter to bind func to
- *
- * @throws Twig.Error
- *
- * @return {void}
- */
- Twig.Templates.registerLoader = function(method_name, func, scope) {
- if (typeof func !== 'function') {
- throw new Twig.Error('Unable to add loader for ' + method_name + ': Invalid function reference given.');
- }
- if (scope) {
- func = func.bind(scope);
- }
- this.loaders[method_name] = func;
- };
-
- /**
- * Remove a registered loader
- *
- * @param {String} method_name The method name for the loader you wish to remove
- *
- * @return {void}
- */
- Twig.Templates.unRegisterLoader = function(method_name) {
- if (this.isRegisteredLoader(method_name)) {
- delete this.loaders[method_name];
- }
- };
-
- /**
- * See if a loader is registered by its method name
- *
- * @param {String} method_name The name of the loader you are looking for
- *
- * @return {boolean}
- */
- Twig.Templates.isRegisteredLoader = function(method_name) {
- return this.loaders.hasOwnProperty(method_name);
- };
-
- /**
- * Register a template parser
- *
- * @example
- * Twig.extend(function(Twig) {
- * Twig.Templates.registerParser('custom_parser', function(params) {
- * // this template source can be accessed in params.data
- * var template = params.data
- *
- * // ... custom process that modifies the template
- *
- * // return the parsed template
- * return template;
- * });
- * });
- *
- * @param {String} method_name The method this parser is intended for (twig, source)
- * @param {Function} func The function to execute when parsing the template
- * @param {Object|undefined} scope Optional scope parameter to bind func to
- *
- * @throws Twig.Error
- *
- * @return {void}
- */
- Twig.Templates.registerParser = function(method_name, func, scope) {
- if (typeof func !== 'function') {
- throw new Twig.Error('Unable to add parser for ' + method_name + ': Invalid function regerence given.');
- }
-
- if (scope) {
- func = func.bind(scope);
- }
-
- this.parsers[method_name] = func;
- };
-
- /**
- * Remove a registered parser
- *
- * @param {String} method_name The method name for the parser you wish to remove
- *
- * @return {void}
- */
- Twig.Templates.unRegisterParser = function(method_name) {
- if (this.isRegisteredParser(method_name)) {
- delete this.parsers[method_name];
- }
- };
-
- /**
- * See if a parser is registered by its method name
- *
- * @param {String} method_name The name of the parser you are looking for
- *
- * @return {boolean}
- */
- Twig.Templates.isRegisteredParser = function(method_name) {
- return this.parsers.hasOwnProperty(method_name);
- };
-
- /**
- * Save a template object to the store.
- *
- * @param {Twig.Template} template The twig.js template to store.
- */
- Twig.Templates.save = function(template) {
- if (template.id === undefined) {
- throw new Twig.Error("Unable to save template with no id");
- }
- Twig.Templates.registry[template.id] = template;
- };
-
- /**
- * Load a previously saved template from the store.
- *
- * @param {string} id The ID of the template to load.
- *
- * @return {Twig.Template} A twig.js template stored with the provided ID.
- */
- Twig.Templates.load = function(id) {
- if (!Twig.Templates.registry.hasOwnProperty(id)) {
- return null;
- }
- return Twig.Templates.registry[id];
- };
-
- /**
- * Load a template from a remote location using AJAX and saves in with the given ID.
- *
- * Available parameters:
- *
- * async: Should the HTTP request be performed asynchronously.
- * Defaults to true.
- * method: What method should be used to load the template
- * (fs or ajax)
- * parser: What method should be used to parse the template
- * (twig or source)
- * precompiled: Has the template already been compiled.
- *
- * @param {string} location The remote URL to load as a template.
- * @param {Object} params The template parameters.
- * @param {function} callback A callback triggered when the template finishes loading.
- * @param {function} error_callback A callback triggered if an error occurs loading the template.
- *
- *
- */
- Twig.Templates.loadRemote = function(location, params, callback, error_callback) {
- var loader;
-
- // Default to async
- if (params.async === undefined) {
- params.async = true;
- }
-
- // Default to the URL so the template is cached.
- if (params.id === undefined) {
- params.id = location;
- }
-
- // Check for existing template
- if (Twig.cache && Twig.Templates.registry.hasOwnProperty(params.id)) {
- // A template is already saved with the given id.
- if (typeof callback === 'function') {
- callback(Twig.Templates.registry[params.id]);
- }
- // TODO: if async, return deferred promise
- return Twig.Templates.registry[params.id];
- }
-
- //if the parser name hasn't been set, default it to twig
- params.parser = params.parser || 'twig';
-
- // Assume 'fs' if the loader is not defined
- loader = this.loaders[params.method] || this.loaders.fs;
- return loader.apply(this, arguments);
- };
-
- // Determine object type
- function is(type, obj) {
- var clas = Object.prototype.toString.call(obj).slice(8, -1);
- return obj !== undefined && obj !== null && clas === type;
- }
-
- /**
- * Create a new twig.js template.
- *
- * Parameters: {
- * data: The template, either pre-compiled tokens or a string template
- * id: The name of this template
- * blocks: Any pre-existing block from a child template
- * }
- *
- * @param {Object} params The template parameters.
- */
- Twig.Template = function ( params ) {
- var data = params.data,
- id = params.id,
- blocks = params.blocks,
- macros = params.macros || {},
- base = params.base,
- path = params.path,
- url = params.url,
- name = params.name,
- method = params.method,
- // parser options
- options = params.options;
-
- // # What is stored in a Twig.Template
- //
- // The Twig Template hold several chucks of data.
- //
- // {
- // id: The token ID (if any)
- // tokens: The list of tokens that makes up this template.
- // blocks: The list of block this template contains.
- // base: The base template (if any)
- // options: {
- // Compiler/parser options
- //
- // strict_variables: true/false
- // Should missing variable/keys emit an error message. If false, they default to null.
- // }
- // }
- //
-
- this.id = id;
- this.method = method;
- this.base = base;
- this.path = path;
- this.url = url;
- this.name = name;
- this.macros = macros;
- this.options = options;
-
- this.reset(blocks);
-
- if (is('String', data)) {
- this.tokens = Twig.prepare.apply(this, [data]);
- } else {
- this.tokens = data;
- }
-
- if (id !== undefined) {
- Twig.Templates.save(this);
- }
- };
-
- Twig.Template.prototype.reset = function(blocks) {
- Twig.log.debug("Twig.Template.reset", "Reseting template " + this.id);
- this.blocks = {};
- this.importedBlocks = [];
- this.originalBlockTokens = {};
- this.child = {
- blocks: blocks || {}
- };
- this.extend = null;
- };
-
- Twig.Template.prototype.render = function (context, params) {
- params = params || {};
-
- var output,
- url;
-
- this.context = context || {};
-
- // Clear any previous state
- this.reset();
- if (params.blocks) {
- this.blocks = params.blocks;
- }
- if (params.macros) {
- this.macros = params.macros;
- }
-
- output = Twig.parse.apply(this, [this.tokens, this.context]);
-
- // Does this template extend another
- if (this.extend) {
- var ext_template;
-
- // check if the template is provided inline
- if ( this.options.allowInlineIncludes ) {
- ext_template = Twig.Templates.load(this.extend);
- if ( ext_template ) {
- ext_template.options = this.options;
- }
- }
-
- // check for the template file via include
- if (!ext_template) {
- url = Twig.path.parsePath(this, this.extend);
-
- ext_template = Twig.Templates.loadRemote(url, {
- method: this.getLoaderMethod(),
- base: this.base,
- async: false,
- id: url,
- options: this.options
- });
- }
-
- this.parent = ext_template;
-
- return this.parent.render(this.context, {
- blocks: this.blocks
- });
- }
-
- if (params.output == 'blocks') {
- return this.blocks;
- } else if (params.output == 'macros') {
- return this.macros;
- } else {
- return output;
- }
- };
-
- Twig.Template.prototype.importFile = function(file) {
- var url, sub_template;
- if (!this.url && this.options.allowInlineIncludes) {
- file = this.path ? this.path + '/' + file : file;
- sub_template = Twig.Templates.load(file);
-
- if (!sub_template) {
- sub_template = Twig.Templates.loadRemote(url, {
- id: file,
- method: this.getLoaderMethod(),
- async: false,
- path: file,
- options: this.options
- });
-
- if (!sub_template) {
- throw new Twig.Error("Unable to find the template " + file);
- }
- }
-
- sub_template.options = this.options;
-
- return sub_template;
- }
-
- url = Twig.path.parsePath(this, file);
-
- // Load blocks from an external file
- sub_template = Twig.Templates.loadRemote(url, {
- method: this.getLoaderMethod(),
- base: this.base,
- async: false,
- options: this.options,
- id: url
- });
-
- return sub_template;
- };
-
- Twig.Template.prototype.importBlocks = function(file, override) {
- var sub_template = this.importFile(file),
- context = this.context,
- that = this,
- key;
-
- override = override || false;
-
- sub_template.render(context);
-
- // Mixin blocks
- Twig.forEach(Object.keys(sub_template.blocks), function(key) {
- if (override || that.blocks[key] === undefined) {
- that.blocks[key] = sub_template.blocks[key];
- that.importedBlocks.push(key);
- }
- });
- };
-
- Twig.Template.prototype.importMacros = function(file) {
- var url = Twig.path.parsePath(this, file);
-
- // load remote template
- var remoteTemplate = Twig.Templates.loadRemote(url, {
- method: this.getLoaderMethod(),
- async: false,
- id: url
- });
-
- return remoteTemplate;
- };
-
- Twig.Template.prototype.getLoaderMethod = function() {
- if (this.path) {
- return 'fs';
- }
- if (this.url) {
- return 'ajax';
- }
- return this.method || 'fs';
- };
-
- Twig.Template.prototype.compile = function(options) {
- // compile the template into raw JS
- return Twig.compiler.compile(this, options);
- };
-
- /**
- * Create safe output
- *
- * @param {string} Content safe to output
- *
- * @return {String} Content wrapped into a String
- */
-
- Twig.Markup = function(content, strategy) {
- if(typeof strategy == 'undefined') {
- strategy = true;
- }
-
- if (typeof content === 'string' && content.length > 0) {
- content = new String(content);
- content.twig_markup = strategy;
- }
- return content;
- };
-
- return Twig;
-
- };
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
-
- // ## twig.compiler.js
- //
- // This file handles compiling templates into JS
- module.exports = function (Twig) {
- /**
- * Namespace for compilation.
- */
- Twig.compiler = {
- module: {}
- };
-
- // Compile a Twig Template to output.
- Twig.compiler.compile = function(template, options) {
- // Get tokens
- var tokens = JSON.stringify(template.tokens)
- , id = template.id
- , output;
-
- if (options.module) {
- if (Twig.compiler.module[options.module] === undefined) {
- throw new Twig.Error("Unable to find module type " + options.module);
- }
- output = Twig.compiler.module[options.module](id, tokens, options.twig);
- } else {
- output = Twig.compiler.wrap(id, tokens);
- }
- return output;
- };
-
- Twig.compiler.module = {
- amd: function(id, tokens, pathToTwig) {
- return 'define(["' + pathToTwig + '"], function (Twig) {\n\tvar twig, templates;\ntwig = Twig.twig;\ntemplates = ' + Twig.compiler.wrap(id, tokens) + '\n\treturn templates;\n});';
- }
- , node: function(id, tokens) {
- return 'var twig = require("twig").twig;\n'
- + 'exports.template = ' + Twig.compiler.wrap(id, tokens)
- }
- , cjs2: function(id, tokens, pathToTwig) {
- return 'module.declare([{ twig: "' + pathToTwig + '" }], function (require, exports, module) {\n'
- + '\tvar twig = require("twig").twig;\n'
- + '\texports.template = ' + Twig.compiler.wrap(id, tokens)
- + '\n});'
- }
- };
-
- Twig.compiler.wrap = function(id, tokens) {
- return 'twig({id:"'+id.replace('"', '\\"')+'", data:'+tokens+', precompiled: true});\n';
- };
-
- return Twig;
- };
-
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
- // ## twig.expression.js
- //
- // This file handles tokenizing, compiling and parsing expressions.
- module.exports = function (Twig) {
- "use strict";
-
- /**
- * Namespace for expression handling.
- */
- Twig.expression = { };
-
- __webpack_require__(4)(Twig);
-
- /**
- * Reserved word that can't be used as variable names.
- */
- Twig.expression.reservedWords = [
- "true", "false", "null", "TRUE", "FALSE", "NULL", "_context", "and", "or", "in", "not in", "if"
- ];
-
- /**
- * The type of tokens used in expressions.
- */
- Twig.expression.type = {
- comma: 'Twig.expression.type.comma',
- operator: {
- unary: 'Twig.expression.type.operator.unary',
- binary: 'Twig.expression.type.operator.binary'
- },
- string: 'Twig.expression.type.string',
- bool: 'Twig.expression.type.bool',
- slice: 'Twig.expression.type.slice',
- array: {
- start: 'Twig.expression.type.array.start',
- end: 'Twig.expression.type.array.end'
- },
- object: {
- start: 'Twig.expression.type.object.start',
- end: 'Twig.expression.type.object.end'
- },
- parameter: {
- start: 'Twig.expression.type.parameter.start',
- end: 'Twig.expression.type.parameter.end'
- },
- subexpression: {
- start: 'Twig.expression.type.subexpression.start',
- end: 'Twig.expression.type.subexpression.end'
- },
- key: {
- period: 'Twig.expression.type.key.period',
- brackets: 'Twig.expression.type.key.brackets'
- },
- filter: 'Twig.expression.type.filter',
- _function: 'Twig.expression.type._function',
- variable: 'Twig.expression.type.variable',
- number: 'Twig.expression.type.number',
- _null: 'Twig.expression.type.null',
- context: 'Twig.expression.type.context',
- test: 'Twig.expression.type.test'
- };
-
- Twig.expression.set = {
- // What can follow an expression (in general)
- operations: [
- Twig.expression.type.filter,
- Twig.expression.type.operator.unary,
- Twig.expression.type.operator.binary,
- Twig.expression.type.array.end,
- Twig.expression.type.object.end,
- Twig.expression.type.parameter.end,
- Twig.expression.type.subexpression.end,
- Twig.expression.type.comma,
- Twig.expression.type.test
- ],
- expressions: [
- Twig.expression.type._function,
- Twig.expression.type.bool,
- Twig.expression.type.string,
- Twig.expression.type.variable,
- Twig.expression.type.number,
- Twig.expression.type._null,
- Twig.expression.type.context,
- Twig.expression.type.parameter.start,
- Twig.expression.type.array.start,
- Twig.expression.type.object.start,
- Twig.expression.type.subexpression.start
- ]
- };
-
- // Most expressions allow a '.' or '[' after them, so we provide a convenience set
- Twig.expression.set.operations_extended = Twig.expression.set.operations.concat([
- Twig.expression.type.key.period,
- Twig.expression.type.key.brackets,
- Twig.expression.type.slice]);
-
- // Some commonly used compile and parse functions.
- Twig.expression.fn = {
- compile: {
- push: function(token, stack, output) {
- output.push(token);
- },
- push_both: function(token, stack, output) {
- output.push(token);
- stack.push(token);
- }
- },
- parse: {
- push: function(token, stack, context) {
- stack.push(token);
- },
- push_value: function(token, stack, context) {
- stack.push(token.value);
- }
- }
- };
-
- // The regular expressions and compile/parse logic used to match tokens in expressions.
- //
- // Properties:
- //
- // type: The type of expression this matches
- //
- // regex: One or more regular expressions that matche the format of the token.
- //
- // next: Valid tokens that can occur next in the expression.
- //
- // Functions:
- //
- // compile: A function that compiles the raw regular expression match into a token.
- //
- // parse: A function that parses the compiled token into output.
- //
- Twig.expression.definitions = [
- {
- type: Twig.expression.type.test,
- regex: /^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*(\s?as)?)/,
- next: Twig.expression.set.operations.concat([Twig.expression.type.parameter.start]),
- compile: function(token, stack, output) {
- token.filter = token.match[2];
- token.modifier = token.match[1];
- delete token.match;
- delete token.value;
- output.push(token);
- },
- parse: function(token, stack, context) {
- var value = stack.pop(),
- params = token.params && Twig.expression.parse.apply(this, [token.params, context]),
- result = Twig.test(token.filter, value, params);
-
- if (token.modifier == 'not') {
- stack.push(!result);
- } else {
- stack.push(result);
- }
- }
- },
- {
- type: Twig.expression.type.comma,
- // Match a comma
- regex: /^,/,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.array.end, Twig.expression.type.object.end]),
- compile: function(token, stack, output) {
- var i = stack.length - 1,
- stack_token;
-
- delete token.match;
- delete token.value;
-
- // pop tokens off the stack until the start of the object
- for(;i >= 0; i--) {
- stack_token = stack.pop();
- if (stack_token.type === Twig.expression.type.object.start
- || stack_token.type === Twig.expression.type.parameter.start
- || stack_token.type === Twig.expression.type.array.start) {
- stack.push(stack_token);
- break;
- }
- output.push(stack_token);
- }
- output.push(token);
- }
- },
- {
- /**
- * Match a number (integer or decimal)
- */
- type: Twig.expression.type.number,
- // match a number
- regex: /^\-?\d+(\.\d+)?/,
- next: Twig.expression.set.operations,
- compile: function(token, stack, output) {
- token.value = Number(token.value);
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- },
- {
- type: Twig.expression.type.operator.binary,
- // Match any of ?:, +, *, /, -, %, ~, <, <=, >, >=, !=, ==, **, ?, :, and, or, in, not in
- // and, or, in, not in can be followed by a space or parenthesis
- regex: /(^\?\:|^[\+\-~%\?]|^[\:](?!\d\])|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^(and)[\(|\s+]|^(or)[\(|\s+]|^(in)[\(|\s+]|^(not in)[\(|\s+]|^\.\.)/,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.operator.unary]),
- transform: function(match, tokens) {
- switch(match[0]) {
- case 'and(':
- case 'or(':
- case 'in(':
- case 'not in(':
- //Strip off the ( if it exists
- tokens[tokens.length - 1].value = match[2];
- return match[0];
- break;
- default:
- return '';
- }
- },
- compile: function(token, stack, output) {
- delete token.match;
-
- token.value = token.value.trim();
- var value = token.value,
- operator = Twig.expression.operator.lookup(value, token);
-
- Twig.log.trace("Twig.expression.compile: ", "Operator: ", operator, " from ", value);
-
- while (stack.length > 0 &&
- (stack[stack.length-1].type == Twig.expression.type.operator.unary || stack[stack.length-1].type == Twig.expression.type.operator.binary) &&
- (
- (operator.associativity === Twig.expression.operator.leftToRight &&
- operator.precidence >= stack[stack.length-1].precidence) ||
-
- (operator.associativity === Twig.expression.operator.rightToLeft &&
- operator.precidence > stack[stack.length-1].precidence)
- )
- ) {
- var temp = stack.pop();
- output.push(temp);
- }
-
- if (value === ":") {
- // Check if this is a ternary or object key being set
- if (stack[stack.length - 1] && stack[stack.length-1].value === "?") {
- // Continue as normal for a ternary
- } else {
- // This is not a ternary so we push the token to the output where it can be handled
- // when the assocated object is closed.
- var key_token = output.pop();
-
- if (key_token.type === Twig.expression.type.string ||
- key_token.type === Twig.expression.type.variable) {
- token.key = key_token.value;
- } else if (key_token.type === Twig.expression.type.number) {
- // Convert integer keys into string keys
- token.key = key_token.value.toString();
- } else if (key_token.expression &&
- (key_token.type === Twig.expression.type.parameter.end ||
- key_token.type == Twig.expression.type.subexpression.end)) {
- token.params = key_token.params;
- } else {
- throw new Twig.Error("Unexpected value before ':' of " + key_token.type + " = " + key_token.value);
- }
-
- output.push(token);
- return;
- }
- } else {
- stack.push(operator);
- }
- },
- parse: function(token, stack, context) {
- if (token.key) {
- // handle ternary ':' operator
- stack.push(token);
- } else if (token.params) {
- // handle "{(expression):value}"
- token.key = Twig.expression.parse.apply(this, [token.params, context]);
- stack.push(token);
-
- //If we're in a loop, we might need token.params later, especially in this form of "(expression):value"
- if (!context.loop) {
- delete(token.params);
- }
- } else {
- Twig.expression.operator.parse(token.value, stack);
- }
- }
- },
- {
- type: Twig.expression.type.operator.unary,
- // Match any of not
- regex: /(^not\s+)/,
- next: Twig.expression.set.expressions,
- compile: function(token, stack, output) {
- delete token.match;
-
- token.value = token.value.trim();
- var value = token.value,
- operator = Twig.expression.operator.lookup(value, token);
-
- Twig.log.trace("Twig.expression.compile: ", "Operator: ", operator, " from ", value);
-
- while (stack.length > 0 &&
- (stack[stack.length-1].type == Twig.expression.type.operator.unary || stack[stack.length-1].type == Twig.expression.type.operator.binary) &&
- (
- (operator.associativity === Twig.expression.operator.leftToRight &&
- operator.precidence >= stack[stack.length-1].precidence) ||
-
- (operator.associativity === Twig.expression.operator.rightToLeft &&
- operator.precidence > stack[stack.length-1].precidence)
- )
- ) {
- var temp = stack.pop();
- output.push(temp);
- }
-
- stack.push(operator);
- },
- parse: function(token, stack, context) {
- Twig.expression.operator.parse(token.value, stack);
- }
- },
- {
- /**
- * Match a string. This is anything between a pair of single or double quotes.
- */
- type: Twig.expression.type.string,
- // See: http://blog.stevenlevithan.com/archives/match-quoted-string
- regex: /^(["'])(?:(?=(\\?))\2[\s\S])*?\1/,
- next: Twig.expression.set.operations_extended,
- compile: function(token, stack, output) {
- var value = token.value;
- delete token.match
-
- // Remove the quotes from the string
- if (value.substring(0, 1) === '"') {
- value = value.replace('\\"', '"');
- } else {
- value = value.replace("\\'", "'");
- }
- token.value = value.substring(1, value.length-1).replace( /\\n/g, "\n" ).replace( /\\r/g, "\r" );
- Twig.log.trace("Twig.expression.compile: ", "String value: ", token.value);
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- },
- {
- /**
- * Match a subexpression set start.
- */
- type: Twig.expression.type.subexpression.start,
- regex: /^\(/,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.subexpression.end]),
- compile: function(token, stack, output) {
- token.value = '(';
- output.push(token);
- stack.push(token);
- },
- parse: Twig.expression.fn.parse.push
- },
- {
- /**
- * Match a subexpression set end.
- */
- type: Twig.expression.type.subexpression.end,
- regex: /^\)/,
- next: Twig.expression.set.operations_extended,
- validate: function(match, tokens) {
- // Iterate back through previous tokens to ensure we follow a subexpression start
- var i = tokens.length - 1,
- found_subexpression_start = false,
- next_subexpression_start_invalid = false,
- unclosed_parameter_count = 0;
-
- while(!found_subexpression_start && i >= 0) {
- var token = tokens[i];
-
- found_subexpression_start = token.type === Twig.expression.type.subexpression.start;
-
- // If we have previously found a subexpression end, then this subexpression start is the start of
- // that subexpression, not the subexpression we are searching for
- if (found_subexpression_start && next_subexpression_start_invalid) {
- next_subexpression_start_invalid = false;
- found_subexpression_start = false;
- }
-
- // Count parameter tokens to ensure we dont return truthy for a parameter opener
- if (token.type === Twig.expression.type.parameter.start) {
- unclosed_parameter_count++;
- } else if (token.type === Twig.expression.type.parameter.end) {
- unclosed_parameter_count--;
- } else if (token.type === Twig.expression.type.subexpression.end) {
- next_subexpression_start_invalid = true;
- }
-
- i--;
- }
-
- // If we found unclosed parameters, return false
- // If we didnt find subexpression start, return false
- // Otherwise return true
-
- return (found_subexpression_start && (unclosed_parameter_count === 0));
- },
- compile: function(token, stack, output) {
- // This is basically a copy of parameter end compilation
- var stack_token,
- end_token = token;
-
- stack_token = stack.pop();
- while(stack.length > 0 && stack_token.type != Twig.expression.type.subexpression.start) {
- output.push(stack_token);
- stack_token = stack.pop();
- }
-
- // Move contents of parens into preceding filter
- var param_stack = [];
- while(token.type !== Twig.expression.type.subexpression.start) {
- // Add token to arguments stack
- param_stack.unshift(token);
- token = output.pop();
- }
-
- param_stack.unshift(token);
-
- var is_expression = false;
-
- //If the token at the top of the *stack* is a function token, pop it onto the output queue.
- // Get the token preceding the parameters
- stack_token = stack[stack.length-1];
-
- if (stack_token === undefined ||
- (stack_token.type !== Twig.expression.type._function &&
- stack_token.type !== Twig.expression.type.filter &&
- stack_token.type !== Twig.expression.type.test &&
- stack_token.type !== Twig.expression.type.key.brackets)) {
-
- end_token.expression = true;
-
- // remove start and end token from stack
- param_stack.pop();
- param_stack.shift();
-
- end_token.params = param_stack;
-
- output.push(end_token);
- } else {
- // This should never be hit
- end_token.expression = false;
- stack_token.params = param_stack;
- }
- },
- parse: function(token, stack, context) {
- var new_array = [],
- array_ended = false,
- value = null;
-
- if (token.expression) {
- value = Twig.expression.parse.apply(this, [token.params, context]);
- stack.push(value);
- } else {
- throw new Twig.Error("Unexpected subexpression end when token is not marked as an expression");
- }
- }
- },
- {
- /**
- * Match a parameter set start.
- */
- type: Twig.expression.type.parameter.start,
- regex: /^\(/,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.parameter.end]),
- validate: function(match, tokens) {
- var last_token = tokens[tokens.length - 1];
- // We can't use the regex to test if we follow a space because expression is trimmed
- return last_token && (Twig.indexOf(Twig.expression.reservedWords, last_token.value.trim()) < 0);
- },
- compile: Twig.expression.fn.compile.push_both,
- parse: Twig.expression.fn.parse.push
- },
- {
- /**
- * Match a parameter set end.
- */
- type: Twig.expression.type.parameter.end,
- regex: /^\)/,
- next: Twig.expression.set.operations_extended,
- compile: function(token, stack, output) {
- var stack_token,
- end_token = token;
-
- stack_token = stack.pop();
- while(stack.length > 0 && stack_token.type != Twig.expression.type.parameter.start) {
- output.push(stack_token);
- stack_token = stack.pop();
- }
-
- // Move contents of parens into preceding filter
- var param_stack = [];
- while(token.type !== Twig.expression.type.parameter.start) {
- // Add token to arguments stack
- param_stack.unshift(token);
- token = output.pop();
- }
- param_stack.unshift(token);
-
- var is_expression = false;
-
- // Get the token preceding the parameters
- token = output[output.length-1];
-
- if (token === undefined ||
- (token.type !== Twig.expression.type._function &&
- token.type !== Twig.expression.type.filter &&
- token.type !== Twig.expression.type.test &&
- token.type !== Twig.expression.type.key.brackets)) {
-
- end_token.expression = true;
-
- // remove start and end token from stack
- param_stack.pop();
- param_stack.shift();
-
- end_token.params = param_stack;
-
- output.push(end_token);
-
- } else {
- end_token.expression = false;
- token.params = param_stack;
- }
- },
- parse: function(token, stack, context) {
- var new_array = [],
- array_ended = false,
- value = null;
-
- if (token.expression) {
- value = Twig.expression.parse.apply(this, [token.params, context])
- stack.push(value);
-
- } else {
-
- while (stack.length > 0) {
- value = stack.pop();
- // Push values into the array until the start of the array
- if (value && value.type && value.type == Twig.expression.type.parameter.start) {
- array_ended = true;
- break;
- }
- new_array.unshift(value);
- }
-
- if (!array_ended) {
- throw new Twig.Error("Expected end of parameter set.");
- }
-
- stack.push(new_array);
- }
- }
- },
- {
- type: Twig.expression.type.slice,
- regex: /^\[(\d*\:\d*)\]/,
- next: Twig.expression.set.operations_extended,
- compile: function(token, stack, output) {
- var sliceRange = token.match[1].split(':');
-
- //sliceStart can be undefined when we pass parameters to the slice filter later
- var sliceStart = (sliceRange[0]) ? parseInt(sliceRange[0]) : undefined;
- var sliceEnd = (sliceRange[1]) ? parseInt(sliceRange[1]) : undefined;
-
- token.value = 'slice';
- token.params = [sliceStart, sliceEnd];
-
- //sliceEnd can't be undefined as the slice filter doesn't check for this, but it does check the length
- //of the params array, so just shorten it.
- if (!sliceEnd) {
- token.params = [sliceStart];
- }
-
- output.push(token);
- },
- parse: function(token, stack, context) {
- var input = stack.pop(),
- params = token.params;
-
- stack.push(Twig.filter.apply(this, [token.value, input, params]));
- }
- },
- {
- /**
- * Match an array start.
- */
- type: Twig.expression.type.array.start,
- regex: /^\[/,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.array.end]),
- compile: Twig.expression.fn.compile.push_both,
- parse: Twig.expression.fn.parse.push
- },
- {
- /**
- * Match an array end.
- */
- type: Twig.expression.type.array.end,
- regex: /^\]/,
- next: Twig.expression.set.operations_extended,
- compile: function(token, stack, output) {
- var i = stack.length - 1,
- stack_token;
- // pop tokens off the stack until the start of the object
- for(;i >= 0; i--) {
- stack_token = stack.pop();
- if (stack_token.type === Twig.expression.type.array.start) {
- break;
- }
- output.push(stack_token);
- }
- output.push(token);
- },
- parse: function(token, stack, context) {
- var new_array = [],
- array_ended = false,
- value = null;
-
- while (stack.length > 0) {
- value = stack.pop();
- // Push values into the array until the start of the array
- if (value.type && value.type == Twig.expression.type.array.start) {
- array_ended = true;
- break;
- }
- new_array.unshift(value);
- }
- if (!array_ended) {
- throw new Twig.Error("Expected end of array.");
- }
-
- stack.push(new_array);
- }
- },
- // Token that represents the start of a hash map '}'
- //
- // Hash maps take the form:
- // { "key": 'value', "another_key": item }
- //
- // Keys must be quoted (either single or double) and values can be any expression.
- {
- type: Twig.expression.type.object.start,
- regex: /^\{/,
- next: Twig.expression.set.expressions.concat([Twig.expression.type.object.end]),
- compile: Twig.expression.fn.compile.push_both,
- parse: Twig.expression.fn.parse.push
- },
-
- // Token that represents the end of a Hash Map '}'
- //
- // This is where the logic for building the internal
- // representation of a hash map is defined.
- {
- type: Twig.expression.type.object.end,
- regex: /^\}/,
- next: Twig.expression.set.operations_extended,
- compile: function(token, stack, output) {
- var i = stack.length-1,
- stack_token;
-
- // pop tokens off the stack until the start of the object
- for(;i >= 0; i--) {
- stack_token = stack.pop();
- if (stack_token && stack_token.type === Twig.expression.type.object.start) {
- break;
- }
- output.push(stack_token);
- }
- output.push(token);
- },
- parse: function(end_token, stack, context) {
- var new_object = {},
- object_ended = false,
- token = null,
- token_key = null,
- has_value = false,
- value = null;
-
- while (stack.length > 0) {
- token = stack.pop();
- // Push values into the array until the start of the object
- if (token && token.type && token.type === Twig.expression.type.object.start) {
- object_ended = true;
- break;
- }
- if (token && token.type && (token.type === Twig.expression.type.operator.binary || token.type === Twig.expression.type.operator.unary) && token.key) {
- if (!has_value) {
- throw new Twig.Error("Missing value for key '" + token.key + "' in object definition.");
- }
- new_object[token.key] = value;
-
- // Preserve the order that elements are added to the map
- // This is necessary since JavaScript objects don't
- // guarantee the order of keys
- if (new_object._keys === undefined) new_object._keys = [];
- new_object._keys.unshift(token.key);
-
- // reset value check
- value = null;
- has_value = false;
-
- } else {
- has_value = true;
- value = token;
- }
- }
- if (!object_ended) {
- throw new Twig.Error("Unexpected end of object.");
- }
-
- stack.push(new_object);
- }
- },
-
- // Token representing a filter
- //
- // Filters can follow any expression and take the form:
- // expression|filter(optional, args)
- //
- // Filter parsing is done in the Twig.filters namespace.
- {
- type: Twig.expression.type.filter,
- // match a | then a letter or _, then any number of letters, numbers, _ or -
- regex: /^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: function(token, stack, output) {
- token.value = token.match[1];
- output.push(token);
- },
- parse: function(token, stack, context) {
- var input = stack.pop(),
- params = token.params && Twig.expression.parse.apply(this, [token.params, context]);
-
- stack.push(Twig.filter.apply(this, [token.value, input, params]));
- }
- },
- {
- type: Twig.expression.type._function,
- // match any letter or _, then any number of letters, numbers, _ or - followed by (
- regex: /^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,
- next: Twig.expression.type.parameter.start,
- validate: function(match, tokens) {
- // Make sure this function is not a reserved word
- return match[1] && (Twig.indexOf(Twig.expression.reservedWords, match[1]) < 0);
- },
- transform: function(match, tokens) {
- return '(';
- },
- compile: function(token, stack, output) {
- var fn = token.match[1];
- token.fn = fn;
- // cleanup token
- delete token.match;
- delete token.value;
-
- output.push(token);
- },
- parse: function(token, stack, context) {
- var params = token.params && Twig.expression.parse.apply(this, [token.params, context]),
- fn = token.fn,
- value;
-
- if (Twig.functions[fn]) {
- // Get the function from the built-in functions
- value = Twig.functions[fn].apply(this, params);
-
- } else if (typeof context[fn] == 'function') {
- // Get the function from the user/context defined functions
- value = context[fn].apply(context, params);
-
- } else {
- throw new Twig.Error(fn + ' function does not exist and is not defined in the context');
- }
-
- stack.push(value);
- }
- },
-
- // Token representing a variable.
- //
- // Variables can contain letters, numbers, underscores and
- // dashes, but must start with a letter or underscore.
- //
- // Variables are retrieved from the render context and take
- // the value of 'undefined' if the given variable doesn't
- // exist in the context.
- {
- type: Twig.expression.type.variable,
- // match any letter or _, then any number of letters, numbers, _ or -
- regex: /^[a-zA-Z_][a-zA-Z0-9_]*/,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: Twig.expression.fn.compile.push,
- validate: function(match, tokens) {
- return (Twig.indexOf(Twig.expression.reservedWords, match[0]) < 0);
- },
- parse: function(token, stack, context) {
- // Get the variable from the context
- var value = Twig.expression.resolve.apply(this, [context[token.value], context]);
- stack.push(value);
- }
- },
- {
- type: Twig.expression.type.key.period,
- regex: /^\.([a-zA-Z0-9_]+)/,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: function(token, stack, output) {
- token.key = token.match[1];
- delete token.match;
- delete token.value;
-
- output.push(token);
- },
- parse: function(token, stack, context, next_token) {
- var params = token.params && Twig.expression.parse.apply(this, [token.params, context]),
- key = token.key,
- object = stack.pop(),
- value;
-
- if (object === null || object === undefined) {
- if (this.options.strict_variables) {
- throw new Twig.Error("Can't access a key " + key + " on an null or undefined object.");
- } else {
- value = undefined;
- }
- } else {
- var capitalize = function (value) {
- return value.substr(0, 1).toUpperCase() + value.substr(1);
- };
-
- // Get the variable from the context
- if (typeof object === 'object' && key in object) {
- value = object[key];
- } else if (object["get" + capitalize(key)] !== undefined) {
- value = object["get" + capitalize(key)];
- } else if (object["is" + capitalize(key)] !== undefined) {
- value = object["is" + capitalize(key)];
- } else {
- value = undefined;
- }
- }
-
- // When resolving an expression we need to pass next_token in case the expression is a function
- stack.push(Twig.expression.resolve.apply(this, [value, context, params, next_token]));
- }
- },
- {
- type: Twig.expression.type.key.brackets,
- regex: /^\[([^\]\:]*)\]/,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: function(token, stack, output) {
- var match = token.match[1];
- delete token.value;
- delete token.match;
-
- // The expression stack for the key
- token.stack = Twig.expression.compile({
- value: match
- }).stack;
-
- output.push(token);
- },
- parse: function(token, stack, context, next_token) {
- // Evaluate key
- var params = token.params && Twig.expression.parse.apply(this, [token.params, context]),
- key = Twig.expression.parse.apply(this, [token.stack, context]),
- object = stack.pop(),
- value;
-
- if (object === null || object === undefined) {
- if (this.options.strict_variables) {
- throw new Twig.Error("Can't access a key " + key + " on an null or undefined object.");
- } else {
- return null;
- }
- }
-
- // Get the variable from the context
- if (typeof object === 'object' && key in object) {
- value = object[key];
- } else {
- value = null;
- }
-
- // When resolving an expression we need to pass next_token in case the expression is a function
- stack.push(Twig.expression.resolve.apply(this, [value, object, params, next_token]));
- }
- },
- {
- /**
- * Match a null value.
- */
- type: Twig.expression.type._null,
- // match a number
- regex: /^(null|NULL|none|NONE)/,
- next: Twig.expression.set.operations,
- compile: function(token, stack, output) {
- delete token.match;
- token.value = null;
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- },
- {
- /**
- * Match the context
- */
- type: Twig.expression.type.context,
- regex: /^_context/,
- next: Twig.expression.set.operations_extended.concat([
- Twig.expression.type.parameter.start]),
- compile: Twig.expression.fn.compile.push,
- parse: function(token, stack, context) {
- stack.push(context);
- }
- },
- {
- /**
- * Match a boolean
- */
- type: Twig.expression.type.bool,
- regex: /^(true|TRUE|false|FALSE)/,
- next: Twig.expression.set.operations,
- compile: function(token, stack, output) {
- token.value = (token.match[0].toLowerCase( ) === "true");
- delete token.match;
- output.push(token);
- },
- parse: Twig.expression.fn.parse.push_value
- }
- ];
-
- /**
- * Resolve a context value.
- *
- * If the value is a function, it is executed with a context parameter.
- *
- * @param {string} key The context object key.
- * @param {Object} context The render context.
- */
- Twig.expression.resolve = function(value, context, params, next_token) {
- if (typeof value == 'function') {
- /*
- If value is a function, it will have been impossible during the compile stage to determine that a following
- set of parentheses were parameters for this function.
-
- Those parentheses will have therefore been marked as an expression, with their own parameters, which really
- belong to this function.
-
- Those parameters will also need parsing in case they are actually an expression to pass as parameters.
- */
- if (next_token && next_token.type === Twig.expression.type.parameter.end) {
- //When parsing these parameters, we need to get them all back, not just the last item on the stack.
- var tokens_are_parameters = true;
-
- params = next_token.params && Twig.expression.parse.apply(this, [next_token.params, context, tokens_are_parameters]);
-
- //Clean up the parentheses tokens on the next loop
- next_token.cleanup = true;
- }
- return value.apply(context, params || []);
- } else {
- return value;
- }
- };
-
- /**
- * Registry for logic handlers.
- */
- Twig.expression.handler = {};
-
- /**
- * Define a new expression type, available at Twig.logic.type.{type}
- *
- * @param {string} type The name of the new type.
- */
- Twig.expression.extendType = function (type) {
- Twig.expression.type[type] = "Twig.expression.type." + type;
- };
-
- /**
- * Extend the expression parsing functionality with a new definition.
- *
- * Token definitions follow this format:
- * {
- * type: One of Twig.expression.type.[type], either pre-defined or added using
- * Twig.expression.extendType
- *
- * next: Array of types from Twig.expression.type that can follow this token,
- *
- * regex: A regex or array of regex's that should match the token.
- *
- * compile: function(token, stack, output) called when this token is being compiled.
- * Should return an object with stack and output set.
- *
- * parse: function(token, stack, context) called when this token is being parsed.
- * Should return an object with stack and context set.
- * }
- *
- * @param {Object} definition A token definition.
- */
- Twig.expression.extend = function (definition) {
- if (!definition.type) {
- throw new Twig.Error("Unable to extend logic definition. No type provided for " + definition);
- }
- Twig.expression.handler[definition.type] = definition;
- };
-
- // Extend with built-in expressions
- while (Twig.expression.definitions.length > 0) {
- Twig.expression.extend(Twig.expression.definitions.shift());
- }
-
- /**
- * Break an expression into tokens defined in Twig.expression.definitions.
- *
- * @param {string} expression The string to tokenize.
- *
- * @return {Array} An array of tokens.
- */
- Twig.expression.tokenize = function (expression) {
- var tokens = [],
- // Keep an offset of the location in the expression for error messages.
- exp_offset = 0,
- // The valid next tokens of the previous token
- next = null,
- // Match information
- type, regex, regex_array,
- // The possible next token for the match
- token_next,
- // Has a match been found from the definitions
- match_found, invalid_matches = [], match_function;
-
- match_function = function () {
- var match = Array.prototype.slice.apply(arguments),
- string = match.pop(),
- offset = match.pop();
-
- Twig.log.trace("Twig.expression.tokenize",
- "Matched a ", type, " regular expression of ", match);
-
- if (next && Twig.indexOf(next, type) < 0) {
- invalid_matches.push(
- type + " cannot follow a " + tokens[tokens.length - 1].type +
- " at template:" + exp_offset + " near '" + match[0].substring(0, 20) +
- "...'"
- );
- // Not a match, don't change the expression
- return match[0];
- }
-
- // Validate the token if a validation function is provided
- if (Twig.expression.handler[type].validate &&
- !Twig.expression.handler[type].validate(match, tokens)) {
- return match[0];
- }
-
- invalid_matches = [];
-
- tokens.push({
- type: type,
- value: match[0],
- match: match
- });
-
- match_found = true;
- next = token_next;
- exp_offset += match[0].length;
-
- // Does the token need to return output back to the expression string
- // e.g. a function match of cycle( might return the '(' back to the expression
- // This allows look-ahead to differentiate between token types (e.g. functions and variable names)
- if (Twig.expression.handler[type].transform) {
- return Twig.expression.handler[type].transform(match, tokens);
- }
- return '';
- };
-
- Twig.log.debug("Twig.expression.tokenize", "Tokenizing expression ", expression);
-
- while (expression.length > 0) {
- expression = expression.trim();
- for (type in Twig.expression.handler) {
- if (Twig.expression.handler.hasOwnProperty(type)) {
- token_next = Twig.expression.handler[type].next;
- regex = Twig.expression.handler[type].regex;
- Twig.log.trace("Checking type ", type, " on ", expression);
- if (regex instanceof Array) {
- regex_array = regex;
- } else {
- regex_array = [regex];
- }
-
- match_found = false;
- while (regex_array.length > 0) {
- regex = regex_array.pop();
- expression = expression.replace(regex, match_function);
- }
- // An expression token has been matched. Break the for loop and start trying to
- // match the next template (if expression isn't empty.)
- if (match_found) {
- break;
- }
- }
- }
- if (!match_found) {
- if (invalid_matches.length > 0) {
- throw new Twig.Error(invalid_matches.join(" OR "));
- } else {
- throw new Twig.Error("Unable to parse '" + expression + "' at template position" + exp_offset);
- }
- }
- }
-
- Twig.log.trace("Twig.expression.tokenize", "Tokenized to ", tokens);
- return tokens;
- };
-
- /**
- * Compile an expression token.
- *
- * @param {Object} raw_token The uncompiled token.
- *
- * @return {Object} The compiled token.
- */
- Twig.expression.compile = function (raw_token) {
- var expression = raw_token.value,
- // Tokenize expression
- tokens = Twig.expression.tokenize(expression),
- token = null,
- output = [],
- stack = [],
- token_template = null;
-
- Twig.log.trace("Twig.expression.compile: ", "Compiling ", expression);
-
- // Push tokens into RPN stack using the Shunting-yard algorithm
- // See http://en.wikipedia.org/wiki/Shunting_yard_algorithm
-
- while (tokens.length > 0) {
- token = tokens.shift();
- token_template = Twig.expression.handler[token.type];
-
- Twig.log.trace("Twig.expression.compile: ", "Compiling ", token);
-
- // Compile the template
- token_template.compile && token_template.compile(token, stack, output);
-
- Twig.log.trace("Twig.expression.compile: ", "Stack is", stack);
- Twig.log.trace("Twig.expression.compile: ", "Output is", output);
- }
-
- while(stack.length > 0) {
- output.push(stack.pop());
- }
-
- Twig.log.trace("Twig.expression.compile: ", "Final output is", output);
-
- raw_token.stack = output;
- delete raw_token.value;
-
- return raw_token;
- };
-
-
- /**
- * Parse an RPN expression stack within a context.
- *
- * @param {Array} tokens An array of compiled expression tokens.
- * @param {Object} context The render context to parse the tokens with.
- *
- * @return {Object} The result of parsing all the tokens. The result
- * can be anything, String, Array, Object, etc... based on
- * the given expression.
- */
- Twig.expression.parse = function (tokens, context, tokens_are_parameters) {
- var that = this;
-
- // If the token isn't an array, make it one.
- if (!(tokens instanceof Array)) {
- tokens = [tokens];
- }
-
- // The output stack
- var stack = [],
- next_token,
- token_template = null,
- loop_token_fixups = [];
-
- Twig.forEach(tokens, function (token, index) {
- //If the token is marked for cleanup, we don't need to parse it
- if (token.cleanup) {
- return;
- }
-
- //Determine the token that follows this one so that we can pass it to the parser
- if (tokens.length > index + 1) {
- next_token = tokens[index + 1];
- }
-
- token_template = Twig.expression.handler[token.type];
-
- token_template.parse && token_template.parse.apply(that, [token, stack, context, next_token]);
-
- //Store any binary tokens for later if we are in a loop.
- if (context.loop && token.type === Twig.expression.type.operator.binary) {
- loop_token_fixups.push(token);
- }
- });
-
- //Check every fixup and remove "key" as long as they still have "params". This covers the use case where
- //a ":" operator is used in a loop with a "(expression):" statement. We need to be able to evaluate the expression
- Twig.forEach(loop_token_fixups, function (loop_token_fixup) {
- if (loop_token_fixup.params && loop_token_fixup.key) {
- delete loop_token_fixup["key"];
- }
- });
-
- //If parse has been called with a set of tokens that are parameters, we need to return the whole stack,
- //wrapped in an Array.
- if (tokens_are_parameters) {
- var params = [];
- while (stack.length > 0) {
- params.unshift(stack.pop());
- }
-
- stack.push(params);
- }
-
- // Pop the final value off the stack
- return stack.pop();
- };
-
- return Twig;
-
- };
-
-
-/***/ },
-/* 4 */
-/***/ function(module, exports) {
-
- // ## twig.expression.operator.js
- //
- // This file handles operator lookups and parsing.
- module.exports = function (Twig) {
- "use strict";
-
- /**
- * Operator associativity constants.
- */
- Twig.expression.operator = {
- leftToRight: 'leftToRight',
- rightToLeft: 'rightToLeft'
- };
-
- var containment = function(a, b) {
- if (b === undefined || b === null) {
- return null;
- } else if (b.indexOf !== undefined) {
- // String
- return a === b || a !== '' && b.indexOf(a) > -1;
- } else {
- var el;
- for (el in b) {
- if (b.hasOwnProperty(el) && b[el] === a) {
- return true;
- }
- }
- return false;
- }
- };
-
- /**
- * Get the precidence and associativity of an operator. These follow the order that C/C++ use.
- * See http://en.wikipedia.org/wiki/Operators_in_C_and_C++ for the table of values.
- */
- Twig.expression.operator.lookup = function (operator, token) {
- switch (operator) {
- case "..":
- token.precidence = 20;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case ',':
- token.precidence = 18;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- // Ternary
- case '?:':
- case '?':
- case ':':
- token.precidence = 16;
- token.associativity = Twig.expression.operator.rightToLeft;
- break;
-
- case 'or':
- token.precidence = 14;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case 'and':
- token.precidence = 13;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case '==':
- case '!=':
- token.precidence = 9;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case '<':
- case '<=':
- case '>':
- case '>=':
- case 'not in':
- case 'in':
- token.precidence = 8;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case '~': // String concatination
- case '+':
- case '-':
- token.precidence = 6;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case '//':
- case '**':
- case '*':
- case '/':
- case '%':
- token.precidence = 5;
- token.associativity = Twig.expression.operator.leftToRight;
- break;
-
- case 'not':
- token.precidence = 3;
- token.associativity = Twig.expression.operator.rightToLeft;
- break;
-
- default:
- throw new Twig.Error("Failed to lookup operator: " + operator + " is an unknown operator.");
- }
- token.operator = operator;
- return token;
- };
-
- /**
- * Handle operations on the RPN stack.
- *
- * Returns the updated stack.
- */
- Twig.expression.operator.parse = function (operator, stack) {
- Twig.log.trace("Twig.expression.operator.parse: ", "Handling ", operator);
- var a, b, c;
-
- if (operator === '?') {
- c = stack.pop();
- }
-
- b = stack.pop();
- if (operator !== 'not') {
- a = stack.pop();
- }
-
- if (operator !== 'in' && operator !== 'not in') {
- if (a && Array.isArray(a)) {
- a = a.length;
- }
-
- if (b && Array.isArray(b)) {
- b = b.length;
- }
- }
-
- switch (operator) {
- case ':':
- // Ignore
- break;
-
- case '?:':
- if (Twig.lib.boolval(a)) {
- stack.push(a);
- } else {
- stack.push(b);
- }
- break;
- case '?':
- if (a === undefined) {
- //An extended ternary.
- a = b;
- b = c;
- c = undefined;
- }
-
- if (Twig.lib.boolval(a)) {
- stack.push(b);
- } else {
- stack.push(c);
- }
- break;
-
- case '+':
- b = parseFloat(b);
- a = parseFloat(a);
- stack.push(a + b);
- break;
-
- case '-':
- b = parseFloat(b);
- a = parseFloat(a);
- stack.push(a - b);
- break;
-
- case '*':
- b = parseFloat(b);
- a = parseFloat(a);
- stack.push(a * b);
- break;
-
- case '/':
- b = parseFloat(b);
- a = parseFloat(a);
- stack.push(a / b);
- break;
-
- case '//':
- b = parseFloat(b);
- a = parseFloat(a);
- stack.push(Math.floor(a / b));
- break;
-
- case '%':
- b = parseFloat(b);
- a = parseFloat(a);
- stack.push(a % b);
- break;
-
- case '~':
- stack.push( (a != null ? a.toString() : "")
- + (b != null ? b.toString() : "") );
- break;
-
- case 'not':
- case '!':
- stack.push(!Twig.lib.boolval(b));
- break;
-
- case '<':
- stack.push(a < b);
- break;
-
- case '<=':
- stack.push(a <= b);
- break;
-
- case '>':
- stack.push(a > b);
- break;
-
- case '>=':
- stack.push(a >= b);
- break;
-
- case '===':
- stack.push(a === b);
- break;
-
- case '==':
- stack.push(a == b);
- break;
-
- case '!==':
- stack.push(a !== b);
- break;
-
- case '!=':
- stack.push(a != b);
- break;
-
- case 'or':
- stack.push(a || b);
- break;
-
- case 'and':
- stack.push(a && b);
- break;
-
- case '**':
- stack.push(Math.pow(a, b));
- break;
-
- case 'not in':
- stack.push( !containment(a, b) );
- break;
-
- case 'in':
- stack.push( containment(a, b) );
- break;
-
- case '..':
- stack.push( Twig.functions.range(a, b) );
- break;
-
- default:
- debugger;
- throw new Twig.Error("Failed to parse operator: " + operator + " is an unknown operator.");
- }
- };
-
- return Twig;
-
- };
-
-
-/***/ },
-/* 5 */
-/***/ function(module, exports) {
-
- // ## twig.filters.js
- //
- // This file handles parsing filters.
- module.exports = function (Twig) {
-
- // Determine object type
- function is(type, obj) {
- var clas = Object.prototype.toString.call(obj).slice(8, -1);
- return obj !== undefined && obj !== null && clas === type;
- }
-
- Twig.filters = {
- // String Filters
- upper: function(value) {
- if ( typeof value !== "string" ) {
- return value;
- }
-
- return value.toUpperCase();
- },
- lower: function(value) {
- if ( typeof value !== "string" ) {
- return value;
- }
-
- return value.toLowerCase();
- },
- capitalize: function(value) {
- if ( typeof value !== "string" ) {
- return value;
- }
-
- return value.substr(0, 1).toUpperCase() + value.toLowerCase().substr(1);
- },
- title: function(value) {
- if ( typeof value !== "string" ) {
- return value;
- }
-
- return value.toLowerCase().replace( /(^|\s)([a-z])/g , function(m, p1, p2){
- return p1 + p2.toUpperCase();
- });
- },
- length: function(value) {
- if (Twig.lib.is("Array", value) || typeof value === "string") {
- return value.length;
- } else if (Twig.lib.is("Object", value)) {
- if (value._keys === undefined) {
- return Object.keys(value).length;
- } else {
- return value._keys.length;
- }
- } else {
- return 0;
- }
- },
-
- // Array/Object Filters
- reverse: function(value) {
- if (is("Array", value)) {
- return value.reverse();
- } else if (is("String", value)) {
- return value.split("").reverse().join("");
- } else if (is("Object", value)) {
- var keys = value._keys || Object.keys(value).reverse();
- value._keys = keys;
- return value;
- }
- },
- sort: function(value) {
- if (is("Array", value)) {
- return value.sort();
- } else if (is('Object', value)) {
- // Sorting objects isn't obvious since the order of
- // returned keys isn't guaranteed in JavaScript.
- // Because of this we use a "hidden" key called _keys to
- // store the keys in the order we want to return them.
-
- delete value._keys;
- var keys = Object.keys(value),
- sorted_keys = keys.sort(function(a, b) {
- var a1, a2;
-
- // if a and b are comparable, we're fine :-)
- if((value[a] > value[b]) == !(value[a] <= value[b])) {
- return value[a] > value[b] ? 1 :
- value[a] < value[b] ? -1 :
- 0;
- }
- // if a and b can be parsed as numbers, we can compare
- // their numeric value
- else if(!isNaN(a1 = parseFloat(value[a])) &&
- !isNaN(b1 = parseFloat(value[b]))) {
- return a1 > b1 ? 1 :
- a1 < b1 ? -1 :
- 0;
- }
- // if one of the values is a string, we convert the
- // other value to string as well
- else if(typeof value[a] == 'string') {
- return value[a] > value[b].toString() ? 1 :
- value[a] < value[b].toString() ? -1 :
- 0;
- }
- else if(typeof value[b] == 'string') {
- return value[a].toString() > value[b] ? 1 :
- value[a].toString() < value[b] ? -1 :
- 0;
- }
- // everything failed - return 'null' as sign, that
- // the values are not comparable
- else {
- return null;
- }
- });
- value._keys = sorted_keys;
- return value;
- }
- },
- keys: function(value) {
- if (value === undefined || value === null){
- return;
- }
-
- var keyset = value._keys || Object.keys(value),
- output = [];
-
- Twig.forEach(keyset, function(key) {
- if (key === "_keys") return; // Ignore the _keys property
- if (value.hasOwnProperty(key)) {
- output.push(key);
- }
- });
- return output;
- },
- url_encode: function(value) {
- if (value === undefined || value === null){
- return;
- }
-
- var result = encodeURIComponent(value);
- result = result.replace("'", "%27");
- return result;
- },
- join: function(value, params) {
- if (value === undefined || value === null){
- return;
- }
-
- var join_str = "",
- output = [],
- keyset = null;
-
- if (params && params[0]) {
- join_str = params[0];
- }
- if (is("Array", value)) {
- output = value;
- } else {
- keyset = value._keys || Object.keys(value);
- Twig.forEach(keyset, function(key) {
- if (key === "_keys") return; // Ignore the _keys property
- if (value.hasOwnProperty(key)) {
- output.push(value[key]);
- }
- });
- }
- return output.join(join_str);
- },
- "default": function(value, params) {
- if (params !== undefined && params.length > 1) {
- throw new Twig.Error("default filter expects one argument");
- }
- if (value === undefined || value === null || value === '' ) {
- if (params === undefined) {
- return '';
- }
-
- return params[0];
- } else {
- return value;
- }
- },
- json_encode: function(value) {
- if(value === undefined || value === null) {
- return "null";
- }
- else if ((typeof value == 'object') && (is("Array", value))) {
- output = [];
-
- Twig.forEach(value, function(v) {
- output.push(Twig.filters.json_encode(v));
- });
-
- return "[" + output.join(",") + "]";
- }
- else if (typeof value == 'object') {
- var keyset = value._keys || Object.keys(value),
- output = [];
-
- Twig.forEach(keyset, function(key) {
- output.push(JSON.stringify(key) + ":" + Twig.filters.json_encode(value[key]));
- });
-
- return "{" + output.join(",") + "}";
- }
- else {
- return JSON.stringify(value);
- }
- },
- merge: function(value, params) {
- var obj = [],
- arr_index = 0,
- keyset = [];
-
- // Check to see if all the objects being merged are arrays
- if (!is("Array", value)) {
- // Create obj as an Object
- obj = { };
- } else {
- Twig.forEach(params, function(param) {
- if (!is("Array", param)) {
- obj = { };
- }
- });
- }
- if (!is("Array", obj)) {
- obj._keys = [];
- }
-
- if (is("Array", value)) {
- Twig.forEach(value, function(val) {
- if (obj._keys) obj._keys.push(arr_index);
- obj[arr_index] = val;
- arr_index++;
- });
- } else {
- keyset = value._keys || Object.keys(value);
- Twig.forEach(keyset, function(key) {
- obj[key] = value[key];
- obj._keys.push(key);
-
- // Handle edge case where a number index in an object is greater than
- // the array counter. In such a case, the array counter is increased
- // one past the index.
- //
- // Example {{ ["a", "b"]|merge({"4":"value"}, ["c", "d"])
- // Without this, d would have an index of "4" and overwrite the value
- // of "value"
- var int_key = parseInt(key, 10);
- if (!isNaN(int_key) && int_key >= arr_index) {
- arr_index = int_key + 1;
- }
- });
- }
-
- // mixin the merge arrays
- Twig.forEach(params, function(param) {
- if (is("Array", param)) {
- Twig.forEach(param, function(val) {
- if (obj._keys) obj._keys.push(arr_index);
- obj[arr_index] = val;
- arr_index++;
- });
- } else {
- keyset = param._keys || Object.keys(param);
- Twig.forEach(keyset, function(key) {
- if (!obj[key]) obj._keys.push(key);
- obj[key] = param[key];
-
- var int_key = parseInt(key, 10);
- if (!isNaN(int_key) && int_key >= arr_index) {
- arr_index = int_key + 1;
- }
- });
- }
- });
- if (params.length === 0) {
- throw new Twig.Error("Filter merge expects at least one parameter");
- }
-
- return obj;
- },
- date: function(value, params) {
- var date = Twig.functions.date(value);
- var format = params && params.length ? params[0] : 'F j, Y H:i';
- return Twig.lib.date(format, date);
- },
-
- date_modify: function(value, params) {
- if (value === undefined || value === null) {
- return;
- }
- if (params === undefined || params.length !== 1) {
- throw new Twig.Error("date_modify filter expects 1 argument");
- }
-
- var modifyText = params[0], time;
-
- if (Twig.lib.is("Date", value)) {
- time = Twig.lib.strtotime(modifyText, value.getTime() / 1000);
- }
- if (Twig.lib.is("String", value)) {
- time = Twig.lib.strtotime(modifyText, Twig.lib.strtotime(value));
- }
- if (Twig.lib.is("Number", value)) {
- time = Twig.lib.strtotime(modifyText, value);
- }
-
- return new Date(time * 1000);
- },
-
- replace: function(value, params) {
- if (value === undefined||value === null){
- return;
- }
-
- var pairs = params[0],
- tag;
- for (tag in pairs) {
- if (pairs.hasOwnProperty(tag) && tag !== "_keys") {
- value = Twig.lib.replaceAll(value, tag, pairs[tag]);
- }
- }
- return value;
- },
-
- format: function(value, params) {
- if (value === undefined || value === null){
- return;
- }
-
- return Twig.lib.vsprintf(value, params);
- },
-
- striptags: function(value) {
- if (value === undefined || value === null){
- return;
- }
-
- return Twig.lib.strip_tags(value);
- },
-
- escape: function(value, params) {
- if (value === undefined|| value === null){
- return;
- }
-
- var strategy = "html";
- if(params && params.length && params[0] !== true)
- strategy = params[0];
-
- if(strategy == "html") {
- var raw_value = value.toString().replace(/&/g, "&amp;")
- .replace(/</g, "&lt;")
- .replace(/>/g, "&gt;")
- .replace(/"/g, "&quot;")
- .replace(/'/g, "&#039;");
- return Twig.Markup(raw_value, 'html');
- } else if(strategy == "js") {
- var raw_value = value.toString();
- var result = "";
-
- for(var i = 0; i < raw_value.length; i++) {
- if(raw_value[i].match(/^[a-zA-Z0-9,\._]$/))
- result += raw_value[i];
- else {
- var char_code = raw_value.charCodeAt(i);
-
- if(char_code < 0x80)
- result += "\\x" + char_code.toString(16).toUpperCase();
- else
- result += Twig.lib.sprintf("\\u%04s", char_code.toString(16).toUpperCase());
- }
- }
-
- return Twig.Markup(result, 'js');
- } else if(strategy == "css") {
- var raw_value = value.toString();
- var result = "";
-
- for(var i = 0; i < raw_value.length; i++) {
- if(raw_value[i].match(/^[a-zA-Z0-9]$/))
- result += raw_value[i];
- else {
- var char_code = raw_value.charCodeAt(i);
- result += "\\" + char_code.toString(16).toUpperCase() + " ";
- }
- }
-
- return Twig.Markup(result, 'css');
- } else if(strategy == "url") {
- var result = Twig.filters.url_encode(value);
- return Twig.Markup(result, 'url');
- } else if(strategy == "html_attr") {
- var raw_value = value.toString();
- var result = "";
-
- for(var i = 0; i < raw_value.length; i++) {
- if(raw_value[i].match(/^[a-zA-Z0-9,\.\-_]$/))
- result += raw_value[i];
- else if(raw_value[i].match(/^[&<>"]$/))
- result += raw_value[i].replace(/&/g, "&amp;")
- .replace(/</g, "&lt;")
- .replace(/>/g, "&gt;")
- .replace(/"/g, "&quot;");
- else {
- var char_code = raw_value.charCodeAt(i);
-
- // The following replaces characters undefined in HTML with
- // the hex entity for the Unicode replacement character.
- if(char_code <= 0x1f && char_code != 0x09 && char_code != 0x0a && char_code != 0x0d)
- result += "&#xFFFD;";
- else if(char_code < 0x80)
- result += Twig.lib.sprintf("&#x%02s;", char_code.toString(16).toUpperCase());
- else
- result += Twig.lib.sprintf("&#x%04s;", char_code.toString(16).toUpperCase());
- }
- }
-
- return Twig.Markup(result, 'html_attr');
- } else {
- throw new Twig.Error("escape strategy unsupported");
- }
- },
-
- /* Alias of escape */
- "e": function(value, params) {
- return Twig.filters.escape(value, params);
- },
-
- nl2br: function(value) {
- if (value === undefined || value === null){
- return;
- }
- var linebreak_tag = "BACKSLASH_n_replace",
- br = "<br />" + linebreak_tag;
-
- value = Twig.filters.escape(value)
- .replace(/\r\n/g, br)
- .replace(/\r/g, br)
- .replace(/\n/g, br);
-
- value = Twig.lib.replaceAll(value, linebreak_tag, "\n");
-
- return Twig.Markup(value);
- },
-
- /**
- * Adapted from: http://phpjs.org/functions/number_format:481
- */
- number_format: function(value, params) {
- var number = value,
- decimals = (params && params[0]) ? params[0] : undefined,
- dec = (params && params[1] !== undefined) ? params[1] : ".",
- sep = (params && params[2] !== undefined) ? params[2] : ",";
-
- number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
- var n = !isFinite(+number) ? 0 : +number,
- prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
- s = '',
- toFixedFix = function (n, prec) {
- var k = Math.pow(10, prec);
- return '' + Math.round(n * k) / k;
- };
- // Fix for IE parseFloat(0.55).toFixed(0) = 0;
- s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
- if (s[0].length > 3) {
- s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
- }
- if ((s[1] || '').length < prec) {
- s[1] = s[1] || '';
- s[1] += new Array(prec - s[1].length + 1).join('0');
- }
- return s.join(dec);
- },
-
- trim: function(value, params) {
- if (value === undefined|| value === null){
- return;
- }
-
- var str = Twig.filters.escape( '' + value ),
- whitespace;
- if ( params && params[0] ) {
- whitespace = '' + params[0];
- } else {
- whitespace = ' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000';
- }
- for (var i = 0; i < str.length; i++) {
- if (whitespace.indexOf(str.charAt(i)) === -1) {
- str = str.substring(i);
- break;
- }
- }
- for (i = str.length - 1; i >= 0; i--) {
- if (whitespace.indexOf(str.charAt(i)) === -1) {
- str = str.substring(0, i + 1);
- break;
- }
- }
- return whitespace.indexOf(str.charAt(0)) === -1 ? str : '';
- },
-
- truncate: function (value, params) {
- var length = 30,
- preserve = false,
- separator = '...';
-
- value = value + '';
- if (params) {
- if (params[0]) {
- length = params[0];
- }
- if (params[1]) {
- preserve = params[1];
- }
- if (params[2]) {
- separator = params[2];
- }
- }
-
- if (value.length > length) {
-
- if (preserve) {
- length = value.indexOf(' ', length);
- if (length === -1) {
- return value;
- }
- }
-
- value = value.substr(0, length) + separator;
- }
-
- return value;
- },
-
- slice: function(value, params) {
- if (value === undefined || value === null) {
- return;
- }
- if (params === undefined || params.length < 1) {
- throw new Twig.Error("slice filter expects at least 1 argument");
- }
-
- // default to start of string
- var start = params[0] || 0;
- // default to length of string
- var length = params.length > 1 ? params[1] : value.length;
- // handle negative start values
- var startIndex = start >= 0 ? start : Math.max( value.length + start, 0 );
-
- if (Twig.lib.is("Array", value)) {
- var output = [];
- for (var i = startIndex; i < startIndex + length && i < value.length; i++) {
- output.push(value[i]);
- }
- return output;
- } else if (Twig.lib.is("String", value)) {
- return value.substr(startIndex, length);
- } else {
- throw new Twig.Error("slice filter expects value to be an array or string");
- }
- },
-
- abs: function(value) {
- if (value === undefined || value === null) {
- return;
- }
-
- return Math.abs(value);
- },
-
- first: function(value) {
- if (is("Array", value)) {
- return value[0];
- } else if (is("Object", value)) {
- if ('_keys' in value) {
- return value[value._keys[0]];
- }
- } else if ( typeof value === "string" ) {
- return value.substr(0, 1);
- }
-
- return;
- },
-
- split: function(value, params) {
- if (value === undefined || value === null) {
- return;
- }
- if (params === undefined || params.length < 1 || params.length > 2) {
- throw new Twig.Error("split filter expects 1 or 2 argument");
- }
- if (Twig.lib.is("String", value)) {
- var delimiter = params[0],
- limit = params[1],
- split = value.split(delimiter);
-
- if (limit === undefined) {
-
- return split;
-
- } else if (limit < 0) {
-
- return value.split(delimiter, split.length + limit);
-
- } else {
-
- var limitedSplit = [];
-
- if (delimiter == '') {
- // empty delimiter
- // "aabbcc"|split('', 2)
- // -> ['aa', 'bb', 'cc']
-
- while(split.length > 0) {
- var temp = "";
- for (var i=0; i<limit && split.length > 0; i++) {
- temp += split.shift();
- }
- limitedSplit.push(temp);
- }
-
- } else {
- // non-empty delimiter
- // "one,two,three,four,five"|split(',', 3)
- // -> ['one', 'two', 'three,four,five']
-
- for (var i=0; i<limit-1 && split.length > 0; i++) {
- limitedSplit.push(split.shift());
- }
-
- if (split.length > 0) {
- limitedSplit.push(split.join(delimiter));
- }
- }
-
- return limitedSplit;
- }
-
- } else {
- throw new Twig.Error("split filter expects value to be a string");
- }
- },
- last: function(value) {
- if (Twig.lib.is('Object', value)) {
- var keys;
-
- if (value._keys === undefined) {
- keys = Object.keys(value);
- } else {
- keys = value._keys;
- }
-
- return value[keys[keys.length - 1]];
- }
-
- // string|array
- return value[value.length - 1];
- },
- raw: function(value) {
- return Twig.Markup(value);
- },
- batch: function(items, params) {
- var size = params.shift(),
- fill = params.shift(),
- result,
- last,
- missing;
-
- if (!Twig.lib.is("Array", items)) {
- throw new Twig.Error("batch filter expects items to be an array");
- }
-
- if (!Twig.lib.is("Number", size)) {
- throw new Twig.Error("batch filter expects size to be a number");
- }
-
- size = Math.ceil(size);
-
- result = Twig.lib.chunkArray(items, size);
-
- if (fill && items.length % size != 0) {
- last = result.pop();
- missing = size - last.length;
-
- while (missing--) {
- last.push(fill);
- }
-
- result.push(last);
- }
-
- return result;
- },
- round: function(value, params) {
- params = params || [];
-
- var precision = params.length > 0 ? params[0] : 0,
- method = params.length > 1 ? params[1] : "common";
-
- value = parseFloat(value);
-
- if(precision && !Twig.lib.is("Number", precision)) {
- throw new Twig.Error("round filter expects precision to be a number");
- }
-
- if (method === "common") {
- return Twig.lib.round(value, precision);
- }
-
- if(!Twig.lib.is("Function", Math[method])) {
- throw new Twig.Error("round filter expects method to be 'floor', 'ceil', or 'common'");
- }
-
- return Math[method](value * Math.pow(10, precision)) / Math.pow(10, precision);
- }
- };
-
- Twig.filter = function(filter, value, params) {
- if (!Twig.filters[filter]) {
- throw "Unable to find filter " + filter;
- }
- return Twig.filters[filter].apply(this, [value, params]);
- };
-
- Twig.filter.extend = function(filter, definition) {
- Twig.filters[filter] = definition;
- };
-
- return Twig;
-
- };
-
-
-/***/ },
-/* 6 */
-/***/ function(module, exports) {
-
- // ## twig.functions.js
- //
- // This file handles parsing filters.
- module.exports = function (Twig) {
- /**
- * @constant
- * @type {string}
- */
- var TEMPLATE_NOT_FOUND_MESSAGE = 'Template "{name}" is not defined.';
-
- // Determine object type
- function is(type, obj) {
- var clas = Object.prototype.toString.call(obj).slice(8, -1);
- return obj !== undefined && obj !== null && clas === type;
- }
-
- Twig.functions = {
- // attribute, block, constant, date, dump, parent, random,.
-
- // Range function from http://phpjs.org/functions/range:499
- // Used under an MIT License
- range: function (low, high, step) {
- // http://kevin.vanzonneveld.net
- // + original by: Waldo Malqui Silva
- // * example 1: range ( 0, 12 );
- // * returns 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
- // * example 2: range( 0, 100, 10 );
- // * returns 2: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
- // * example 3: range( 'a', 'i' );
- // * returns 3: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
- // * example 4: range( 'c', 'a' );
- // * returns 4: ['c', 'b', 'a']
- var matrix = [];
- var inival, endval, plus;
- var walker = step || 1;
- var chars = false;
-
- if (!isNaN(low) && !isNaN(high)) {
- inival = parseInt(low, 10);
- endval = parseInt(high, 10);
- } else if (isNaN(low) && isNaN(high)) {
- chars = true;
- inival = low.charCodeAt(0);
- endval = high.charCodeAt(0);
- } else {
- inival = (isNaN(low) ? 0 : low);
- endval = (isNaN(high) ? 0 : high);
- }
-
- plus = ((inival > endval) ? false : true);
- if (plus) {
- while (inival <= endval) {
- matrix.push(((chars) ? String.fromCharCode(inival) : inival));
- inival += walker;
- }
- } else {
- while (inival >= endval) {
- matrix.push(((chars) ? String.fromCharCode(inival) : inival));
- inival -= walker;
- }
- }
-
- return matrix;
- },
- cycle: function(arr, i) {
- var pos = i % arr.length;
- return arr[pos];
- },
- dump: function() {
- var EOL = '\n',
- indentChar = ' ',
- indentTimes = 0,
- out = '',
- args = Array.prototype.slice.call(arguments),
- indent = function(times) {
- var ind = '';
- while (times > 0) {
- times--;
- ind += indentChar;
- }
- return ind;
- },
- displayVar = function(variable) {
- out += indent(indentTimes);
- if (typeof(variable) === 'object') {
- dumpVar(variable);
- } else if (typeof(variable) === 'function') {
- out += 'function()' + EOL;
- } else if (typeof(variable) === 'string') {
- out += 'string(' + variable.length + ') "' + variable + '"' + EOL;
- } else if (typeof(variable) === 'number') {
- out += 'number(' + variable + ')' + EOL;
- } else if (typeof(variable) === 'boolean') {
- out += 'bool(' + variable + ')' + EOL;
- }
- },
- dumpVar = function(variable) {
- var i;
- if (variable === null) {
- out += 'NULL' + EOL;
- } else if (variable === undefined) {
- out += 'undefined' + EOL;
- } else if (typeof variable === 'object') {
- out += indent(indentTimes) + typeof(variable);
- indentTimes++;
- out += '(' + (function(obj) {
- var size = 0, key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- size++;
- }
- }
- return size;
- })(variable) + ') {' + EOL;
- for (i in variable) {
- out += indent(indentTimes) + '[' + i + ']=> ' + EOL;
- displayVar(variable[i]);
- }
- indentTimes--;
- out += indent(indentTimes) + '}' + EOL;
- } else {
- displayVar(variable);
- }
- };
-
- // handle no argument case by dumping the entire render context
- if (args.length == 0) args.push(this.context);
-
- Twig.forEach(args, function(variable) {
- dumpVar(variable);
- });
-
- return out;
- },
- date: function(date, time) {
- var dateObj;
- if (date === undefined || date === null || date === "") {
- dateObj = new Date();
- } else if (Twig.lib.is("Date", date)) {
- dateObj = date;
- } else if (Twig.lib.is("String", date)) {
- if (date.match(/^[0-9]+$/)) {
- dateObj = new Date(date * 1000);
- }
- else {
- dateObj = new Date(Twig.lib.strtotime(date) * 1000);
- }
- } else if (Twig.lib.is("Number", date)) {
- // timestamp
- dateObj = new Date(date * 1000);
- } else {
- throw new Twig.Error("Unable to parse date " + date);
- }
- return dateObj;
- },
- block: function(block) {
- if (this.originalBlockTokens[block]) {
- return Twig.logic.parse.apply(this, [this.originalBlockTokens[block], this.context]).output;
- } else {
- return this.blocks[block];
- }
- },
- parent: function() {
- // Add a placeholder
- return Twig.placeholders.parent;
- },
- attribute: function(object, method, params) {
- if (Twig.lib.is('Object', object)) {
- if (object.hasOwnProperty(method)) {
- if (typeof object[method] === "function") {
- return object[method].apply(undefined, params);
- }
- else {
- return object[method];
- }
- }
- }
- // Array will return element 0-index
- return object[method] || undefined;
- },
- max: function(values) {
- if(Twig.lib.is("Object", values)) {
- delete values["_keys"];
- return Twig.lib.max(values);
- }
-
- return Twig.lib.max.apply(null, arguments);
- },
- min: function(values) {
- if(Twig.lib.is("Object", values)) {
- delete values["_keys"];
- return Twig.lib.min(values);
- }
-
- return Twig.lib.min.apply(null, arguments);
- },
- template_from_string: function(template) {
- if (template === undefined) {
- template = '';
- }
- return Twig.Templates.parsers.twig({
- options: this.options,
- data: template
- });
- },
- random: function(value) {
- var LIMIT_INT31 = 0x80000000;
-
- function getRandomNumber(n) {
- var random = Math.floor(Math.random() * LIMIT_INT31);
- var limits = [0, n];
- var min = Math.min.apply(null, limits),
- max = Math.max.apply(null, limits);
- return min + Math.floor((max - min + 1) * random / LIMIT_INT31);
- }
-
- if(Twig.lib.is("Number", value)) {
- return getRandomNumber(value);
- }
-
- if(Twig.lib.is("String", value)) {
- return value.charAt(getRandomNumber(value.length-1));
- }
-
- if(Twig.lib.is("Array", value)) {
- return value[getRandomNumber(value.length-1)];
- }
-
- if(Twig.lib.is("Object", value)) {
- var keys = Object.keys(value);
- return value[keys[getRandomNumber(keys.length-1)]];
- }
-
- return getRandomNumber(LIMIT_INT31-1);
- },
-
- /**
- * Returns the content of a template without rendering it
- * @param {string} name
- * @param {boolean} [ignore_missing=false]
- * @returns {string}
- */
- source: function(name, ignore_missing) {
- var templateSource;
- var templateFound = false;
- var isNodeEnvironment = typeof module !== 'undefined' && typeof module.exports !== 'undefined' && typeof window === 'undefined';
- var loader;
- var path;
-
- //if we are running in a node.js environment, set the loader to 'fs' and ensure the
- // path is relative to the CWD of the running script
- //else, set the loader to 'ajax' and set the path to the value of name
- if (isNodeEnvironment) {
- loader = 'fs';
- path = __dirname + '/' + name;
- } else {
- loader = 'ajax';
- path = name;
- }
-
- //build the params object
- var params = {
- id: name,
- path: path,
- method: loader,
- parser: 'source',
- async: false,
- fetchTemplateSource: true
- };
-
- //default ignore_missing to false
- if (typeof ignore_missing === 'undefined') {
- ignore_missing = false;
- }
-
- //try to load the remote template
- //
- //on exception, log it
- try {
- templateSource = Twig.Templates.loadRemote(name, params);
-
- //if the template is undefined or null, set the template to an empty string and do NOT flip the
- // boolean indicating we found the template
- //
- //else, all is good! flip the boolean indicating we found the template
- if (typeof templateSource === 'undefined' || templateSource === null) {
- templateSource = '';
- } else {
- templateFound = true;
- }
- } catch (e) {
- Twig.log.debug('Twig.functions.source: ', 'Problem loading template ', e);
- }
-
- //if the template was NOT found AND we are not ignoring missing templates, return the same message
- // that is returned by the PHP implementation of the twig source() function
- //
- //else, return the template source
- if (!templateFound && !ignore_missing) {
- return TEMPLATE_NOT_FOUND_MESSAGE.replace('{name}', name);
- } else {
- return templateSource;
- }
- }
- };
-
- Twig._function = function(_function, value, params) {
- if (!Twig.functions[_function]) {
- throw "Unable to find function " + _function;
- }
- return Twig.functions[_function](value, params);
- };
-
- Twig._function.extend = function(_function, definition) {
- Twig.functions[_function] = definition;
- };
-
- return Twig;
-
- };
-
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
- // ## twig.lib.js
- //
- // This file contains 3rd party libraries used within twig.
- //
- // Copies of the licenses for the code included here can be found in the
- // LICENSES.md file.
- //
-
- module.exports = function(Twig) {
-
- // Namespace for libraries
- Twig.lib = { };
-
- Twig.lib.sprintf = __webpack_require__(8);
- Twig.lib.vsprintf = __webpack_require__(9);
- Twig.lib.round = __webpack_require__(10);
- Twig.lib.max = __webpack_require__(11);
- Twig.lib.min = __webpack_require__(12);
- Twig.lib.strip_tags = __webpack_require__(13);
- Twig.lib.strtotime = __webpack_require__(14);
- Twig.lib.date = __webpack_require__(15);
- Twig.lib.boolval = __webpack_require__(16);
-
- Twig.lib.is = function(type, obj) {
- var clas = Object.prototype.toString.call(obj).slice(8, -1);
- return obj !== undefined && obj !== null && clas === type;
- };
-
- // shallow-copy an object
- Twig.lib.copy = function(src) {
- var target = {},
- key;
- for (key in src)
- target[key] = src[key];
-
- return target;
- };
-
- Twig.lib.extend = function (src, add) {
- var keys = Object.keys(add),
- i;
-
- i = keys.length;
-
- while (i--) {
- src[keys[i]] = add[keys[i]];
- }
-
- return src;
- };
-
- Twig.lib.replaceAll = function(string, search, replace) {
- return string.split(search).join(replace);
- };
-
- // chunk an array (arr) into arrays of (size) items, returns an array of arrays, or an empty array on invalid input
- Twig.lib.chunkArray = function (arr, size) {
- var returnVal = [],
- x = 0,
- len = arr.length;
-
- if (size < 1 || !Twig.lib.is("Array", arr)) {
- return [];
- }
-
- while (x < len) {
- returnVal.push(arr.slice(x, x += size));
- }
-
- return returnVal;
- };
-
- return Twig;
- };
-
-
-/***/ },
-/* 8 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- module.exports = function sprintf() {
- // discuss at: http://locutus.io/php/sprintf/
- // original by: Ash Searle (http://hexmen.com/blog/)
- // improved by: Michael White (http://getsprink.com)
- // improved by: Jack
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Dj
- // improved by: Allidylls
- // input by: Paulo Freitas
- // input by: Brett Zamir (http://brett-zamir.me)
- // example 1: sprintf("%01.2f", 123.1)
- // returns 1: '123.10'
- // example 2: sprintf("[%10s]", 'monkey')
- // returns 2: '[ monkey]'
- // example 3: sprintf("[%'#10s]", 'monkey')
- // returns 3: '[####monkey]'
- // example 4: sprintf("%d", 123456789012345)
- // returns 4: '123456789012345'
- // example 5: sprintf('%-03s', 'E')
- // returns 5: 'E00'
-
- var regex = /%%|%(\d+\$)?([\-+'#0 ]*)(\*\d+\$|\*|\d+)?(?:\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g;
- var a = arguments;
- var i = 0;
- var format = a[i++];
-
- var _pad = function _pad(str, len, chr, leftJustify) {
- if (!chr) {
- chr = ' ';
- }
- var padding = str.length >= len ? '' : new Array(1 + len - str.length >>> 0).join(chr);
- return leftJustify ? str + padding : padding + str;
- };
-
- var justify = function justify(value, prefix, leftJustify, minWidth, zeroPad, customPadChar) {
- var diff = minWidth - value.length;
- if (diff > 0) {
- if (leftJustify || !zeroPad) {
- value = _pad(value, minWidth, customPadChar, leftJustify);
- } else {
- value = [value.slice(0, prefix.length), _pad('', diff, '0', true), value.slice(prefix.length)].join('');
- }
- }
- return value;
- };
-
- var _formatBaseX = function _formatBaseX(value, base, prefix, leftJustify, minWidth, precision, zeroPad) {
- // Note: casts negative numbers to positive ones
- var number = value >>> 0;
- prefix = prefix && number && {
- '2': '0b',
- '8': '0',
- '16': '0x'
- }[base] || '';
- value = prefix + _pad(number.toString(base), precision || 0, '0', false);
- return justify(value, prefix, leftJustify, minWidth, zeroPad);
- };
-
- // _formatString()
- var _formatString = function _formatString(value, leftJustify, minWidth, precision, zeroPad, customPadChar) {
- if (precision !== null && precision !== undefined) {
- value = value.slice(0, precision);
- }
- return justify(value, '', leftJustify, minWidth, zeroPad, customPadChar);
- };
-
- // doFormat()
- var doFormat = function doFormat(substring, valueIndex, flags, minWidth, precision, type) {
- var number, prefix, method, textTransform, value;
-
- if (substring === '%%') {
- return '%';
- }
-
- // parse flags
- var leftJustify = false;
- var positivePrefix = '';
- var zeroPad = false;
- var prefixBaseX = false;
- var customPadChar = ' ';
- var flagsl = flags.length;
- var j;
- for (j = 0; j < flagsl; j++) {
- switch (flags.charAt(j)) {
- case ' ':
- positivePrefix = ' ';
- break;
- case '+':
- positivePrefix = '+';
- break;
- case '-':
- leftJustify = true;
- break;
- case "'":
- customPadChar = flags.charAt(j + 1);
- break;
- case '0':
- zeroPad = true;
- customPadChar = '0';
- break;
- case '#':
- prefixBaseX = true;
- break;
- }
- }
-
- // parameters may be null, undefined, empty-string or real valued
- // we want to ignore null, undefined and empty-string values
- if (!minWidth) {
- minWidth = 0;
- } else if (minWidth === '*') {
- minWidth = +a[i++];
- } else if (minWidth.charAt(0) === '*') {
- minWidth = +a[minWidth.slice(1, -1)];
- } else {
- minWidth = +minWidth;
- }
-
- // Note: undocumented perl feature:
- if (minWidth < 0) {
- minWidth = -minWidth;
- leftJustify = true;
- }
-
- if (!isFinite(minWidth)) {
- throw new Error('sprintf: (minimum-)width must be finite');
- }
-
- if (!precision) {
- precision = 'fFeE'.indexOf(type) > -1 ? 6 : type === 'd' ? 0 : undefined;
- } else if (precision === '*') {
- precision = +a[i++];
- } else if (precision.charAt(0) === '*') {
- precision = +a[precision.slice(1, -1)];
- } else {
- precision = +precision;
- }
-
- // grab value using valueIndex if required?
- value = valueIndex ? a[valueIndex.slice(0, -1)] : a[i++];
-
- switch (type) {
- case 's':
- return _formatString(value + '', leftJustify, minWidth, precision, zeroPad, customPadChar);
- case 'c':
- return _formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, zeroPad);
- case 'b':
- return _formatBaseX(value, 2, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
- case 'o':
- return _formatBaseX(value, 8, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
- case 'x':
- return _formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
- case 'X':
- return _formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad).toUpperCase();
- case 'u':
- return _formatBaseX(value, 10, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
- case 'i':
- case 'd':
- number = +value || 0;
- // Plain Math.round doesn't just truncate
- number = Math.round(number - number % 1);
- prefix = number < 0 ? '-' : positivePrefix;
- value = prefix + _pad(String(Math.abs(number)), precision, '0', false);
- return justify(value, prefix, leftJustify, minWidth, zeroPad);
- case 'e':
- case 'E':
- case 'f': // @todo: Should handle locales (as per setlocale)
- case 'F':
- case 'g':
- case 'G':
- number = +value;
- prefix = number < 0 ? '-' : positivePrefix;
- method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(type.toLowerCase())];
- textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(type) % 2];
- value = prefix + Math.abs(number)[method](precision);
- return justify(value, prefix, leftJustify, minWidth, zeroPad)[textTransform]();
- default:
- return substring;
- }
- };
-
- return format.replace(regex, doFormat);
- };
- //# sourceMappingURL=sprintf.js.map
-
-/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- module.exports = function vsprintf(format, args) {
- // discuss at: http://locutus.io/php/vsprintf/
- // original by: ejsanders
- // example 1: vsprintf('%04d-%02d-%02d', [1988, 8, 1])
- // returns 1: '1988-08-01'
-
- var sprintf = __webpack_require__(8);
-
- return sprintf.apply(this, [format].concat(args));
- };
- //# sourceMappingURL=vsprintf.js.map
-
-/***/ },
-/* 10 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- module.exports = function round(value, precision, mode) {
- // discuss at: http://locutus.io/php/round/
- // original by: Philip Peterson
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: T.Wild
- // revised by: Rafał Kukawski (http://blog.kukawski.pl)
- // input by: Greenseed
- // input by: meo
- // input by: William
- // input by: Josep Sanz (http://www.ws3.es/)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // note 1: Great work. Ideas for improvement:
- // note 1: - code more compliant with developer guidelines
- // note 1: - for implementing PHP constant arguments look at
- // note 1: the pathinfo() function, it offers the greatest
- // note 1: flexibility & compatibility possible
- // example 1: round(1241757, -3)
- // returns 1: 1242000
- // example 2: round(3.6)
- // returns 2: 4
- // example 3: round(2.835, 2)
- // returns 3: 2.84
- // example 4: round(1.1749999999999, 2)
- // returns 4: 1.17
- // example 5: round(58551.799999999996, 2)
- // returns 5: 58551.8
-
- var m, f, isHalf, sgn; // helper variables
- // making sure precision is integer
- precision |= 0;
- m = Math.pow(10, precision);
- value *= m;
- // sign of the number
- sgn = value > 0 | -(value < 0);
- isHalf = value % 1 === 0.5 * sgn;
- f = Math.floor(value);
-
- if (isHalf) {
- switch (mode) {
- case 'PHP_ROUND_HALF_DOWN':
- // rounds .5 toward zero
- value = f + (sgn < 0);
- break;
- case 'PHP_ROUND_HALF_EVEN':
- // rouds .5 towards the next even integer
- value = f + f % 2 * sgn;
- break;
- case 'PHP_ROUND_HALF_ODD':
- // rounds .5 towards the next odd integer
- value = f + !(f % 2);
- break;
- default:
- // rounds .5 away from zero
- value = f + (sgn > 0);
- }
- }
-
- return (isHalf ? value : Math.round(value)) / m;
- };
- //# sourceMappingURL=round.js.map
-
-/***/ },
-/* 11 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
-
- module.exports = function max() {
- // discuss at: http://locutus.io/php/max/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Jack
- // note 1: Long code cause we're aiming for maximum PHP compatibility
- // example 1: max(1, 3, 5, 6, 7)
- // returns 1: 7
- // example 2: max([2, 4, 5])
- // returns 2: 5
- // example 3: max(0, 'hello')
- // returns 3: 0
- // example 4: max('hello', 0)
- // returns 4: 'hello'
- // example 5: max(-1, 'hello')
- // returns 5: 'hello'
- // example 6: max([2, 4, 8], [2, 5, 7])
- // returns 6: [2, 5, 7]
-
- var ar;
- var retVal;
- var i = 0;
- var n = 0;
- var argv = arguments;
- var argc = argv.length;
- var _obj2Array = function _obj2Array(obj) {
- if (Object.prototype.toString.call(obj) === '[object Array]') {
- return obj;
- } else {
- var ar = [];
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- ar.push(obj[i]);
- }
- }
- return ar;
- }
- };
- var _compare = function _compare(current, next) {
- var i = 0;
- var n = 0;
- var tmp = 0;
- var nl = 0;
- var cl = 0;
-
- if (current === next) {
- return 0;
- } else if ((typeof current === 'undefined' ? 'undefined' : _typeof(current)) === 'object') {
- if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- current = _obj2Array(current);
- next = _obj2Array(next);
- cl = current.length;
- nl = next.length;
- if (nl > cl) {
- return 1;
- } else if (nl < cl) {
- return -1;
- }
- for (i = 0, n = cl; i < n; ++i) {
- tmp = _compare(current[i], next[i]);
- if (tmp === 1) {
- return 1;
- } else if (tmp === -1) {
- return -1;
- }
- }
- return 0;
- }
- return -1;
- } else if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- return 1;
- } else if (isNaN(next) && !isNaN(current)) {
- if (current === 0) {
- return 0;
- }
- return current < 0 ? 1 : -1;
- } else if (isNaN(current) && !isNaN(next)) {
- if (next === 0) {
- return 0;
- }
- return next > 0 ? 1 : -1;
- }
-
- if (next === current) {
- return 0;
- }
-
- return next > current ? 1 : -1;
- };
-
- if (argc === 0) {
- throw new Error('At least one value should be passed to max()');
- } else if (argc === 1) {
- if (_typeof(argv[0]) === 'object') {
- ar = _obj2Array(argv[0]);
- } else {
- throw new Error('Wrong parameter count for max()');
- }
- if (ar.length === 0) {
- throw new Error('Array must contain at least one element for max()');
- }
- } else {
- ar = argv;
- }
-
- retVal = ar[0];
- for (i = 1, n = ar.length; i < n; ++i) {
- if (_compare(retVal, ar[i]) === 1) {
- retVal = ar[i];
- }
- }
-
- return retVal;
- };
- //# sourceMappingURL=max.js.map
-
-/***/ },
-/* 12 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
-
- module.exports = function min() {
- // discuss at: http://locutus.io/php/min/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // revised by: Onno Marsman (https://twitter.com/onnomarsman)
- // improved by: Jack
- // note 1: Long code cause we're aiming for maximum PHP compatibility
- // example 1: min(1, 3, 5, 6, 7)
- // returns 1: 1
- // example 2: min([2, 4, 5])
- // returns 2: 2
- // example 3: min(0, 'hello')
- // returns 3: 0
- // example 4: min('hello', 0)
- // returns 4: 'hello'
- // example 5: min(-1, 'hello')
- // returns 5: -1
- // example 6: min([2, 4, 8], [2, 5, 7])
- // returns 6: [2, 4, 8]
-
- var ar;
- var retVal;
- var i = 0;
- var n = 0;
- var argv = arguments;
- var argc = argv.length;
- var _obj2Array = function _obj2Array(obj) {
- if (Object.prototype.toString.call(obj) === '[object Array]') {
- return obj;
- }
- var ar = [];
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- ar.push(obj[i]);
- }
- }
- return ar;
- };
-
- var _compare = function _compare(current, next) {
- var i = 0;
- var n = 0;
- var tmp = 0;
- var nl = 0;
- var cl = 0;
-
- if (current === next) {
- return 0;
- } else if ((typeof current === 'undefined' ? 'undefined' : _typeof(current)) === 'object') {
- if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- current = _obj2Array(current);
- next = _obj2Array(next);
- cl = current.length;
- nl = next.length;
- if (nl > cl) {
- return 1;
- } else if (nl < cl) {
- return -1;
- }
- for (i = 0, n = cl; i < n; ++i) {
- tmp = _compare(current[i], next[i]);
- if (tmp === 1) {
- return 1;
- } else if (tmp === -1) {
- return -1;
- }
- }
- return 0;
- }
- return -1;
- } else if ((typeof next === 'undefined' ? 'undefined' : _typeof(next)) === 'object') {
- return 1;
- } else if (isNaN(next) && !isNaN(current)) {
- if (current === 0) {
- return 0;
- }
- return current < 0 ? 1 : -1;
- } else if (isNaN(current) && !isNaN(next)) {
- if (next === 0) {
- return 0;
- }
- return next > 0 ? 1 : -1;
- }
-
- if (next === current) {
- return 0;
- }
-
- return next > current ? 1 : -1;
- };
-
- if (argc === 0) {
- throw new Error('At least one value should be passed to min()');
- } else if (argc === 1) {
- if (_typeof(argv[0]) === 'object') {
- ar = _obj2Array(argv[0]);
- } else {
- throw new Error('Wrong parameter count for min()');
- }
-
- if (ar.length === 0) {
- throw new Error('Array must contain at least one element for min()');
- }
- } else {
- ar = argv;
- }
-
- retVal = ar[0];
-
- for (i = 1, n = ar.length; i < n; ++i) {
- if (_compare(retVal, ar[i]) === -1) {
- retVal = ar[i];
- }
- }
-
- return retVal;
- };
- //# sourceMappingURL=min.js.map
-
-/***/ },
-/* 13 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- module.exports = function strip_tags(input, allowed) {
- // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/strip_tags/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Luke Godfrey
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // input by: Pul
- // input by: Alex
- // input by: Marc Palau
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: Bobby Drake
- // input by: Evertjan Garretsen
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Eric Nagel
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Tomasz Wesolowski
- // revised by: Rafał Kukawski (http://blog.kukawski.pl)
- // example 1: strip_tags('<p>Kevin</p> <br /><b>van</b> <i>Zonneveld</i>', '<i><b>')
- // returns 1: 'Kevin <b>van</b> <i>Zonneveld</i>'
- // example 2: strip_tags('<p>Kevin <img src="someimage.png" onmouseover="someFunction()">van <i>Zonneveld</i></p>', '<p>')
- // returns 2: '<p>Kevin van Zonneveld</p>'
- // example 3: strip_tags("<a href='http://kvz.io'>Kevin van Zonneveld</a>", "<a>")
- // returns 3: "<a href='http://kvz.io'>Kevin van Zonneveld</a>"
- // example 4: strip_tags('1 < 5 5 > 1')
- // returns 4: '1 < 5 5 > 1'
- // example 5: strip_tags('1 <br/> 1')
- // returns 5: '1 1'
- // example 6: strip_tags('1 <br/> 1', '<br>')
- // returns 6: '1 <br/> 1'
- // example 7: strip_tags('1 <br/> 1', '<br><br/>')
- // returns 7: '1 <br/> 1'
-
- // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
- allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('');
-
- var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;
- var commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
-
- return input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {
- return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
- });
- };
- //# sourceMappingURL=strip_tags.js.map
-
-/***/ },
-/* 14 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- module.exports = function strtotime(text, now) {
- // discuss at: http://locutus.io/php/strtotime/
- // original by: Caio Ariede (http://caioariede.com)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: Caio Ariede (http://caioariede.com)
- // improved by: A. Matías Quezada (http://amatiasq.com)
- // improved by: preuter
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Mirko Faber
- // input by: David
- // bugfixed by: Wagner B. Soares
- // bugfixed by: Artur Tchernychev
- // bugfixed by: Stephan Bösch-Plepelits (http://github.com/plepe)
- // note 1: Examples all have a fixed timestamp to prevent
- // note 1: tests to fail because of variable time(zones)
- // example 1: strtotime('+1 day', 1129633200)
- // returns 1: 1129719600
- // example 2: strtotime('+1 week 2 days 4 hours 2 seconds', 1129633200)
- // returns 2: 1130425202
- // example 3: strtotime('last month', 1129633200)
- // returns 3: 1127041200
- // example 4: strtotime('2009-05-04 08:30:00 GMT')
- // returns 4: 1241425800
- // example 5: strtotime('2009-05-04 08:30:00+00')
- // returns 5: 1241425800
- // example 6: strtotime('2009-05-04 08:30:00+02:00')
- // returns 6: 1241418600
- // example 7: strtotime('2009-05-04T08:30:00Z')
- // returns 7: 1241425800
-
- var parsed;
- var match;
- var today;
- var year;
- var date;
- var days;
- var ranges;
- var len;
- var times;
- var regex;
- var i;
- var fail = false;
-
- if (!text) {
- return fail;
- }
-
- // Unecessary spaces
- text = text.replace(/^\s+|\s+$/g, '').replace(/\s{2,}/g, ' ').replace(/[\t\r\n]/g, '').toLowerCase();
-
- // in contrast to php, js Date.parse function interprets:
- // dates given as yyyy-mm-dd as in timezone: UTC,
- // dates with "." or "-" as MDY instead of DMY
- // dates with two-digit years differently
- // etc...etc...
- // ...therefore we manually parse lots of common date formats
- var pattern = new RegExp(['^(\\d{1,4})', '([\\-\\.\\/:])', '(\\d{1,2})', '([\\-\\.\\/:])', '(\\d{1,4})', '(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?', '(?:\\s([A-Z]+)?)?$'].join(''));
- match = text.match(pattern);
-
- if (match && match[2] === match[4]) {
- if (match[1] > 1901) {
- switch (match[2]) {
- case '-':
- // YYYY-M-D
- if (match[3] > 12 || match[5] > 31) {
- return fail;
- }
-
- return new Date(match[1], parseInt(match[3], 10) - 1, match[5], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '.':
- // YYYY.M.D is not parsed by strtotime()
- return fail;
- case '/':
- // YYYY/M/D
- if (match[3] > 12 || match[5] > 31) {
- return fail;
- }
-
- return new Date(match[1], parseInt(match[3], 10) - 1, match[5], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- }
- } else if (match[5] > 1901) {
- switch (match[2]) {
- case '-':
- // D-M-YYYY
- if (match[3] > 12 || match[1] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[3], 10) - 1, match[1], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '.':
- // D.M.YYYY
- if (match[3] > 12 || match[1] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[3], 10) - 1, match[1], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '/':
- // M/D/YYYY
- if (match[1] > 12 || match[3] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[1], 10) - 1, match[3], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- }
- } else {
- switch (match[2]) {
- case '-':
- // YY-M-D
- if (match[3] > 12 || match[5] > 31 || match[1] < 70 && match[1] > 38) {
- return fail;
- }
-
- year = match[1] >= 0 && match[1] <= 38 ? +match[1] + 2000 : match[1];
- return new Date(year, parseInt(match[3], 10) - 1, match[5], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case '.':
- // D.M.YY or H.MM.SS
- if (match[5] >= 70) {
- // D.M.YY
- if (match[3] > 12 || match[1] > 31) {
- return fail;
- }
-
- return new Date(match[5], parseInt(match[3], 10) - 1, match[1], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- }
- if (match[5] < 60 && !match[6]) {
- // H.MM.SS
- if (match[1] > 23 || match[3] > 59) {
- return fail;
- }
-
- today = new Date();
- return new Date(today.getFullYear(), today.getMonth(), today.getDate(), match[1] || 0, match[3] || 0, match[5] || 0, match[9] || 0) / 1000;
- }
-
- // invalid format, cannot be parsed
- return fail;
- case '/':
- // M/D/YY
- if (match[1] > 12 || match[3] > 31 || match[5] < 70 && match[5] > 38) {
- return fail;
- }
-
- year = match[5] >= 0 && match[5] <= 38 ? +match[5] + 2000 : match[5];
- return new Date(year, parseInt(match[1], 10) - 1, match[3], match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) / 1000;
- case ':':
- // HH:MM:SS
- if (match[1] > 23 || match[3] > 59 || match[5] > 59) {
- return fail;
- }
-
- today = new Date();
- return new Date(today.getFullYear(), today.getMonth(), today.getDate(), match[1] || 0, match[3] || 0, match[5] || 0) / 1000;
- }
- }
- }
-
- // other formats and "now" should be parsed by Date.parse()
- if (text === 'now') {
- return now === null || isNaN(now) ? new Date().getTime() / 1000 | 0 : now | 0;
- }
- if (!isNaN(parsed = Date.parse(text))) {
- return parsed / 1000 | 0;
- }
- // Browsers !== Chrome have problems parsing ISO 8601 date strings, as they do
- // not accept lower case characters, space, or shortened time zones.
- // Therefore, fix these problems and try again.
- // Examples:
- // 2015-04-15 20:33:59+02
- // 2015-04-15 20:33:59z
- // 2015-04-15t20:33:59+02:00
- pattern = new RegExp(['^([0-9]{4}-[0-9]{2}-[0-9]{2})', '[ t]', '([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)', '([\\+-][0-9]{2}(:[0-9]{2})?|z)'].join(''));
- match = text.match(pattern);
- if (match) {
- // @todo: time zone information
- if (match[4] === 'z') {
- match[4] = 'Z';
- } else if (match[4].match(/^([\+-][0-9]{2})$/)) {
- match[4] = match[4] + ':00';
- }
-
- if (!isNaN(parsed = Date.parse(match[1] + 'T' + match[2] + match[4]))) {
- return parsed / 1000 | 0;
- }
- }
-
- date = now ? new Date(now * 1000) : new Date();
- days = {
- 'sun': 0,
- 'mon': 1,
- 'tue': 2,
- 'wed': 3,
- 'thu': 4,
- 'fri': 5,
- 'sat': 6
- };
- ranges = {
- 'yea': 'FullYear',
- 'mon': 'Month',
- 'day': 'Date',
- 'hou': 'Hours',
- 'min': 'Minutes',
- 'sec': 'Seconds'
- };
-
- function lastNext(type, range, modifier) {
- var diff;
- var day = days[range];
-
- if (typeof day !== 'undefined') {
- diff = day - date.getDay();
-
- if (diff === 0) {
- diff = 7 * modifier;
- } else if (diff > 0 && type === 'last') {
- diff -= 7;
- } else if (diff < 0 && type === 'next') {
- diff += 7;
- }
-
- date.setDate(date.getDate() + diff);
- }
- }
-
- function process(val) {
- // @todo: Reconcile this with regex using \s, taking into account
- // browser issues with split and regexes
- var splt = val.split(' ');
- var type = splt[0];
- var range = splt[1].substring(0, 3);
- var typeIsNumber = /\d+/.test(type);
- var ago = splt[2] === 'ago';
- var num = (type === 'last' ? -1 : 1) * (ago ? -1 : 1);
-
- if (typeIsNumber) {
- num *= parseInt(type, 10);
- }
-
- if (ranges.hasOwnProperty(range) && !splt[1].match(/^mon(day|\.)?$/i)) {
- return date['set' + ranges[range]](date['get' + ranges[range]]() + num);
- }
-
- if (range === 'wee') {
- return date.setDate(date.getDate() + num * 7);
- }
-
- if (type === 'next' || type === 'last') {
- lastNext(type, range, num);
- } else if (!typeIsNumber) {
- return false;
- }
-
- return true;
- }
-
- times = '(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec' + '|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?' + '|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)';
- regex = '([+-]?\\d+\\s' + times + '|' + '(last|next)\\s' + times + ')(\\sago)?';
-
- match = text.match(new RegExp(regex, 'gi'));
- if (!match) {
- return fail;
- }
-
- for (i = 0, len = match.length; i < len; i++) {
- if (!process(match[i])) {
- return fail;
- }
- }
-
- return date.getTime() / 1000;
- };
- //# sourceMappingURL=strtotime.js.map
-
-/***/ },
-/* 15 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- module.exports = function date(format, timestamp) {
- // discuss at: http://locutus.io/php/date/
- // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
- // original by: gettimeofday
- // parts by: Peter-Paul Koch (http://www.quirksmode.org/js/beat.html)
- // improved by: Kevin van Zonneveld (http://kvz.io)
- // improved by: MeEtc (http://yass.meetcweb.com)
- // improved by: Brad Touesnard
- // improved by: Tim Wiel
- // improved by: Bryan Elliott
- // improved by: David Randall
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Brett Zamir (http://brett-zamir.me)
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Thomas Beaucourt (http://www.webapp.fr)
- // improved by: JT
- // improved by: Theriault (https://github.com/Theriault)
- // improved by: Rafał Kukawski (http://blog.kukawski.pl)
- // improved by: Theriault (https://github.com/Theriault)
- // input by: Brett Zamir (http://brett-zamir.me)
- // input by: majak
- // input by: Alex
- // input by: Martin
- // input by: Alex Wilson
- // input by: Haravikk
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: majak
- // bugfixed by: Kevin van Zonneveld (http://kvz.io)
- // bugfixed by: Brett Zamir (http://brett-zamir.me)
- // bugfixed by: omid (http://locutus.io/php/380:380#comment_137122)
- // bugfixed by: Chris (http://www.devotis.nl/)
- // note 1: Uses global: locutus to store the default timezone
- // note 1: Although the function potentially allows timezone info
- // note 1: (see notes), it currently does not set
- // note 1: per a timezone specified by date_default_timezone_set(). Implementers might use
- // note 1: $locutus.currentTimezoneOffset and
- // note 1: $locutus.currentTimezoneDST set by that function
- // note 1: in order to adjust the dates in this function
- // note 1: (or our other date functions!) accordingly
- // example 1: date('H:m:s \\m \\i\\s \\m\\o\\n\\t\\h', 1062402400)
- // returns 1: '07:09:40 m is month'
- // example 2: date('F j, Y, g:i a', 1062462400)
- // returns 2: 'September 2, 2003, 12:26 am'
- // example 3: date('Y W o', 1062462400)
- // returns 3: '2003 36 2003'
- // example 4: var $x = date('Y m d', (new Date()).getTime() / 1000)
- // example 4: $x = $x + ''
- // example 4: var $result = $x.length // 2009 01 09
- // returns 4: 10
- // example 5: date('W', 1104534000)
- // returns 5: '52'
- // example 6: date('B t', 1104534000)
- // returns 6: '999 31'
- // example 7: date('W U', 1293750000.82); // 2010-12-31
- // returns 7: '52 1293750000'
- // example 8: date('W', 1293836400); // 2011-01-01
- // returns 8: '52'
- // example 9: date('W Y-m-d', 1293974054); // 2011-01-02
- // returns 9: '52 2011-01-02'
- // test: skip-1 skip-2 skip-5
-
- var jsdate, f;
- // Keep this here (works, but for code commented-out below for file size reasons)
- // var tal= [];
- var txtWords = ['Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
- // trailing backslash -> (dropped)
- // a backslash followed by any character (including backslash) -> the character
- // empty string -> empty string
- var formatChr = /\\?(.?)/gi;
- var formatChrCb = function formatChrCb(t, s) {
- return f[t] ? f[t]() : s;
- };
- var _pad = function _pad(n, c) {
- n = String(n);
- while (n.length < c) {
- n = '0' + n;
- }
- return n;
- };
- f = {
- // Day
- d: function d() {
- // Day of month w/leading 0; 01..31
- return _pad(f.j(), 2);
- },
- D: function D() {
- // Shorthand day name; Mon...Sun
- return f.l().slice(0, 3);
- },
- j: function j() {
- // Day of month; 1..31
- return jsdate.getDate();
- },
- l: function l() {
- // Full day name; Monday...Sunday
- return txtWords[f.w()] + 'day';
- },
- N: function N() {
- // ISO-8601 day of week; 1[Mon]..7[Sun]
- return f.w() || 7;
- },
- S: function S() {
- // Ordinal suffix for day of month; st, nd, rd, th
- var j = f.j();
- var i = j % 10;
- if (i <= 3 && parseInt(j % 100 / 10, 10) === 1) {
- i = 0;
- }
- return ['st', 'nd', 'rd'][i - 1] || 'th';
- },
- w: function w() {
- // Day of week; 0[Sun]..6[Sat]
- return jsdate.getDay();
- },
- z: function z() {
- // Day of year; 0..365
- var a = new Date(f.Y(), f.n() - 1, f.j());
- var b = new Date(f.Y(), 0, 1);
- return Math.round((a - b) / 864e5);
- },
-
- // Week
- W: function W() {
- // ISO-8601 week number
- var a = new Date(f.Y(), f.n() - 1, f.j() - f.N() + 3);
- var b = new Date(a.getFullYear(), 0, 4);
- return _pad(1 + Math.round((a - b) / 864e5 / 7), 2);
- },
-
- // Month
- F: function F() {
- // Full month name; January...December
- return txtWords[6 + f.n()];
- },
- m: function m() {
- // Month w/leading 0; 01...12
- return _pad(f.n(), 2);
- },
- M: function M() {
- // Shorthand month name; Jan...Dec
- return f.F().slice(0, 3);
- },
- n: function n() {
- // Month; 1...12
- return jsdate.getMonth() + 1;
- },
- t: function t() {
- // Days in month; 28...31
- return new Date(f.Y(), f.n(), 0).getDate();
- },
-
- // Year
- L: function L() {
- // Is leap year?; 0 or 1
- var j = f.Y();
- return j % 4 === 0 & j % 100 !== 0 | j % 400 === 0;
- },
- o: function o() {
- // ISO-8601 year
- var n = f.n();
- var W = f.W();
- var Y = f.Y();
- return Y + (n === 12 && W < 9 ? 1 : n === 1 && W > 9 ? -1 : 0);
- },
- Y: function Y() {
- // Full year; e.g. 1980...2010
- return jsdate.getFullYear();
- },
- y: function y() {
- // Last two digits of year; 00...99
- return f.Y().toString().slice(-2);
- },
-
- // Time
- a: function a() {
- // am or pm
- return jsdate.getHours() > 11 ? 'pm' : 'am';
- },
- A: function A() {
- // AM or PM
- return f.a().toUpperCase();
- },
- B: function B() {
- // Swatch Internet time; 000..999
- var H = jsdate.getUTCHours() * 36e2;
- // Hours
- var i = jsdate.getUTCMinutes() * 60;
- // Minutes
- // Seconds
- var s = jsdate.getUTCSeconds();
- return _pad(Math.floor((H + i + s + 36e2) / 86.4) % 1e3, 3);
- },
- g: function g() {
- // 12-Hours; 1..12
- return f.G() % 12 || 12;
- },
- G: function G() {
- // 24-Hours; 0..23
- return jsdate.getHours();
- },
- h: function h() {
- // 12-Hours w/leading 0; 01..12
- return _pad(f.g(), 2);
- },
- H: function H() {
- // 24-Hours w/leading 0; 00..23
- return _pad(f.G(), 2);
- },
- i: function i() {
- // Minutes w/leading 0; 00..59
- return _pad(jsdate.getMinutes(), 2);
- },
- s: function s() {
- // Seconds w/leading 0; 00..59
- return _pad(jsdate.getSeconds(), 2);
- },
- u: function u() {
- // Microseconds; 000000-999000
- return _pad(jsdate.getMilliseconds() * 1000, 6);
- },
-
- // Timezone
- e: function e() {
- // Timezone identifier; e.g. Atlantic/Azores, ...
- // The following works, but requires inclusion of the very large
- // timezone_abbreviations_list() function.
- /* return that.date_default_timezone_get();
- */
- var msg = 'Not supported (see source code of date() for timezone on how to add support)';
- throw new Error(msg);
- },
- I: function I() {
- // DST observed?; 0 or 1
- // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.
- // If they are not equal, then DST is observed.
- var a = new Date(f.Y(), 0);
- // Jan 1
- var c = Date.UTC(f.Y(), 0);
- // Jan 1 UTC
- var b = new Date(f.Y(), 6);
- // Jul 1
- // Jul 1 UTC
- var d = Date.UTC(f.Y(), 6);
- return a - c !== b - d ? 1 : 0;
- },
- O: function O() {
- // Difference to GMT in hour format; e.g. +0200
- var tzo = jsdate.getTimezoneOffset();
- var a = Math.abs(tzo);
- return (tzo > 0 ? '-' : '+') + _pad(Math.floor(a / 60) * 100 + a % 60, 4);
- },
- P: function P() {
- // Difference to GMT w/colon; e.g. +02:00
- var O = f.O();
- return O.substr(0, 3) + ':' + O.substr(3, 2);
- },
- T: function T() {
- // The following works, but requires inclusion of the very
- // large timezone_abbreviations_list() function.
- /* var abbr, i, os, _default;
- if (!tal.length) {
- tal = that.timezone_abbreviations_list();
- }
- if ($locutus && $locutus.default_timezone) {
- _default = $locutus.default_timezone;
- for (abbr in tal) {
- for (i = 0; i < tal[abbr].length; i++) {
- if (tal[abbr][i].timezone_id === _default) {
- return abbr.toUpperCase();
- }
- }
- }
- }
- for (abbr in tal) {
- for (i = 0; i < tal[abbr].length; i++) {
- os = -jsdate.getTimezoneOffset() * 60;
- if (tal[abbr][i].offset === os) {
- return abbr.toUpperCase();
- }
- }
- }
- */
- return 'UTC';
- },
- Z: function Z() {
- // Timezone offset in seconds (-43200...50400)
- return -jsdate.getTimezoneOffset() * 60;
- },
-
- // Full Date/Time
- c: function c() {
- // ISO-8601 date.
- return 'Y-m-d\\TH:i:sP'.replace(formatChr, formatChrCb);
- },
- r: function r() {
- // RFC 2822
- return 'D, d M Y H:i:s O'.replace(formatChr, formatChrCb);
- },
- U: function U() {
- // Seconds since UNIX epoch
- return jsdate / 1000 | 0;
- }
- };
-
- var _date = function _date(format, timestamp) {
- jsdate = timestamp === undefined ? new Date() // Not provided
- : timestamp instanceof Date ? new Date(timestamp) // JS Date()
- : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
- ;
- return format.replace(formatChr, formatChrCb);
- };
-
- return _date(format, timestamp);
- };
- //# sourceMappingURL=date.js.map
-
-/***/ },
-/* 16 */
-/***/ function(module, exports) {
-
- 'use strict';
-
- module.exports = function boolval(mixedVar) {
- // original by: Will Rowe
- // example 1: boolval(true)
- // returns 1: true
- // example 2: boolval(false)
- // returns 2: false
- // example 3: boolval(0)
- // returns 3: false
- // example 4: boolval(0.0)
- // returns 4: false
- // example 5: boolval('')
- // returns 5: false
- // example 6: boolval('0')
- // returns 6: false
- // example 7: boolval([])
- // returns 7: false
- // example 8: boolval('')
- // returns 8: false
- // example 9: boolval(null)
- // returns 9: false
- // example 10: boolval(undefined)
- // returns 10: false
- // example 11: boolval('true')
- // returns 11: true
-
- if (mixedVar === false) {
- return false;
- }
-
- if (mixedVar === 0 || mixedVar === 0.0) {
- return false;
- }
-
- if (mixedVar === '' || mixedVar === '0') {
- return false;
- }
-
- if (Array.isArray(mixedVar) && mixedVar.length === 0) {
- return false;
- }
-
- if (mixedVar === null || mixedVar === undefined) {
- return false;
- }
-
- return true;
- };
- //# sourceMappingURL=boolval.js.map
-
-/***/ },
-/* 17 */
-/***/ function(module, exports) {
-
- module.exports = function(Twig) {
- 'use strict';
-
- Twig.Templates.registerLoader('ajax', function(location, params, callback, error_callback) {
- var template,
- xmlhttp,
- precompiled = params.precompiled,
- parser = this.parsers[params.parser] || this.parser.twig;
-
- if (typeof XMLHttpRequest === "undefined") {
- throw new Twig.Error('Unsupported platform: Unable to do ajax requests ' +
- 'because there is no "XMLHTTPRequest" implementation');
- }
-
- xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function() {
- var data = null;
-
- if(xmlhttp.readyState === 4) {
- if (xmlhttp.status === 200 || (window.cordova && xmlhttp.status == 0)) {
- Twig.log.debug("Got template ", xmlhttp.responseText);
-
- if (precompiled === true) {
- data = JSON.parse(xmlhttp.responseText);
- } else {
- data = xmlhttp.responseText;
- }
-
- params.url = location;
- params.data = data;
-
- template = parser.call(this, params);
-
- if (typeof callback === 'function') {
- callback(template);
- }
- } else {
- if (typeof error_callback === 'function') {
- error_callback(xmlhttp);
- }
- }
- }
- };
- xmlhttp.open("GET", location, !!params.async);
- xmlhttp.send();
-
- if (params.async) {
- // TODO: return deferred promise
- return true;
- } else {
- return template;
- }
- });
-
- };
-
-
-/***/ },
-/* 18 */
-/***/ function(module, exports, __webpack_require__) {
-
- module.exports = function(Twig) {
- 'use strict';
-
- var fs, path;
-
- try {
- // require lib dependencies at runtime
- fs = __webpack_require__(19);
- path = __webpack_require__(20);
- } catch (e) {
- // NOTE: this is in a try/catch to avoid errors cross platform
- }
-
- Twig.Templates.registerLoader('fs', function(location, params, callback, error_callback) {
- var template,
- data = null,
- precompiled = params.precompiled,
- parser = this.parsers[params.parser] || this.parser.twig;
-
- if (!fs || !path) {
- throw new Twig.Error('Unsupported platform: Unable to load from file ' +
- 'because there is no "fs" or "path" implementation');
- }
-
- var loadTemplateFn = function(err, data) {
- if (err) {
- if (typeof error_callback === 'function') {
- error_callback(err);
- }
- return;
- }
-
- if (precompiled === true) {
- data = JSON.parse(data);
- }
-
- params.data = data;
- params.path = params.path || location;
-
- // template is in data
- template = parser.call(this, params);
-
- if (typeof callback === 'function') {
- callback(template);
- }
- };
- params.path = params.path || location;
-
- if (params.async) {
- fs.stat(params.path, function (err, stats) {
- if (err || !stats.isFile()) {
- if (typeof error_callback === 'function') {
- error_callback(new Twig.Error('Unable to find template file ' + params.path));
- }
- return;
- }
- fs.readFile(params.path, 'utf8', loadTemplateFn);
- });
- // TODO: return deferred promise
- return true;
- } else {
- try {
- if (!fs.statSync(params.path).isFile()) {
- throw new Twig.Error('Unable to find template file ' + params.path);
- }
- } catch (err) {
- throw new Twig.Error('Unable to find template file ' + params.path);
- }
- data = fs.readFileSync(params.path, 'utf8');
- loadTemplateFn(undefined, data);
- return template
- }
- });
-
- };
-
-
-/***/ },
-/* 19 */
-/***/ function(module, exports) {
-
- module.exports = require("fs");
-
-/***/ },
-/* 20 */
-/***/ function(module, exports) {
-
- module.exports = require("path");
-
-/***/ },
-/* 21 */
-/***/ function(module, exports) {
-
- // ## twig.logic.js
- //
- // This file handles tokenizing, compiling and parsing logic tokens. {% ... %}
- module.exports = function (Twig) {
- "use strict";
-
- /**
- * Namespace for logic handling.
- */
- Twig.logic = {};
-
- /**
- * Logic token types.
- */
- Twig.logic.type = {
- if_: 'Twig.logic.type.if',
- endif: 'Twig.logic.type.endif',
- for_: 'Twig.logic.type.for',
- endfor: 'Twig.logic.type.endfor',
- else_: 'Twig.logic.type.else',
- elseif: 'Twig.logic.type.elseif',
- set: 'Twig.logic.type.set',
- setcapture:'Twig.logic.type.setcapture',
- endset: 'Twig.logic.type.endset',
- filter: 'Twig.logic.type.filter',
- endfilter: 'Twig.logic.type.endfilter',
- shortblock: 'Twig.logic.type.shortblock',
- block: 'Twig.logic.type.block',
- endblock: 'Twig.logic.type.endblock',
- extends_: 'Twig.logic.type.extends',
- use: 'Twig.logic.type.use',
- include: 'Twig.logic.type.include',
- spaceless: 'Twig.logic.type.spaceless',
- endspaceless: 'Twig.logic.type.endspaceless',
- macro: 'Twig.logic.type.macro',
- endmacro: 'Twig.logic.type.endmacro',
- import_: 'Twig.logic.type.import',
- from: 'Twig.logic.type.from',
- embed: 'Twig.logic.type.embed',
- endembed: 'Twig.logic.type.endembed'
- };
-
-
- // Regular expressions for handling logic tokens.
- //
- // Properties:
- //
- // type: The type of expression this matches
- //
- // regex: A regular expression that matches the format of the token
- //
- // next: What logic tokens (if any) pop this token off the logic stack. If empty, the
- // logic token is assumed to not require an end tag and isn't push onto the stack.
- //
- // open: Does this tag open a logic expression or is it standalone. For example,
- // {% endif %} cannot exist without an opening {% if ... %} tag, so open = false.
- //
- // Functions:
- //
- // compile: A function that handles compiling the token into an output token ready for
- // parsing with the parse function.
- //
- // parse: A function that parses the compiled token into output (HTML / whatever the
- // template represents).
- Twig.logic.definitions = [
- {
- /**
- * If type logic tokens.
- *
- * Format: {% if expression %}
- */
- type: Twig.logic.type.if_,
- regex: /^if\s+([\s\S]+)$/,
- next: [
- Twig.logic.type.else_,
- Twig.logic.type.elseif,
- Twig.logic.type.endif
- ],
- open: true,
- compile: function (token) {
- var expression = token.match[1];
- // Compile the expression.
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var output = '',
- // Parse the expression
- result = Twig.expression.parse.apply(this, [token.stack, context]);
-
- // Start a new logic chain
- chain = true;
-
- if (Twig.lib.boolval(result)) {
- chain = false;
- // parse if output
- output = Twig.parse.apply(this, [token.output, context]);
- }
- return {
- chain: chain,
- output: output
- };
- }
- },
- {
- /**
- * Else if type logic tokens.
- *
- * Format: {% elseif expression %}
- */
- type: Twig.logic.type.elseif,
- regex: /^elseif\s+([^\s].*)$/,
- next: [
- Twig.logic.type.else_,
- Twig.logic.type.elseif,
- Twig.logic.type.endif
- ],
- open: false,
- compile: function (token) {
- var expression = token.match[1];
- // Compile the expression.
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var output = '',
- result = Twig.expression.parse.apply(this, [token.stack, context]);
-
- if (chain && Twig.lib.boolval(result)) {
- chain = false;
- // parse if output
- output = Twig.parse.apply(this, [token.output, context]);
- }
-
- return {
- chain: chain,
- output: output
- };
- }
- },
- {
- /**
- * Else if type logic tokens.
- *
- * Format: {% elseif expression %}
- */
- type: Twig.logic.type.else_,
- regex: /^else$/,
- next: [
- Twig.logic.type.endif,
- Twig.logic.type.endfor
- ],
- open: false,
- parse: function (token, context, chain) {
- var output = '';
- if (chain) {
- output = Twig.parse.apply(this, [token.output, context]);
- }
- return {
- chain: chain,
- output: output
- };
- }
- },
- {
- /**
- * End if type logic tokens.
- *
- * Format: {% endif %}
- */
- type: Twig.logic.type.endif,
- regex: /^endif$/,
- next: [ ],
- open: false
- },
- {
- /**
- * For type logic tokens.
- *
- * Format: {% for expression %}
- */
- type: Twig.logic.type.for_,
- regex: /^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/,
- next: [
- Twig.logic.type.else_,
- Twig.logic.type.endfor
- ],
- open: true,
- compile: function (token) {
- var key_value = token.match[1],
- expression = token.match[2],
- conditional = token.match[3],
- kv_split = null;
-
- token.key_var = null;
- token.value_var = null;
-
- if (key_value.indexOf(",") >= 0) {
- kv_split = key_value.split(',');
- if (kv_split.length === 2) {
- token.key_var = kv_split[0].trim();
- token.value_var = kv_split[1].trim();
- } else {
- throw new Twig.Error("Invalid expression in for loop: " + key_value);
- }
- } else {
- token.value_var = key_value;
- }
-
- // Valid expressions for a for loop
- // for item in expression
- // for key,item in expression
-
- // Compile the expression.
- token.expression = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- // Compile the conditional (if available)
- if (conditional) {
- token.conditional = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: conditional
- }]).stack;
- }
-
- delete token.match;
- return token;
- },
- parse: function (token, context, continue_chain) {
- // Parse expression
- var result = Twig.expression.parse.apply(this, [token.expression, context]),
- output = [],
- len,
- index = 0,
- keyset,
- that = this,
- conditional = token.conditional,
- buildLoop = function(index, len) {
- var isConditional = conditional !== undefined;
- return {
- index: index+1,
- index0: index,
- revindex: isConditional?undefined:len-index,
- revindex0: isConditional?undefined:len-index-1,
- first: (index === 0),
- last: isConditional?undefined:(index === len-1),
- length: isConditional?undefined:len,
- parent: context
- };
- },
- // run once for each iteration of the loop
- loop = function(key, value) {
- var inner_context = Twig.ChildContext(context);
-
- inner_context[token.value_var] = value;
-
- if (token.key_var) {
- inner_context[token.key_var] = key;
- }
-
- // Loop object
- inner_context.loop = buildLoop(index, len);
-
- if (conditional === undefined ||
- Twig.expression.parse.apply(that, [conditional, inner_context]))
- {
- output.push(Twig.parse.apply(that, [token.output, inner_context]));
- index += 1;
- }
-
- // Delete loop-related variables from the context
- delete inner_context['loop'];
- delete inner_context[token.value_var];
- delete inner_context[token.key_var];
-
- // Merge in values that exist in context but have changed
- // in inner_context.
- Twig.merge(context, inner_context, true);
- };
-
-
- if (Twig.lib.is('Array', result)) {
- len = result.length;
- Twig.forEach(result, function (value) {
- var key = index;
-
- loop(key, value);
- });
- } else if (Twig.lib.is('Object', result)) {
- if (result._keys !== undefined) {
- keyset = result._keys;
- } else {
- keyset = Object.keys(result);
- }
- len = keyset.length;
- Twig.forEach(keyset, function(key) {
- // Ignore the _keys property, it's internal to twig.js
- if (key === "_keys") return;
-
- loop(key, result[key]);
- });
- }
-
- // Only allow else statements if no output was generated
- continue_chain = (output.length === 0);
-
- return {
- chain: continue_chain,
- output: Twig.output.apply(this, [output])
- };
- }
- },
- {
- /**
- * End if type logic tokens.
- *
- * Format: {% endif %}
- */
- type: Twig.logic.type.endfor,
- regex: /^endfor$/,
- next: [ ],
- open: false
- },
- {
- /**
- * Set type logic tokens.
- *
- * Format: {% set key = expression %}
- */
- type: Twig.logic.type.set,
- regex: /^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*([\s\S]+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var key = token.match[1].trim(),
- expression = token.match[2],
- // Compile the expression.
- expression_stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- token.key = key;
- token.expression = expression_stack;
-
- delete token.match;
- return token;
- },
- parse: function (token, context, continue_chain) {
- var value = Twig.expression.parse.apply(this, [token.expression, context]),
- key = token.key;
-
- if (value === context) {
- /* If storing the context in a variable, it needs to be a clone of the current state of context.
- Otherwise we have a context with infinite recursion.
- Fixes #341
- */
- value = Twig.lib.copy(value);
- }
-
- context[key] = value;
-
- return {
- chain: continue_chain,
- context: context
- };
- }
- },
- {
- /**
- * Set capture type logic tokens.
- *
- * Format: {% set key %}
- */
- type: Twig.logic.type.setcapture,
- regex: /^set\s+([a-zA-Z0-9_,\s]+)$/,
- next: [
- Twig.logic.type.endset
- ],
- open: true,
- compile: function (token) {
- var key = token.match[1].trim();
-
- token.key = key;
-
- delete token.match;
- return token;
- },
- parse: function (token, context, continue_chain) {
-
- var value = Twig.parse.apply(this, [token.output, context]),
- key = token.key;
-
- // set on both the global and local context
- this.context[key] = value;
- context[key] = value;
-
- return {
- chain: continue_chain,
- context: context
- };
- }
- },
- {
- /**
- * End set type block logic tokens.
- *
- * Format: {% endset %}
- */
- type: Twig.logic.type.endset,
- regex: /^endset$/,
- next: [ ],
- open: false
- },
- {
- /**
- * Filter logic tokens.
- *
- * Format: {% filter upper %} or {% filter lower|escape %}
- */
- type: Twig.logic.type.filter,
- regex: /^filter\s+(.+)$/,
- next: [
- Twig.logic.type.endfilter
- ],
- open: true,
- compile: function (token) {
- var expression = "|" + token.match[1].trim();
- // Compile the expression.
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var unfiltered = Twig.parse.apply(this, [token.output, context]),
- stack = [{
- type: Twig.expression.type.string,
- value: unfiltered
- }].concat(token.stack);
-
- var output = Twig.expression.parse.apply(this, [stack, context]);
-
- return {
- chain: chain,
- output: output
- };
- }
- },
- {
- /**
- * End filter logic tokens.
- *
- * Format: {% endfilter %}
- */
- type: Twig.logic.type.endfilter,
- regex: /^endfilter$/,
- next: [ ],
- open: false
- },
- {
- /**
- * Block logic tokens.
- *
- * Format: {% block title %}
- */
- type: Twig.logic.type.block,
- regex: /^block\s+([a-zA-Z0-9_]+)$/,
- next: [
- Twig.logic.type.endblock
- ],
- open: true,
- compile: function (token) {
- token.block = token.match[1].trim();
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var block_output,
- output,
- isImported = Twig.indexOf(this.importedBlocks, token.block) > -1,
- hasParent = this.blocks[token.block] && Twig.indexOf(this.blocks[token.block], Twig.placeholders.parent) > -1;
-
- // Don't override previous blocks unless they're imported with "use"
- // Loops should be exempted as well.
- if (this.blocks[token.block] === undefined || isImported || hasParent || context.loop || token.overwrite) {
- if (token.expression) {
- // Short blocks have output as an expression on the open tag (no body)
- block_output = Twig.expression.parse.apply(this, [{
- type: Twig.expression.type.string,
- value: Twig.expression.parse.apply(this, [token.output, context])
- }, context]);
- } else {
- block_output = Twig.expression.parse.apply(this, [{
- type: Twig.expression.type.string,
- value: Twig.parse.apply(this, [token.output, context])
- }, context]);
- }
-
- if (isImported) {
- // once the block is overridden, remove it from the list of imported blocks
- this.importedBlocks.splice(this.importedBlocks.indexOf(token.block), 1);
- }
-
- if (hasParent) {
- this.blocks[token.block] = Twig.Markup(this.blocks[token.block].replace(Twig.placeholders.parent, block_output));
- } else {
- this.blocks[token.block] = block_output;
- }
-
- this.originalBlockTokens[token.block] = {
- type: token.type,
- block: token.block,
- output: token.output,
- overwrite: true
- };
- }
-
- // Check if a child block has been set from a template extending this one.
- if (this.child.blocks[token.block]) {
- output = this.child.blocks[token.block];
- } else {
- output = this.blocks[token.block];
- }
-
- return {
- chain: chain,
- output: output
- };
- }
- },
- {
- /**
- * Block shorthand logic tokens.
- *
- * Format: {% block title expression %}
- */
- type: Twig.logic.type.shortblock,
- regex: /^block\s+([a-zA-Z0-9_]+)\s+(.+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- token.expression = token.match[2].trim();
-
- token.output = Twig.expression.compile({
- type: Twig.expression.type.expression,
- value: token.expression
- }).stack;
-
- token.block = token.match[1].trim();
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- return Twig.logic.handler[Twig.logic.type.block].parse.apply(this, arguments);
- }
- },
- {
- /**
- * End block logic tokens.
- *
- * Format: {% endblock %}
- */
- type: Twig.logic.type.endblock,
- regex: /^endblock(?:\s+([a-zA-Z0-9_]+))?$/,
- next: [ ],
- open: false
- },
- {
- /**
- * Block logic tokens.
- *
- * Format: {% extends "template.twig" %}
- */
- type: Twig.logic.type.extends_,
- regex: /^extends\s+(.+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var expression = token.match[1].trim();
- delete token.match;
-
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- return token;
- },
- parse: function (token, context, chain) {
- var template,
- innerContext = Twig.ChildContext(context);
- // Resolve filename
- var file = Twig.expression.parse.apply(this, [token.stack, context]);
-
- // Set parent template
- this.extend = file;
-
- if (file instanceof Twig.Template) {
- template = file;
- } else {
- // Import file
- template = this.importFile(file);
- }
-
- // Render the template in case it puts anything in its context
- template.render(innerContext);
-
- // Extend the parent context with the extended context
- Twig.lib.extend(context, innerContext);
-
- return {
- chain: chain,
- output: ''
- };
- }
- },
- {
- /**
- * Block logic tokens.
- *
- * Format: {% use "template.twig" %}
- */
- type: Twig.logic.type.use,
- regex: /^use\s+(.+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var expression = token.match[1].trim();
- delete token.match;
-
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- return token;
- },
- parse: function (token, context, chain) {
- // Resolve filename
- var file = Twig.expression.parse.apply(this, [token.stack, context]);
-
- // Import blocks
- this.importBlocks(file);
-
- return {
- chain: chain,
- output: ''
- };
- }
- },
- {
- /**
- * Block logic tokens.
- *
- * Format: {% includes "template.twig" [with {some: 'values'} only] %}
- */
- type: Twig.logic.type.include,
- regex: /^include\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var match = token.match,
- expression = match[1].trim(),
- ignoreMissing = match[2] !== undefined,
- withContext = match[3],
- only = ((match[4] !== undefined) && match[4].length);
-
- delete token.match;
-
- token.only = only;
- token.ignoreMissing = ignoreMissing;
-
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- if (withContext !== undefined) {
- token.withStack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: withContext.trim()
- }]).stack;
- }
-
- return token;
- },
- parse: function (token, context, chain) {
- // Resolve filename
- var innerContext = {},
- withContext,
- i,
- template;
-
- if (!token.only) {
- innerContext = Twig.ChildContext(context);
- }
-
- if (token.withStack !== undefined) {
- withContext = Twig.expression.parse.apply(this, [token.withStack, context]);
-
- for (i in withContext) {
- if (withContext.hasOwnProperty(i))
- innerContext[i] = withContext[i];
- }
- }
-
- var file = Twig.expression.parse.apply(this, [token.stack, context]);
-
- if (file instanceof Twig.Template) {
- template = file;
- } else {
- // Import file
- try {
- template = this.importFile(file);
- } catch (err) {
- if (token.ignoreMissing) {
- return {
- chain: chain,
- output: ''
- }
- }
-
- throw err;
- }
- }
-
- return {
- chain: chain,
- output: template.render(innerContext)
- };
- }
- },
- {
- type: Twig.logic.type.spaceless,
- regex: /^spaceless$/,
- next: [
- Twig.logic.type.endspaceless
- ],
- open: true,
-
- // Parse the html and return it without any spaces between tags
- parse: function (token, context, chain) {
- var // Parse the output without any filter
- unfiltered = Twig.parse.apply(this, [token.output, context]),
- // A regular expression to find closing and opening tags with spaces between them
- rBetweenTagSpaces = />\s+</g,
- // Replace all space between closing and opening html tags
- output = unfiltered.replace(rBetweenTagSpaces,'><').trim();
- // Rewrap output as a Twig.Markup
- output = Twig.Markup(output);
- return {
- chain: chain,
- output: output
- };
- }
- },
-
- // Add the {% endspaceless %} token
- {
- type: Twig.logic.type.endspaceless,
- regex: /^endspaceless$/,
- next: [ ],
- open: false
- },
- {
- /**
- * Macro logic tokens.
- *
- * Format: {% maro input(name, value, type, size) %}
- *
- */
- type: Twig.logic.type.macro,
- regex: /^macro\s+([a-zA-Z0-9_]+)\s*\(\s*((?:[a-zA-Z0-9_]+(?:,\s*)?)*)\s*\)$/,
- next: [
- Twig.logic.type.endmacro
- ],
- open: true,
- compile: function (token) {
- var macroName = token.match[1],
- parameters = token.match[2].split(/[\s,]+/);
-
- //TODO: Clean up duplicate check
- for (var i=0; i<parameters.length; i++) {
- for (var j=0; j<parameters.length; j++){
- if (parameters[i] === parameters[j] && i !== j) {
- throw new Twig.Error("Duplicate arguments for parameter: "+ parameters[i]);
- }
- }
- }
-
- token.macroName = macroName;
- token.parameters = parameters;
-
- delete token.match;
- return token;
- },
- parse: function (token, context, chain) {
- var template = this;
- this.macros[token.macroName] = function() {
- // Pass global context and other macros
- var macroContext = {
- _self: template.macros
- }
- // Add parameters from context to macroContext
- for (var i=0; i<token.parameters.length; i++) {
- var prop = token.parameters[i];
- if(typeof arguments[i] !== 'undefined') {
- macroContext[prop] = arguments[i];
- } else {
- macroContext[prop] = undefined;
- }
- }
- // Render
- return Twig.parse.apply(template, [token.output, macroContext])
- };
-
- return {
- chain: chain,
- output: ''
- };
-
- }
- },
- {
- /**
- * End macro logic tokens.
- *
- * Format: {% endmacro %}
- */
- type: Twig.logic.type.endmacro,
- regex: /^endmacro$/,
- next: [ ],
- open: false
- },
- {
- /*
- * import logic tokens.
- *
- * Format: {% import "template.twig" as form %}
- */
- type: Twig.logic.type.import_,
- regex: /^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var expression = token.match[1].trim(),
- contextName = token.match[2].trim();
- delete token.match;
-
- token.expression = expression;
- token.contextName = contextName;
-
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- return token;
- },
- parse: function (token, context, chain) {
- if (token.expression !== "_self") {
- var file = Twig.expression.parse.apply(this, [token.stack, context]);
- var template = this.importFile(file || token.expression);
- context[token.contextName] = template.render({}, {output: 'macros'});
- }
- else {
- context[token.contextName] = this.macros;
- }
-
- return {
- chain: chain,
- output: ''
- }
-
- }
- },
- {
- /*
- * from logic tokens.
- *
- * Format: {% from "template.twig" import func as form %}
- */
- type: Twig.logic.type.from,
- regex: /^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,
- next: [ ],
- open: true,
- compile: function (token) {
- var expression = token.match[1].trim(),
- macroExpressions = token.match[2].trim().split(/[ ,]+/),
- macroNames = {};
-
- for (var i=0; i<macroExpressions.length; i++) {
- var res = macroExpressions[i];
-
- // match function as variable
- var macroMatch = res.match(/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/);
- if (macroMatch) {
- macroNames[macroMatch[1].trim()] = macroMatch[2].trim();
- }
- else if (res.match(/^([a-zA-Z0-9_]+)$/)) {
- macroNames[res] = res;
- }
- else {
- // ignore import
- }
-
- }
-
- delete token.match;
-
- token.expression = expression;
- token.macroNames = macroNames;
-
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- return token;
- },
- parse: function (token, context, chain) {
- var macros;
-
- if (token.expression !== "_self") {
- var file = Twig.expression.parse.apply(this, [token.stack, context]);
- var template = this.importFile(file || token.expression);
- macros = template.render({}, {output: 'macros'});
- }
- else {
- macros = this.macros;
- }
-
- for (var macroName in token.macroNames) {
- if (macros.hasOwnProperty(macroName)) {
- context[token.macroNames[macroName]] = macros[macroName];
- }
- }
-
- return {
- chain: chain,
- output: ''
- }
-
- }
- },
- {
- /**
- * The embed tag combines the behaviour of include and extends.
- * It allows you to include another template's contents, just like include does.
- *
- * Format: {% embed "template.twig" [with {some: 'values'} only] %}
- */
- type: Twig.logic.type.embed,
- regex: /^embed\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,
- next: [
- Twig.logic.type.endembed
- ],
- open: true,
- compile: function (token) {
- var match = token.match,
- expression = match[1].trim(),
- ignoreMissing = match[2] !== undefined,
- withContext = match[3],
- only = ((match[4] !== undefined) && match[4].length);
-
- delete token.match;
-
- token.only = only;
- token.ignoreMissing = ignoreMissing;
-
- token.stack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: expression
- }]).stack;
-
- if (withContext !== undefined) {
- token.withStack = Twig.expression.compile.apply(this, [{
- type: Twig.expression.type.expression,
- value: withContext.trim()
- }]).stack;
- }
-
- return token;
- },
- parse: function (token, context, chain) {
- // Resolve filename
- var innerContext = {},
- withContext,
- i,
- template;
-
- if (!token.only) {
- for (i in context) {
- if (context.hasOwnProperty(i))
- innerContext[i] = context[i];
- }
- }
-
- if (token.withStack !== undefined) {
- withContext = Twig.expression.parse.apply(this, [token.withStack, context]);
-
- for (i in withContext) {
- if (withContext.hasOwnProperty(i))
- innerContext[i] = withContext[i];
- }
- }
-
- var file = Twig.expression.parse.apply(this, [token.stack, innerContext]);
-
- if (file instanceof Twig.Template) {
- template = file;
- } else {
- // Import file
- try {
- template = this.importFile(file);
- } catch (err) {
- if (token.ignoreMissing) {
- return {
- chain: chain,
- output: ''
- }
- }
-
- throw err;
- }
- }
-
- // reset previous blocks
- this.blocks = {};
-
- // parse tokens. output will be not used
- var output = Twig.parse.apply(this, [token.output, innerContext]);
-
- // render tempalte with blocks defined in embed block
- return {
- chain: chain,
- output: template.render(innerContext, {'blocks':this.blocks})
- };
- }
- },
- /* Add the {% endembed %} token
- *
- */
- {
- type: Twig.logic.type.endembed,
- regex: /^endembed$/,
- next: [ ],
- open: false
- }
-
- ];
-
-
- /**
- * Registry for logic handlers.
- */
- Twig.logic.handler = {};
-
- /**
- * Define a new token type, available at Twig.logic.type.{type}
- */
- Twig.logic.extendType = function (type, value) {
- value = value || ("Twig.logic.type" + type);
- Twig.logic.type[type] = value;
- };
-
- /**
- * Extend the logic parsing functionality with a new token definition.
- *
- * // Define a new tag
- * Twig.logic.extend({
- * type: Twig.logic.type.{type},
- * // The pattern to match for this token
- * regex: ...,
- * // What token types can follow this token, leave blank if any.
- * next: [ ... ]
- * // Create and return compiled version of the token
- * compile: function(token) { ... }
- * // Parse the compiled token with the context provided by the render call
- * // and whether this token chain is complete.
- * parse: function(token, context, chain) { ... }
- * });
- *
- * @param {Object} definition The new logic expression.
- */
- Twig.logic.extend = function (definition) {
-
- if (!definition.type) {
- throw new Twig.Error("Unable to extend logic definition. No type provided for " + definition);
- } else {
- Twig.logic.extendType(definition.type);
- }
- Twig.logic.handler[definition.type] = definition;
- };
-
- // Extend with built-in expressions
- while (Twig.logic.definitions.length > 0) {
- Twig.logic.extend(Twig.logic.definitions.shift());
- }
-
- /**
- * Compile a logic token into an object ready for parsing.
- *
- * @param {Object} raw_token An uncompiled logic token.
- *
- * @return {Object} A compiled logic token, ready for parsing.
- */
- Twig.logic.compile = function (raw_token) {
- var expression = raw_token.value.trim(),
- token = Twig.logic.tokenize.apply(this, [expression]),
- token_template = Twig.logic.handler[token.type];
-
- // Check if the token needs compiling
- if (token_template.compile) {
- token = token_template.compile.apply(this, [token]);
- Twig.log.trace("Twig.logic.compile: ", "Compiled logic token to ", token);
- }
-
- return token;
- };
-
- /**
- * Tokenize logic expressions. This function matches token expressions against regular
- * expressions provided in token definitions provided with Twig.logic.extend.
- *
- * @param {string} expression the logic token expression to tokenize
- * (i.e. what's between {% and %})
- *
- * @return {Object} The matched token with type set to the token type and match to the regex match.
- */
- Twig.logic.tokenize = function (expression) {
- var token = {},
- token_template_type = null,
- token_type = null,
- token_regex = null,
- regex_array = null,
- regex = null,
- match = null;
-
- // Ignore whitespace around expressions.
- expression = expression.trim();
-
- for (token_template_type in Twig.logic.handler) {
- if (Twig.logic.handler.hasOwnProperty(token_template_type)) {
- // Get the type and regex for this template type
- token_type = Twig.logic.handler[token_template_type].type;
- token_regex = Twig.logic.handler[token_template_type].regex;
-
- // Handle multiple regular expressions per type.
- regex_array = [];
- if (token_regex instanceof Array) {
- regex_array = token_regex;
- } else {
- regex_array.push(token_regex);
- }
-
- // Check regular expressions in the order they were specified in the definition.
- while (regex_array.length > 0) {
- regex = regex_array.shift();
- match = regex.exec(expression.trim());
- if (match !== null) {
- token.type = token_type;
- token.match = match;
- Twig.log.trace("Twig.logic.tokenize: ", "Matched a ", token_type, " regular expression of ", match);
- return token;
- }
- }
- }
- }
-
- // No regex matches
- throw new Twig.Error("Unable to parse '" + expression.trim() + "'");
- };
-
- /**
- * Parse a logic token within a given context.
- *
- * What are logic chains?
- * Logic chains represent a series of tokens that are connected,
- * for example:
- * {% if ... %} {% else %} {% endif %}
- *
- * The chain parameter is used to signify if a chain is open of closed.
- * open:
- * More tokens in this chain should be parsed.
- * closed:
- * This token chain has completed parsing and any additional
- * tokens (else, elseif, etc...) should be ignored.
- *
- * @param {Object} token The compiled token.
- * @param {Object} context The render context.
- * @param {boolean} chain Is this an open logic chain. If false, that means a
- * chain is closed and no further cases should be parsed.
- */
- Twig.logic.parse = function (token, context, chain) {
- var output = '',
- token_template;
-
- context = context || { };
-
- Twig.log.debug("Twig.logic.parse: ", "Parsing logic token ", token);
-
- token_template = Twig.logic.handler[token.type];
-
- if (token_template.parse) {
- output = token_template.parse.apply(this, [token, context, chain]);
- }
- return output;
- };
-
- return Twig;
-
- };
-
-
-/***/ },
-/* 22 */
-/***/ function(module, exports) {
-
- module.exports = function(Twig) {
- 'use strict';
-
- Twig.Templates.registerParser('source', function(params) {
- return params.data || '';
- });
- };
-
-
-/***/ },
-/* 23 */
-/***/ function(module, exports) {
-
- module.exports = function(Twig) {
- 'use strict';
-
- Twig.Templates.registerParser('twig', function(params) {
- return new Twig.Template(params);
- });
- };
-
-
-/***/ },
-/* 24 */
-/***/ function(module, exports, __webpack_require__) {
-
- // ## twig.path.js
- //
- // This file handles path parsing
- module.exports = function (Twig) {
- "use strict";
-
- /**
- * Namespace for path handling.
- */
- Twig.path = {};
-
- /**
- * Generate the canonical version of a url based on the given base path and file path and in
- * the previously registered namespaces.
- *
- * @param {string} template The Twig Template
- * @param {string} file The file path, may be relative and may contain namespaces.
- *
- * @return {string} The canonical version of the path
- */
- Twig.path.parsePath = function(template, file) {
- var namespaces = null,
- file = file || "";
-
- if (typeof template === 'object' && typeof template.options === 'object') {
- namespaces = template.options.namespaces;
- }
-
- if (typeof namespaces === 'object' && (file.indexOf('::') > 0) || file.indexOf('@') >= 0){
- for (var k in namespaces){
- if (namespaces.hasOwnProperty(k)) {
- file = file.replace(k + '::', namespaces[k]);
- file = file.replace('@' + k, namespaces[k]);
- }
- }
-
- return file;
- }
-
- return Twig.path.relativePath(template, file);
- };
-
- /**
- * Generate the relative canonical version of a url based on the given base path and file path.
- *
- * @param {Twig.Template} template The Twig.Template.
- * @param {string} file The file path, relative to the base path.
- *
- * @return {string} The canonical version of the path.
- */
- Twig.path.relativePath = function(template, file) {
- var base,
- base_path,
- sep_chr = "/",
- new_path = [],
- file = file || "",
- val;
-
- if (template.url) {
- if (typeof template.base !== 'undefined') {
- base = template.base + ((template.base.charAt(template.base.length-1) === '/') ? '' : '/');
- } else {
- base = template.url;
- }
- } else if (template.path) {
- // Get the system-specific path separator
- var path = __webpack_require__(20),
- sep = path.sep || sep_chr,
- relative = new RegExp("^\\.{1,2}" + sep.replace("\\", "\\\\"));
- file = file.replace(/\//g, sep);
-
- if (template.base !== undefined && file.match(relative) == null) {
- file = file.replace(template.base, '');
- base = template.base + sep;
- } else {
- base = path.normalize(template.path);
- }
-
- base = base.replace(sep+sep, sep);
- sep_chr = sep;
- } else if ((template.name || template.id) && template.method && template.method !== 'fs' && template.method !== 'ajax') {
- // Custom registered loader
- base = template.base || template.name || template.id;
- } else {
- throw new Twig.Error("Cannot extend an inline template.");
- }
-
- base_path = base.split(sep_chr);
-
- // Remove file from url
- base_path.pop();
- base_path = base_path.concat(file.split(sep_chr));
-
- while (base_path.length > 0) {
- val = base_path.shift();
- if (val == ".") {
- // Ignore
- } else if (val == ".." && new_path.length > 0 && new_path[new_path.length-1] != "..") {
- new_path.pop();
- } else {
- new_path.push(val);
- }
- }
-
- return new_path.join(sep_chr);
- };
-
- return Twig;
- };
-
-
-/***/ },
-/* 25 */
-/***/ function(module, exports) {
-
- // ## twig.tests.js
- //
- // This file handles expression tests. (is empty, is not defined, etc...)
- module.exports = function (Twig) {
- "use strict";
- Twig.tests = {
- empty: function(value) {
- if (value === null || value === undefined) return true;
- // Handler numbers
- if (typeof value === "number") return false; // numbers are never "empty"
- // Handle strings and arrays
- if (value.length && value.length > 0) return false;
- // Handle objects
- for (var key in value) {
- if (value.hasOwnProperty(key)) return false;
- }
- return true;
- },
- odd: function(value) {
- return value % 2 === 1;
- },
- even: function(value) {
- return value % 2 === 0;
- },
- divisibleby: function(value, params) {
- return value % params[0] === 0;
- },
- defined: function(value) {
- return value !== undefined;
- },
- none: function(value) {
- return value === null;
- },
- 'null': function(value) {
- return this.none(value); // Alias of none
- },
- 'same as': function(value, params) {
- return value === params[0];
- },
- sameas: function(value, params) {
- console.warn('`sameas` is deprecated use `same as`');
- return Twig.tests['same as'](value, params);
- },
- iterable: function(value) {
- return value && (Twig.lib.is("Array", value) || Twig.lib.is("Object", value));
- }
- /*
- constant ?
- */
- };
-
- Twig.test = function(test, value, params) {
- if (!Twig.tests[test]) {
- throw "Test " + test + " is not defined.";
- }
- return Twig.tests[test](value, params);
- };
-
- Twig.test.extend = function(test, definition) {
- Twig.tests[test] = definition;
- };
-
- return Twig;
- };
-
-
-/***/ },
-/* 26 */
-/***/ function(module, exports) {
-
- // ## twig.exports.js
- //
- // This file provides extension points and other hooks into the twig functionality.
-
- module.exports = function (Twig) {
- "use strict";
- Twig.exports = {
- VERSION: Twig.VERSION
- };
-
- /**
- * Create and compile a twig.js template.
- *
- * @param {Object} param Paramteres for creating a Twig template.
- *
- * @return {Twig.Template} A Twig template ready for rendering.
- */
- Twig.exports.twig = function twig(params) {
- 'use strict';
- var id = params.id,
- options = {
- strict_variables: params.strict_variables || false,
- // TODO: turn autoscape on in the next major version
- autoescape: params.autoescape != null && params.autoescape || false,
- allowInlineIncludes: params.allowInlineIncludes || false,
- rethrow: params.rethrow || false,
- namespaces: params.namespaces
- };
-
- if (Twig.cache && id) {
- Twig.validateId(id);
- }
-
- if (params.debug !== undefined) {
- Twig.debug = params.debug;
- }
- if (params.trace !== undefined) {
- Twig.trace = params.trace;
- }
-
- if (params.data !== undefined) {
- return Twig.Templates.parsers.twig({
- data: params.data,
- path: params.hasOwnProperty('path') ? params.path : undefined,
- module: params.module,
- id: id,
- options: options
- });
-
- } else if (params.ref !== undefined) {
- if (params.id !== undefined) {
- throw new Twig.Error("Both ref and id cannot be set on a twig.js template.");
- }
- return Twig.Templates.load(params.ref);
-
- } else if (params.method !== undefined) {
- if (!Twig.Templates.isRegisteredLoader(params.method)) {
- throw new Twig.Error('Loader for "' + params.method + '" is not defined.');
- }
- return Twig.Templates.loadRemote(params.name || params.href || params.path || id || undefined, {
- id: id,
- method: params.method,
- parser: params.parser || 'twig',
- base: params.base,
- module: params.module,
- precompiled: params.precompiled,
- async: params.async,
- options: options
-
- }, params.load, params.error);
-
- } else if (params.href !== undefined) {
- return Twig.Templates.loadRemote(params.href, {
- id: id,
- method: 'ajax',
- parser: params.parser || 'twig',
- base: params.base,
- module: params.module,
- precompiled: params.precompiled,
- async: params.async,
- options: options
-
- }, params.load, params.error);
-
- } else if (params.path !== undefined) {
- return Twig.Templates.loadRemote(params.path, {
- id: id,
- method: 'fs',
- parser: params.parser || 'twig',
- base: params.base,
- module: params.module,
- precompiled: params.precompiled,
- async: params.async,
- options: options
-
- }, params.load, params.error);
- }
- };
-
- // Extend Twig with a new filter.
- Twig.exports.extendFilter = function(filter, definition) {
- Twig.filter.extend(filter, definition);
- };
-
- // Extend Twig with a new function.
- Twig.exports.extendFunction = function(fn, definition) {
- Twig._function.extend(fn, definition);
- };
-
- // Extend Twig with a new test.
- Twig.exports.extendTest = function(test, definition) {
- Twig.test.extend(test, definition);
- };
-
- // Extend Twig with a new definition.
- Twig.exports.extendTag = function(definition) {
- Twig.logic.extend(definition);
- };
-
- // Provide an environment for extending Twig core.
- // Calls fn with the internal Twig object.
- Twig.exports.extend = function(fn) {
- fn(Twig);
- };
-
-
- /**
- * Provide an extension for use with express 2.
- *
- * @param {string} markup The template markup.
- * @param {array} options The express options.
- *
- * @return {string} The rendered template.
- */
- Twig.exports.compile = function(markup, options) {
- var id = options.filename,
- path = options.filename,
- template;
-
- // Try to load the template from the cache
- template = new Twig.Template({
- data: markup,
- path: path,
- id: id,
- options: options.settings['twig options']
- }); // Twig.Templates.load(id) ||
-
- return function(context) {
- return template.render(context);
- };
- };
-
- /**
- * Provide an extension for use with express 3.
- *
- * @param {string} path The location of the template file on disk.
- * @param {Object|Function} The options or callback.
- * @param {Function} fn callback.
- *
- * @throws Twig.Error
- */
- Twig.exports.renderFile = function(path, options, fn) {
- // handle callback in options
- if (typeof options === 'function') {
- fn = options;
- options = {};
- }
-
- options = options || {};
-
- var settings = options.settings || {};
-
- var params = {
- path: path,
- base: settings.views,
- load: function(template) {
- // render and return template as a simple string, see https://github.com/twigjs/twig.js/pull/348 for more information
- fn(null, '' + template.render(options));
- }
- };
-
- // mixin any options provided to the express app.
- var view_options = settings['twig options'];
-
- if (view_options) {
- for (var option in view_options) {
- if (view_options.hasOwnProperty(option)) {
- params[option] = view_options[option];
- }
- }
- }
-
- Twig.exports.twig(params);
- };
-
- // Express 3 handler
- Twig.exports.__express = Twig.exports.renderFile;
-
- /**
- * Shoud Twig.js cache templates.
- * Disable during development to see changes to templates without
- * reloading, and disable in production to improve performance.
- *
- * @param {boolean} cache
- */
- Twig.exports.cache = function(cache) {
- Twig.cache = cache;
- };
-
- //We need to export the path module so we can effectively test it
- Twig.exports.path = Twig.path;
-
- //Export our filters.
- //Resolves #307
- Twig.exports.filters = Twig.filters;
-
- return Twig;
- };
-
-
-/***/ }
-/******/ ])
-});
-; \ No newline at end of file
diff --git a/node_modules/twig/twig.min.js b/node_modules/twig/twig.min.js
deleted file mode 100644
index 581573f..0000000
--- a/node_modules/twig/twig.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Twig=t():e.Twig=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){/**
- * Twig.js
- *
- * @copyright 2011-2016 John Roepke and the Twig.js Contributors
- * @license Available under the BSD 2-Clause License
- * @link https://github.com/twigjs/twig.js
- */
-var n={VERSION:"0.10.2"};r(1)(n),r(2)(n),r(3)(n),r(5)(n),r(6)(n),r(7)(n),r(17)(n),r(18)(n),r(22)(n),r(23)(n),r(24)(n),r(25)(n),r(26)(n),r(27)(n),e.exports=n.exports},function(e,t){e.exports=function(e){"use strict";function t(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return void 0!==t&&null!==t&&r===e}return e.trace=!1,e.debug=!1,e.cache=!0,e.placeholders={parent:"{{|PARENT|}}"},e.indexOf=function(e,t){if(Array.prototype.hasOwnProperty("indexOf"))return e.indexOf(t);if(void 0===e||null===e)throw new TypeError;var r=Object(e),n=r.length>>>0;if(0===n)return-1;var o=0;if(arguments.length>0&&(o=Number(arguments[1]),o!==o?o=0:0!==o&&o!==1/0&&o!==-(1/0)&&(o=(o>0||-1)*Math.floor(Math.abs(o)))),o>=n)return-1;for(var i=o>=0?o:Math.max(n-Math.abs(o),0);i<n;i++)if(i in r&&r[i]===t)return i;return e==t?0:-1},e.forEach=function(e,t,r){if(Array.prototype.forEach)return e.forEach(t,r);var n,o;if(null==e)throw new TypeError(" this is null or not defined");var i=Object(e),s=i.length>>>0;if("[object Function]"!={}.toString.call(t))throw new TypeError(t+" is not a function");for(r&&(n=r),o=0;o<s;){var p;o in i&&(p=i[o],t.call(n,p,o,i)),o++}},e.merge=function(t,r,n){return e.forEach(Object.keys(r),function(e){(!n||e in t)&&(t[e]=r[e])}),t},e.Error=function(e){this.message=e,this.name="TwigException",this.type="TwigException"},e.Error.prototype.toString=function(){var e=this.name+": "+this.message;return e},e.log={trace:function(){e.trace&&console&&console.log(Array.prototype.slice.call(arguments))},debug:function(){e.debug&&console&&console.log(Array.prototype.slice.call(arguments))}},"undefined"!=typeof console?"undefined"!=typeof console.error?e.log.error=function(){console.error.apply(console,arguments)}:"undefined"!=typeof console.log&&(e.log.error=function(){console.log.apply(console,arguments)}):e.log.error=function(){},e.ChildContext=function(e){var t=function(){};return t.prototype=e,new t},e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw",output_whitespace_pre:"output_whitespace_pre",output_whitespace_post:"output_whitespace_post",output_whitespace_both:"output_whitespace_both",logic_whitespace_pre:"logic_whitespace_pre",logic_whitespace_post:"logic_whitespace_post",logic_whitespace_both:"logic_whitespace_both"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.raw,open:"{% verbatim %}",close:"{% endverbatim %}"},{type:e.token.type.output_whitespace_pre,open:"{{-",close:"}}"},{type:e.token.type.output_whitespace_post,open:"{{",close:"-}}"},{type:e.token.type.output_whitespace_both,open:"{{-",close:"-}}"},{type:e.token.type.logic_whitespace_pre,open:"{%-",close:"%}"},{type:e.token.type.logic_whitespace_post,open:"{%",close:"-%}"},{type:e.token.type.logic_whitespace_both,open:"{%-",close:"-%}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){var r,n,o,i,s={position:null,close_position:null,def:null};for(r=0;r<e.token.definitions.length;r++)n=e.token.definitions[r],o=t.indexOf(n.open),i=t.indexOf(n.close),e.log.trace("Twig.token.findStart: ","Searching for ",n.open," found at ",o),o>=0&&n.open.length!==n.close.length&&i<0||(o>=0&&(null===s.position||o<s.position)?(s.position=o,s.def=n,s.close_position=i):o>=0&&null!==s.position&&o===s.position&&(n.open.length>s.def.open.length?(s.position=o,s.def=n,s.close_position=i):n.open.length===s.def.open.length&&(n.close.length>s.def.close.length?i>=0&&i<s.close_position&&(s.position=o,s.def=n,s.close_position=i):i>=0&&i<s.close_position&&(s.position=o,s.def=n,s.close_position=i))));return delete s.close_position,s},e.token.findEnd=function(t,r,n){for(var o,i,s=null,p=!1,a=0,l=null,c=null,u=null,f=null,h=null,y=null;!p;){if(l=null,c=null,u=t.indexOf(r.close,a),!(u>=0))throw new e.Error("Unable to find closing bracket '"+r.close+"' opened near template position "+n);if(s=u,p=!0,r.type===e.token.type.comment)break;if(r.type===e.token.type.raw)break;for(i=e.token.strings.length,o=0;o<i;o+=1)h=t.indexOf(e.token.strings[o],a),h>0&&h<u&&(null===l||h<l)&&(l=h,c=e.token.strings[o]);if(null!==l)for(f=l+1,s=null,p=!1;;){if(y=t.indexOf(c,f),y<0)throw"Unclosed string in template";if("\\"!==t.substr(y-1,1)){a=y+1;break}f=y+1}}return s},e.tokenize=function(t){for(var r=[],n=0,o=null,i=null;t.length>0;)if(o=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",o),null!==o.position){if(o.position>0&&r.push({type:e.token.type.raw,value:t.substring(0,o.position)}),t=t.substr(o.position+o.def.open.length),n+=o.position+o.def.open.length,i=e.token.findEnd(t,o.def,n),e.log.trace("Twig.tokenize: ","Token ends at ",i),r.push({type:o.def.type,value:t.substring(0,i).trim()}),"\n"===t.substr(i+o.def.close.length,1))switch(o.def.type){case"logic_whitespace_pre":case"logic_whitespace_post":case"logic_whitespace_both":case"logic":i+=1}t=t.substr(i+o.def.close.length),n+=i+o.def.close.length}else r.push({type:e.token.type.raw,value:t}),t="";return r},e.compile=function(t){try{for(var r=[],n=[],o=[],i=null,s=null,p=null,a=null,l=null,c=null,u=null,f=null,h=null,y=null,d=null,g=null,m=function(t){e.expression.compile.apply(this,[t]),n.length>0?o.push(t):r.push(t)},x=function(t){if(s=e.logic.compile.apply(this,[t]),y=s.type,d=e.logic.handler[y].open,g=e.logic.handler[y].next,e.log.trace("Twig.compile: ","Compiled logic token to ",s," next is: ",g," open is : ",d),void 0!==d&&!d){if(a=n.pop(),u=e.logic.handler[a.type],e.indexOf(u.next,y)<0)throw new Error(y+" not expected after a "+a.type);a.output=a.output||[],a.output=a.output.concat(o),o=[],h={type:e.token.type.logic,token:a},n.length>0?o.push(h):r.push(h)}void 0!==g&&g.length>0?(e.log.trace("Twig.compile: ","Pushing ",s," to logic stack."),n.length>0&&(a=n.pop(),a.output=a.output||[],a.output=a.output.concat(o),n.push(a),o=[]),n.push(s)):void 0!==d&&d&&(h={type:e.token.type.logic,token:s},n.length>0?o.push(h):r.push(h))};t.length>0;){switch(i=t.shift(),l=r[r.length-1],c=o[o.length-1],f=t[0],e.log.trace("Compiling token ",i),i.type){case e.token.type.raw:n.length>0?o.push(i):r.push(i);break;case e.token.type.logic:x.call(this,i);break;case e.token.type.comment:break;case e.token.type.output:m.call(this,i);break;case e.token.type.logic_whitespace_pre:case e.token.type.logic_whitespace_post:case e.token.type.logic_whitespace_both:case e.token.type.output_whitespace_pre:case e.token.type.output_whitespace_post:case e.token.type.output_whitespace_both:switch(i.type!==e.token.type.output_whitespace_post&&i.type!==e.token.type.logic_whitespace_post&&(l&&l.type===e.token.type.raw&&(r.pop(),null===l.value.match(/^\s*$/)&&(l.value=l.value.trim(),r.push(l))),c&&c.type===e.token.type.raw&&(o.pop(),null===c.value.match(/^\s*$/)&&(c.value=c.value.trim(),o.push(c)))),i.type){case e.token.type.output_whitespace_pre:case e.token.type.output_whitespace_post:case e.token.type.output_whitespace_both:m.call(this,i);break;case e.token.type.logic_whitespace_pre:case e.token.type.logic_whitespace_post:case e.token.type.logic_whitespace_both:x.call(this,i)}i.type!==e.token.type.output_whitespace_pre&&i.type!==e.token.type.logic_whitespace_pre&&f&&f.type===e.token.type.raw&&(t.shift(),null===f.value.match(/^\s*$/)&&(f.value=f.value.trim(),t.unshift(f)))}e.log.trace("Twig.compile: "," Output: ",r," Logic Stack: ",n," Pending Output: ",o)}if(n.length>0)throw p=n.pop(),new Error("Unable to find an end tag for "+p.type+", expecting one of "+p.next);return r}catch(t){if(this.options.rethrow)throw t;e.log.error("Error compiling twig template "+this.id+": "),t.stack?e.log.error(t.stack):e.log.error(t.toString())}},e.parse=function(t,r){try{var n=[],o=!0,i=this;return e.forEach(t,function(t){switch(e.log.debug("Twig.parse: ","Parsing token: ",t),t.type){case e.token.type.raw:n.push(e.filters.raw(t.value));break;case e.token.type.logic:var s=t.token,p=e.logic.parse.apply(i,[s,r,o]);void 0!==p.chain&&(o=p.chain),void 0!==p.context&&(r=p.context),void 0!==p.output&&n.push(p.output);break;case e.token.type.comment:break;case e.token.type.output_whitespace_pre:case e.token.type.output_whitespace_post:case e.token.type.output_whitespace_both:case e.token.type.output:e.log.debug("Twig.parse: ","Output token: ",t.stack),n.push(e.expression.parse.apply(i,[t.stack,r]))}}),e.output.apply(this,[n])}catch(t){if(this.options.rethrow)throw t;if(e.log.error("Error parsing twig template "+this.id+": "),t.stack?e.log.error(t.stack):e.log.error(t.toString()),e.debug)return t.toString()}},e.prepare=function(t){var r,n;return e.log.debug("Twig.prepare: ","Tokenizing ",t),n=e.tokenize.apply(this,[t]),e.log.debug("Twig.prepare: ","Compiling ",n),r=e.compile.apply(this,[n]),e.log.debug("Twig.prepare: ","Compiled ",r),r},e.output=function(t){if(!this.options.autoescape)return t.join("");var r="html";"string"==typeof this.options.autoescape&&(r=this.options.autoescape);var n=[];return e.forEach(t,function(t){t&&t.twig_markup!==!0&&t.twig_markup!=r&&(t=e.filters.escape(t,[r])),n.push(t)}),e.Markup(n.join(""))},e.Templates={loaders:{},parsers:{},registry:{}},e.validateId=function(t){if("prototype"===t)throw new e.Error(t+" is not a valid twig identifier");if(e.cache&&e.Templates.registry.hasOwnProperty(t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.registerLoader=function(t,r,n){if("function"!=typeof r)throw new e.Error("Unable to add loader for "+t+": Invalid function reference given.");n&&(r=r.bind(n)),this.loaders[t]=r},e.Templates.unRegisterLoader=function(e){this.isRegisteredLoader(e)&&delete this.loaders[e]},e.Templates.isRegisteredLoader=function(e){return this.loaders.hasOwnProperty(e)},e.Templates.registerParser=function(t,r,n){if("function"!=typeof r)throw new e.Error("Unable to add parser for "+t+": Invalid function regerence given.");n&&(r=r.bind(n)),this.parsers[t]=r},e.Templates.unRegisterParser=function(e){this.isRegisteredParser(e)&&delete this.parsers[e]},e.Templates.isRegisteredParser=function(e){return this.parsers.hasOwnProperty(e)},e.Templates.save=function(t){if(void 0===t.id)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return e.Templates.registry.hasOwnProperty(t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,r,n,o){var i;return void 0===r.async&&(r.async=!0),void 0===r.id&&(r.id=t),e.cache&&e.Templates.registry.hasOwnProperty(r.id)?("function"==typeof n&&n(e.Templates.registry[r.id]),e.Templates.registry[r.id]):(r.parser=r.parser||"twig",i=this.loaders[r.method]||this.loaders.fs,i.apply(this,arguments))},e.Template=function(r){var n=r.data,o=r.id,i=r.blocks,s=r.macros||{},p=r.base,a=r.path,l=r.url,c=r.name,u=r.method,f=r.options;this.id=o,this.method=u,this.base=p,this.path=a,this.url=l,this.name=c,this.macros=s,this.options=f,this.reset(i),t("String",n)?this.tokens=e.prepare.apply(this,[n]):this.tokens=n,void 0!==o&&e.Templates.save(this)},e.Template.prototype.reset=function(t){e.log.debug("Twig.Template.reset","Reseting template "+this.id),this.blocks={},this.importedBlocks=[],this.originalBlockTokens={},this.child={blocks:t||{}},this.extend=null},e.Template.prototype.render=function(t,r){r=r||{};var n,o;if(this.context=t||{},this.reset(),r.blocks&&(this.blocks=r.blocks),r.macros&&(this.macros=r.macros),n=e.parse.apply(this,[this.tokens,this.context]),this.extend){var i;return this.options.allowInlineIncludes&&(i=e.Templates.load(this.extend),i&&(i.options=this.options)),i||(o=e.path.parsePath(this,this.extend),i=e.Templates.loadRemote(o,{method:this.getLoaderMethod(),base:this.base,async:!1,id:o,options:this.options})),this.parent=i,this.parent.render(this.context,{blocks:this.blocks})}return"blocks"==r.output?this.blocks:"macros"==r.output?this.macros:n},e.Template.prototype.importFile=function(t){var r,n;if(!this.url&&this.options.allowInlineIncludes){if(t=this.path?this.path+"/"+t:t,n=e.Templates.load(t),!n&&(n=e.Templates.loadRemote(r,{id:t,method:this.getLoaderMethod(),async:!1,path:t,options:this.options}),!n))throw new e.Error("Unable to find the template "+t);return n.options=this.options,n}return r=e.path.parsePath(this,t),n=e.Templates.loadRemote(r,{method:this.getLoaderMethod(),base:this.base,async:!1,options:this.options,id:r})},e.Template.prototype.importBlocks=function(t,r){var n=this.importFile(t),o=this.context,i=this;r=r||!1,n.render(o),e.forEach(Object.keys(n.blocks),function(e){(r||void 0===i.blocks[e])&&(i.blocks[e]=n.blocks[e],i.importedBlocks.push(e))})},e.Template.prototype.importMacros=function(t){var r=e.path.parsePath(this,t),n=e.Templates.loadRemote(r,{method:this.getLoaderMethod(),async:!1,id:r});return n},e.Template.prototype.getLoaderMethod=function(){return this.path?"fs":this.url?"ajax":this.method||"fs"},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e.Markup=function(e,t){return"undefined"==typeof t&&(t=!0),"string"==typeof e&&e.length>0&&(e=new String(e),e.twig_markup=t),e},e}},function(e,t){e.exports=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,r){var n,o=JSON.stringify(t.tokens),i=t.id;if(r.module){if(void 0===e.compiler.module[r.module])throw new e.Error("Unable to find module type "+r.module);n=e.compiler.module[r.module](i,o,r.twig)}else n=e.compiler.wrap(i,o);return n},e.compiler.module={amd:function(t,r,n){return'define(["'+n+'"], function (Twig) {\n\tvar twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,r)+"\n\treturn templates;\n});"},node:function(t,r){return'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,r)},cjs2:function(t,r,n){return'module.declare([{ twig: "'+n+'" }], function (require, exports, module) {\n\tvar twig = require("twig").twig;\n\texports.template = '+e.compiler.wrap(t,r)+"\n});"}},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}},function(e,t,r){e.exports=function(e){"use strict";e.expression={},r(4)(e),e.expression.reservedWords=["true","false","null","TRUE","FALSE","NULL","_context","and","or","in","not in","if"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",slice:"Twig.expression.type.slice",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},subexpression:{start:"Twig.expression.type.subexpression.start",end:"Twig.expression.type.subexpression.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.subexpression.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start,e.expression.type.subexpression.start]},e.expression.set.operations_extended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets,e.expression.type.slice]),e.expression.fn={compile:{push:function(e,t,r){r.push(e)},push_both:function(e,t,r){r.push(e),t.push(e)}},parse:{push:function(e,t,r){t.push(e)},push_value:function(e,t,r){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*(\s?as)?)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile:function(e,t,r){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,r.push(e)},parse:function(t,r,n){var o=r.pop(),i=t.params&&e.expression.parse.apply(this,[t.params,n]),s=e.test(t.filter,o,i);"not"==t.modifier?r.push(!s):r.push(s)}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile:function(t,r,n){var o,i=r.length-1;for(delete t.match,delete t.value;i>=0;i--){if(o=r.pop(),o.type===e.expression.type.object.start||o.type===e.expression.type.parameter.start||o.type===e.expression.type.array.start){r.push(o);break}n.push(o)}n.push(t)}},{type:e.expression.type.number,regex:/^\-?\d+(\.\d+)?/,next:e.expression.set.operations,compile:function(e,t,r){e.value=Number(e.value),r.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.operator.binary,regex:/(^\?\:|^[\+\-~%\?]|^[\:](?!\d\])|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^(and)[\(|\s+]|^(or)[\(|\s+]|^(in)[\(|\s+]|^(not in)[\(|\s+]|^\.\.)/,next:e.expression.set.expressions.concat([e.expression.type.operator.unary]),transform:function(e,t){switch(e[0]){case"and(":case"or(":case"in(":case"not in(":return t[t.length-1].value=e[2],e[0];default:return""}},compile:function(t,r,n){delete t.match,t.value=t.value.trim();var o=t.value,i=e.expression.operator.lookup(o,t);for(e.log.trace("Twig.expression.compile: ","Operator: ",i," from ",o);r.length>0&&(r[r.length-1].type==e.expression.type.operator.unary||r[r.length-1].type==e.expression.type.operator.binary)&&(i.associativity===e.expression.operator.leftToRight&&i.precidence>=r[r.length-1].precidence||i.associativity===e.expression.operator.rightToLeft&&i.precidence>r[r.length-1].precidence);){var s=r.pop();n.push(s)}if(":"===o){if(!r[r.length-1]||"?"!==r[r.length-1].value){var p=n.pop();if(p.type===e.expression.type.string||p.type===e.expression.type.variable)t.key=p.value;else if(p.type===e.expression.type.number)t.key=p.value.toString();else{if(!p.expression||p.type!==e.expression.type.parameter.end&&p.type!=e.expression.type.subexpression.end)throw new e.Error("Unexpected value before ':' of "+p.type+" = "+p.value);t.params=p.params}return void n.push(t)}}else r.push(i)},parse:function(t,r,n){t.key?r.push(t):t.params?(t.key=e.expression.parse.apply(this,[t.params,n]),r.push(t),n.loop||delete t.params):e.expression.operator.parse(t.value,r)}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile:function(t,r,n){delete t.match,t.value=t.value.trim();var o=t.value,i=e.expression.operator.lookup(o,t);for(e.log.trace("Twig.expression.compile: ","Operator: ",i," from ",o);r.length>0&&(r[r.length-1].type==e.expression.type.operator.unary||r[r.length-1].type==e.expression.type.operator.binary)&&(i.associativity===e.expression.operator.leftToRight&&i.precidence>=r[r.length-1].precidence||i.associativity===e.expression.operator.rightToLeft&&i.precidence>r[r.length-1].precidence);){var s=r.pop();n.push(s)}r.push(i)},parse:function(t,r,n){e.expression.operator.parse(t.value,r)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2[\s\S])*?\1/,next:e.expression.set.operations_extended,compile:function(t,r,n){var o=t.value;delete t.match,o='"'===o.substring(0,1)?o.replace('\\"','"'):o.replace("\\'","'"),t.value=o.substring(1,o.length-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),n.push(t)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.subexpression.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.subexpression.end]),compile:function(e,t,r){e.value="(",r.push(e),t.push(e)},parse:e.expression.fn.parse.push},{type:e.expression.type.subexpression.end,regex:/^\)/,next:e.expression.set.operations_extended,validate:function(t,r){for(var n=r.length-1,o=!1,i=!1,s=0;!o&&n>=0;){var p=r[n];o=p.type===e.expression.type.subexpression.start,o&&i&&(i=!1,o=!1),p.type===e.expression.type.parameter.start?s++:p.type===e.expression.type.parameter.end?s--:p.type===e.expression.type.subexpression.end&&(i=!0),n--}return o&&0===s},compile:function(t,r,n){var o,i=t;for(o=r.pop();r.length>0&&o.type!=e.expression.type.subexpression.start;)n.push(o),o=r.pop();for(var s=[];t.type!==e.expression.type.subexpression.start;)s.unshift(t),t=n.pop();s.unshift(t);o=r[r.length-1],void 0===o||o.type!==e.expression.type._function&&o.type!==e.expression.type.filter&&o.type!==e.expression.type.test&&o.type!==e.expression.type.key.brackets?(i.expression=!0,s.pop(),s.shift(),i.params=s,n.push(i)):(i.expression=!1,o.params=s)},parse:function(t,r,n){var o=null;if(!t.expression)throw new e.Error("Unexpected subexpression end when token is not marked as an expression");o=e.expression.parse.apply(this,[t.params,n]),r.push(o)}},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),validate:function(t,r){var n=r[r.length-1];return n&&e.indexOf(e.expression.reservedWords,n.value.trim())<0},compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operations_extended,compile:function(t,r,n){var o,i=t;for(o=r.pop();r.length>0&&o.type!=e.expression.type.parameter.start;)n.push(o),o=r.pop();for(var s=[];t.type!==e.expression.type.parameter.start;)s.unshift(t),t=n.pop();s.unshift(t);t=n[n.length-1],void 0===t||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets?(i.expression=!0,s.pop(),s.shift(),i.params=s,n.push(i)):(i.expression=!1,t.params=s)},parse:function(t,r,n){var o=[],i=!1,s=null;if(t.expression)s=e.expression.parse.apply(this,[t.params,n]),r.push(s);else{for(;r.length>0;){if(s=r.pop(),s&&s.type&&s.type==e.expression.type.parameter.start){i=!0;break}o.unshift(s)}if(!i)throw new e.Error("Expected end of parameter set.");r.push(o)}}},{type:e.expression.type.slice,regex:/^\[(\d*\:\d*)\]/,next:e.expression.set.operations_extended,compile:function(e,t,r){var n=e.match[1].split(":"),o=n[0]?parseInt(n[0]):void 0,i=n[1]?parseInt(n[1]):void 0;e.value="slice",e.params=[o,i],i||(e.params=[o]),r.push(e)},parse:function(t,r,n){var o=r.pop(),i=t.params;r.push(e.filter.apply(this,[t.value,o,i]))}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operations_extended,compile:function(t,r,n){for(var o,i=r.length-1;i>=0&&(o=r.pop(),o.type!==e.expression.type.array.start);i--)n.push(o);n.push(t)},parse:function(t,r,n){for(var o=[],i=!1,s=null;r.length>0;){if(s=r.pop(),s.type&&s.type==e.expression.type.array.start){i=!0;break}o.unshift(s)}if(!i)throw new e.Error("Expected end of array.");r.push(o)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operations_extended,compile:function(t,r,n){for(var o,i=r.length-1;i>=0&&(o=r.pop(),!o||o.type!==e.expression.type.object.start);i--)n.push(o);n.push(t)},parse:function(t,r,n){for(var o={},i=!1,s=null,p=!1,a=null;r.length>0;){if(s=r.pop(),s&&s.type&&s.type===e.expression.type.object.start){i=!0;break}if(s&&s.type&&(s.type===e.expression.type.operator.binary||s.type===e.expression.type.operator.unary)&&s.key){if(!p)throw new e.Error("Missing value for key '"+s.key+"' in object definition.");o[s.key]=a,void 0===o._keys&&(o._keys=[]),o._keys.unshift(s.key),a=null,p=!1}else p=!0,a=s}if(!i)throw new e.Error("Unexpected end of object.");r.push(o)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,r){e.value=e.match[1],r.push(e)},parse:function(t,r,n){var o=r.pop(),i=t.params&&e.expression.parse.apply(this,[t.params,n]);r.push(e.filter.apply(this,[t.value,o,i]))}},{type:e.expression.type._function,regex:/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,next:e.expression.type.parameter.start,validate:function(t,r){return t[1]&&e.indexOf(e.expression.reservedWords,t[1])<0},transform:function(e,t){return"("},compile:function(e,t,r){var n=e.match[1];e.fn=n,delete e.match,delete e.value,r.push(e)},parse:function(t,r,n){var o,i=t.params&&e.expression.parse.apply(this,[t.params,n]),s=t.fn;if(e.functions[s])o=e.functions[s].apply(this,i);else{if("function"!=typeof n[s])throw new e.Error(s+" function does not exist and is not defined in the context");o=n[s].apply(n,i)}r.push(o)}},{type:e.expression.type.variable,regex:/^[a-zA-Z_][a-zA-Z0-9_]*/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:function(t,r){return e.indexOf(e.expression.reservedWords,t[0])<0},parse:function(t,r,n){var o=e.expression.resolve.apply(this,[n[t.value],n]);r.push(o)}},{type:e.expression.type.key.period,regex:/^\.([a-zA-Z0-9_]+)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,r){e.key=e.match[1],delete e.match,delete e.value,r.push(e)},parse:function(t,r,n,o){var i,s=t.params&&e.expression.parse.apply(this,[t.params,n]),p=t.key,a=r.pop();if(null===a||void 0===a){if(this.options.strict_variables)throw new e.Error("Can't access a key "+p+" on an null or undefined object.");i=void 0}else{var l=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)};i="object"==typeof a&&p in a?a[p]:void 0!==a["get"+l(p)]?a["get"+l(p)]:void 0!==a["is"+l(p)]?a["is"+l(p)]:void 0}r.push(e.expression.resolve.apply(this,[i,n,s,o]))}},{type:e.expression.type.key.brackets,regex:/^\[([^\]\:]*)\]/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(t,r,n){var o=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:o}).stack,n.push(t)},parse:function(t,r,n,o){var i,s=t.params&&e.expression.parse.apply(this,[t.params,n]),p=e.expression.parse.apply(this,[t.stack,n]),a=r.pop();if(null===a||void 0===a){if(this.options.strict_variables)throw new e.Error("Can't access a key "+p+" on an null or undefined object.");return null}i="object"==typeof a&&p in a?a[p]:null,r.push(e.expression.resolve.apply(this,[i,a,s,o]))}},{type:e.expression.type._null,regex:/^(null|NULL|none|NONE)/,next:e.expression.set.operations,compile:function(e,t,r){delete e.match,e.value=null,r.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse:function(e,t,r){t.push(r)}},{type:e.expression.type.bool,regex:/^(true|TRUE|false|FALSE)/,next:e.expression.set.operations,compile:function(e,t,r){e.value="true"===e.match[0].toLowerCase(),delete e.match,r.push(e)},parse:e.expression.fn.parse.push_value}],e.expression.resolve=function(t,r,n,o){if("function"==typeof t){if(o&&o.type===e.expression.type.parameter.end){var i=!0;n=o.params&&e.expression.parse.apply(this,[o.params,r,i]),o.cleanup=!0}return t.apply(r,n||[])}return t},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};for(;e.expression.definitions.length>0;)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){var r,n,o,i,s,p,a=[],l=0,c=null,u=[];for(p=function(){var t=Array.prototype.slice.apply(arguments);t.pop(),t.pop();return e.log.trace("Twig.expression.tokenize","Matched a ",r," regular expression of ",t),c&&e.indexOf(c,r)<0?(u.push(r+" cannot follow a "+a[a.length-1].type+" at template:"+l+" near '"+t[0].substring(0,20)+"...'"),t[0]):e.expression.handler[r].validate&&!e.expression.handler[r].validate(t,a)?t[0]:(u=[],a.push({type:r,value:t[0],match:t}),s=!0,c=i,l+=t[0].length,e.expression.handler[r].transform?e.expression.handler[r].transform(t,a):"")},e.log.debug("Twig.expression.tokenize","Tokenizing expression ",t);t.length>0;){t=t.trim();for(r in e.expression.handler)if(e.expression.handler.hasOwnProperty(r)){for(i=e.expression.handler[r].next,n=e.expression.handler[r].regex,e.log.trace("Checking type ",r," on ",t),o=n instanceof Array?n:[n],s=!1;o.length>0;)n=o.pop(),t=t.replace(n,p);if(s)break}if(!s)throw u.length>0?new e.Error(u.join(" OR ")):new e.Error("Unable to parse '"+t+"' at template position"+l)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",a),a},e.expression.compile=function(t){var r=t.value,n=e.expression.tokenize(r),o=null,i=[],s=[],p=null;for(e.log.trace("Twig.expression.compile: ","Compiling ",r);n.length>0;)o=n.shift(),p=e.expression.handler[o.type],e.log.trace("Twig.expression.compile: ","Compiling ",o),p.compile&&p.compile(o,s,i),e.log.trace("Twig.expression.compile: ","Stack is",s),e.log.trace("Twig.expression.compile: ","Output is",i);for(;s.length>0;)i.push(s.pop());return e.log.trace("Twig.expression.compile: ","Final output is",i),t.stack=i,delete t.value,t},e.expression.parse=function(t,r,n){var o=this;t instanceof Array||(t=[t]);var i,s=[],p=null,a=[];if(e.forEach(t,function(n,l){n.cleanup||(t.length>l+1&&(i=t[l+1]),p=e.expression.handler[n.type],p.parse&&p.parse.apply(o,[n,s,r,i]),r.loop&&n.type===e.expression.type.operator.binary&&a.push(n))}),e.forEach(a,function(e){e.params&&e.key&&delete e.key}),n){for(var l=[];s.length>0;)l.unshift(s.pop());s.push(l)}return s.pop()},e}},function(e,t){e.exports=function(e){"use strict";e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};var t=function(e,t){if(void 0===t||null===t)return null;if(void 0!==t.indexOf)return e===t||""!==e&&t.indexOf(e)>-1;var r;for(r in t)if(t.hasOwnProperty(r)&&t[r]===e)return!0;return!1};return e.expression.operator.lookup=function(t,r){switch(t){case"..":r.precidence=20,r.associativity=e.expression.operator.leftToRight;break;case",":r.precidence=18,r.associativity=e.expression.operator.leftToRight;break;case"?:":case"?":case":":r.precidence=16,r.associativity=e.expression.operator.rightToLeft;break;case"or":r.precidence=14,r.associativity=e.expression.operator.leftToRight;break;case"and":r.precidence=13,r.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":r.precidence=9,r.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":case"not in":case"in":r.precidence=8,r.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":r.precidence=6,r.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":r.precidence=5,r.associativity=e.expression.operator.leftToRight;break;case"not":r.precidence=3,r.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error("Failed to lookup operator: "+t+" is an unknown operator.")}return r.operator=t,r},e.expression.operator.parse=function(r,n){e.log.trace("Twig.expression.operator.parse: ","Handling ",r);var o,i,s;switch("?"===r&&(s=n.pop()),i=n.pop(),"not"!==r&&(o=n.pop()),"in"!==r&&"not in"!==r&&(o&&Array.isArray(o)&&(o=o.length),i&&Array.isArray(i)&&(i=i.length)),r){case":":break;case"?:":e.lib.boolval(o)?n.push(o):n.push(i);
-break;case"?":void 0===o&&(o=i,i=s,s=void 0),e.lib.boolval(o)?n.push(i):n.push(s);break;case"+":i=parseFloat(i),o=parseFloat(o),n.push(o+i);break;case"-":i=parseFloat(i),o=parseFloat(o),n.push(o-i);break;case"*":i=parseFloat(i),o=parseFloat(o),n.push(o*i);break;case"/":i=parseFloat(i),o=parseFloat(o),n.push(o/i);break;case"//":i=parseFloat(i),o=parseFloat(o),n.push(Math.floor(o/i));break;case"%":i=parseFloat(i),o=parseFloat(o),n.push(o%i);break;case"~":n.push((null!=o?o.toString():"")+(null!=i?i.toString():""));break;case"not":case"!":n.push(!e.lib.boolval(i));break;case"<":n.push(o<i);break;case"<=":n.push(o<=i);break;case">":n.push(o>i);break;case">=":n.push(o>=i);break;case"===":n.push(o===i);break;case"==":n.push(o==i);break;case"!==":n.push(o!==i);break;case"!=":n.push(o!=i);break;case"or":n.push(o||i);break;case"and":n.push(o&&i);break;case"**":n.push(Math.pow(o,i));break;case"not in":n.push(!t(o,i));break;case"in":n.push(t(o,i));break;case"..":n.push(e.functions.range(o,i));break;default:throw new e.Error("Failed to parse operator: "+r+" is an unknown operator.")}},e}},function(e,t){e.exports=function(e){function t(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return void 0!==t&&null!==t&&r===e}return e.filters={upper:function(e){return"string"!=typeof e?e:e.toUpperCase()},lower:function(e){return"string"!=typeof e?e:e.toLowerCase()},capitalize:function(e){return"string"!=typeof e?e:e.substr(0,1).toUpperCase()+e.toLowerCase().substr(1)},title:function(e){return"string"!=typeof e?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,r){return t+r.toUpperCase()})},length:function(t){return e.lib.is("Array",t)||"string"==typeof t?t.length:e.lib.is("Object",t)?void 0===t._keys?Object.keys(t).length:t._keys.length:0},reverse:function(e){if(t("Array",e))return e.reverse();if(t("String",e))return e.split("").reverse().join("");if(t("Object",e)){var r=e._keys||Object.keys(e).reverse();return e._keys=r,e}},sort:function(e){if(t("Array",e))return e.sort();if(t("Object",e)){delete e._keys;var r=Object.keys(e),n=r.sort(function(t,r){var n;return e[t]>e[r]==!(e[t]<=e[r])?e[t]>e[r]?1:e[t]<e[r]?-1:0:isNaN(n=parseFloat(e[t]))||isNaN(b1=parseFloat(e[r]))?"string"==typeof e[t]?e[t]>e[r].toString()?1:e[t]<e[r].toString()?-1:0:"string"==typeof e[r]?e[t].toString()>e[r]?1:e[t].toString()<e[r]?-1:0:null:n>b1?1:n<b1?-1:0});return e._keys=n,e}},keys:function(t){if(void 0!==t&&null!==t){var r=t._keys||Object.keys(t),n=[];return e.forEach(r,function(e){"_keys"!==e&&t.hasOwnProperty(e)&&n.push(e)}),n}},url_encode:function(e){if(void 0!==e&&null!==e){var t=encodeURIComponent(e);return t=t.replace("'","%27")}},join:function(r,n){if(void 0!==r&&null!==r){var o="",i=[],s=null;return n&&n[0]&&(o=n[0]),t("Array",r)?i=r:(s=r._keys||Object.keys(r),e.forEach(s,function(e){"_keys"!==e&&r.hasOwnProperty(e)&&i.push(r[e])})),i.join(o)}},default:function(t,r){if(void 0!==r&&r.length>1)throw new e.Error("default filter expects one argument");return void 0===t||null===t||""===t?void 0===r?"":r[0]:t},json_encode:function(r){if(void 0===r||null===r)return"null";if("object"==typeof r&&t("Array",r))return o=[],e.forEach(r,function(t){o.push(e.filters.json_encode(t))}),"["+o.join(",")+"]";if("object"==typeof r){var n=r._keys||Object.keys(r),o=[];return e.forEach(n,function(t){o.push(JSON.stringify(t)+":"+e.filters.json_encode(r[t]))}),"{"+o.join(",")+"}"}return JSON.stringify(r)},merge:function(r,n){var o=[],i=0,s=[];if(t("Array",r)?e.forEach(n,function(e){t("Array",e)||(o={})}):o={},t("Array",o)||(o._keys=[]),t("Array",r)?e.forEach(r,function(e){o._keys&&o._keys.push(i),o[i]=e,i++}):(s=r._keys||Object.keys(r),e.forEach(s,function(e){o[e]=r[e],o._keys.push(e);var t=parseInt(e,10);!isNaN(t)&&t>=i&&(i=t+1)})),e.forEach(n,function(r){t("Array",r)?e.forEach(r,function(e){o._keys&&o._keys.push(i),o[i]=e,i++}):(s=r._keys||Object.keys(r),e.forEach(s,function(e){o[e]||o._keys.push(e),o[e]=r[e];var t=parseInt(e,10);!isNaN(t)&&t>=i&&(i=t+1)}))}),0===n.length)throw new e.Error("Filter merge expects at least one parameter");return o},date:function(t,r){var n=e.functions.date(t),o=r&&r.length?r[0]:"F j, Y H:i";return e.lib.date(o,n)},date_modify:function(t,r){if(void 0!==t&&null!==t){if(void 0===r||1!==r.length)throw new e.Error("date_modify filter expects 1 argument");var n,o=r[0];return e.lib.is("Date",t)&&(n=e.lib.strtotime(o,t.getTime()/1e3)),e.lib.is("String",t)&&(n=e.lib.strtotime(o,e.lib.strtotime(t))),e.lib.is("Number",t)&&(n=e.lib.strtotime(o,t)),new Date(1e3*n)}},replace:function(t,r){if(void 0!==t&&null!==t){var n,o=r[0];for(n in o)o.hasOwnProperty(n)&&"_keys"!==n&&(t=e.lib.replaceAll(t,n,o[n]));return t}},format:function(t,r){if(void 0!==t&&null!==t)return e.lib.vsprintf(t,r)},striptags:function(t){if(void 0!==t&&null!==t)return e.lib.strip_tags(t)},escape:function(t,r){if(void 0!==t&&null!==t){var n="html";if(r&&r.length&&r[0]!==!0&&(n=r[0]),"html"==n){var o=t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return e.Markup(o,"html")}if("js"==n){for(var o=t.toString(),i="",s=0;s<o.length;s++)if(o[s].match(/^[a-zA-Z0-9,\._]$/))i+=o[s];else{var p=o.charCodeAt(s);i+=p<128?"\\x"+p.toString(16).toUpperCase():e.lib.sprintf("\\u%04s",p.toString(16).toUpperCase())}return e.Markup(i,"js")}if("css"==n){for(var o=t.toString(),i="",s=0;s<o.length;s++)if(o[s].match(/^[a-zA-Z0-9]$/))i+=o[s];else{var p=o.charCodeAt(s);i+="\\"+p.toString(16).toUpperCase()+" "}return e.Markup(i,"css")}if("url"==n){var i=e.filters.url_encode(t);return e.Markup(i,"url")}if("html_attr"==n){for(var o=t.toString(),i="",s=0;s<o.length;s++)if(o[s].match(/^[a-zA-Z0-9,\.\-_]$/))i+=o[s];else if(o[s].match(/^[&<>"]$/))i+=o[s].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");else{var p=o.charCodeAt(s);i+=p<=31&&9!=p&&10!=p&&13!=p?"&#xFFFD;":p<128?e.lib.sprintf("&#x%02s;",p.toString(16).toUpperCase()):e.lib.sprintf("&#x%04s;",p.toString(16).toUpperCase())}return e.Markup(i,"html_attr")}throw new e.Error("escape strategy unsupported")}},e:function(t,r){return e.filters.escape(t,r)},nl2br:function(t){if(void 0!==t&&null!==t){var r="BACKSLASH_n_replace",n="<br />"+r;return t=e.filters.escape(t).replace(/\r\n/g,n).replace(/\r/g,n).replace(/\n/g,n),t=e.lib.replaceAll(t,r,"\n"),e.Markup(t)}},number_format:function(e,t){var r=e,n=t&&t[0]?t[0]:void 0,o=t&&void 0!==t[1]?t[1]:".",i=t&&void 0!==t[2]?t[2]:",";r=(r+"").replace(/[^0-9+\-Ee.]/g,"");var s=isFinite(+r)?+r:0,p=isFinite(+n)?Math.abs(n):0,a="",l=function(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r};return a=(p?l(s,p):""+Math.round(s)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(a[1]||"").length<p&&(a[1]=a[1]||"",a[1]+=new Array(p-a[1].length+1).join("0")),a.join(o)},trim:function(t,r){if(void 0!==t&&null!==t){var n,o=e.filters.escape(""+t);n=r&&r[0]?""+r[0]:" \n\r\t\f\v            ​\u2028\u2029 ";for(var i=0;i<o.length;i++)if(n.indexOf(o.charAt(i))===-1){o=o.substring(i);break}for(i=o.length-1;i>=0;i--)if(n.indexOf(o.charAt(i))===-1){o=o.substring(0,i+1);break}return n.indexOf(o.charAt(0))===-1?o:""}},truncate:function(e,t){var r=30,n=!1,o="...";if(e+="",t&&(t[0]&&(r=t[0]),t[1]&&(n=t[1]),t[2]&&(o=t[2])),e.length>r){if(n&&(r=e.indexOf(" ",r),r===-1))return e;e=e.substr(0,r)+o}return e},slice:function(t,r){if(void 0!==t&&null!==t){if(void 0===r||r.length<1)throw new e.Error("slice filter expects at least 1 argument");var n=r[0]||0,o=r.length>1?r[1]:t.length,i=n>=0?n:Math.max(t.length+n,0);if(e.lib.is("Array",t)){for(var s=[],p=i;p<i+o&&p<t.length;p++)s.push(t[p]);return s}if(e.lib.is("String",t))return t.substr(i,o);throw new e.Error("slice filter expects value to be an array or string")}},abs:function(e){if(void 0!==e&&null!==e)return Math.abs(e)},first:function(e){if(t("Array",e))return e[0];if(t("Object",e)){if("_keys"in e)return e[e._keys[0]]}else if("string"==typeof e)return e.substr(0,1)},split:function(t,r){if(void 0!==t&&null!==t){if(void 0===r||r.length<1||r.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){var n=r[0],o=r[1],i=t.split(n);if(void 0===o)return i;if(o<0)return t.split(n,i.length+o);var s=[];if(""==n)for(;i.length>0;){for(var p="",a=0;a<o&&i.length>0;a++)p+=i.shift();s.push(p)}else{for(var a=0;a<o-1&&i.length>0;a++)s.push(i.shift());i.length>0&&s.push(i.join(n))}return s}throw new e.Error("split filter expects value to be a string")}},last:function(t){if(e.lib.is("Object",t)){var r;return r=void 0===t._keys?Object.keys(t):t._keys,t[r[r.length-1]]}return t[t.length-1]},raw:function(t){return e.Markup(t)},batch:function(t,r){var n,o,i,s=r.shift(),p=r.shift();if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",s))throw new e.Error("batch filter expects size to be a number");if(s=Math.ceil(s),n=e.lib.chunkArray(t,s),p&&t.length%s!=0){for(o=n.pop(),i=s-o.length;i--;)o.push(p);n.push(o)}return n},round:function(t,r){r=r||[];var n=r.length>0?r[0]:0,o=r.length>1?r[1]:"common";if(t=parseFloat(t),n&&!e.lib.is("Number",n))throw new e.Error("round filter expects precision to be a number");if("common"===o)return e.lib.round(t,n);if(!e.lib.is("Function",Math[o]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[o](t*Math.pow(10,n))/Math.pow(10,n)}},e.filter=function(t,r,n){if(!e.filters[t])throw"Unable to find filter "+t;return e.filters[t].apply(this,[r,n])},e.filter.extend=function(t,r){e.filters[t]=r},e}},function(e,t){e.exports=function(t){var r='Template "{name}" is not defined.';return t.functions={range:function(e,t,r){var n,o,i,s=[],p=r||1,a=!1;if(isNaN(e)||isNaN(t)?isNaN(e)&&isNaN(t)?(a=!0,n=e.charCodeAt(0),o=t.charCodeAt(0)):(n=isNaN(e)?0:e,o=isNaN(t)?0:t):(n=parseInt(e,10),o=parseInt(t,10)),i=!(n>o))for(;n<=o;)s.push(a?String.fromCharCode(n):n),n+=p;else for(;n>=o;)s.push(a?String.fromCharCode(n):n),n-=p;return s},cycle:function(e,t){var r=t%e.length;return e[r]},dump:function(){var e="\n",r=" ",n=0,o="",i=Array.prototype.slice.call(arguments),s=function(e){for(var t="";e>0;)e--,t+=r;return t},p=function(t){o+=s(n),"object"==typeof t?a(t):"function"==typeof t?o+="function()"+e:"string"==typeof t?o+="string("+t.length+') "'+t+'"'+e:"number"==typeof t?o+="number("+t+")"+e:"boolean"==typeof t&&(o+="bool("+t+")"+e)},a=function(t){var r;if(null===t)o+="NULL"+e;else if(void 0===t)o+="undefined"+e;else if("object"==typeof t){o+=s(n)+typeof t,n++,o+="("+function(e){var t,r=0;for(t in e)e.hasOwnProperty(t)&&r++;return r}(t)+") {"+e;for(r in t)o+=s(n)+"["+r+"]=> "+e,p(t[r]);n--,o+=s(n)+"}"+e}else p(t)};return 0==i.length&&i.push(this.context),t.forEach(i,function(e){a(e)}),o},date:function(e,r){var n;if(void 0===e||null===e||""===e)n=new Date;else if(t.lib.is("Date",e))n=e;else if(t.lib.is("String",e))n=e.match(/^[0-9]+$/)?new Date(1e3*e):new Date(1e3*t.lib.strtotime(e));else{if(!t.lib.is("Number",e))throw new t.Error("Unable to parse date "+e);n=new Date(1e3*e)}return n},block:function(e){return this.originalBlockTokens[e]?t.logic.parse.apply(this,[this.originalBlockTokens[e],this.context]).output:this.blocks[e]},parent:function(){return t.placeholders.parent},attribute:function(e,r,n){return t.lib.is("Object",e)&&e.hasOwnProperty(r)?"function"==typeof e[r]?e[r].apply(void 0,n):e[r]:e[r]||void 0},max:function(e){return t.lib.is("Object",e)?(delete e._keys,t.lib.max(e)):t.lib.max.apply(null,arguments)},min:function(e){return t.lib.is("Object",e)?(delete e._keys,t.lib.min(e)):t.lib.min.apply(null,arguments)},template_from_string:function(e){return void 0===e&&(e=""),t.Templates.parsers.twig({options:this.options,data:e})},random:function(e){function r(e){var t=Math.floor(Math.random()*n),r=[0,e],o=Math.min.apply(null,r),i=Math.max.apply(null,r);return o+Math.floor((i-o+1)*t/n)}var n=2147483648;if(t.lib.is("Number",e))return r(e);if(t.lib.is("String",e))return e.charAt(r(e.length-1));if(t.lib.is("Array",e))return e[r(e.length-1)];if(t.lib.is("Object",e)){var o=Object.keys(e);return e[o[r(o.length-1)]]}return r(n-1)},source:function(n,o){var i,s,p,a=!1,l="undefined"!=typeof e&&"undefined"!=typeof e.exports&&"undefined"==typeof window;l?(s="fs",p=__dirname+"/"+n):(s="ajax",p=n);var c={id:n,path:p,method:s,parser:"source",async:!1,fetchTemplateSource:!0};"undefined"==typeof o&&(o=!1);try{i=t.Templates.loadRemote(n,c),"undefined"==typeof i||null===i?i="":a=!0}catch(e){t.log.debug("Twig.functions.source: ","Problem loading template ",e)}return a||o?i:r.replace("{name}",n)}},t._function=function(e,r,n){if(!t.functions[e])throw"Unable to find function "+e;return t.functions[e](r,n)},t._function.extend=function(e,r){t.functions[e]=r},t}},function(e,t,r){e.exports=function(e){return e.lib={},e.lib.sprintf=r(8),e.lib.vsprintf=r(9),e.lib.round=r(10),e.lib.max=r(11),e.lib.min=r(12),e.lib.strip_tags=r(13),e.lib.strtotime=r(14),e.lib.date=r(15),e.lib.boolval=r(16),e.lib.is=function(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return void 0!==t&&null!==t&&r===e},e.lib.copy=function(e){var t,r={};for(t in e)r[t]=e[t];return r},e.lib.extend=function(e,t){var r,n=Object.keys(t);for(r=n.length;r--;)e[n[r]]=t[n[r]];return e},e.lib.replaceAll=function(e,t,r){return e.split(t).join(r)},e.lib.chunkArray=function(t,r){var n=[],o=0,i=t.length;if(r<1||!e.lib.is("Array",t))return[];for(;o<i;)n.push(t.slice(o,o+=r));return n},e}},function(e,t){"use strict";e.exports=function(){var e=/%%|%(\d+\$)?([\-+'#0 ]*)(\*\d+\$|\*|\d+)?(?:\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,r=0,n=t[r++],o=function(e,t,r,n){r||(r=" ");var o=e.length>=t?"":new Array(1+t-e.length>>>0).join(r);return n?e+o:o+e},i=function(e,t,r,n,i,s){var p=n-e.length;return p>0&&(e=r||!i?o(e,n,s,r):[e.slice(0,t.length),o("",p,"0",!0),e.slice(t.length)].join("")),e},s=function(e,t,r,n,s,p,a){var l=e>>>0;return r=r&&l&&{2:"0b",8:"0",16:"0x"}[t]||"",e=r+o(l.toString(t),p||0,"0",!1),i(e,r,n,s,a)},p=function(e,t,r,n,o,s){return null!==n&&void 0!==n&&(e=e.slice(0,n)),i(e,"",t,r,o,s)},a=function(e,n,a,l,c,u){var f,h,y,d,g;if("%%"===e)return"%";var m,x=!1,v="",b=!1,w=!1,k=" ",_=a.length;for(m=0;m<_;m++)switch(a.charAt(m)){case" ":v=" ";break;case"+":v="+";break;case"-":x=!0;break;case"'":k=a.charAt(m+1);break;case"0":b=!0,k="0";break;case"#":w=!0}if(l=l?"*"===l?+t[r++]:"*"===l.charAt(0)?+t[l.slice(1,-1)]:+l:0,l<0&&(l=-l,x=!0),!isFinite(l))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"===c?+t[r++]:"*"===c.charAt(0)?+t[c.slice(1,-1)]:+c:"fFeE".indexOf(u)>-1?6:"d"===u?0:void 0,g=n?t[n.slice(0,-1)]:t[r++],u){case"s":return p(g+"",x,l,c,b,k);case"c":return p(String.fromCharCode(+g),x,l,c,b);case"b":return s(g,2,w,x,l,c,b);case"o":return s(g,8,w,x,l,c,b);case"x":return s(g,16,w,x,l,c,b);case"X":return s(g,16,w,x,l,c,b).toUpperCase();case"u":return s(g,10,w,x,l,c,b);case"i":case"d":return f=+g||0,f=Math.round(f-f%1),h=f<0?"-":v,g=h+o(String(Math.abs(f)),c,"0",!1),i(g,h,x,l,b);case"e":case"E":case"f":case"F":case"g":case"G":return f=+g,h=f<0?"-":v,y=["toExponential","toFixed","toPrecision"]["efg".indexOf(u.toLowerCase())],d=["toString","toUpperCase"]["eEfFgG".indexOf(u)%2],g=h+Math.abs(f)[y](c),i(g,h,x,l,b)[d]();default:return e}};return n.replace(e,a)}},function(e,t,r){"use strict";e.exports=function(e,t){var n=r(8);return n.apply(this,[e].concat(t))}},function(e,t){"use strict";e.exports=function(e,t,r){var n,o,i,s;if(t|=0,n=Math.pow(10,t),e*=n,s=e>0|-(e<0),i=e%1===.5*s,o=Math.floor(e),i)switch(r){case"PHP_ROUND_HALF_DOWN":e=o+(s<0);break;case"PHP_ROUND_HALF_EVEN":e=o+o%2*s;break;case"PHP_ROUND_HALF_ODD":e=o+!(o%2);break;default:e=o+(s>0)}return(i?e:Math.round(e))/n}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.exports=function(){var e,t,n=0,o=0,i=arguments,s=i.length,p=function(e){if("[object Array]"===Object.prototype.toString.call(e))return e;var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t},a=function e(t,n){var o=0,i=0,s=0,a=0,l=0;if(t===n)return 0;if("object"===("undefined"==typeof t?"undefined":r(t))){if("object"===("undefined"==typeof n?"undefined":r(n))){if(t=p(t),n=p(n),l=t.length,a=n.length,a>l)return 1;if(a<l)return-1;for(o=0,i=l;o<i;++o){if(s=e(t[o],n[o]),1===s)return 1;if(s===-1)return-1}return 0}return-1}return"object"===("undefined"==typeof n?"undefined":r(n))?1:isNaN(n)&&!isNaN(t)?0===t?0:t<0?1:-1:isNaN(t)&&!isNaN(n)?0===n?0:n>0?1:-1:n===t?0:n>t?1:-1};if(0===s)throw new Error("At least one value should be passed to max()");if(1===s){if("object"!==r(i[0]))throw new Error("Wrong parameter count for max()");if(e=p(i[0]),0===e.length)throw new Error("Array must contain at least one element for max()")}else e=i;for(t=e[0],n=1,o=e.length;n<o;++n)1===a(t,e[n])&&(t=e[n]);return t}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.exports=function(){var e,t,n=0,o=0,i=arguments,s=i.length,p=function(e){if("[object Array]"===Object.prototype.toString.call(e))return e;var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t},a=function e(t,n){var o=0,i=0,s=0,a=0,l=0;if(t===n)return 0;if("object"===("undefined"==typeof t?"undefined":r(t))){if("object"===("undefined"==typeof n?"undefined":r(n))){if(t=p(t),n=p(n),l=t.length,a=n.length,a>l)return 1;if(a<l)return-1;for(o=0,i=l;o<i;++o){if(s=e(t[o],n[o]),1===s)return 1;if(s===-1)return-1}return 0}return-1}return"object"===("undefined"==typeof n?"undefined":r(n))?1:isNaN(n)&&!isNaN(t)?0===t?0:t<0?1:-1:isNaN(t)&&!isNaN(n)?0===n?0:n>0?1:-1:n===t?0:n>t?1:-1};if(0===s)throw new Error("At least one value should be passed to min()");if(1===s){if("object"!==r(i[0]))throw new Error("Wrong parameter count for min()");if(e=p(i[0]),0===e.length)throw new Error("Array must contain at least one element for min()")}else e=i;for(t=e[0],n=1,o=e.length;n<o;++n)a(t,e[n])===-1&&(t=e[n]);return t}},function(e,t){"use strict";e.exports=function(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var r=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return e.replace(n,"").replace(r,function(e,r){return t.indexOf("<"+r.toLowerCase()+">")>-1?e:""})}},function(e,t){"use strict";e.exports=function(e,t){function r(e,t,r){var n,o=l[t];"undefined"!=typeof o&&(n=o-a.getDay(),0===n?n=7*r:n>0&&"last"===e?n-=7:n<0&&"next"===e&&(n+=7),a.setDate(a.getDate()+n))}function n(e){var t=e.split(" "),n=t[0],o=t[1].substring(0,3),i=/\d+/.test(n),s="ago"===t[2],p=("last"===n?-1:1)*(s?-1:1);if(i&&(p*=parseInt(n,10)),c.hasOwnProperty(o)&&!t[1].match(/^mon(day|\.)?$/i))return a["set"+c[o]](a["get"+c[o]]()+p);if("wee"===o)return a.setDate(a.getDate()+7*p);if("next"===n||"last"===n)r(n,o,p);else if(!i)return!1;return!0}var o,i,s,p,a,l,c,u,f,h,y,d=!1;if(!e)return d;e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase();var g=new RegExp(["^(\\d{1,4})","([\\-\\.\\/:])","(\\d{1,2})","([\\-\\.\\/:])","(\\d{1,4})","(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?","(?:\\s([A-Z]+)?)?$"].join(""));if(i=e.match(g),i&&i[2]===i[4])if(i[1]>1901)switch(i[2]){case"-":return i[3]>12||i[5]>31?d:new Date(i[1],parseInt(i[3],10)-1,i[5],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3;case".":return d;case"/":return i[3]>12||i[5]>31?d:new Date(i[1],parseInt(i[3],10)-1,i[5],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3}else if(i[5]>1901)switch(i[2]){case"-":return i[3]>12||i[1]>31?d:new Date(i[5],parseInt(i[3],10)-1,i[1],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3;case".":return i[3]>12||i[1]>31?d:new Date(i[5],parseInt(i[3],10)-1,i[1],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3;case"/":return i[1]>12||i[3]>31?d:new Date(i[5],parseInt(i[1],10)-1,i[3],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3}else switch(i[2]){case"-":return i[3]>12||i[5]>31||i[1]<70&&i[1]>38?d:(p=i[1]>=0&&i[1]<=38?+i[1]+2e3:i[1],new Date(p,parseInt(i[3],10)-1,i[5],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3);case".":return i[5]>=70?i[3]>12||i[1]>31?d:new Date(i[5],parseInt(i[3],10)-1,i[1],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3:i[5]<60&&!i[6]?i[1]>23||i[3]>59?d:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),i[1]||0,i[3]||0,i[5]||0,i[9]||0)/1e3):d;case"/":return i[1]>12||i[3]>31||i[5]<70&&i[5]>38?d:(p=i[5]>=0&&i[5]<=38?+i[5]+2e3:i[5],new Date(p,parseInt(i[1],10)-1,i[3],i[6]||0,i[7]||0,i[8]||0,i[9]||0)/1e3);case":":return i[1]>23||i[3]>59||i[5]>59?d:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),i[1]||0,i[3]||0,i[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3|0:0|t;if(!isNaN(o=Date.parse(e)))return o/1e3|0;if(g=new RegExp(["^([0-9]{4}-[0-9]{2}-[0-9]{2})","[ t]","([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)","([\\+-][0-9]{2}(:[0-9]{2})?|z)"].join("")),i=e.match(g),i&&("z"===i[4]?i[4]="Z":i[4].match(/^([\+-][0-9]{2})$/)&&(i[4]=i[4]+":00"),!isNaN(o=Date.parse(i[1]+"T"+i[2]+i[4]))))return o/1e3|0;if(a=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},c={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},f="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",h="([+-]?\\d+\\s"+f+"|(last|next)\\s"+f+")(\\sago)?",i=e.match(new RegExp(h,"gi")),!i)return d;for(y=0,u=i.length;y<u;y++)if(!n(i[y]))return d;return a.getTime()/1e3}},function(e,t){"use strict";e.exports=function(e,t){var r,n,o=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],i=/\\?(.?)/gi,s=function(e,t){return n[e]?n[e]():t},p=function(e,t){for(e=String(e);e.length<t;)e="0"+e;return e};n={d:function(){return p(n.j(),2)},D:function(){return n.l().slice(0,3)},j:function(){return r.getDate()},l:function(){return o[n.w()]+"day"},N:function(){return n.w()||7},S:function(){var e=n.j(),t=e%10;return t<=3&&1===parseInt(e%100/10,10)&&(t=0),["st","nd","rd"][t-1]||"th"},w:function(){return r.getDay()},z:function(){var e=new Date(n.Y(),n.n()-1,n.j()),t=new Date(n.Y(),0,1);return Math.round((e-t)/864e5)},W:function(){var e=new Date(n.Y(),n.n()-1,n.j()-n.N()+3),t=new Date(e.getFullYear(),0,4);return p(1+Math.round((e-t)/864e5/7),2)},F:function(){return o[6+n.n()]},m:function(){return p(n.n(),2)},M:function(){return n.F().slice(0,3)},n:function(){return r.getMonth()+1},t:function(){return new Date(n.Y(),n.n(),0).getDate()},L:function(){var e=n.Y();return e%4===0&e%100!==0|e%400===0},o:function(){var e=n.n(),t=n.W(),r=n.Y();return r+(12===e&&t<9?1:1===e&&t>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return n.Y().toString().slice(-2)},a:function(){return r.getHours()>11?"pm":"am"},A:function(){return n.a().toUpperCase()},B:function(){var e=3600*r.getUTCHours(),t=60*r.getUTCMinutes(),n=r.getUTCSeconds();return p(Math.floor((e+t+n+3600)/86.4)%1e3,3)},g:function(){return n.G()%12||12},G:function(){return r.getHours()},h:function(){return p(n.g(),2)},H:function(){return p(n.G(),2)},i:function(){return p(r.getMinutes(),2)},s:function(){return p(r.getSeconds(),2)},u:function(){return p(1e3*r.getMilliseconds(),6)},e:function(){var e="Not supported (see source code of date() for timezone on how to add support)";throw new Error(e)},I:function(){var e=new Date(n.Y(),0),t=Date.UTC(n.Y(),0),r=new Date(n.Y(),6),o=Date.UTC(n.Y(),6);return e-t!==r-o?1:0},O:function(){var e=r.getTimezoneOffset(),t=Math.abs(e);return(e>0?"-":"+")+p(100*Math.floor(t/60)+t%60,4)},P:function(){var e=n.O();return e.substr(0,3)+":"+e.substr(3,2)},T:function(){return"UTC"},Z:function(){return 60*-r.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(i,s)},r:function(){return"D, d M Y H:i:s O".replace(i,s)},U:function(){return r/1e3|0}};var a=function(e,t){return r=void 0===t?new Date:t instanceof Date?new Date(t):new Date(1e3*t),e.replace(i,s)};return a(e,t)}},function(e,t){"use strict";e.exports=function(e){return e!==!1&&(0!==e&&0!==e&&(""!==e&&"0"!==e&&((!Array.isArray(e)||0!==e.length)&&(null!==e&&void 0!==e))))}},function(e,t){e.exports=function(e){"use strict";e.Templates.registerLoader("ajax",function(t,r,n,o){var i,s,p=r.precompiled,a=this.parsers[r.parser]||this.parser.twig;if("undefined"==typeof XMLHttpRequest)throw new e.Error('Unsupported platform: Unable to do ajax requests because there is no "XMLHTTPRequest" implementation');return s=new XMLHttpRequest,s.onreadystatechange=function(){var l=null;4===s.readyState&&(200===s.status||window.cordova&&0==s.status?(e.log.debug("Got template ",s.responseText),l=p===!0?JSON.parse(s.responseText):s.responseText,r.url=t,r.data=l,i=a.call(this,r),"function"==typeof n&&n(i)):"function"==typeof o&&o(s))},s.open("GET",t,!!r.async),s.send(),!!r.async||i})}},function(e,t,r){e.exports=function(e){"use strict";var t,n;try{t=r(19),n=r(20)}catch(e){}e.Templates.registerLoader("fs",function(r,o,i,s){var p,a=null,l=o.precompiled,c=this.parsers[o.parser]||this.parser.twig;if(!t||!n)throw new e.Error('Unsupported platform: Unable to load from file because there is no "fs" or "path" implementation');var u=function(e,t){return e?void("function"==typeof s&&s(e)):(l===!0&&(t=JSON.parse(t)),o.data=t,o.path=o.path||r,p=c.call(this,o),void("function"==typeof i&&i(p)))};if(o.path=o.path||r,o.async)return t.stat(o.path,function(r,n){return r||!n.isFile()?void("function"==typeof s&&s(new e.Error("Unable to find template file "+o.path))):void t.readFile(o.path,"utf8",u)}),!0;try{if(!t.statSync(o.path).isFile())throw new e.Error("Unable to find template file "+o.path)}catch(t){throw new e.Error("Unable to find template file "+o.path)}return a=t.readFileSync(o.path,"utf8"),u(void 0,a),p})}},function(e,t){},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,o="/"===s.charAt(0))}return t=r(n(t.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+t||"."},t.normalize=function(e){var o=t.isAbsolute(e),i="/"===s(e,-1);return e=r(n(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var o=n(e.split("/")),i=n(r.split("/")),s=Math.min(o.length,i.length),p=s,a=0;a<s;a++)if(o[a]!==i[a]){p=a;break}for(var l=[],a=p;a<o.length;a++)l.push("..");return l=l.concat(i.slice(p)),l.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=i(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},t.basename=function(e,t){var r=i(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){return i(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(t,r(21))},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(u===clearTimeout)return clearTimeout(e);if((u===n||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(e);try{return u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this,e)}}}function s(){d&&h&&(d=!1,h.length?y=h.concat(y):g=-1,y.length&&p())}function p(){if(!d){var e=o(s);d=!0;for(var t=y.length;t;){for(h=y,y=[];++g<t;)h&&h[g].run();g=-1,t=y.length}h=null,d=!1,i(e)}}function a(e,t){this.fun=e,this.array=t}function l(){}var c,u,f=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{u="function"==typeof clearTimeout?clearTimeout:n}catch(e){u=n}}();var h,y=[],d=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];y.push(new a(e,t)),1!==y.length||d||o(p)},a.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){e.exports=function(e){"use strict";for(e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",shortblock:"Twig.logic.type.shortblock",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from",embed:"Twig.logic.type.embed",endembed:"Twig.logic.type.endembed"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s+([\s\S]+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile:function(t){var r=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,delete t.match,t},parse:function(t,r,n){var o="",i=e.expression.parse.apply(this,[t.stack,r]);return n=!0,e.lib.boolval(i)&&(n=!1,o=e.parse.apply(this,[t.output,r])),{chain:n,output:o}}},{type:e.logic.type.elseif,regex:/^elseif\s+([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile:function(t){var r=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,delete t.match,t},parse:function(t,r,n){var o="",i=e.expression.parse.apply(this,[t.stack,r]);return n&&e.lib.boolval(i)&&(n=!1,o=e.parse.apply(this,[t.output,r])),{chain:n,output:o}}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse:function(t,r,n){var o="";return n&&(o=e.parse.apply(this,[t.output,r])),{chain:n,output:o}}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile:function(t){var r=t.match[1],n=t.match[2],o=t.match[3],i=null;if(t.key_var=null,t.value_var=null,r.indexOf(",")>=0){if(i=r.split(","),2!==i.length)throw new e.Error("Invalid expression in for loop: "+r);t.key_var=i[0].trim(),
-t.value_var=i[1].trim()}else t.value_var=r;return t.expression=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,o&&(t.conditional=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:o}]).stack),delete t.match,t},parse:function(t,r,n){var o,i,s=e.expression.parse.apply(this,[t.expression,r]),p=[],a=0,l=this,c=t.conditional,u=function(e,t){var n=void 0!==c;return{index:e+1,index0:e,revindex:n?void 0:t-e,revindex0:n?void 0:t-e-1,first:0===e,last:n?void 0:e===t-1,length:n?void 0:t,parent:r}},f=function(n,i){var s=e.ChildContext(r);s[t.value_var]=i,t.key_var&&(s[t.key_var]=n),s.loop=u(a,o),(void 0===c||e.expression.parse.apply(l,[c,s]))&&(p.push(e.parse.apply(l,[t.output,s])),a+=1),delete s.loop,delete s[t.value_var],delete s[t.key_var],e.merge(r,s,!0)};return e.lib.is("Array",s)?(o=s.length,e.forEach(s,function(e){var t=a;f(t,e)})):e.lib.is("Object",s)&&(i=void 0!==s._keys?s._keys:Object.keys(s),o=i.length,e.forEach(i,function(e){"_keys"!==e&&f(e,s[e])})),n=0===p.length,{chain:n,output:e.output.apply(this,[p])}}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*([\s\S]+)$/,next:[],open:!0,compile:function(t){var r=t.match[1].trim(),n=t.match[2],o=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack;return t.key=r,t.expression=o,delete t.match,t},parse:function(t,r,n){var o=e.expression.parse.apply(this,[t.expression,r]),i=t.key;return o===r&&(o=e.lib.copy(o)),r[i]=o,{chain:n,context:r}}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:function(e){var t=e.match[1].trim();return e.key=t,delete e.match,e},parse:function(t,r,n){var o=e.parse.apply(this,[t.output,r]),i=t.key;return this.context[i]=o,r[i]=o,{chain:n,context:r}}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile:function(t){var r="|"+t.match[1].trim();return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,delete t.match,t},parse:function(t,r,n){var o=e.parse.apply(this,[t.output,r]),i=[{type:e.expression.type.string,value:o}].concat(t.stack),s=e.expression.parse.apply(this,[i,r]);return{chain:n,output:s}}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.block,regex:/^block\s+([a-zA-Z0-9_]+)$/,next:[e.logic.type.endblock],open:!0,compile:function(e){return e.block=e.match[1].trim(),delete e.match,e},parse:function(t,r,n){var o,i,s=e.indexOf(this.importedBlocks,t.block)>-1,p=this.blocks[t.block]&&e.indexOf(this.blocks[t.block],e.placeholders.parent)>-1;return(void 0===this.blocks[t.block]||s||p||r.loop||t.overwrite)&&(o=t.expression?e.expression.parse.apply(this,[{type:e.expression.type.string,value:e.expression.parse.apply(this,[t.output,r])},r]):e.expression.parse.apply(this,[{type:e.expression.type.string,value:e.parse.apply(this,[t.output,r])},r]),s&&this.importedBlocks.splice(this.importedBlocks.indexOf(t.block),1),p?this.blocks[t.block]=e.Markup(this.blocks[t.block].replace(e.placeholders.parent,o)):this.blocks[t.block]=o,this.originalBlockTokens[t.block]={type:t.type,block:t.block,output:t.output,overwrite:!0}),i=this.child.blocks[t.block]?this.child.blocks[t.block]:this.blocks[t.block],{chain:n,output:i}}},{type:e.logic.type.shortblock,regex:/^block\s+([a-zA-Z0-9_]+)\s+(.+)$/,next:[],open:!0,compile:function(t){return t.expression=t.match[2].trim(),t.output=e.expression.compile({type:e.expression.type.expression,value:t.expression}).stack,t.block=t.match[1].trim(),delete t.match,t},parse:function(t,r,n){return e.logic.handler[e.logic.type.block].parse.apply(this,arguments)}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+([a-zA-Z0-9_]+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile:function(t){var r=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,t},parse:function(t,r,n){var o,i=e.ChildContext(r),s=e.expression.parse.apply(this,[t.stack,r]);return this.extend=s,o=s instanceof e.Template?s:this.importFile(s),o.render(i),e.lib.extend(r,i),{chain:n,output:""}}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile:function(t){var r=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,t},parse:function(t,r,n){var o=e.expression.parse.apply(this,[t.stack,r]);return this.importBlocks(o),{chain:n,output:""}}},{type:e.logic.type.include,regex:/^include\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,next:[],open:!0,compile:function(t){var r=t.match,n=r[1].trim(),o=void 0!==r[2],i=r[3],s=void 0!==r[4]&&r[4].length;return delete t.match,t.only=s,t.ignoreMissing=o,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,void 0!==i&&(t.withStack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i.trim()}]).stack),t},parse:function(t,r,n){var o,i,s,p={};if(t.only||(p=e.ChildContext(r)),void 0!==t.withStack){o=e.expression.parse.apply(this,[t.withStack,r]);for(i in o)o.hasOwnProperty(i)&&(p[i]=o[i])}var a=e.expression.parse.apply(this,[t.stack,r]);if(a instanceof e.Template)s=a;else try{s=this.importFile(a)}catch(e){if(t.ignoreMissing)return{chain:n,output:""};throw e}return{chain:n,output:s.render(p)}}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse:function(t,r,n){var o=e.parse.apply(this,[t.output,r]),i=/>\s+</g,s=o.replace(i,"><").trim();return s=e.Markup(s),{chain:n,output:s}}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+([a-zA-Z0-9_]+)\s*\(\s*((?:[a-zA-Z0-9_]+(?:,\s*)?)*)\s*\)$/,next:[e.logic.type.endmacro],open:!0,compile:function(t){for(var r=t.match[1],n=t.match[2].split(/[\s,]+/),o=0;o<n.length;o++)for(var i=0;i<n.length;i++)if(n[o]===n[i]&&o!==i)throw new e.Error("Duplicate arguments for parameter: "+n[o]);return t.macroName=r,t.parameters=n,delete t.match,t},parse:function(t,r,n){var o=this;return this.macros[t.macroName]=function(){for(var r={_self:o.macros},n=0;n<t.parameters.length;n++){var i=t.parameters[n];"undefined"!=typeof arguments[n]?r[i]=arguments[n]:r[i]=void 0}return e.parse.apply(o,[t.output,r])},{chain:n,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,next:[],open:!0,compile:function(t){var r=t.match[1].trim(),n=t.match[2].trim();return delete t.match,t.expression=r,t.contextName=n,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,t},parse:function(t,r,n){if("_self"!==t.expression){var o=e.expression.parse.apply(this,[t.stack,r]),i=this.importFile(o||t.expression);r[t.contextName]=i.render({},{output:"macros"})}else r[t.contextName]=this.macros;return{chain:n,output:""}}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile:function(t){for(var r=t.match[1].trim(),n=t.match[2].trim().split(/[ ,]+/),o={},i=0;i<n.length;i++){var s=n[i],p=s.match(/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/);p?o[p[1].trim()]=p[2].trim():s.match(/^([a-zA-Z0-9_]+)$/)&&(o[s]=s)}return delete t.match,t.expression=r,t.macroNames=o,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,t},parse:function(t,r,n){var o;if("_self"!==t.expression){var i=e.expression.parse.apply(this,[t.stack,r]),s=this.importFile(i||t.expression);o=s.render({},{output:"macros"})}else o=this.macros;for(var p in t.macroNames)o.hasOwnProperty(p)&&(r[t.macroNames[p]]=o[p]);return{chain:n,output:""}}},{type:e.logic.type.embed,regex:/^embed\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,next:[e.logic.type.endembed],open:!0,compile:function(t){var r=t.match,n=r[1].trim(),o=void 0!==r[2],i=r[3],s=void 0!==r[4]&&r[4].length;return delete t.match,t.only=s,t.ignoreMissing=o,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,void 0!==i&&(t.withStack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i.trim()}]).stack),t},parse:function(t,r,n){var o,i,s,p={};if(!t.only)for(i in r)r.hasOwnProperty(i)&&(p[i]=r[i]);if(void 0!==t.withStack){o=e.expression.parse.apply(this,[t.withStack,r]);for(i in o)o.hasOwnProperty(i)&&(p[i]=o[i])}var a=e.expression.parse.apply(this,[t.stack,p]);if(a instanceof e.Template)s=a;else try{s=this.importFile(a)}catch(e){if(t.ignoreMissing)return{chain:n,output:""};throw e}this.blocks={};e.parse.apply(this,[t.output,p]);return{chain:n,output:s.render(p,{blocks:this.blocks})}}},{type:e.logic.type.endembed,regex:/^endembed$/,next:[],open:!1}],e.logic.handler={},e.logic.extendType=function(t,r){r=r||"Twig.logic.type"+t,e.logic.type[t]=r},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.logic.extendType(t.type),e.logic.handler[t.type]=t};e.logic.definitions.length>0;)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){var r=t.value.trim(),n=e.logic.tokenize.apply(this,[r]),o=e.logic.handler[n.type];return o.compile&&(n=o.compile.apply(this,[n]),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",n)),n},e.logic.tokenize=function(t){var r={},n=null,o=null,i=null,s=null,p=null,a=null;t=t.trim();for(n in e.logic.handler)if(e.logic.handler.hasOwnProperty(n))for(o=e.logic.handler[n].type,i=e.logic.handler[n].regex,s=[],i instanceof Array?s=i:s.push(i);s.length>0;)if(p=s.shift(),a=p.exec(t.trim()),null!==a)return r.type=o,r.match=a,e.log.trace("Twig.logic.tokenize: ","Matched a ",o," regular expression of ",a),r;throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,r,n){var o,i="";return r=r||{},e.log.debug("Twig.logic.parse: ","Parsing logic token ",t),o=e.logic.handler[t.type],o.parse&&(i=o.parse.apply(this,[t,r,n])),i},e}},function(e,t){e.exports=function(e){"use strict";e.Templates.registerParser("source",function(e){return e.data||""})}},function(e,t){e.exports=function(e){"use strict";e.Templates.registerParser("twig",function(t){return new e.Template(t)})}},function(e,t,r){e.exports=function(e){"use strict";return e.path={},e.path.parsePath=function(t,r){var n=null,r=r||"";if("object"==typeof t&&"object"==typeof t.options&&(n=t.options.namespaces),"object"==typeof n&&r.indexOf("::")>0||r.indexOf("@")>=0){for(var o in n)n.hasOwnProperty(o)&&(r=r.replace(o+"::",n[o]),r=r.replace("@"+o,n[o]));return r}return e.path.relativePath(t,r)},e.path.relativePath=function(t,n){var o,i,s,p="/",a=[],n=n||"";if(t.url)o="undefined"!=typeof t.base?t.base+("/"===t.base.charAt(t.base.length-1)?"":"/"):t.url;else if(t.path){var l=r(20),c=l.sep||p,u=new RegExp("^\\.{1,2}"+c.replace("\\","\\\\"));n=n.replace(/\//g,c),void 0!==t.base&&null==n.match(u)?(n=n.replace(t.base,""),o=t.base+c):o=l.normalize(t.path),o=o.replace(c+c,c),p=c}else{if(!t.name&&!t.id||!t.method||"fs"===t.method||"ajax"===t.method)throw new e.Error("Cannot extend an inline template.");o=t.base||t.name||t.id}for(i=o.split(p),i.pop(),i=i.concat(n.split(p));i.length>0;)s=i.shift(),"."==s||(".."==s&&a.length>0&&".."!=a[a.length-1]?a.pop():a.push(s));return a.join(p)},e}},function(e,t){e.exports=function(e){"use strict";return e.tests={empty:function(e){if(null===e||void 0===e)return!0;if("number"==typeof e)return!1;if(e.length&&e.length>0)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},odd:function(e){return e%2===1},even:function(e){return e%2===0},divisibleby:function(e,t){return e%t[0]===0},defined:function(e){return void 0!==e},none:function(e){return null===e},null:function(e){return this.none(e)},"same as":function(e,t){return e===t[0]},sameas:function(t,r){return console.warn("`sameas` is deprecated use `same as`"),e.tests["same as"](t,r)},iterable:function(t){return t&&(e.lib.is("Array",t)||e.lib.is("Object",t))}},e.test=function(t,r,n){if(!e.tests[t])throw"Test "+t+" is not defined.";return e.tests[t](r,n)},e.test.extend=function(t,r){e.tests[t]=r},e}},function(e,t){e.exports=function(e){"use strict";return e.exports={VERSION:e.VERSION},e.exports.twig=function(t){var r=t.id,n={strict_variables:t.strict_variables||!1,autoescape:null!=t.autoescape&&t.autoescape||!1,allowInlineIncludes:t.allowInlineIncludes||!1,rethrow:t.rethrow||!1,namespaces:t.namespaces};if(e.cache&&r&&e.validateId(r),void 0!==t.debug&&(e.debug=t.debug),void 0!==t.trace&&(e.trace=t.trace),void 0!==t.data)return e.Templates.parsers.twig({data:t.data,path:t.hasOwnProperty("path")?t.path:void 0,module:t.module,id:r,options:n});if(void 0!==t.ref){if(void 0!==t.id)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(t.ref)}if(void 0!==t.method){if(!e.Templates.isRegisteredLoader(t.method))throw new e.Error('Loader for "'+t.method+'" is not defined.');return e.Templates.loadRemote(t.name||t.href||t.path||r||void 0,{id:r,method:t.method,parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:n},t.load,t.error)}return void 0!==t.href?e.Templates.loadRemote(t.href,{id:r,method:"ajax",parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:n},t.load,t.error):void 0!==t.path?e.Templates.loadRemote(t.path,{id:r,method:"fs",parser:t.parser||"twig",base:t.base,module:t.module,precompiled:t.precompiled,async:t.async,options:n},t.load,t.error):void 0},e.exports.extendFilter=function(t,r){e.filter.extend(t,r)},e.exports.extendFunction=function(t,r){e._function.extend(t,r)},e.exports.extendTest=function(t,r){e.test.extend(t,r)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,r){var n,o=r.filename,i=r.filename;return n=new e.Template({data:t,path:i,id:o,options:r.settings["twig options"]}),function(e){return n.render(e)}},e.exports.renderFile=function(t,r,n){"function"==typeof r&&(n=r,r={}),r=r||{};var o=r.settings||{},i={path:t,base:o.views,load:function(e){n(null,""+e.render(r))}},s=o["twig options"];if(s)for(var p in s)s.hasOwnProperty(p)&&(i[p]=s[p]);e.exports.twig(i)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e.exports.path=e.path,e.exports.filters=e.filters,e}}])}); \ No newline at end of file
diff --git a/node_modules/walk/LICENSE b/node_modules/walk/LICENSE
deleted file mode 100644
index d804d51..0000000
--- a/node_modules/walk/LICENSE
+++ /dev/null
@@ -1,41 +0,0 @@
-Copyright 2011 AJ ONeal
-
-This is open source software; you can redistribute it and/or modify it under the
-terms of either:
-
- a) the "MIT License"
- b) the "Apache-2.0 License"
-
-MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-Apache-2.0 License Summary
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/node_modules/walk/README.md b/node_modules/walk/README.md
deleted file mode 100644
index 9a1595b..0000000
--- a/node_modules/walk/README.md
+++ /dev/null
@@ -1,306 +0,0 @@
-node-walk
-====
-
-| Sponsored by [ppl](https://ppl.family)
-
-nodejs walk implementation.
-
-This is somewhat of a port python's `os.walk`, but using Node.JS conventions.
-
- * EventEmitter
- * Asynchronous
- * Chronological (optionally)
- * Built-in flow-control
- * includes Synchronous version (same API as Asynchronous)
-
-As few file descriptors are opened at a time as possible.
-This is particularly well suited for single hard disks which are not flash or solid state.
-
-Installation
-----
-
-```bash
-npm install --save walk
-```
-
-Getting Started
-====
-
-```javascript
-(function () {
- "use strict";
-
- var walk = require('walk');
- var fs = require('fs');
- var walker;
-
- walker = walk.walk("/tmp", options);
-
- walker.on("file", function (root, fileStats, next) {
- fs.readFile(fileStats.name, function () {
- // doStuff
- next();
- });
- });
-
- walker.on("errors", function (root, nodeStatsArray, next) {
- next();
- });
-
- walker.on("end", function () {
- console.log("all done");
- });
-}());
-```
-
-Common Events
------
-
-All single event callbacks are in the form of `function (root, stat, next) {}`.
-
-All multiple event callbacks callbacks are in the form of `function (root, stats, next) {}`, except **names** which is an array of strings.
-
-All **error** event callbacks are in the form `function (root, stat/stats, next) {}`.
-**`stat.error`** contains the error.
-
-* `names`
-* `directory`
-* `directories`
-* `file`
-* `files`
-* `end`
-* `nodeError` (`stat` failed)
-* `directoryError` (`stat` succedded, but `readdir` failed)
-* `errors` (a collection of any errors encountered)
-
-
-A typical `stat` event looks like this:
-
-```javascript
-{ dev: 16777223,
- mode: 33188,
- nlink: 1,
- uid: 501,
- gid: 20,
- rdev: 0,
- blksize: 4096,
- ino: 49868100,
- size: 5617,
- blocks: 16,
- atime: Mon Jan 05 2015 18:18:10 GMT-0700 (MST),
- mtime: Thu Sep 25 2014 21:21:28 GMT-0600 (MDT),
- ctime: Thu Sep 25 2014 21:21:28 GMT-0600 (MDT),
- birthtime: Thu Sep 25 2014 21:21:28 GMT-0600 (MDT),
- name: 'README.md',
- type: 'file' }
-```
-
-Advanced Example
-====
-
-Both Asynchronous and Synchronous versions are provided.
-
-```javascript
-(function () {
- "use strict";
-
- var walk = require('walk');
- var fs = require('fs');
- var options;
- var walker;
-
- options = {
- followLinks: false
- // directories with these keys will be skipped
- , filters: ["Temp", "_Temp"]
- };
-
- walker = walk.walk("/tmp", options);
-
- // OR
- // walker = walk.walkSync("/tmp", options);
-
- walker.on("names", function (root, nodeNamesArray) {
- nodeNamesArray.sort(function (a, b) {
- if (a > b) return 1;
- if (a < b) return -1;
- return 0;
- });
- });
-
- walker.on("directories", function (root, dirStatsArray, next) {
- // dirStatsArray is an array of `stat` objects with the additional attributes
- // * type
- // * error
- // * name
-
- next();
- });
-
- walker.on("file", function (root, fileStats, next) {
- fs.readFile(fileStats.name, function () {
- // doStuff
- next();
- });
- });
-
- walker.on("errors", function (root, nodeStatsArray, next) {
- next();
- });
-
- walker.on("end", function () {
- console.log("all done");
- });
-}());
-```
-
-### Sync
-
-Note: You **can't use EventEmitter** if you want truly synchronous walker
-(although it's synchronous under the hood, it appears not to be due to the use of `process.nextTick()`).
-
-Instead **you must use `options.listeners`** for truly synchronous walker.
-
-Although the sync version uses all of the `fs.readSync`, `fs.readdirSync`, and other sync methods,
-I don't think I can prevent the `process.nextTick()` that `EventEmitter` calls.
-
-```javascript
-(function () {
- "use strict";
-
- var walk = require('walk');
- var fs = require('fs');
- var options;
- var walker;
-
- // To be truly synchronous in the emitter and maintain a compatible api,
- // the listeners must be listed before the object is created
- options = {
- listeners: {
- names: function (root, nodeNamesArray) {
- nodeNamesArray.sort(function (a, b) {
- if (a > b) return 1;
- if (a < b) return -1;
- return 0;
- });
- }
- , directories: function (root, dirStatsArray, next) {
- // dirStatsArray is an array of `stat` objects with the additional attributes
- // * type
- // * error
- // * name
-
- next();
- }
- , file: function (root, fileStats, next) {
- fs.readFile(fileStats.name, function () {
- // doStuff
- next();
- });
- }
- , errors: function (root, nodeStatsArray, next) {
- next();
- }
- }
- };
-
- walker = walk.walkSync("/tmp", options);
-
- console.log("all done");
-}());
-```
-
-API
-====
-
-Emitted Values
-
- * `on('XYZ', function(root, stats, next) {})`
-
- * `root` - the containing the files to be inspected
- * *stats[Array]* - a single `stats` object or an array with some added attributes
- * type - 'file', 'directory', etc
- * error
- * name - the name of the file, dir, etc
- * next - no more files will be read until this is called
-
-Single Events - fired immediately
-
- * `end` - No files, dirs, etc left to inspect
-
- * `directoryError` - Error when `fstat` succeeded, but reading path failed (Probably due to permissions).
- * `nodeError` - Error `fstat` did not succeeded.
- * `node` - a `stats` object for a node of any type
- * `file` - includes links when `followLinks` is `true`
- * `directory` - **NOTE** you could get a recursive loop if `followLinks` and a directory links to its parent
- * `symbolicLink` - always empty when `followLinks` is `true`
- * `blockDevice`
- * `characterDevice`
- * `FIFO`
- * `socket`
-
-Events with Array Arguments - fired after all files in the dir have been `stat`ed
-
- * `names` - before any `stat` takes place. Useful for sorting and filtering.
- * Note: the array is an array of `string`s, not `stat` objects
- * Note: the `next` argument is a `noop`
-
- * `errors` - errors encountered by `fs.stat` when reading ndes in a directory
- * `nodes` - an array of `stats` of any type
- * `files`
- * `directories` - modification of this array - sorting, removing, etc - affects traversal
- * `symbolicLinks`
- * `blockDevices`
- * `characterDevices`
- * `FIFOs`
- * `sockets`
-
-**Warning** beware of infinite loops when `followLinks` is true (using `walk-recurse` varient).
-
-Comparisons
-====
-
-Tested on my `/System` containing 59,490 (+ self) directories (and lots of files).
-The size of the text output was 6mb.
-
-`find`:
- time bash -c "find /System -type d | wc"
- 59491 97935 6262916
-
- real 2m27.114s
- user 0m1.193s
- sys 0m14.859s
-
-`find.js`:
-
-Note that `find.js` omits the start directory
-
- time bash -c "node examples/find.js /System -type d | wc"
- 59490 97934 6262908
-
- # Test 1
- real 2m52.273s
- user 0m20.374s
- sys 0m27.800s
-
- # Test 2
- real 2m23.725s
- user 0m18.019s
- sys 0m23.202s
-
- # Test 3
- real 2m50.077s
- user 0m17.661s
- sys 0m24.008s
-
-In conclusion node.js asynchronous walk is much slower than regular "find".
-
-LICENSE
-===
-
-`node-walk` is available under the following licenses:
-
- * MIT
- * Apache 2
-
-Copyright 2011 - Present AJ ONeal
diff --git a/node_modules/walk/lib/node-type-emitter.js b/node_modules/walk/lib/node-type-emitter.js
deleted file mode 100644
index 59c0f58..0000000
--- a/node_modules/walk/lib/node-type-emitter.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true*/
-(function () {
- "use strict";
-
- // "FIFO" isn't easy to convert to camelCase and back reliably
- var isFnodeTypes = [
- "isFile", "isDirectory", "isSymbolicLink", "isBlockDevice", "isCharacterDevice", "isFIFO", "isSocket"
- ],
- fnodeTypes = [
- "file", "directory", "symbolicLink", "blockDevice", "characterDevice", "FIFO", "socket"
- ],
- fnodeTypesPlural = [
- "files", "directories", "symbolicLinks", "blockDevices", "characterDevices", "FIFOs", "sockets"
- ];
-
-
- //
- function createNodeGroups() {
- var nodeGroups = {};
- fnodeTypesPlural.concat("nodes", "errors").forEach(function (fnodeTypePlural) {
- nodeGroups[fnodeTypePlural] = [];
- });
- return nodeGroups;
- }
-
-
- // Determine each file node's type
- //
- function sortFnodesByType(stat, fnodes) {
- var i, isType;
-
- for (i = 0; i < isFnodeTypes.length; i += 1) {
- isType = isFnodeTypes[i];
- if (stat[isType]()) {
- stat.type = fnodeTypes[i];
- fnodes[fnodeTypesPlural[i]].push(stat);
- return;
- }
- }
- }
-
-
- // Get the current number of listeners (which may change)
- // Emit events to each listener
- // Wait for all listeners to `next()` before continueing
- // (in theory this may avoid disk thrashing)
- function emitSingleEvents(emitter, path, stats, next, self) {
- var num = 1 + emitter.listeners(stats.type).length + emitter.listeners("node").length;
-
- function nextWhenReady(flag) {
- if (flag) {
- stats.flag = flag;
- }
- num -= 1;
- if (0 === num) { next.call(self); }
- }
-
- emitter.emit(stats.type, path, stats, nextWhenReady);
- emitter.emit("node", path, stats, nextWhenReady);
- nextWhenReady();
- }
-
-
- // Since the risk for disk thrashing among anything
- // other than files is relatively low, all types are
- // emitted at once, but all must complete before advancing
- function emitPluralEvents(emitter, path, nodes, next, self) {
- var num = 1;
-
- function nextWhenReady() {
- num -= 1;
- if (0 === num) { next.call(self); }
- }
-
- fnodeTypesPlural.concat(["nodes", "errors"]).forEach(function (fnodeType) {
- if (0 === nodes[fnodeType].length) { return; }
- num += emitter.listeners(fnodeType).length;
- emitter.emit(fnodeType, path, nodes[fnodeType], nextWhenReady);
- });
- nextWhenReady();
- }
-
- module.exports = {
- emitNodeType: emitSingleEvents,
- emitNodeTypeGroups: emitPluralEvents,
- isFnodeTypes: isFnodeTypes,
- fnodeTypes: fnodeTypes,
- fnodeTypesPlural: fnodeTypesPlural,
- sortFnodesByType: sortFnodesByType,
- createNodeGroups: createNodeGroups
- };
-}());
diff --git a/node_modules/walk/lib/walk-async-only.js b/node_modules/walk/lib/walk-async-only.js
deleted file mode 100644
index 41b30ca..0000000
--- a/node_modules/walk/lib/walk-async-only.js
+++ /dev/null
@@ -1,93 +0,0 @@
-(function () {
- "use strict"
-
- // Array.prototype.forEachAsync(next, item, i, collection)
- require('futures/forEachAsync');
-
- function noop() {}
-
- var fs = require('fs'),
- path = require('path'),
- EventEmitter = require('events').EventEmitter,
- TypeEmitter = require('./node-type-emitter');
-
- // 2010-11-25 jorge@jorgechamorro.com
- function create(pathname, cb) {
- var emitter = new EventEmitter(),
- q = [],
- queue = [q],
- curpath;
-
- function walk() {
- fs.readdir(curpath, function(err, files) {
- if (err) {
- emitter.emit('directoryError', curpath, { error: err }, noop);
- //emitter.emit('error', curpath, { error: err });
- }
- // XXX bug was here. next() was omitted
- if (!files || 0 == files.length) {
- return next();
- }
-
- var fnodeGroups = TypeEmitter.createNodeGroups();
-
- // TODO could allow user to selectively stat
- // and don't stat if there are no stat listeners
- emitter.emit('names', curpath, files, noop);
- files.forEachAsync(function (cont, file) {
- emitter.emit('name', curpath, file, noop);
- fs.lstat(curpath + path.sep + file, function (err, stat) {
- stat = stat || {};
- stat.name = file;
- if (err) {
- stat.error = err;
- //emitter.emit('error', curpath, stat);
- emitter.emit('nodeError', curpath, stat, noop);
- fnodeGroups.errors.push(stat);
- cont();
- } else {
- TypeEmitter.sortFnodesByType(stat, fnodeGroups);
- TypeEmitter.emitNodeType(emitter, curpath, stat, cont);
- }
- });
- }).then(function () {
- if (fnodeGroups.errors.length) {
- emitter.emit('errors', curpath, fnodeGroups.errors, noop);
- }
- TypeEmitter.emitNodeTypeGroups(emitter, curpath, fnodeGroups, function () {
- var dirs = [];
- fnodeGroups.directories.forEach(function (stat) {
- dirs.push(stat.name);
- });
- dirs.forEach(fullPath);
- queue.push(q = dirs);
- next();
- });
- });
- });
- }
-
- function next() {
- if (q.length) {
- curpath = q.pop();
- return walk();
- }
- if (queue.length -= 1) {
- q = queue[queue.length-1];
- return next();
- }
- emitter.emit('end');
- }
-
- function fullPath(v,i,o) {
- o[i]= [curpath, path.sep, v].join('');
- }
-
- curpath = pathname;
- walk();
-
- return emitter;
- }
-
- module.exports = create;
-}());
diff --git a/node_modules/walk/lib/walk.js b/node_modules/walk/lib/walk.js
deleted file mode 100644
index ee8ade5..0000000
--- a/node_modules/walk/lib/walk.js
+++ /dev/null
@@ -1,302 +0,0 @@
-// Adapted from work by jorge@jorgechamorro.com on 2010-11-25
-(function () {
- "use strict";
-
- function noop() {}
-
- var fs = require('fs')
- , forEachAsync = require('foreachasync').forEachAsync
- , EventEmitter = require('events').EventEmitter
- , TypeEmitter = require('./node-type-emitter')
- , util = require('util')
- , path = require('path')
- ;
-
- function appendToDirs(stat) {
- /*jshint validthis:true*/
- if(stat.flag && stat.flag === NO_DESCEND) { return; }
- this.push(stat.name);
- }
-
- function wFilesHandlerWrapper(items) {
- /*jshint validthis:true*/
- this._wFilesHandler(noop, items);
- }
-
- function Walker(pathname, options, sync) {
- EventEmitter.call(this);
-
- var me = this
- ;
-
- options = options || {};
- me._wStat = options.followLinks && 'stat' || 'lstat';
- me._wStatSync = me._wStat + 'Sync';
- me._wsync = sync;
- me._wq = [];
- me._wqueue = [me._wq];
- me._wcurpath = undefined;
- me._wfilters = options.filters || [];
- me._wfirstrun = true;
- me._wcurpath = pathname;
-
- if (me._wsync) {
- //console.log('_walkSync');
- me._wWalk = me._wWalkSync;
- } else {
- //console.log('_walkASync');
- me._wWalk = me._wWalkAsync;
- }
-
- options.listeners = options.listeners || {};
- Object.keys(options.listeners).forEach(function (event) {
- var callbacks = options.listeners[event]
- ;
-
- if ('function' === typeof callbacks) {
- callbacks = [callbacks];
- }
-
- callbacks.forEach(function (callback) {
- me.on(event, callback);
- });
- });
-
- me._wWalk();
- }
-
- // Inherits must come before prototype additions
- util.inherits(Walker, EventEmitter);
-
- Walker.prototype._wLstatHandler = function (err, stat) {
- var me = this
- ;
-
- stat = stat || {};
- stat.name = me._wcurfile;
-
- if (err) {
- stat.error = err;
- //me.emit('error', curpath, stat);
- // TODO v3.0 (don't noop the next if there are listeners)
- me.emit('nodeError', me._wcurpath, stat, noop);
- me._wfnodegroups.errors.push(stat);
- me._wCurFileCallback();
- } else {
- TypeEmitter.sortFnodesByType(stat, me._wfnodegroups);
- // NOTE: wCurFileCallback doesn't need thisness, so this is okay
- TypeEmitter.emitNodeType(me, me._wcurpath, stat, me._wCurFileCallback, me);
- }
- };
- Walker.prototype._wFilesHandler = function (cont, file) {
- var statPath
- , me = this
- ;
-
-
- me._wcurfile = file;
- me._wCurFileCallback = cont;
- me.emit('name', me._wcurpath, file, noop);
-
- statPath = me._wcurpath + path.sep + file;
-
- if (!me._wsync) {
- // TODO how to remove this anony?
- fs[me._wStat](statPath, function (err, stat) {
- me._wLstatHandler(err, stat);
- });
- return;
- }
-
- try {
- me._wLstatHandler(null, fs[me._wStatSync](statPath));
- } catch(e) {
- me._wLstatHandler(e);
- }
- };
- Walker.prototype._wOnEmitDone = function () {
- var me = this
- , dirs = []
- ;
-
- me._wfnodegroups.directories.forEach(appendToDirs, dirs);
- dirs.forEach(me._wJoinPath, me);
- me._wqueue.push(me._wq = dirs);
- me._wNext();
- };
- Walker.prototype._wPostFilesHandler = function () {
- var me = this
- ;
-
- if (me._wfnodegroups.errors.length) {
- // TODO v3.0 (don't noop the next)
- // .errors is an array of stats with { name: name, error: error }
- me.emit('errors', me._wcurpath, me._wfnodegroups.errors, noop);
- }
- // XXX emitNodeTypes still needs refactor
- TypeEmitter.emitNodeTypeGroups(me, me._wcurpath, me._wfnodegroups, me._wOnEmitDone, me);
- };
- Walker.prototype._wReadFiles = function () {
- var me = this
- ;
-
- if (!me._wcurfiles || 0 === me._wcurfiles.length) {
- return me._wNext();
- }
-
- // TODO could allow user to selectively stat
- // and don't stat if there are no stat listeners
- me.emit('names', me._wcurpath, me._wcurfiles, noop);
-
- if (me._wsync) {
- me._wcurfiles.forEach(wFilesHandlerWrapper, me);
- me._wPostFilesHandler();
- } else {
- forEachAsync(me._wcurfiles, me._wFilesHandler, me).then(me._wPostFilesHandler);
- }
- };
- Walker.prototype._wReaddirHandler = function (err, files) {
- var fnodeGroups = TypeEmitter.createNodeGroups()
- , me = this
- , parent
- , child
- ;
-
- me._wfnodegroups = fnodeGroups;
- me._wcurfiles = files;
-
- // no error, great
- if (!err) {
- me._wReadFiles();
- return;
- }
-
- // TODO path.sep
- me._wcurpath = me._wcurpath.replace(/\/$/, '');
-
- // error? not first run? => directory error
- if (!me._wfirstrun) {
- // TODO v3.0 (don't noop the next if there are listeners)
- me.emit('directoryError', me._wcurpath, { error: err }, noop);
- // TODO v3.0
- //me.emit('directoryError', me._wcurpath.replace(/^(.*)\/.*$/, '$1'), { name: me._wcurpath.replace(/^.*\/(.*)/, '$1'), error: err }, noop);
- me._wReadFiles();
- return;
- }
-
- // error? first run? => maybe a file, maybe a true error
- me._wfirstrun = false;
-
- // readdir failed (might be a file), try a stat on the parent
- parent = me._wcurpath.replace(/^(.*)\/.*$/, '$1');
- fs[me._wStat](parent, function (e, stat) {
-
- if (stat) {
- // success
- // now try stat on this as a child of the parent directory
- child = me._wcurpath.replace(/^.*\/(.*)$/, '$1');
- me._wcurfiles = [child];
- me._wcurpath = parent;
- } else {
- // TODO v3.0
- //me.emit('directoryError', me._wcurpath.replace(/^(.*)\/.*$/, '$1'), { name: me._wcurpath.replace(/^.*\/(.*)/, '$1'), error: err }, noop);
- // TODO v3.0 (don't noop the next)
- // the original readdir error, not the parent stat error
- me.emit('nodeError', me._wcurpath, { error: err }, noop);
- }
-
- me._wReadFiles();
- });
- };
- Walker.prototype._wFilter = function () {
- var me = this
- , exclude
- ;
-
- // Stop directories that contain filter keywords
- // from continuing through the walk process
- exclude = me._wfilters.some(function (filter) {
- if (me._wcurpath.match(filter)) {
- return true;
- }
- });
-
- return exclude;
- };
- Walker.prototype._wWalkSync = function () {
- //console.log('walkSync');
- var err
- , files
- , me = this
- ;
-
- try {
- files = fs.readdirSync(me._wcurpath);
- } catch(e) {
- err = e;
- }
-
- me._wReaddirHandler(err, files);
- };
- Walker.prototype._wWalkAsync = function () {
- //console.log('walkAsync');
- var me = this
- ;
-
- // TODO how to remove this anony?
- fs.readdir(me._wcurpath, function (err, files) {
- me._wReaddirHandler(err, files);
- });
- };
- Walker.prototype._wNext = function () {
- var me = this
- ;
-
- if (me._paused) {
- return;
- }
- if (me._wq.length) {
- me._wcurpath = me._wq.pop();
- while (me._wq.length && me._wFilter()) {
- me._wcurpath = me._wq.pop();
- }
- if (me._wcurpath && !me._wFilter()) {
- me._wWalk();
- } else {
- me._wNext();
- }
- return;
- }
- me._wqueue.length -= 1;
- if (me._wqueue.length) {
- me._wq = me._wqueue[me._wqueue.length - 1];
- return me._wNext();
- }
-
- // To not break compatibility
- //process.nextTick(function () {
- me.emit('end');
- //});
- };
- Walker.prototype._wJoinPath = function (v, i, o) {
- var me = this
- ;
-
- o[i] = [me._wcurpath, path.sep, v].join('');
- };
- Walker.prototype.pause = function () {
- this._paused = true;
- };
- Walker.prototype.resume = function () {
- this._paused = false;
- this._wNext();
- };
-
- exports.walk = function (path, opts) {
- return new Walker(path, opts, false);
- };
-
- exports.walkSync = function (path, opts) {
- return new Walker(path, opts, true);
- };
-}());
diff --git a/node_modules/walk/package.json b/node_modules/walk/package.json
deleted file mode 100644
index 701d7dd..0000000
--- a/node_modules/walk/package.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "_from": "walk@2.3.x",
- "_id": "walk@2.3.14",
- "_inBundle": false,
- "_integrity": "sha512-5skcWAUmySj6hkBdH6B6+3ddMjVQYH5Qy9QGbPmN8kVmLteXk+yVXg+yfk1nbX30EYakahLrr8iPcCxJQSCBeg==",
- "_location": "/walk",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "walk@2.3.x",
- "name": "walk",
- "escapedName": "walk",
- "rawSpec": "2.3.x",
- "saveSpec": null,
- "fetchSpec": "2.3.x"
- },
- "_requiredBy": [
- "/twig"
- ],
- "_resolved": "https://registry.npmjs.org/walk/-/walk-2.3.14.tgz",
- "_shasum": "60ec8631cfd23276ae1e7363ce11d626452e1ef3",
- "_spec": "walk@2.3.x",
- "_where": "/home/marvin/IdeaProjects/untitled/node_modules/twig",
- "author": {
- "name": "AJ ONeal",
- "email": "coolaj86@gmail.com"
- },
- "bugs": {
- "url": "https://git.coolaj86.com/coolaj86/fs-walk.js/issues"
- },
- "bundleDependencies": false,
- "contributors": [],
- "dependencies": {
- "foreachasync": "^3.0.0"
- },
- "deprecated": false,
- "description": "A node port of python's os.walk",
- "devDependencies": {},
- "directories": {
- "example": "examples",
- "test": "test"
- },
- "files": [
- "lib"
- ],
- "homepage": "https://git.coolaj86.com/coolaj86/fs-walk.js",
- "keywords": [
- "util",
- "os",
- "sys",
- "fs",
- "walk",
- "walkSync"
- ],
- "lib": ".",
- "license": "(MIT OR Apache-2.0)",
- "main": "./lib/walk.js",
- "name": "walk",
- "repository": {
- "url": "https://git.coolaj86.com/coolaj86/fs-walk.js.git"
- },
- "scripts": {
- "test": "./test/walk-test.sh"
- },
- "url": "http://git.coolaj86.com/coolaj86/fs-walk.js",
- "version": "2.3.14"
-}