locutus 2.0.12 → 2.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_util/cli.js.map +1 -1
- package/_util/util.js +11 -16
- package/_util/util.js.map +1 -1
- package/c/index.js +2 -2
- package/c/index.js.map +1 -1
- package/c/math/index.js +2 -2
- package/c/math/index.js.map +1 -1
- package/c/stdio/index.js +1 -1
- package/c/stdio/index.js.map +1 -1
- package/c/stdio/sprintf.js +8 -1
- package/c/stdio/sprintf.js.map +1 -1
- package/golang/index.js +1 -1
- package/golang/index.js.map +1 -1
- package/golang/strings/Count.js +1 -1
- package/golang/strings/Count.js.map +1 -1
- package/golang/strings/index.js +4 -4
- package/golang/strings/index.js.map +1 -1
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/package.json +39 -40
- package/php/_helpers/_bc.js +104 -48
- package/php/_helpers/_bc.js.map +1 -1
- package/php/_helpers/_phpCastString.js.map +1 -1
- package/php/_helpers/_php_cast_float.js.map +1 -1
- package/php/_helpers/_php_cast_int.js.map +1 -1
- package/php/_helpers/index.js +4 -4
- package/php/_helpers/index.js.map +1 -1
- package/php/array/array_change_key_case.js +2 -2
- package/php/array/array_change_key_case.js.map +1 -1
- package/php/array/array_chunk.js +1 -1
- package/php/array/array_chunk.js.map +1 -1
- package/php/array/array_column.js.map +1 -1
- package/php/array/array_combine.js.map +1 -1
- package/php/array/array_count_values.js.map +1 -1
- package/php/array/array_diff.js.map +1 -1
- package/php/array/array_diff_assoc.js.map +1 -1
- package/php/array/array_diff_key.js.map +1 -1
- package/php/array/array_diff_uassoc.js.map +1 -1
- package/php/array/array_diff_ukey.js.map +1 -1
- package/php/array/array_fill.js +1 -1
- package/php/array/array_fill.js.map +1 -1
- package/php/array/array_fill_keys.js.map +1 -1
- package/php/array/array_filter.js +1 -1
- package/php/array/array_filter.js.map +1 -1
- package/php/array/array_flip.js +1 -1
- package/php/array/array_flip.js.map +1 -1
- package/php/array/array_intersect.js.map +1 -1
- package/php/array/array_intersect_assoc.js.map +1 -1
- package/php/array/array_intersect_key.js.map +1 -1
- package/php/array/array_intersect_uassoc.js.map +1 -1
- package/php/array/array_intersect_ukey.js.map +1 -1
- package/php/array/array_keys.js.map +1 -1
- package/php/array/array_map.js.map +1 -1
- package/php/array/array_merge.js +1 -1
- package/php/array/array_merge.js.map +1 -1
- package/php/array/array_merge_recursive.js.map +1 -1
- package/php/array/array_multisort.js +16 -16
- package/php/array/array_multisort.js.map +1 -1
- package/php/array/array_pad.js +1 -1
- package/php/array/array_pad.js.map +1 -1
- package/php/array/array_pop.js.map +1 -1
- package/php/array/array_product.js.map +1 -1
- package/php/array/array_push.js.map +1 -1
- package/php/array/array_rand.js.map +1 -1
- package/php/array/array_reduce.js.map +1 -1
- package/php/array/array_replace.js.map +1 -1
- package/php/array/array_replace_recursive.js +1 -1
- package/php/array/array_replace_recursive.js.map +1 -1
- package/php/array/array_reverse.js +1 -1
- package/php/array/array_reverse.js.map +1 -1
- package/php/array/array_search.js.map +1 -1
- package/php/array/array_shift.js +0 -19
- package/php/array/array_shift.js.map +1 -1
- package/php/array/array_slice.js.map +1 -1
- package/php/array/array_splice.js.map +1 -1
- package/php/array/array_sum.js +1 -1
- package/php/array/array_sum.js.map +1 -1
- package/php/array/array_udiff.js.map +1 -1
- package/php/array/array_udiff_assoc.js.map +1 -1
- package/php/array/array_udiff_uassoc.js.map +1 -1
- package/php/array/array_uintersect.js.map +1 -1
- package/php/array/array_uintersect_uassoc.js.map +1 -1
- package/php/array/array_unique.js.map +1 -1
- package/php/array/array_unshift.js.map +1 -1
- package/php/array/array_values.js.map +1 -1
- package/php/array/array_walk.js.map +1 -1
- package/php/array/array_walk_recursive.js.map +1 -1
- package/php/array/arsort.js +3 -3
- package/php/array/arsort.js.map +1 -1
- package/php/array/asort.js +3 -3
- package/php/array/asort.js.map +1 -1
- package/php/array/count.js +1 -1
- package/php/array/count.js.map +1 -1
- package/php/array/current.js.map +1 -1
- package/php/array/each.js.map +1 -1
- package/php/array/end.js +1 -1
- package/php/array/end.js.map +1 -1
- package/php/array/in_array.js.map +1 -1
- package/php/array/index.js +73 -72
- package/php/array/index.js.map +1 -1
- package/php/array/key.js.map +1 -1
- package/php/array/krsort.js +3 -3
- package/php/array/krsort.js.map +1 -1
- package/php/array/ksort.js +3 -3
- package/php/array/ksort.js.map +1 -1
- package/php/array/natcasesort.js +2 -2
- package/php/array/natcasesort.js.map +1 -1
- package/php/array/natsort.js +2 -2
- package/php/array/natsort.js.map +1 -1
- package/php/array/next.js.map +1 -1
- package/php/array/pos.js.map +1 -1
- package/php/array/prev.js.map +1 -1
- package/php/array/range.js +3 -3
- package/php/array/range.js.map +1 -1
- package/php/array/reset.js.map +1 -1
- package/php/array/rsort.js +3 -3
- package/php/array/rsort.js.map +1 -1
- package/php/array/shuffle.js.map +1 -1
- package/php/array/sizeof.js.map +1 -1
- package/php/array/sort.js +3 -3
- package/php/array/sort.js.map +1 -1
- package/php/array/uasort.js.map +1 -1
- package/php/array/uksort.js.map +1 -1
- package/php/array/usort.js.map +1 -1
- package/php/bc/bcadd.js +3 -1
- package/php/bc/bcadd.js.map +1 -1
- package/php/bc/bccomp.js +2 -1
- package/php/bc/bccomp.js.map +1 -1
- package/php/bc/bcdiv.js +3 -1
- package/php/bc/bcdiv.js.map +1 -1
- package/php/bc/bcmul.js +3 -1
- package/php/bc/bcmul.js.map +1 -1
- package/php/bc/bcround.js +4 -2
- package/php/bc/bcround.js.map +1 -1
- package/php/bc/bcscale.js.map +1 -1
- package/php/bc/bcsub.js +3 -1
- package/php/bc/bcsub.js.map +1 -1
- package/php/bc/index.js +7 -7
- package/php/bc/index.js.map +1 -1
- package/php/ctype/ctype_alnum.js.map +1 -1
- package/php/ctype/ctype_alpha.js.map +1 -1
- package/php/ctype/ctype_cntrl.js.map +1 -1
- package/php/ctype/ctype_digit.js.map +1 -1
- package/php/ctype/ctype_graph.js.map +1 -1
- package/php/ctype/ctype_lower.js.map +1 -1
- package/php/ctype/ctype_print.js.map +1 -1
- package/php/ctype/ctype_punct.js.map +1 -1
- package/php/ctype/ctype_space.js.map +1 -1
- package/php/ctype/ctype_upper.js.map +1 -1
- package/php/ctype/ctype_xdigit.js.map +1 -1
- package/php/ctype/index.js +11 -11
- package/php/ctype/index.js.map +1 -1
- package/php/datetime/date.js +2 -1
- package/php/datetime/date.js.map +1 -1
- package/php/datetime/date_parse.js +1 -1
- package/php/datetime/date_parse.js.map +1 -1
- package/php/datetime/getdate.js.map +1 -1
- package/php/datetime/gettimeofday.js.map +1 -1
- package/php/datetime/gmdate.js.map +1 -1
- package/php/datetime/gmmktime.js.map +1 -1
- package/php/datetime/gmstrftime.js.map +1 -1
- package/php/datetime/idate.js +1 -1
- package/php/datetime/idate.js.map +1 -1
- package/php/datetime/index.js +15 -15
- package/php/datetime/index.js.map +1 -1
- package/php/datetime/microtime.js +3 -3
- package/php/datetime/microtime.js.map +1 -1
- package/php/datetime/mktime.js.map +1 -1
- package/php/datetime/strftime.js +2 -3
- package/php/datetime/strftime.js.map +1 -1
- package/php/datetime/strptime.js +20 -21
- package/php/datetime/strptime.js.map +1 -1
- package/php/datetime/strtotime.js +170 -4
- package/php/datetime/strtotime.js.map +1 -1
- package/php/exec/escapeshellarg.js +12 -4
- package/php/exec/escapeshellarg.js.map +1 -1
- package/php/exec/index.js +1 -1
- package/php/exec/index.js.map +1 -1
- package/php/filesystem/basename.js.map +1 -1
- package/php/filesystem/file_get_contents.js.map +1 -1
- package/php/filesystem/index.js +5 -5
- package/php/filesystem/index.js.map +1 -1
- package/php/filesystem/pathinfo.js +7 -8
- package/php/filesystem/pathinfo.js.map +1 -1
- package/php/filesystem/realpath.js.map +1 -1
- package/php/funchand/call_user_func.js.map +1 -1
- package/php/funchand/call_user_func_array.js +1 -1
- package/php/funchand/call_user_func_array.js.map +1 -1
- package/php/funchand/function_exists.js.map +1 -1
- package/php/funchand/get_defined_functions.js.map +1 -1
- package/php/funchand/index.js +5 -5
- package/php/funchand/index.js.map +1 -1
- package/php/i18n/i18n_loc_get_default.js.map +1 -1
- package/php/i18n/i18n_loc_set_default.js.map +1 -1
- package/php/i18n/index.js +2 -2
- package/php/i18n/index.js.map +1 -1
- package/php/index.js +19 -19
- package/php/index.js.map +1 -1
- package/php/info/assert_options.js +2 -1
- package/php/info/assert_options.js.map +1 -1
- package/php/info/index.js +6 -6
- package/php/info/index.js.map +1 -1
- package/php/info/ini_get.js.map +1 -1
- package/php/info/ini_set.js.map +1 -1
- package/php/info/set_time_limit.js.map +1 -1
- package/php/info/version_compare.js +21 -22
- package/php/info/version_compare.js.map +1 -1
- package/php/json/index.js +3 -3
- package/php/json/index.js.map +1 -1
- package/php/json/json_decode.js +1 -1
- package/php/json/json_decode.js.map +1 -1
- package/php/json/json_encode.js +1 -1
- package/php/json/json_encode.js.map +1 -1
- package/php/json/json_last_error.js.map +1 -1
- package/php/math/fmod.js +2 -2
- package/php/math/fmod.js.map +1 -1
- package/php/math/hypot.js.map +1 -1
- package/php/math/index.js +46 -46
- package/php/math/index.js.map +1 -1
- package/php/math/is_finite.js.map +1 -1
- package/php/math/is_infinite.js.map +1 -1
- package/php/math/is_nan.js.map +1 -1
- package/php/math/log1p.js.map +1 -1
- package/php/math/max.js +7 -7
- package/php/math/max.js.map +1 -1
- package/php/math/min.js +5 -5
- package/php/math/min.js.map +1 -1
- package/php/math/mt_rand.js.map +1 -1
- package/php/math/rand.js.map +1 -1
- package/php/math/round.js +1 -1
- package/php/math/round.js.map +1 -1
- package/php/misc/index.js +2 -2
- package/php/misc/index.js.map +1 -1
- package/php/misc/pack.js +23 -18
- package/php/misc/pack.js.map +1 -1
- package/php/misc/uniqid.js +1 -1
- package/php/misc/uniqid.js.map +1 -1
- package/php/net-gopher/gopher_parsedir.js +3 -4
- package/php/net-gopher/gopher_parsedir.js.map +1 -1
- package/php/net-gopher/index.js +1 -1
- package/php/net-gopher/index.js.map +1 -1
- package/php/network/index.js +6 -6
- package/php/network/index.js.map +1 -1
- package/php/network/inet_ntop.js.map +1 -1
- package/php/network/inet_pton.js +40 -32
- package/php/network/inet_pton.js.map +1 -1
- package/php/network/setcookie.js.map +1 -1
- package/php/network/setrawcookie.js.map +1 -1
- package/php/pcre/index.js +4 -3
- package/php/pcre/index.js.map +1 -1
- package/php/pcre/preg_replace.js +24 -0
- package/php/pcre/preg_replace.js.map +1 -0
- package/php/pcre/sql_regcase.js.map +1 -1
- package/php/strings/addcslashes.js.map +1 -1
- package/php/strings/bin2hex.js +3 -3
- package/php/strings/bin2hex.js.map +1 -1
- package/php/strings/chop.js.map +1 -1
- package/php/strings/convert_cyr_string.js +1 -1
- package/php/strings/convert_cyr_string.js.map +1 -1
- package/php/strings/convert_uuencode.js.map +1 -1
- package/php/strings/count_chars.js +1 -1
- package/php/strings/count_chars.js.map +1 -1
- package/php/strings/crc32.js.map +1 -1
- package/php/strings/echo.js.map +1 -1
- package/php/strings/explode.js.map +1 -1
- package/php/strings/get_html_translation_table.js +1 -1
- package/php/strings/get_html_translation_table.js.map +1 -1
- package/php/strings/hex2bin.js +1 -1
- package/php/strings/hex2bin.js.map +1 -1
- package/php/strings/html_entity_decode.js.map +1 -1
- package/php/strings/htmlentities.js.map +1 -1
- package/php/strings/htmlspecialchars.js +6 -6
- package/php/strings/htmlspecialchars.js.map +1 -1
- package/php/strings/htmlspecialchars_decode.js +6 -6
- package/php/strings/htmlspecialchars_decode.js.map +1 -1
- package/php/strings/implode.js.map +1 -1
- package/php/strings/index.js +91 -91
- package/php/strings/index.js.map +1 -1
- package/php/strings/join.js.map +1 -1
- package/php/strings/lcfirst.js.map +1 -1
- package/php/strings/levenshtein.js +6 -1
- package/php/strings/levenshtein.js.map +1 -1
- package/php/strings/localeconv.js.map +1 -1
- package/php/strings/ltrim.js.map +1 -1
- package/php/strings/md5.js +19 -15
- package/php/strings/md5.js.map +1 -1
- package/php/strings/md5_file.js.map +1 -1
- package/php/strings/metaphone.js +2 -2
- package/php/strings/metaphone.js.map +1 -1
- package/php/strings/money_format.js.map +1 -1
- package/php/strings/nl2br.js.map +1 -1
- package/php/strings/nl_langinfo.js.map +1 -1
- package/php/strings/number_format.js.map +1 -1
- package/php/strings/ord.js.map +1 -1
- package/php/strings/parse_str.js +13 -13
- package/php/strings/parse_str.js.map +1 -1
- package/php/strings/printf.js.map +1 -1
- package/php/strings/quoted_printable_decode.js.map +1 -1
- package/php/strings/quoted_printable_encode.js.map +1 -1
- package/php/strings/rtrim.js.map +1 -1
- package/php/strings/setlocale.js +18 -19
- package/php/strings/setlocale.js.map +1 -1
- package/php/strings/sha1.js +12 -7
- package/php/strings/sha1.js.map +1 -1
- package/php/strings/sha1_file.js.map +1 -1
- package/php/strings/similar_text.js +4 -4
- package/php/strings/similar_text.js.map +1 -1
- package/php/strings/soundex.js +3 -3
- package/php/strings/soundex.js.map +1 -1
- package/php/strings/split.js.map +1 -1
- package/php/strings/sprintf.js +7 -2
- package/php/strings/sprintf.js.map +1 -1
- package/php/strings/sscanf.js +2 -2
- package/php/strings/sscanf.js.map +1 -1
- package/php/strings/str_getcsv.js +2 -2
- package/php/strings/str_getcsv.js.map +1 -1
- package/php/strings/str_ireplace.js +6 -0
- package/php/strings/str_ireplace.js.map +1 -1
- package/php/strings/str_pad.js +1 -1
- package/php/strings/str_pad.js.map +1 -1
- package/php/strings/str_repeat.js.map +1 -1
- package/php/strings/str_replace.js +6 -0
- package/php/strings/str_replace.js.map +1 -1
- package/php/strings/str_shuffle.js +1 -1
- package/php/strings/str_shuffle.js.map +1 -1
- package/php/strings/str_split.js.map +1 -1
- package/php/strings/str_word_count.js.map +1 -1
- package/php/strings/strcasecmp.js.map +1 -1
- package/php/strings/strchr.js.map +1 -1
- package/php/strings/strcoll.js.map +1 -1
- package/php/strings/strip_tags.js.map +1 -1
- package/php/strings/stripos.js.map +1 -1
- package/php/strings/stristr.js.map +1 -1
- package/php/strings/strlen.js.map +1 -1
- package/php/strings/strnatcasecmp.js.map +1 -1
- package/php/strings/strnatcmp.js.map +1 -1
- package/php/strings/strncasecmp.js +1 -1
- package/php/strings/strncasecmp.js.map +1 -1
- package/php/strings/strncmp.js.map +1 -1
- package/php/strings/strpbrk.js.map +1 -1
- package/php/strings/strpos.js.map +1 -1
- package/php/strings/strrchr.js.map +1 -1
- package/php/strings/strrev.js.map +1 -1
- package/php/strings/strripos.js.map +1 -1
- package/php/strings/strrpos.js.map +1 -1
- package/php/strings/strspn.js +3 -3
- package/php/strings/strspn.js.map +1 -1
- package/php/strings/strstr.js.map +1 -1
- package/php/strings/strtok.js.map +1 -1
- package/php/strings/strtr.js.map +1 -1
- package/php/strings/substr.js.map +1 -1
- package/php/strings/substr_count.js.map +1 -1
- package/php/strings/trim.js.map +1 -1
- package/php/strings/ucfirst.js.map +1 -1
- package/php/strings/vprintf.js.map +1 -1
- package/php/strings/vsprintf.js.map +1 -1
- package/php/strings/wordwrap.js +4 -2
- package/php/strings/wordwrap.js.map +1 -1
- package/php/url/base64_decode.js +8 -8
- package/php/url/base64_decode.js.map +1 -1
- package/php/url/base64_encode.js +8 -8
- package/php/url/base64_encode.js.map +1 -1
- package/php/url/http_build_query.js +4 -4
- package/php/url/http_build_query.js.map +1 -1
- package/php/url/index.js +8 -8
- package/php/url/index.js.map +1 -1
- package/php/url/parse_url.js +1 -1
- package/php/url/parse_url.js.map +1 -1
- package/php/var/doubleval.js.map +1 -1
- package/php/var/empty.js +4 -4
- package/php/var/empty.js.map +1 -1
- package/php/var/gettype.js +1 -1
- package/php/var/gettype.js.map +1 -1
- package/php/var/index.js +30 -30
- package/php/var/index.js.map +1 -1
- package/php/var/intval.js +2 -1
- package/php/var/intval.js.map +1 -1
- package/php/var/is_array.js.map +1 -1
- package/php/var/is_callable.js.map +1 -1
- package/php/var/is_double.js.map +1 -1
- package/php/var/is_integer.js.map +1 -1
- package/php/var/is_long.js.map +1 -1
- package/php/var/is_numeric.js.map +1 -1
- package/php/var/is_real.js.map +1 -1
- package/php/var/is_unicode.js.map +1 -1
- package/php/var/isset.js +1 -1
- package/php/var/isset.js.map +1 -1
- package/php/var/print_r.js.map +1 -1
- package/php/var/serialize.js +7 -5
- package/php/var/serialize.js.map +1 -1
- package/php/var/strval.js.map +1 -1
- package/php/var/unserialize.js +422 -236
- package/php/var/unserialize.js.map +1 -1
- package/php/var/var_dump.js +3 -3
- package/php/var/var_dump.js.map +1 -1
- package/php/var/var_export.js +5 -5
- package/php/var/var_export.js.map +1 -1
- package/php/xdiff/index.js +2 -2
- package/php/xdiff/index.js.map +1 -1
- package/php/xdiff/xdiff_string_diff.js +30 -30
- package/php/xdiff/xdiff_string_diff.js.map +1 -1
- package/php/xdiff/xdiff_string_patch.js +7 -8
- package/php/xdiff/xdiff_string_patch.js.map +1 -1
- package/php/xml/index.js +2 -2
- package/php/xml/index.js.map +1 -1
- package/php/xml/utf8_decode.js.map +1 -1
- package/php/xml/utf8_encode.js +2 -2
- package/php/xml/utf8_encode.js.map +1 -1
- package/python/index.js +1 -1
- package/python/index.js.map +1 -1
- package/python/string/capwords.js.map +1 -1
- package/python/string/index.js +4 -4
- package/python/string/index.js.map +1 -1
- package/python/string/punctuation.js +10 -0
- package/python/string/punctuation.js.map +1 -0
- package/ruby/Math/index.js +1 -1
- package/ruby/Math/index.js.map +1 -1
- package/ruby/index.js +1 -1
- package/ruby/index.js.map +1 -1
package/php/array/rsort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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":"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","file":"rsort.js","sourcesContent":["module.exports = function rsort (inputArr, sortFlags) {\n // discuss at: https://locutus.io/php/rsort/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // revised by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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: https://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 const i18nlgd = require('../i18n/i18n_loc_get_default')\n const strnatcmp = require('../strings/strnatcmp')\n\n let sorter\n let i\n let k\n let sortByReference = false\n let populateArr = {}\n\n const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $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 const aFloat = parseFloat(a)\n const bFloat = parseFloat(b)\n const aNumeric = aFloat + '' === a\n const 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 const iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n const 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"]}
|
package/php/array/shuffle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,SAAS,EAAf;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,MAAMC,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAAvH;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: https://locutus.io/php/shuffle/\n // original by: Jonas Raoni Soares Silva (https://www.jsfromhell.com)\n // revised by: Kevin van Zonneveld (https://kvz.io)\n // revised by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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 const valArr = []\n let k = ''\n let i = 0\n let sortByReference = false\n let 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 const 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"]}
|
package/php/array/sizeof.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,QAAQC,QAAQ,gBAAR,CAAd;;AAEA,SAAOD,MAAMF,QAAN,EAAgBC,IAAhB,CAAP;AACD,CAXD","file":"sizeof.js","sourcesContent":["module.exports = function sizeof (mixedVar, mode) {\n // discuss at: https://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 const count = require('../array/count')\n\n return count(mixedVar, mode)\n}\n"]}
|
package/php/array/sort.js
CHANGED
|
@@ -34,9 +34,9 @@ module.exports = function sort(inputArr, sortFlags) {
|
|
|
34
34
|
|
|
35
35
|
var i18nlgd = require('../i18n/i18n_loc_get_default');
|
|
36
36
|
|
|
37
|
-
var sorter;
|
|
38
|
-
var i;
|
|
39
|
-
var k;
|
|
37
|
+
var sorter = void 0;
|
|
38
|
+
var i = void 0;
|
|
39
|
+
var k = void 0;
|
|
40
40
|
var sortByReference = false;
|
|
41
41
|
var populateArr = {};
|
|
42
42
|
|
package/php/array/sort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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":"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","file":"sort.js","sourcesContent":["module.exports = function sort (inputArr, sortFlags) {\n // discuss at: https://locutus.io/php/sort/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // revised by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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: https://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 const i18nlgd = require('../i18n/i18n_loc_get_default')\n\n let sorter\n let i\n let k\n let sortByReference = false\n let populateArr = {}\n\n const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $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 const aFloat = parseFloat(a)\n const bFloat = parseFloat(b)\n const aNumeric = aFloat + '' === a\n const 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 const iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n sortByReference = iniVal === 'on'\n populateArr = sortByReference ? inputArr : populateArr\n\n const 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"]}
|
package/php/array/uasort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,SAAS,EAAf;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,MAAMU,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAAvH;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: https://locutus.io/php/uasort/\n // original by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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 const valArr = []\n let k = ''\n let i = 0\n let sortByReference = false\n let 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 const 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"]}
|
package/php/array/uksort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,SAAS,EAAf;AACA,MAAMC,OAAO,EAAb;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,MAAMC,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAAvH;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: https://locutus.io/php/uksort/\n // original by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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 const tmpArr = {}\n const keys = []\n let i = 0\n let k = ''\n let sortByReference = false\n let 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 const 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"]}
|
package/php/array/usort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,SAAS,EAAf;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,MAAMU,SAAS,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAAvH;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: https://locutus.io/php/usort/\n // original by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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 const valArr = []\n let k = ''\n let i = 0\n let sortByReference = false\n let 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 const 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"]}
|
package/php/bc/bcadd.js
CHANGED
|
@@ -13,7 +13,9 @@ module.exports = function bcadd(leftOperand, rightOperand, scale) {
|
|
|
13
13
|
var bc = require('../_helpers/_bc');
|
|
14
14
|
var libbcmath = bc();
|
|
15
15
|
|
|
16
|
-
var first
|
|
16
|
+
var first = void 0,
|
|
17
|
+
second = void 0,
|
|
18
|
+
result = void 0;
|
|
17
19
|
|
|
18
20
|
if (typeof scale === 'undefined') {
|
|
19
21
|
scale = libbcmath.scale;
|
package/php/bc/bcadd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,KAAKC,QAAQ,iBAAR,CAAX;AACA,MAAMC,YAAYF,IAAlB;;AAEA,MAAIG,cAAJ;AAAA,MAAWC,eAAX;AAAA,MAAmBC,eAAnB;;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: https://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 const bc = require('../_helpers/_bc')\n const libbcmath = bc()\n\n let 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"]}
|
package/php/bc/bccomp.js
CHANGED
package/php/bc/bccomp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,KAAKC,QAAQ,iBAAR,CAAX;AACA,MAAMC,YAAYF,IAAlB;;AAEA;AACA,MAAIG,cAAJ;AAAA,MAAWC,eAAX;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: https://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 const bc = require('../_helpers/_bc')\n const libbcmath = bc()\n\n // bc_num\n let 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"]}
|
package/php/bc/bcdiv.js
CHANGED
|
@@ -15,7 +15,9 @@ module.exports = function bcdiv(leftOperand, rightOperand, scale) {
|
|
|
15
15
|
var _bc = require('../_helpers/_bc');
|
|
16
16
|
var libbcmath = _bc();
|
|
17
17
|
|
|
18
|
-
var first
|
|
18
|
+
var first = void 0,
|
|
19
|
+
second = void 0,
|
|
20
|
+
result = void 0;
|
|
19
21
|
|
|
20
22
|
if (typeof scale === 'undefined') {
|
|
21
23
|
scale = libbcmath.scale;
|
package/php/bc/bcdiv.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,MAAMC,QAAQ,iBAAR,CAAZ;AACA,MAAMC,YAAYF,KAAlB;;AAEA,MAAIG,cAAJ;AAAA,MAAWC,eAAX;AAAA,MAAmBC,eAAnB;;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: https://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 const _bc = require('../_helpers/_bc')\n const libbcmath = _bc()\n\n let 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"]}
|
package/php/bc/bcmul.js
CHANGED
|
@@ -15,7 +15,9 @@ module.exports = function bcmul(leftOperand, rightOperand, scale) {
|
|
|
15
15
|
var _bc = require('../_helpers/_bc');
|
|
16
16
|
var libbcmath = _bc();
|
|
17
17
|
|
|
18
|
-
var first
|
|
18
|
+
var first = void 0,
|
|
19
|
+
second = void 0,
|
|
20
|
+
result = void 0;
|
|
19
21
|
|
|
20
22
|
if (typeof scale === 'undefined') {
|
|
21
23
|
scale = libbcmath.scale;
|
package/php/bc/bcmul.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,MAAMC,QAAQ,iBAAR,CAAZ;AACA,MAAMC,YAAYF,KAAlB;;AAEA,MAAIG,cAAJ;AAAA,MAAWC,eAAX;AAAA,MAAmBC,eAAnB;;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: https://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 const _bc = require('../_helpers/_bc')\n const libbcmath = _bc()\n\n let 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"]}
|
package/php/bc/bcround.js
CHANGED
|
@@ -9,8 +9,10 @@ module.exports = function bcround(val, precision) {
|
|
|
9
9
|
var _bc = require('../_helpers/_bc');
|
|
10
10
|
var libbcmath = _bc();
|
|
11
11
|
|
|
12
|
-
var temp
|
|
13
|
-
|
|
12
|
+
var temp = void 0,
|
|
13
|
+
result = void 0,
|
|
14
|
+
digit = void 0;
|
|
15
|
+
var rightOperand = void 0;
|
|
14
16
|
|
|
15
17
|
// create number
|
|
16
18
|
temp = libbcmath.bc_init_num();
|
package/php/bc/bcround.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,MAAMC,QAAQ,iBAAR,CAAZ;AACA,MAAMC,YAAYF,KAAlB;;AAEA,MAAIG,aAAJ;AAAA,MAAUC,eAAV;AAAA,MAAkBC,cAAlB;AACA,MAAIC,qBAAJ;;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: https://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 const _bc = require('../_helpers/_bc')\n const libbcmath = _bc()\n\n let temp, result, digit\n let 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"]}
|
package/php/bc/bcscale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,MAAMC,QAAQ,iBAAR,CAAZ;AACA,MAAMC,YAAYF,KAAlB;;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: https://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 const _bc = require('../_helpers/_bc')\n const 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"]}
|
package/php/bc/bcsub.js
CHANGED
|
@@ -13,7 +13,9 @@ module.exports = function bcsub(leftOperand, rightOperand, scale) {
|
|
|
13
13
|
var _bc = require('../_helpers/_bc');
|
|
14
14
|
var libbcmath = _bc();
|
|
15
15
|
|
|
16
|
-
var first
|
|
16
|
+
var first = void 0,
|
|
17
|
+
second = void 0,
|
|
18
|
+
result = void 0;
|
|
17
19
|
|
|
18
20
|
if (typeof scale === 'undefined') {
|
|
19
21
|
scale = libbcmath.scale;
|
package/php/bc/bcsub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,MAAMC,QAAQ,iBAAR,CAAZ;AACA,MAAMC,YAAYF,KAAlB;;AAEA,MAAIG,cAAJ;AAAA,MAAWC,eAAX;AAAA,MAAmBC,eAAnB;;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: https://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 const _bc = require('../_helpers/_bc')\n const libbcmath = _bc()\n\n let 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"]}
|
package/php/bc/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
module.exports
|
|
4
|
-
module.exports
|
|
5
|
-
module.exports
|
|
6
|
-
module.exports
|
|
7
|
-
module.exports
|
|
8
|
-
module.exports
|
|
9
|
-
module.exports
|
|
3
|
+
module.exports.bcadd = require('./bcadd');
|
|
4
|
+
module.exports.bccomp = require('./bccomp');
|
|
5
|
+
module.exports.bcdiv = require('./bcdiv');
|
|
6
|
+
module.exports.bcmul = require('./bcmul');
|
|
7
|
+
module.exports.bcround = require('./bcround');
|
|
8
|
+
module.exports.bcscale = require('./bcscale');
|
|
9
|
+
module.exports.bcsub = require('./bcsub');
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/php/bc/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/bc/index.js"],"names":["module","exports","require"],"mappings":";;AAAAA,OAAOC,OAAP,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/bc/index.js"],"names":["module","exports","bcadd","require","bccomp","bcdiv","bcmul","bcround","bcscale","bcsub"],"mappings":";;AAAAA,OAAOC,OAAP,CAAeC,KAAf,GAAuBC,QAAQ,SAAR,CAAvB;AACAH,OAAOC,OAAP,CAAeG,MAAf,GAAwBD,QAAQ,UAAR,CAAxB;AACAH,OAAOC,OAAP,CAAeI,KAAf,GAAuBF,QAAQ,SAAR,CAAvB;AACAH,OAAOC,OAAP,CAAeK,KAAf,GAAuBH,QAAQ,SAAR,CAAvB;AACAH,OAAOC,OAAP,CAAeM,OAAf,GAAyBJ,QAAQ,WAAR,CAAzB;AACAH,OAAOC,OAAP,CAAeO,OAAf,GAAyBL,QAAQ,WAAR,CAAzB;AACAH,OAAOC,OAAP,CAAeQ,KAAf,GAAuBN,QAAQ,SAAR,CAAvB","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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_alnum/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_alnum('AbC12')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.an) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_alpha/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_alpha('Az')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.al) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_cntrl/\n // original by: Brett Zamir (https://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 const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.ct) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_digit/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_digit('150')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.dg) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_graph/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_graph('!%')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.gr) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_lower/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_lower('abc')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.lw) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_print/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_print('AbC!#12')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pr) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_punct/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_punct('!?')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pu) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_space/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_space('\\t\\n')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.sp) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_upper/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_upper('AZ')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.up) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAW,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAA1D;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;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: https://locutus.io/php/ctype_xdigit/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_xdigit('01dF')\n // returns 1: true\n\n const 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 const $global = (typeof window !== 'undefined' ? window : global)\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.xd) !== -1\n}\n"]}
|