locutus 2.0.16 → 2.0.30
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/util.js +24 -24
- package/_util/util.js.map +1 -1
- package/c/math/abs.js.map +1 -1
- package/c/math/frexp.js.map +1 -1
- package/c/stdio/sprintf.js +1 -1
- package/c/stdio/sprintf.js.map +1 -1
- package/golang/strings/Contains.js.map +1 -1
- package/golang/strings/Count.js.map +1 -1
- package/golang/strings/Index2.js.map +1 -1
- package/golang/strings/LastIndex.js.map +1 -1
- package/package.json +65 -60
- package/php/_helpers/_bc.js +2 -3
- package/php/_helpers/_bc.js.map +1 -1
- package/php/_helpers/_phpCastString.js.map +1 -1
- package/php/_helpers/_php_cast_float.js +0 -1
- package/php/_helpers/_php_cast_float.js.map +1 -1
- package/php/_helpers/_php_cast_int.js +0 -1
- package/php/_helpers/_php_cast_int.js.map +1 -1
- package/php/array/array_change_key_case.js +0 -1
- package/php/array/array_change_key_case.js.map +1 -1
- package/php/array/array_chunk.js +6 -5
- package/php/array/array_chunk.js.map +1 -1
- package/php/array/array_column.js +1 -1
- package/php/array/array_column.js.map +1 -1
- package/php/array/array_combine.js +0 -1
- package/php/array/array_combine.js.map +1 -1
- package/php/array/array_count_values.js +0 -1
- package/php/array/array_count_values.js.map +1 -1
- package/php/array/array_diff.js +0 -2
- package/php/array/array_diff.js.map +1 -1
- package/php/array/array_diff_assoc.js +0 -2
- package/php/array/array_diff_assoc.js.map +1 -1
- package/php/array/array_diff_key.js +0 -2
- package/php/array/array_diff_key.js.map +1 -1
- package/php/array/array_diff_uassoc.js +0 -2
- package/php/array/array_diff_uassoc.js.map +1 -1
- package/php/array/array_diff_ukey.js +0 -2
- package/php/array/array_diff_ukey.js.map +1 -1
- package/php/array/array_fill.js +0 -1
- package/php/array/array_fill.js.map +1 -1
- package/php/array/array_fill_keys.js +0 -1
- package/php/array/array_fill_keys.js.map +1 -1
- package/php/array/array_filter.js +0 -1
- package/php/array/array_filter.js.map +1 -1
- package/php/array/array_flip.js +0 -1
- package/php/array/array_flip.js.map +1 -1
- package/php/array/array_intersect.js +0 -3
- package/php/array/array_intersect.js.map +1 -1
- package/php/array/array_intersect_assoc.js +0 -3
- package/php/array/array_intersect_assoc.js.map +1 -1
- package/php/array/array_intersect_key.js +0 -3
- package/php/array/array_intersect_key.js.map +1 -1
- package/php/array/array_intersect_uassoc.js +0 -3
- package/php/array/array_intersect_uassoc.js.map +1 -1
- package/php/array/array_intersect_ukey.js +0 -3
- package/php/array/array_intersect_ukey.js.map +1 -1
- package/php/array/array_key_exists.js +0 -1
- package/php/array/array_key_exists.js.map +1 -1
- package/php/array/array_keys.js +0 -1
- package/php/array/array_keys.js.map +1 -1
- package/php/array/array_map.js +0 -1
- package/php/array/array_map.js.map +1 -1
- package/php/array/array_merge.js +0 -1
- package/php/array/array_merge.js.map +1 -1
- package/php/array/array_merge_recursive.js +0 -1
- package/php/array/array_merge_recursive.js.map +1 -1
- package/php/array/array_multisort.js +0 -1
- package/php/array/array_multisort.js.map +1 -1
- package/php/array/array_pad.js +0 -1
- package/php/array/array_pad.js.map +1 -1
- package/php/array/array_pop.js +0 -1
- package/php/array/array_pop.js.map +1 -1
- package/php/array/array_product.js +0 -1
- package/php/array/array_product.js.map +1 -1
- package/php/array/array_push.js +0 -1
- package/php/array/array_push.js.map +1 -1
- package/php/array/array_rand.js +0 -1
- package/php/array/array_rand.js.map +1 -1
- package/php/array/array_reduce.js +0 -1
- package/php/array/array_reduce.js.map +1 -1
- package/php/array/array_replace.js +0 -1
- package/php/array/array_replace.js.map +1 -1
- package/php/array/array_replace_recursive.js +0 -1
- package/php/array/array_replace_recursive.js.map +1 -1
- package/php/array/array_reverse.js +0 -1
- package/php/array/array_reverse.js.map +1 -1
- package/php/array/array_search.js +1 -2
- package/php/array/array_search.js.map +1 -1
- package/php/array/array_shift.js +0 -1
- package/php/array/array_shift.js.map +1 -1
- package/php/array/array_slice.js +2 -2
- package/php/array/array_slice.js.map +1 -1
- package/php/array/array_splice.js +0 -1
- package/php/array/array_splice.js.map +1 -1
- package/php/array/array_sum.js +0 -1
- package/php/array/array_sum.js.map +1 -1
- package/php/array/array_udiff.js +0 -3
- package/php/array/array_udiff.js.map +1 -1
- package/php/array/array_udiff_assoc.js +0 -2
- package/php/array/array_udiff_assoc.js.map +1 -1
- package/php/array/array_udiff_uassoc.js +0 -2
- package/php/array/array_udiff_uassoc.js.map +1 -1
- package/php/array/array_uintersect.js +0 -3
- package/php/array/array_uintersect.js.map +1 -1
- package/php/array/array_uintersect_uassoc.js +0 -3
- package/php/array/array_uintersect_uassoc.js.map +1 -1
- package/php/array/array_unique.js +0 -1
- package/php/array/array_unique.js.map +1 -1
- package/php/array/array_unshift.js +0 -1
- package/php/array/array_unshift.js.map +1 -1
- package/php/array/array_values.js +0 -1
- package/php/array/array_values.js.map +1 -1
- package/php/array/array_walk.js +0 -1
- package/php/array/array_walk.js.map +1 -1
- package/php/array/array_walk_recursive.js +0 -1
- package/php/array/array_walk_recursive.js.map +1 -1
- package/php/array/arsort.js.map +1 -1
- package/php/array/asort.js.map +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.map +1 -1
- package/php/array/in_array.js +1 -2
- package/php/array/in_array.js.map +1 -1
- package/php/array/key.js.map +1 -1
- package/php/array/krsort.js.map +1 -1
- package/php/array/ksort.js.map +1 -1
- package/php/array/natcasesort.js.map +1 -1
- 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.map +1 -1
- package/php/array/reset.js.map +1 -1
- 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.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.map +1 -1
- package/php/bc/bccomp.js.map +1 -1
- package/php/bc/bcdiv.js.map +1 -1
- package/php/bc/bcmul.js.map +1 -1
- package/php/bc/bcround.js.map +1 -1
- package/php/bc/bcscale.js.map +1 -1
- package/php/bc/bcsub.js.map +1 -1
- package/php/ctype/ctype_alnum.js +0 -1
- package/php/ctype/ctype_alnum.js.map +1 -1
- package/php/ctype/ctype_alpha.js +0 -1
- package/php/ctype/ctype_alpha.js.map +1 -1
- package/php/ctype/ctype_cntrl.js +0 -1
- package/php/ctype/ctype_cntrl.js.map +1 -1
- package/php/ctype/ctype_digit.js +0 -1
- package/php/ctype/ctype_digit.js.map +1 -1
- package/php/ctype/ctype_graph.js +0 -1
- package/php/ctype/ctype_graph.js.map +1 -1
- package/php/ctype/ctype_lower.js +0 -1
- package/php/ctype/ctype_lower.js.map +1 -1
- package/php/ctype/ctype_print.js +0 -1
- package/php/ctype/ctype_print.js.map +1 -1
- package/php/ctype/ctype_punct.js +0 -1
- package/php/ctype/ctype_punct.js.map +1 -1
- package/php/ctype/ctype_space.js +0 -1
- package/php/ctype/ctype_space.js.map +1 -1
- package/php/ctype/ctype_upper.js +0 -1
- package/php/ctype/ctype_upper.js.map +1 -1
- package/php/ctype/ctype_xdigit.js +0 -1
- package/php/ctype/ctype_xdigit.js.map +1 -1
- package/php/datetime/checkdate.js.map +1 -1
- package/php/datetime/date.js +1 -2
- package/php/datetime/date.js.map +1 -1
- package/php/datetime/date_parse.js +0 -1
- package/php/datetime/date_parse.js.map +1 -1
- package/php/datetime/getdate.js +1 -2
- 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.map +1 -1
- package/php/datetime/microtime.js.map +1 -1
- package/php/datetime/mktime.js.map +1 -1
- package/php/datetime/strftime.js.map +1 -1
- package/php/datetime/strptime.js.map +1 -1
- package/php/datetime/strtotime.js +28 -14
- package/php/datetime/strtotime.js.map +1 -1
- package/php/datetime/time.js.map +1 -1
- package/php/exec/escapeshellarg.js +1 -1
- package/php/exec/escapeshellarg.js.map +1 -1
- package/php/filesystem/basename.js.map +1 -1
- package/php/filesystem/dirname.js.map +1 -1
- package/php/filesystem/file_get_contents.js +0 -1
- package/php/filesystem/file_get_contents.js.map +1 -1
- package/php/filesystem/pathinfo.js.map +1 -1
- package/php/filesystem/realpath.js.map +1 -1
- package/php/funchand/call_user_func.js +0 -1
- package/php/funchand/call_user_func.js.map +1 -1
- package/php/funchand/call_user_func_array.js +0 -1
- package/php/funchand/call_user_func_array.js.map +1 -1
- package/php/funchand/create_function.js +0 -1
- package/php/funchand/create_function.js.map +1 -1
- package/php/funchand/function_exists.js +0 -1
- package/php/funchand/function_exists.js.map +1 -1
- package/php/funchand/get_defined_functions.js +0 -1
- package/php/funchand/get_defined_functions.js.map +1 -1
- package/php/i18n/i18n_loc_get_default.js +0 -1
- package/php/i18n/i18n_loc_get_default.js.map +1 -1
- package/php/i18n/i18n_loc_set_default.js +0 -1
- package/php/i18n/i18n_loc_set_default.js.map +1 -1
- package/php/info/assert_options.js +0 -1
- package/php/info/assert_options.js.map +1 -1
- package/php/info/getenv.js.map +1 -1
- package/php/info/ini_get.js +0 -1
- package/php/info/ini_get.js.map +1 -1
- package/php/info/ini_set.js +0 -1
- package/php/info/ini_set.js.map +1 -1
- package/php/info/set_time_limit.js +0 -1
- package/php/info/set_time_limit.js.map +1 -1
- package/php/info/version_compare.js +0 -1
- package/php/info/version_compare.js.map +1 -1
- package/php/json/json_decode.js +0 -1
- package/php/json/json_decode.js.map +1 -1
- package/php/json/json_encode.js +0 -1
- package/php/json/json_encode.js.map +1 -1
- package/php/json/json_last_error.js +0 -1
- package/php/json/json_last_error.js.map +1 -1
- package/php/math/abs.js.map +1 -1
- package/php/math/acos.js.map +1 -1
- package/php/math/acosh.js.map +1 -1
- package/php/math/asin.js.map +1 -1
- package/php/math/asinh.js.map +1 -1
- package/php/math/atan.js.map +1 -1
- package/php/math/atan2.js.map +1 -1
- package/php/math/atanh.js.map +1 -1
- package/php/math/base_convert.js +0 -1
- package/php/math/base_convert.js.map +1 -1
- package/php/math/bindec.js.map +1 -1
- package/php/math/ceil.js.map +1 -1
- package/php/math/cos.js.map +1 -1
- package/php/math/cosh.js.map +1 -1
- package/php/math/decbin.js +1 -1
- package/php/math/decbin.js.map +1 -1
- package/php/math/dechex.js +1 -1
- package/php/math/dechex.js.map +1 -1
- package/php/math/decoct.js +1 -1
- package/php/math/decoct.js.map +1 -1
- package/php/math/deg2rad.js.map +1 -1
- package/php/math/exp.js.map +1 -1
- package/php/math/expm1.js.map +1 -1
- package/php/math/floor.js.map +1 -1
- package/php/math/fmod.js.map +1 -1
- package/php/math/getrandmax.js.map +1 -1
- package/php/math/hexdec.js.map +1 -1
- package/php/math/hypot.js.map +1 -1
- package/php/math/is_finite.js +0 -1
- package/php/math/is_finite.js.map +1 -1
- package/php/math/is_infinite.js +0 -1
- package/php/math/is_infinite.js.map +1 -1
- package/php/math/is_nan.js +0 -1
- package/php/math/is_nan.js.map +1 -1
- package/php/math/lcg_value.js +0 -1
- package/php/math/lcg_value.js.map +1 -1
- package/php/math/log.js.map +1 -1
- package/php/math/log10.js.map +1 -1
- package/php/math/log1p.js.map +1 -1
- package/php/math/max.js.map +1 -1
- package/php/math/min.js.map +1 -1
- package/php/math/mt_getrandmax.js +0 -1
- package/php/math/mt_getrandmax.js.map +1 -1
- package/php/math/mt_rand.js +0 -1
- package/php/math/mt_rand.js.map +1 -1
- package/php/math/octdec.js.map +1 -1
- package/php/math/pi.js.map +1 -1
- package/php/math/pow.js.map +1 -1
- package/php/math/rad2deg.js.map +1 -1
- package/php/math/rand.js.map +1 -1
- package/php/math/round.js.map +1 -1
- package/php/math/sin.js.map +1 -1
- package/php/math/sinh.js.map +1 -1
- package/php/math/sqrt.js.map +1 -1
- package/php/math/tan.js.map +1 -1
- package/php/math/tanh.js.map +1 -1
- package/php/misc/pack.js +15 -15
- package/php/misc/pack.js.map +1 -1
- package/php/misc/uniqid.js.map +1 -1
- package/php/net-gopher/gopher_parsedir.js +0 -1
- package/php/net-gopher/gopher_parsedir.js.map +1 -1
- package/php/network/inet_ntop.js +0 -1
- package/php/network/inet_ntop.js.map +1 -1
- package/php/network/inet_pton.js +1 -2
- package/php/network/inet_pton.js.map +1 -1
- package/php/network/ip2long.js.map +1 -1
- package/php/network/long2ip.js +1 -1
- package/php/network/long2ip.js.map +1 -1
- package/php/network/setcookie.js.map +1 -1
- package/php/network/setrawcookie.js.map +1 -1
- package/php/pcre/preg_match.js +0 -1
- package/php/pcre/preg_match.js.map +1 -1
- package/php/pcre/preg_quote.js +0 -1
- package/php/pcre/preg_quote.js.map +1 -1
- package/php/pcre/preg_replace.js +0 -1
- package/php/pcre/preg_replace.js.map +1 -1
- package/php/pcre/sql_regcase.js +0 -1
- package/php/pcre/sql_regcase.js.map +1 -1
- package/php/strings/addcslashes.js.map +1 -1
- package/php/strings/addslashes.js.map +1 -1
- package/php/strings/bin2hex.js.map +1 -1
- package/php/strings/chop.js.map +1 -1
- package/php/strings/chr.js +2 -2
- package/php/strings/chr.js.map +1 -1
- package/php/strings/chunk_split.js +0 -1
- package/php/strings/chunk_split.js.map +1 -1
- package/php/strings/convert_cyr_string.js +0 -1
- package/php/strings/convert_cyr_string.js.map +1 -1
- package/php/strings/convert_uuencode.js +0 -1
- package/php/strings/convert_uuencode.js.map +1 -1
- package/php/strings/count_chars.js +0 -1
- package/php/strings/count_chars.js.map +1 -1
- package/php/strings/crc32.js +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 +0 -1
- package/php/strings/get_html_translation_table.js.map +1 -1
- package/php/strings/hex2bin.js.map +1 -1
- package/php/strings/html_entity_decode.js +0 -1
- package/php/strings/html_entity_decode.js.map +1 -1
- package/php/strings/htmlentities.js.map +1 -1
- package/php/strings/htmlspecialchars.js.map +1 -1
- package/php/strings/htmlspecialchars_decode.js +0 -1
- package/php/strings/htmlspecialchars_decode.js.map +1 -1
- package/php/strings/implode.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.map +1 -1
- package/php/strings/localeconv.js.map +1 -1
- package/php/strings/ltrim.js.map +1 -1
- package/php/strings/md5.js +67 -67
- package/php/strings/md5.js.map +1 -1
- package/php/strings/md5_file.js +0 -1
- package/php/strings/md5_file.js.map +1 -1
- package/php/strings/metaphone.js +1 -1
- package/php/strings/metaphone.js.map +1 -1
- package/php/strings/money_format.js +0 -1
- package/php/strings/money_format.js.map +1 -1
- package/php/strings/nl2br.js.map +1 -1
- package/php/strings/nl_langinfo.js +0 -1
- package/php/strings/nl_langinfo.js.map +1 -1
- package/php/strings/number_format.js +0 -1
- package/php/strings/number_format.js.map +1 -1
- package/php/strings/ord.js +3 -3
- package/php/strings/ord.js.map +1 -1
- package/php/strings/parse_str.js +0 -1
- package/php/strings/parse_str.js.map +1 -1
- package/php/strings/printf.js.map +1 -1
- package/php/strings/quoted_printable_decode.js +0 -1
- package/php/strings/quoted_printable_decode.js.map +1 -1
- package/php/strings/quoted_printable_encode.js +0 -1
- package/php/strings/quoted_printable_encode.js.map +1 -1
- package/php/strings/quotemeta.js.map +1 -1
- package/php/strings/rtrim.js.map +1 -1
- package/php/strings/setlocale.js.map +1 -1
- package/php/strings/sha1.js +7 -7
- package/php/strings/sha1.js.map +1 -1
- package/php/strings/sha1_file.js +0 -1
- package/php/strings/sha1_file.js.map +1 -1
- package/php/strings/similar_text.js +1 -2
- package/php/strings/similar_text.js.map +1 -1
- package/php/strings/soundex.js.map +1 -1
- package/php/strings/split.js.map +1 -1
- package/php/strings/sprintf.js.map +1 -1
- package/php/strings/sscanf.js.map +1 -1
- package/php/strings/str_getcsv.js +0 -1
- package/php/strings/str_getcsv.js.map +1 -1
- package/php/strings/str_ireplace.js +0 -1
- package/php/strings/str_ireplace.js.map +1 -1
- package/php/strings/str_pad.js +0 -1
- package/php/strings/str_pad.js.map +1 -1
- package/php/strings/str_repeat.js +0 -1
- package/php/strings/str_repeat.js.map +1 -1
- package/php/strings/str_replace.js +0 -1
- package/php/strings/str_replace.js.map +1 -1
- package/php/strings/str_rot13.js +0 -1
- package/php/strings/str_rot13.js.map +1 -1
- package/php/strings/str_shuffle.js +0 -1
- package/php/strings/str_shuffle.js.map +1 -1
- package/php/strings/str_split.js +0 -1
- package/php/strings/str_split.js.map +1 -1
- package/php/strings/str_word_count.js +4 -5
- 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/strcmp.js.map +1 -1
- package/php/strings/strcoll.js.map +1 -1
- package/php/strings/strcspn.js.map +1 -1
- package/php/strings/strip_tags.js +0 -1
- package/php/strings/strip_tags.js.map +1 -1
- package/php/strings/stripos.js.map +1 -1
- package/php/strings/stripslashes.js.map +1 -1
- package/php/strings/stristr.js.map +1 -1
- package/php/strings/strlen.js +4 -4
- 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.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.map +1 -1
- package/php/strings/strstr.js.map +1 -1
- package/php/strings/strtok.js.map +1 -1
- package/php/strings/strtolower.js.map +1 -1
- package/php/strings/strtoupper.js.map +1 -1
- package/php/strings/strtr.js.map +1 -1
- package/php/strings/substr.js.map +1 -1
- package/php/strings/substr_compare.js +0 -1
- package/php/strings/substr_compare.js.map +1 -1
- package/php/strings/substr_count.js +0 -1
- package/php/strings/substr_count.js.map +1 -1
- package/php/strings/substr_replace.js +0 -1
- package/php/strings/substr_replace.js.map +1 -1
- package/php/strings/trim.js.map +1 -1
- package/php/strings/ucfirst.js.map +1 -1
- package/php/strings/ucwords.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.map +1 -1
- package/php/url/base64_decode.js +0 -1
- package/php/url/base64_decode.js.map +1 -1
- package/php/url/base64_encode.js +0 -1
- package/php/url/base64_encode.js.map +1 -1
- package/php/url/http_build_query.js +0 -1
- package/php/url/http_build_query.js.map +1 -1
- package/php/url/parse_url.js +0 -1
- package/php/url/parse_url.js.map +1 -1
- package/php/url/rawurldecode.js.map +1 -1
- package/php/url/rawurlencode.js.map +1 -1
- package/php/url/urldecode.js.map +1 -1
- package/php/url/urlencode.js.map +1 -1
- package/php/var/boolval.js.map +1 -1
- package/php/var/doubleval.js.map +1 -1
- package/php/var/empty.js.map +1 -1
- package/php/var/floatval.js.map +1 -1
- package/php/var/gettype.js.map +1 -1
- package/php/var/intval.js.map +1 -1
- package/php/var/is_array.js +0 -1
- package/php/var/is_array.js.map +1 -1
- package/php/var/is_binary.js +0 -1
- package/php/var/is_binary.js.map +1 -1
- package/php/var/is_bool.js +0 -1
- package/php/var/is_bool.js.map +1 -1
- package/php/var/is_buffer.js +0 -1
- package/php/var/is_buffer.js.map +1 -1
- package/php/var/is_callable.js +1 -2
- package/php/var/is_callable.js.map +1 -1
- package/php/var/is_double.js +0 -1
- package/php/var/is_double.js.map +1 -1
- package/php/var/is_float.js +0 -1
- package/php/var/is_float.js.map +1 -1
- package/php/var/is_int.js +0 -1
- package/php/var/is_int.js.map +1 -1
- package/php/var/is_integer.js +0 -1
- package/php/var/is_integer.js.map +1 -1
- package/php/var/is_long.js +0 -1
- package/php/var/is_long.js.map +1 -1
- package/php/var/is_null.js +0 -1
- package/php/var/is_null.js.map +1 -1
- package/php/var/is_numeric.js +0 -1
- package/php/var/is_numeric.js.map +1 -1
- package/php/var/is_object.js +0 -1
- package/php/var/is_object.js.map +1 -1
- package/php/var/is_real.js +0 -1
- package/php/var/is_real.js.map +1 -1
- package/php/var/is_scalar.js +0 -1
- package/php/var/is_scalar.js.map +1 -1
- package/php/var/is_string.js +0 -1
- package/php/var/is_string.js.map +1 -1
- package/php/var/is_unicode.js +0 -1
- package/php/var/is_unicode.js.map +1 -1
- package/php/var/isset.js.map +1 -1
- package/php/var/print_r.js +0 -1
- package/php/var/print_r.js.map +1 -1
- package/php/var/serialize.js.map +1 -1
- package/php/var/strval.js.map +1 -1
- package/php/var/unserialize.js +12 -16
- package/php/var/unserialize.js.map +1 -1
- package/php/var/var_dump.js +0 -1
- package/php/var/var_dump.js.map +1 -1
- package/php/var/var_export.js +0 -1
- package/php/var/var_export.js.map +1 -1
- package/php/xdiff/xdiff_string_diff.js +0 -1
- package/php/xdiff/xdiff_string_diff.js.map +1 -1
- package/php/xdiff/xdiff_string_patch.js +0 -1
- package/php/xdiff/xdiff_string_patch.js.map +1 -1
- package/php/xml/utf8_decode.js +10 -11
- package/php/xml/utf8_decode.js.map +1 -1
- package/php/xml/utf8_encode.js +4 -5
- package/php/xml/utf8_encode.js.map +1 -1
- package/python/string/ascii_letters.js +0 -1
- package/python/string/ascii_letters.js.map +1 -1
- package/python/string/ascii_lowercase.js +0 -1
- package/python/string/ascii_lowercase.js.map +1 -1
- package/python/string/ascii_uppercase.js +0 -1
- package/python/string/ascii_uppercase.js.map +1 -1
- package/python/string/capwords.js.map +1 -1
- package/python/string/index.js +1 -0
- package/python/string/index.js.map +1 -1
- package/python/string/punctuation.js +2 -2
- package/python/string/punctuation.js.map +1 -1
- package/ruby/Math/acos.js.map +1 -1
- package/php/_locutus_shared/_locutus_shared_bc.js +0 -1255
- package/php/_locutus_shared/_locutus_shared_bc.js.map +0 -1
- package/php/_locutus_shared/index.js +0 -4
- package/php/_locutus_shared/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAkBC,MAAlB,EAA0BC,IAA1B,EAAgC;AAC/C;AACA;AACA;AACA;;AAEA,MAAMC,UAAUC,QAAQ,oBAAR,CAAhB;;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: https://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 const sprintf = require('../strings/sprintf')\n\n return sprintf.apply(this, [format].concat(args))\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAkBC,GAAlB,EAAuBC,QAAvB,EAAiCC,QAAjC,EAA2CC,GAA3C,EAAgD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAF,aAAWG,UAAUC,MAAV,IAAoB,CAApB,GAAwB,CAACJ,QAAzB,GAAoC,EAA/C;AACAC,aAAWE,UAAUC,MAAV,IAAoB,CAApB,GAAwB,KAAKH,QAA7B,GAAwC,IAAnD;AACAC,QAAMC,UAAUC,MAAV,IAAoB,CAApB,GAAwB,CAAC,CAACF,GAA1B,GAAgC,KAAtC;;AAEA,MAAIG,UAAJ;AAAA,MAAOC,UAAP;AAAA,MAAUC,aAAV;;AAEAR,SAAO,EAAP;;AAEA,MAAIC,WAAW,CAAf,EAAkB;AAChB,WAAOD,GAAP;AACD;;AAED,MAAMS,eAAe,YAArB;AACA,MAAMC,kCAAkC,MAAxC;AACA,MAAMC,4CAA4C,WAAlD;;AAEA,MAAMC,QAAQZ,IAAIa,KAAJ,CAAUJ,YAAV,CAAd;AACA,MAAMK,IAAIF,MAAMP,MAAhB;AACA,MAAIU,cAAJ;;AAEA;AACA,OAAKT,IAAI,CAAT,EAAYA,IAAIQ,CAAhB,EAAmBF,MAAMN,GAAN,KAAcE,IAAjC,EAAuC;AACrCA,WAAOI,MAAMN,CAAN,CAAP;AACAM,UAAMN,CAAN,IAAW,EAAX;;AAEA,WAAOE,KAAKH,MAAL,GAAcJ,QAArB,EAA+B;AAC7B;AACA,UAAMe,QAAQR,KAAKQ,KAAL,CAAW,CAAX,EAAcf,WAAW,CAAzB,CAAd;;AAEA;AACA,UAAIgB,QAAQ,CAAZ;AACA;AACA,UAAIC,QAAQ,CAAZ;;AAEAH,cAAQC,MAAMD,KAAN,CAAYJ,yCAAZ,CAAR;;AAEA;AACA,UAAII,MAAM,CAAN,CAAJ,EAAc;AACZ;AACAR,YAAIN,QAAJ;AACAgB,gBAAQ,CAAR;AACD,OAJD,MAIO;AACL;AACAV,YAAIS,MAAMX,MAAN,GAAeU,MAAM,CAAN,EAASV,MAA5B;;AAEA,YAAIE,CAAJ,EAAO;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,cAAMY,2BAA2B,CAACX,KAAKQ,KAAL,CAAWf,QAAX,EAAqBc,KAArB,CAA2BL,+BAA3B,KAA+D,CAAC,EAAD,CAAhE,EAAsE,CAAtE,CAAjC;;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: https://locutus.io/php/wordwrap/\n // original by: Jonas Raoni Soares Silva (https://www.jsfromhell.com)\n // improved by: Nick Callen\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Sakimori\n // revised by: Jonas Raoni Soares Silva (https://www.jsfromhell.com)\n // bugfixed by: Michael Grier\n // bugfixed by: Feras ALHAEK\n // improved by: Rafał Kukawski (https://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 let i, j, line\n\n str += ''\n\n if (intWidth < 1) {\n return str\n }\n\n const reLineBreaks = /\\r\\n|\\n|\\r/\n const reBeginningUntilFirstWhitespace = /^\\S*/\n const reLastCharsWithOptionalTrailingWhitespace = /\\S*(\\s)?$/\n\n const lines = str.split(reLineBreaks)\n const l = lines.length\n let 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 const slice = line.slice(0, intWidth + 1)\n\n // remove leading whitespace from rest of line to parse\n let ltrim = 0\n // remove trailing whitespace from new line content\n let 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 const 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"]}
|
package/php/url/base64_decode.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAuBC,WAAvB,EAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMC,mBAAmB,SAAnBA,gBAAmB,CAAUC,GAAV,EAAe;AACtC;AACA,WAAOC,mBACLD,IACGE,KADH,CACS,EADT,EAEGC,GAFH,CAEO,UAAUC,CAAV,EAAa;AAChB,aAAO,MAAM,CAAC,OAAOA,EAAEC,UAAF,CAAa,CAAb,EAAgBC,QAAhB,CAAyB,EAAzB,CAAR,EAAsCC,KAAtC,CAA4C,CAAC,CAA7C,CAAb;AACD,KAJH,EAKGC,IALH,CAKQ,EALR,CADK,CAAP;AAQD,GAVD;;AAYA,MAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjC,QAAI,OAAOA,OAAOC,IAAd,KAAuB,WAA3B,EAAwC;AACtC,aAAOX,iBAAiBU,OAAOC,IAAP,CAAYZ,WAAZ,CAAjB,CAAP;AACD;AACF,GAJD,MAIO;AACL,WAAO,IAAIa,MAAJ,CAAWb,WAAX,EAAwB,QAAxB,EAAkCQ,QAAlC,CAA2C,OAA3C,CAAP;AACD;;AAED,MAAMM,MAAM,mEAAZ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,aAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,MAAM,EAAV;AACA,MAAMC,SAAS,EAAf;;AAEA,MAAI,CAAC1B,WAAL,EAAkB;AAChB,WAAOA,WAAP;AACD;;AAEDA,iBAAe,EAAf;;AAEA,KAAG;AACD;AACAkB,SAAKJ,IAAIa,OAAJ,CAAY3B,YAAY4B,MAAZ,CAAmBL,GAAnB,CAAZ,CAAL;AACAJ,SAAKL,IAAIa,OAAJ,CAAY3B,YAAY4B,MAAZ,CAAmBL,GAAnB,CAAZ,CAAL;AACAH,SAAKN,IAAIa,OAAJ,CAAY3B,YAAY4B,MAAZ,CAAmBL,GAAnB,CAAZ,CAAL;AACAF,SAAKP,IAAIa,OAAJ,CAAY3B,YAAY4B,MAAZ,CAAmBL,GAAnB,CAAZ,CAAL;;AAEAD,WAAQJ,MAAM,EAAP,GAAcC,MAAM,EAApB,GAA2BC,MAAM,CAAjC,GAAsCC,EAA7C;;AAEAN,SAAMO,QAAQ,EAAT,GAAe,IAApB;AACAN,SAAMM,QAAQ,CAAT,GAAc,IAAnB;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,CAvFD","file":"base64_decode.js","sourcesContent":["module.exports = function base64_decode(encodedData) {\n // discuss at: https://locutus.io/php/base64_decode/\n // original by: Tyler Akins (https://rumkin.com)\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // input by: Aman Gupta\n // input by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Pellentesque Malesuada\n // bugfixed by: Kevin van Zonneveld (https://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 const decodeUTF8string = function (str) {\n // Going backwards: from bytestream, to percent-encoding, to original string.\n return decodeURIComponent(\n str\n .split('')\n .map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n })\n .join(''),\n )\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 const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n let o1\n let o2\n let o3\n let h1\n let h2\n let h3\n let h4\n let bits\n let i = 0\n let ac = 0\n let dec = ''\n const 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"]}
|
package/php/url/base64_encode.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAuBC,cAAvB,EAAuC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMC,mBAAmB,SAAnBA,gBAAmB,CAAUC,GAAV,EAAe;AACtC;AACA;AACA;AACA,WAAOC,mBAAmBD,GAAnB,EAAwBE,OAAxB,CAAgC,iBAAhC,EAAmD,SAASC,YAAT,CAAsBC,KAAtB,EAA6BC,EAA7B,EAAiC;AACzF,aAAOC,OAAOC,YAAP,CAAoB,OAAOF,EAA3B,CAAP;AACD,KAFM,CAAP;AAGD,GAPD;;AASA,MAAI,OAAOG,MAAP,KAAkB,WAAtB,EAAmC;AACjC,QAAI,OAAOA,OAAOC,IAAd,KAAuB,WAA3B,EAAwC;AACtC,aAAOD,OAAOC,IAAP,CAAYV,iBAAiBD,cAAjB,CAAZ,CAAP;AACD;AACF,GAJD,MAIO;AACL,WAAO,IAAIY,MAAJ,CAAWZ,cAAX,EAA2Ba,QAA3B,CAAoC,QAApC,CAAP;AACD;;AAED,MAAMC,MAAM,mEAAZ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,WAAJ;AACA,MAAIC,aAAJ;AACA,MAAIC,IAAI,CAAR;AACA,MAAIC,KAAK,CAAT;AACA,MAAIC,MAAM,EAAV;AACA,MAAMC,SAAS,EAAf;;AAEA,MAAI,CAAC1B,cAAL,EAAqB;AACnB,WAAOA,cAAP;AACD;;AAEDA,mBAAiBC,iBAAiBD,cAAjB,CAAjB;;AAEA,KAAG;AACD;AACAe,SAAKf,eAAe2B,UAAf,CAA0BJ,GAA1B,CAAL;AACAP,SAAKhB,eAAe2B,UAAf,CAA0BJ,GAA1B,CAAL;AACAN,SAAKjB,eAAe2B,UAAf,CAA0BJ,GAA1B,CAAL;;AAEAD,WAAQP,MAAM,EAAP,GAAcC,MAAM,CAApB,GAAyBC,EAAhC;;AAEAC,SAAMI,QAAQ,EAAT,GAAe,IAApB;AACAH,SAAMG,QAAQ,EAAT,GAAe,IAApB;AACAF,SAAME,QAAQ,CAAT,GAAc,IAAnB;AACAD,SAAKC,OAAO,IAAZ;;AAEA;AACAI,WAAOF,IAAP,IAAeV,IAAIc,MAAJ,CAAWV,EAAX,IAAiBJ,IAAIc,MAAJ,CAAWT,EAAX,CAAjB,GAAkCL,IAAIc,MAAJ,CAAWR,EAAX,CAAlC,GAAmDN,IAAIc,MAAJ,CAAWP,EAAX,CAAlE;AACD,GAfD,QAeSE,IAAIvB,eAAe6B,MAf5B;;AAiBAJ,QAAMC,OAAOI,IAAP,CAAY,EAAZ,CAAN;;AAEA,MAAMC,IAAI/B,eAAe6B,MAAf,GAAwB,CAAlC;;AAEA,SAAO,CAACE,IAAIN,IAAIO,KAAJ,CAAU,CAAV,EAAaD,IAAI,CAAjB,CAAJ,GAA0BN,GAA3B,IAAkC,MAAMO,KAAN,CAAYD,KAAK,CAAjB,CAAzC;AACD,CA/ED","file":"base64_encode.js","sourcesContent":["module.exports = function base64_encode(stringToEncode) {\n // discuss at: https://locutus.io/php/base64_encode/\n // original by: Tyler Akins (https://rumkin.com)\n // improved by: Bayron Guevara\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Rafał Kukawski (https://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 const 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, 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 const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n let o1\n let o2\n let o3\n let h1\n let h2\n let h3\n let h4\n let bits\n let i = 0\n let ac = 0\n let enc = ''\n const 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 const r = stringToEncode.length % 3\n\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3)\n}\n"]}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
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; };
|
|
4
4
|
|
|
5
5
|
module.exports = function http_build_query(formdata, numericPrefix, argSeparator, encType) {
|
|
6
|
-
// eslint-disable-line camelcase
|
|
7
6
|
// discuss at: https://locutus.io/php/http_build_query/
|
|
8
7
|
// original by: Kevin van Zonneveld (https://kvz.io)
|
|
9
8
|
// improved by: Legaev Andrey
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAA0BC,QAA1B,EAAoCC,aAApC,EAAmDC,YAAnD,EAAiEC,OAAjE,EAA0E;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,mBAAJ;;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,cAAJ;AACA,MAAIC,YAAJ;AACA,MAAMC,MAAM,EAAZ;;AAEA,MAAMC,wBAAwB,SAAxBA,qBAAwB,CAAUF,GAAV,EAAeG,GAAf,EAAoBR,YAApB,EAAkC;AAC9D,QAAIS,UAAJ;AACA,QAAMH,MAAM,EAAZ;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,QAAMU,QAAQR,sBAAsBF,GAAtB,EAA2BD,KAA3B,EAAkCJ,YAAlC,CAAd;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) {\n // discuss at: https://locutus.io/php/http_build_query/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Legaev Andrey\n // improved by: Michael White (https://getsprink.com)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // revised by: stag019\n // input by: Dreamer\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: MIO_KODUKI (https://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'}, '', '&')\n // returns 1: 'foo=bar&php=hypertext+processor&baz=boom&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'}, '', '&', 'PHP_QUERY_RFC3986')\n // returns 3: 'foo=bar&php=hypertext%20processor&baz=boom&cow=milk'\n\n let 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 let value\n let key\n const tmp = []\n\n const _httpBuildQueryHelper = function (key, val, argSeparator) {\n let k\n const 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 const query = _httpBuildQueryHelper(key, value, argSeparator)\n if (query !== '') {\n tmp.push(query)\n }\n }\n\n return tmp.join(argSeparator)\n}\n"]}
|
package/php/url/parse_url.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = function parse_url(str, component) {
|
|
4
|
-
// eslint-disable-line camelcase
|
|
5
4
|
// discuss at: https://locutus.io/php/parse_url/
|
|
6
5
|
// original by: Steven Levithan (https://blog.stevenlevithan.com)
|
|
7
6
|
// reimplemented by: Brett Zamir (https://brett-zamir.me)
|
package/php/url/parse_url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAmBC,GAAnB,EAAwBC,SAAxB,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,cAAJ;;AAEA,MAAMC,OACJ,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,wBAA3B,CAAjC,GAAwFC,SAAzF,KAAuG,KADzG;;AAGA,MAAMC,MAAM,CACV,QADU,EAEV,QAFU,EAGV,WAHU,EAIV,UAJU,EAKV,MALU,EAMV,MANU,EAOV,MAPU,EAQV,MARU,EASV,UATU,EAUV,MAVU,EAWV,WAXU,EAYV,MAZU,EAaV,OAbU,EAcV,UAdU,CAAZ;;AAiBA;AACA,MAAIC,SAAS;AACXC,SAAK,IAAIC,MAAJ,CACH,CACE,oBADF,EAEE,gFAFF,EAGE,IAHF,EAIE,oEAJF,EAKEC,IALF,CAKO,EALP,CADG,CADM;AASXC,YAAQ,IAAIF,MAAJ,CACN,CACE,oBADF,EAEE,wEAFF,EAGE,0DAHF,EAIEC,IAJF,CAIO,EAJP,CADM,CATG;AAgBXE,WAAO,IAAIH,MAAJ,CACL,CACE,0CADF,EAEE,iBAFF,EAGE,6DAHF,EAIE,wEAJF,EAKE,4BALF,EAMEC,IANF,CAMO,EANP,CADK;AAhBI,GAAb;;AA2BA,MAAMG,IAAIN,OAAOJ,IAAP,EAAaW,IAAb,CAAkBd,GAAlB,CAAV;AACA,MAAMe,MAAM,EAAZ;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,QAAMgB,OACJ,CAAC,OAAOf,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,4BAA3B,CAAjC,GAA4FC,SAA7F,KACA,UAFF;AAGAE,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,CAzGD","file":"parse_url.js","sourcesContent":["module.exports = function parse_url(str, component) {\n // discuss at: https://locutus.io/php/parse_url/\n // original by: Steven Levithan (https://blog.stevenlevithan.com)\n // reimplemented by: Brett Zamir (https://brett-zamir.me)\n // input by: Lorenzo Pisani\n // input by: Tony\n // improved by: Brett Zamir (https://brett-zamir.me)\n // note 1: original by https://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js\n // note 1: blog post at https://blog.stevenlevithan.com/archives/parseuri\n // note 1: demo at https://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('https://user:pass@host/path?a=v#a')\n // returns 1: {scheme: 'https', host: 'host', user: 'user', pass: 'pass', path: '/path', query: 'a=v', fragment: 'a'}\n // example 2: parse_url('https://en.wikipedia.org/wiki/%22@%22_%28album%29')\n // returns 2: {scheme: 'https', 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 let query\n\n const mode =\n (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.mode') : undefined) || 'php'\n\n const 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 let parser = {\n php: new RegExp(\n [\n '(?:([^:\\\\/?#]+):)?',\n '(?:\\\\/\\\\/()(?:(?:()(?:([^:@\\\\/]*):?([^:@\\\\/]*))?@)?([^:\\\\/?#]*)(?::(\\\\d*))?))?',\n '()',\n '(?:(()(?:(?:[^?#\\\\/]*\\\\/)*)()(?:[^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)',\n ].join(''),\n ),\n strict: new RegExp(\n [\n '(?:([^:\\\\/?#]+):)?',\n '(?:\\\\/\\\\/((?:(([^:@\\\\/]*):?([^:@\\\\/]*))?@)?([^:\\\\/?#]*)(?::(\\\\d*))?))?',\n '((((?:[^?#\\\\/]*\\\\/)*)([^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)',\n ].join(''),\n ),\n loose: new RegExp(\n [\n '(?:(?![^:@]+:[^:@\\\\/]*@)([^:\\\\/?#.]+):)?',\n '(?:\\\\/\\\\/\\\\/?)?',\n '((?:(([^:@\\\\/]*):?([^:@\\\\/]*))?@)?([^:\\\\/?#]*)(?::(\\\\d*))?)',\n '(((\\\\/(?:[^?#](?![^?#\\\\/]*\\\\.[^?#\\\\/.]+(?:[?#]|$)))*\\\\/?)?([^?#\\\\/]*))',\n '(?:\\\\?([^#]*))?(?:#(.*))?)',\n ].join(''),\n ),\n }\n\n const m = parser[mode].exec(str)\n const uri = {}\n let 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 const name =\n (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.queryKey') : undefined) ||\n '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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/url/rawurldecode.js"],"names":["module","exports","rawurldecode","str","decodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/url/rawurldecode.js"],"names":["module","exports","rawurldecode","str","decodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,GAAtB,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,mBACL,CAACD,MAAM,EAAP,EAAWE,OAAX,CAAmB,mBAAnB,EAAwC,YAAY;AAClD;AACA,WAAO,KAAP;AACD,GAHD,CADK,CAAP;AAMD,CA1BD","file":"rawurldecode.js","sourcesContent":["module.exports = function rawurldecode(str) {\n // discuss at: https://locutus.io/php/rawurldecode/\n // original by: Brett Zamir (https://brett-zamir.me)\n // input by: travc\n // input by: Brett Zamir (https://brett-zamir.me)\n // input by: Ratheous\n // input by: lovio\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // reimplemented by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://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('https%3A%2F%2Fkvz.io%2F')\n // returns 2: 'https://kvz.io/'\n // example 3: rawurldecode('https%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3D')\n // returns 3: 'https://www.google.nl/search?q=Locutus&ie='\n\n return decodeURIComponent(\n (str + '').replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25'\n }),\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/url/rawurlencode.js"],"names":["module","exports","rawurlencode","str","encodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/url/rawurlencode.js"],"names":["module","exports","rawurlencode","str","encodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,GAAtB,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA,QAAMA,MAAM,EAAZ;;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: https://locutus.io/php/rawurlencode/\n // original by: Brett Zamir (https://brett-zamir.me)\n // input by: travc\n // input by: Brett Zamir (https://brett-zamir.me)\n // input by: Michael Grier\n // input by: Ratheous\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: Joris\n // reimplemented by: Brett Zamir (https://brett-zamir.me)\n // reimplemented by: Brett Zamir (https://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('https://kvz.io/')\n // returns 2: 'https%3A%2F%2Fkvz.io%2F'\n // example 3: rawurlencode('https://www.google.nl/search?q=Locutus&ie=utf-8')\n // returns 3: 'https%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"]}
|
package/php/url/urldecode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/url/urldecode.js"],"names":["module","exports","urldecode","str","decodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/url/urldecode.js"],"names":["module","exports","urldecode","str","decodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,GAAnB,EAAwB;AACvC;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,mBACL,CAACD,MAAM,EAAP,EACGE,OADH,CACW,mBADX,EACgC,YAAY;AACxC;AACA,WAAO,KAAP;AACD,GAJH,EAKGA,OALH,CAKW,KALX,EAKkB,KALlB,CADK,CAAP;AAQD,CAzCD","file":"urldecode.js","sourcesContent":["module.exports = function urldecode(str) {\n // discuss at: https://locutus.io/php/urldecode/\n // original by: Philip Peterson\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: Lars Fischer\n // improved by: Orlando\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // input by: AJ\n // input by: travc\n // input by: Brett Zamir (https://brett-zamir.me)\n // input by: Ratheous\n // input by: e-mike\n // input by: lovio\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Rob\n // reimplemented by: Brett Zamir (https://brett-zamir.me)\n // note 1: info on what encoding functions to use from:\n // note 1: https://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('https%3A%2F%2Fkvz.io%2F')\n // returns 2: 'https://kvz.io/'\n // example 3: urldecode('https%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: 'https://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(\n (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}\n"]}
|
package/php/url/urlencode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/url/urlencode.js"],"names":["module","exports","urlencode","str","encodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/url/urlencode.js"],"names":["module","exports","urlencode","str","encodeURIComponent","replace"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,GAAnB,EAAwB;AACvC;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;;AAEAA,QAAMA,MAAM,EAAZ;;AAEA,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,IANJ,EAMU,KANV,EAOJA,OAPI,CAOI,MAPJ,EAOY,GAPZ,CAAP;AAQD,CAtCD","file":"urlencode.js","sourcesContent":["module.exports = function urlencode(str) {\n // discuss at: https://locutus.io/php/urlencode/\n // original by: Philip Peterson\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: Lars Fischer\n // improved by: Waldo Malqui Silva (https://fayr.us/waldo/)\n // input by: AJ\n // input by: travc\n // input by: Brett Zamir (https://brett-zamir.me)\n // input by: Ratheous\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Joris\n // reimplemented by: Brett Zamir (https://brett-zamir.me)\n // reimplemented by: Brett Zamir (https://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('https://kvz.io/')\n // returns 2: 'https%3A%2F%2Fkvz.io%2F'\n // example 3: urlencode('https://www.google.nl/search?q=Locutus&ie=utf-8')\n // returns 3: 'https%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8'\n\n str = str + ''\n\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(/~/g, '%7E')\n .replace(/%20/g, '+')\n}\n"]}
|
package/php/var/boolval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/boolval.js"],"names":["module","exports","boolval","mixedVar","Array","isArray","length","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/boolval.js"],"names":["module","exports","boolval","mixedVar","Array","isArray","length","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAiBC,QAAjB,EAA2B;AAC1C;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"]}
|
package/php/var/doubleval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/doubleval.js"],"names":["module","exports","doubleval","mixedVar","floatval","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/doubleval.js"],"names":["module","exports","doubleval","mixedVar","floatval","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,QAAnB,EAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,WAAWC,QAAQ,iBAAR,CAAjB;;AAEA,SAAOD,SAASD,QAAT,CAAP;AACD,CAXD","file":"doubleval.js","sourcesContent":["module.exports = function doubleval(mixedVar) {\n // discuss at: https://locutus.io/php/doubleval/\n // original by: Brett Zamir (https://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 const floatval = require('../var/floatval')\n\n return floatval(mixedVar)\n}\n"]}
|
package/php/var/empty.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAeC,QAAf,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,cAAJ;AACA,MAAIC,YAAJ;AACA,MAAIC,UAAJ;AACA,MAAIC,YAAJ;AACA,MAAMC,cAAc,CAACJ,KAAD,EAAQ,IAAR,EAAc,KAAd,EAAqB,CAArB,EAAwB,EAAxB,EAA4B,GAA5B,CAApB;;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: https://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 (https://www.svest.org/)\n // bugfixed by: Kevin van Zonneveld (https://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 (https://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 let undef\n let key\n let i\n let len\n const 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"]}
|
package/php/var/floatval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/floatval.js"],"names":["module","exports","floatval","mixedVar","parseFloat"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/floatval.js"],"names":["module","exports","floatval","mixedVar","parseFloat"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAkBC,QAAlB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOC,WAAWD,QAAX,KAAwB,CAA/B;AACD,CAbD","file":"floatval.js","sourcesContent":["module.exports = function floatval(mixedVar) {\n // discuss at: https://locutus.io/php/floatval/\n // original by: Michael White (https://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"]}
|
package/php/var/gettype.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAiBC,QAAjB,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,UAAUC,QAAQ,iBAAR,CAAhB;;AAEA,MAAIC,WAAWH,QAAX,yCAAWA,QAAX,CAAJ;AACA,MAAII,aAAJ;AACA,MAAMC,eAAe,SAAfA,YAAe,CAAUC,EAAV,EAAc;AACjC,QAAMF,OAAO,8BAA8BG,IAA9B,CAAmCD,EAAnC,CAAb;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,UACE,OAAOA,SAASQ,MAAhB,KAA2B,QAA3B,IACA,CAACR,SAASS,oBAAT,CAA8B,QAA9B,CADD,IAEA,OAAOT,SAASU,MAAhB,KAA2B,UAH7B,EAIE;AACAP,YAAI,OAAJ;AACD,OAND,MAMO,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,KAtBD,MAsBO;AACLA,UAAI,MAAJ;AACD;AACF,GA1BD,MA0BO,IAAIA,MAAM,QAAV,EAAoB;AACzBA,QAAIF,QAAQD,QAAR,IAAoB,QAApB,GAA+B,SAAnC;AACD;;AAED,SAAOG,CAAP;AACD,CAnED","file":"gettype.js","sourcesContent":["module.exports = function gettype(mixedVar) {\n // discuss at: https://locutus.io/php/gettype/\n // original by: Paulo Freitas\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Douglas Crockford (https://javascript.crockford.com)\n // improved by: Brett Zamir (https://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 const isFloat = require('../var/is_float')\n\n let s = typeof mixedVar\n let name\n const _getFuncName = function (fn) {\n const 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: https://javascript.crockford.com/remedial.html\n // @todo: Break up this lengthy if statement\n if (\n typeof mixedVar.length === 'number' &&\n !mixedVar.propertyIsEnumerable('length') &&\n typeof mixedVar.splice === 'function'\n ) {\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"]}
|
package/php/var/intval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,CAAgBC,QAAhB,EAA0BC,IAA1B,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;;AAEA,MAAIC,YAAJ;AAAA,MAASC,cAAT;;AAEA,MAAMC,cAAcJ,QAAd,yCAAcA,QAAd,CAAN;;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,WAAOK,MAAMJ,GAAN,KAAc,CAACK,SAASL,GAAT,CAAf,GAA+B,CAA/B,GAAmCA,GAA1C;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: https://locutus.io/php/intval/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // improved by: stensi\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: Rafał Kukawski (https://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 let tmp, match\n\n const 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"]}
|
package/php/var/is_array.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
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; };
|
|
4
4
|
|
|
5
5
|
module.exports = function is_array(mixedVar) {
|
|
6
|
-
// eslint-disable-line camelcase
|
|
7
6
|
// discuss at: https://locutus.io/php/is_array/
|
|
8
7
|
// original by: Kevin van Zonneveld (https://kvz.io)
|
|
9
8
|
// improved by: Legaev Andrey
|
package/php/var/is_array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,
|
|
1
|
+
{"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,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;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,eAAe,SAAfA,YAAe,CAAUC,EAAV,EAAc;AACjC,QAAMC,OAAO,8BAA8BC,IAA9B,CAAmCF,EAAnC,CAAb;AACA,QAAI,CAACC,IAAL,EAAW;AACT,aAAO,aAAP;AACD;AACD,WAAOA,KAAK,CAAL,CAAP;AACD,GAND;AAOA,MAAME,WAAW,SAAXA,QAAW,CAAUL,QAAV,EAAoB;AACnC;AACA;AACA;AACA;AACA,QAAI,CAACA,QAAD,IAAa,QAAOA,QAAP,yCAAOA,QAAP,OAAoB,QAAjC,IAA6C,OAAOA,SAASM,MAAhB,KAA2B,QAA5E,EAAsF;AACpF,aAAO,KAAP;AACD;AACD,QAAMC,MAAMP,SAASM,MAArB;AACAN,aAASA,SAASM,MAAlB,IAA4B,OAA5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAIC,QAAQP,SAASM,MAArB,EAA6B;AAC3B;AACA;AACAN,eAASM,MAAT,IAAmB,CAAnB;AACA,aAAO,IAAP;AACD;AACD;AACA;AACA;AACA;AACA,WAAON,SAASA,SAASM,MAAlB,CAAP;AACA,WAAO,KAAP;AACD,GA9BD;;AAgCA,MAAI,CAACN,QAAD,IAAa,QAAOA,QAAP,yCAAOA,QAAP,OAAoB,QAArC,EAA+C;AAC7C,WAAO,KAAP;AACD;;AAED,MAAMQ,UAAUH,SAASL,QAAT,CAAhB;;AAEA,MAAIQ,OAAJ,EAAa;AACX,WAAO,IAAP;AACD;;AAED,MAAMC,SACJ,CAAC,OAAOC,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFC,SAA1F,KAAwG,IAD1G;AAEA,MAAIF,WAAW,IAAf,EAAqB;AACnB,QAAMG,WAAWC,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BhB,QAA/B,CAAjB;AACA,QAAMiB,SAAShB,aAAaD,SAASkB,WAAtB,CAAf;;AAEA,QAAIN,aAAa,iBAAb,IAAkCK,WAAW,QAAjD,EAA2D;AACzD;AACA,aAAO,IAAP;AACD;AACF;;AAED,SAAO,KAAP;AACD,CA5FD","file":"is_array.js","sourcesContent":["module.exports = function is_array(mixedVar) {\n // discuss at: https://locutus.io/php/is_array/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Legaev Andrey\n // improved by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: Nathan Sepulveda\n // improved by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: Cord\n // bugfixed by: Manish\n // bugfixed by: Brett Zamir (https://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 const _getFuncName = function (fn) {\n const name = /\\W*function\\s+([\\w$]+)\\s*\\(/.exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n const _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 const 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 const isArray = _isArray(mixedVar)\n\n if (isArray) {\n return true\n }\n\n const iniVal =\n (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.objectsAsArrays') : undefined) || 'on'\n if (iniVal === 'on') {\n const asString = Object.prototype.toString.call(mixedVar)\n const 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"]}
|
package/php/var/is_binary.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = function is_binary(vr) {
|
|
4
|
-
// eslint-disable-line camelcase
|
|
5
4
|
// discuss at: https://locutus.io/php/is_binary/
|
|
6
5
|
// original by: Brett Zamir (https://brett-zamir.me)
|
|
7
6
|
// example 1: is_binary('This could be binary as far as JavaScript knows...')
|
package/php/var/is_binary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/is_binary.js"],"names":["module","exports","is_binary","vr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/is_binary.js"],"names":["module","exports","is_binary","vr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,EAAnB,EAAuB;AACtC;AACA;AACA;AACA;;AAEA,SAAO,OAAOA,EAAP,KAAc,QAArB,CANsC,CAMR;AAC/B,CAPD","file":"is_binary.js","sourcesContent":["module.exports = function is_binary(vr) {\n // discuss at: https://locutus.io/php/is_binary/\n // original by: Brett Zamir (https://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"]}
|
package/php/var/is_bool.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = function is_bool(mixedVar) {
|
|
4
|
-
// eslint-disable-line camelcase
|
|
5
4
|
// discuss at: https://locutus.io/php/is_bool/
|
|
6
5
|
// original by: Onno Marsman (https://twitter.com/onnomarsman)
|
|
7
6
|
// improved by: CoursesWeb (https://www.coursesweb.net/)
|
package/php/var/is_bool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/is_bool.js"],"names":["module","exports","is_bool","mixedVar"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/is_bool.js"],"names":["module","exports","is_bool","mixedVar"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAiBC,QAAjB,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOA,aAAa,IAAb,IAAqBA,aAAa,KAAzC,CAT0C,CASK;AAChD,CAVD","file":"is_bool.js","sourcesContent":["module.exports = function is_bool(mixedVar) {\n // discuss at: https://locutus.io/php/is_bool/\n // original by: Onno Marsman (https://twitter.com/onnomarsman)\n // improved by: CoursesWeb (https://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"]}
|
package/php/var/is_buffer.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = function is_buffer(vr) {
|
|
4
|
-
// eslint-disable-line camelcase
|
|
5
4
|
// discuss at: https://locutus.io/php/is_buffer/
|
|
6
5
|
// original by: Brett Zamir (https://brett-zamir.me)
|
|
7
6
|
// example 1: is_buffer('This could be binary or a regular string...')
|
package/php/var/is_buffer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/is_buffer.js"],"names":["module","exports","is_buffer","vr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/is_buffer.js"],"names":["module","exports","is_buffer","vr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,EAAnB,EAAuB;AACtC;AACA;AACA;AACA;;AAEA,SAAO,OAAOA,EAAP,KAAc,QAArB;AACD,CAPD","file":"is_buffer.js","sourcesContent":["module.exports = function is_buffer(vr) {\n // discuss at: https://locutus.io/php/is_buffer/\n // original by: Brett Zamir (https://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"]}
|
package/php/var/is_callable.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
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; };
|
|
4
4
|
|
|
5
5
|
module.exports = function is_callable(mixedVar, syntaxOnly, callableName) {
|
|
6
|
-
// eslint-disable-line camelcase
|
|
7
6
|
// discuss at: https://locutus.io/php/is_callable/
|
|
8
7
|
// original by: Brett Zamir (https://brett-zamir.me)
|
|
9
8
|
// input by: François
|
|
@@ -78,8 +77,8 @@ module.exports = function is_callable(mixedVar, syntaxOnly, callableName) {
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
// validFunctionName avoids exploits
|
|
80
|
+
// eslint-disable-next-line no-eval
|
|
81
81
|
if (validFunctionName && typeof eval(method) === 'function') {
|
|
82
|
-
// eslint-disable-line no-eval
|
|
83
82
|
if (callableName) {
|
|
84
83
|
$global[callableName] = name;
|
|
85
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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","test","toString","match","Object","prototype","call","length","constructor","eval"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"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","test","toString","match","Object","prototype","call","length","constructor","eval"],"mappings":";;;;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,UAA/B,EAA2CC,YAA3C,EAAyD;AACxE;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,MAAMC,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;;AAEA,MAAMC,6BAA6B,kDAAnC;;AAEA,MAAIC,OAAO,EAAX;AACA,MAAIC,MAAM,EAAV;AACA,MAAIC,SAAS,EAAb;AACA,MAAIC,oBAAoB,KAAxB;;AAEA,MAAMC,cAAc,SAAdA,WAAc,CAAUC,EAAV,EAAc;AAChC,QAAML,OAAO,8BAA8BM,IAA9B,CAAmCD,EAAnC,CAAb;AACA,QAAI,CAACL,IAAL,EAAW;AACT,aAAO,aAAP;AACD;AACD,WAAOA,KAAK,CAAL,CAAP;AACD,GAND;;AAQA;AACA,MAAI,oBAAoBO,IAApB,CAAyBd,SAASe,QAAT,EAAzB,CAAJ,EAAmD;AACjD,WAAO,KAAP;AACD;;AAED,MAAI,OAAOf,QAAP,KAAoB,QAAxB,EAAkC;AAChCQ,UAAML,OAAN;AACAM,aAAST,QAAT;AACAO,WAAOP,QAAP;AACAU,wBAAoB,CAAC,CAACH,KAAKS,KAAL,CAAWV,0BAAX,CAAtB;AACD,GALD,MAKO,IAAI,OAAON,QAAP,KAAoB,UAAxB,EAAoC;AACzC,WAAO,IAAP;AACD,GAFM,MAEA,IACLiB,OAAOC,SAAP,CAAiBH,QAAjB,CAA0BI,IAA1B,CAA+BnB,QAA/B,MAA6C,gBAA7C,IACAA,SAASoB,MAAT,KAAoB,CADpB,IAEA,QAAOpB,SAAS,CAAT,CAAP,MAAuB,QAFvB,IAGA,OAAOA,SAAS,CAAT,CAAP,KAAuB,QAJlB,EAKL;AACAQ,UAAMR,SAAS,CAAT,CAAN;AACAS,aAAST,SAAS,CAAT,CAAT;AACAO,WAAO,CAACC,IAAIa,WAAJ,IAAmBV,YAAYH,IAAIa,WAAhB,CAApB,IAAoD,IAApD,GAA2DZ,MAAlE;AACD;;AAED,MAAIR,cAAc,OAAOO,IAAIC,MAAJ,CAAP,KAAuB,UAAzC,EAAqD;AACnD,QAAIP,YAAJ,EAAkB;AAChBC,cAAQD,YAAR,IAAwBK,IAAxB;AACD;AACD,WAAO,IAAP;AACD;;AAED;AACA;AACA,MAAIG,qBAAqB,OAAOY,KAAKb,MAAL,CAAP,KAAwB,UAAjD,EAA6D;AAC3D,QAAIP,YAAJ,EAAkB;AAChBC,cAAQD,YAAR,IAAwBK,IAAxB;AACD;AACD,WAAO,IAAP;AACD;;AAED,SAAO,KAAP;AACD,CAzFD","file":"is_callable.js","sourcesContent":["module.exports = function is_callable(mixedVar, syntaxOnly, callableName) {\n // discuss at: https://locutus.io/php/is_callable/\n // original by: Brett Zamir (https://brett-zamir.me)\n // input by: François\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: KnightYoshi\n // improved by: Waldo Malqui Silva (https://fayr.us/waldo/)\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 // example 5: is_callable(class MyClass {})\n // returns 5: false\n\n const $global = typeof window !== 'undefined' ? window : global\n\n const validJSFunctionNamePattern = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/\n\n let name = ''\n let obj = {}\n let method = ''\n let validFunctionName = false\n\n const getFuncName = function (fn) {\n const name = /\\W*function\\s+([\\w$]+)\\s*\\(/.exec(fn)\n if (!name) {\n return '(Anonymous)'\n }\n return name[1]\n }\n\n // eslint-disable-next-line no-useless-escape\n if (/(^class|\\(this\\,)/.test(mixedVar.toString())) {\n return false\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 (\n Object.prototype.toString.call(mixedVar) === '[object Array]' &&\n mixedVar.length === 2 &&\n typeof mixedVar[0] === 'object' &&\n typeof mixedVar[1] === 'string'\n ) {\n obj = mixedVar[0]\n method = mixedVar[1]\n name = (obj.constructor && getFuncName(obj.constructor)) + '::' + method\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 // eslint-disable-next-line no-eval\n if (validFunctionName && typeof eval(method) === 'function') {\n if (callableName) {\n $global[callableName] = name\n }\n return true\n }\n\n return false\n}\n"]}
|
package/php/var/is_double.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = function is_double(mixedVar) {
|
|
4
|
-
// eslint-disable-line camelcase
|
|
5
4
|
// discuss at: https://locutus.io/php/is_double/
|
|
6
5
|
// original by: Paulo Freitas
|
|
7
6
|
// note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
|
package/php/var/is_double.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/is_double.js"],"names":["module","exports","is_double","mixedVar","_isFloat","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/is_double.js"],"names":["module","exports","is_double","mixedVar","_isFloat","require"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,QAAnB,EAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,WAAWC,QAAQ,iBAAR,CAAjB;AACA,SAAOD,SAASD,QAAT,CAAP;AACD,CAVD","file":"is_double.js","sourcesContent":["module.exports = function is_double(mixedVar) {\n // discuss at: https://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 const _isFloat = require('../var/is_float')\n return _isFloat(mixedVar)\n}\n"]}
|
package/php/var/is_float.js
CHANGED
package/php/var/is_float.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/var/is_float.js"],"names":["module","exports","is_float","mixedVar","isFinite"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/var/is_float.js"],"names":["module","exports","is_float","mixedVar","isFinite"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,CAAkBC,QAAlB,EAA4B;AAC3C;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) {\n // discuss at: https://locutus.io/php/is_float/\n // original by: Paulo Freitas\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // improved by: WebDevHobo (https://webdevhobo.blogspot.com/)\n // improved by: Rafał Kukawski (https://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"]}
|