@maiyunnet/kebab 7.5.0 → 7.6.1
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/doc/README.sc.md +201 -0
- package/doc/README.tc.md +203 -0
- package/doc/icon.png +0 -0
- package/doc/kebab-rag.md +23161 -0
- package/doc/sc/api/index/index.md +47 -0
- package/doc/sc/api/index/interfaces/IConfig.md +165 -0
- package/doc/sc/api/index/interfaces/IConfigAi.md +29 -0
- package/doc/sc/api/index/interfaces/IConfigConst.md +201 -0
- package/doc/sc/api/index/interfaces/IConfigDb.md +59 -0
- package/doc/sc/api/index/interfaces/IConfigDns.md +27 -0
- package/doc/sc/api/index/interfaces/IConfigJwt.md +51 -0
- package/doc/sc/api/index/interfaces/IConfigKv.md +59 -0
- package/doc/sc/api/index/interfaces/IConfigLang.md +27 -0
- package/doc/sc/api/index/interfaces/IConfigS3.md +53 -0
- package/doc/sc/api/index/interfaces/IConfigSql.md +19 -0
- package/doc/sc/api/index/interfaces/IConfigTurnstile.md +51 -0
- package/doc/sc/api/index/interfaces/IConfigVector.md +51 -0
- package/doc/sc/api/index/interfaces/IPostFile.md +43 -0
- package/doc/sc/api/index/interfaces/IUrlParse.md +97 -0
- package/doc/sc/api/index/interfaces/IVhost.md +43 -0
- package/doc/sc/api/index/type-aliases/DbValue.md +13 -0
- package/doc/sc/api/index/type-aliases/Json.md +13 -0
- package/doc/sc/api/index/variables/CERT_CWD.md +11 -0
- package/doc/sc/api/index/variables/CONF_CWD.md +11 -0
- package/doc/sc/api/index/variables/FTMP_CWD.md +11 -0
- package/doc/sc/api/index/variables/IND_CWD.md +11 -0
- package/doc/sc/api/index/variables/LIB_CWD.md +11 -0
- package/doc/sc/api/index/variables/LIB_PATH.md +11 -0
- package/doc/sc/api/index/variables/LOG_CWD.md +11 -0
- package/doc/sc/api/index/variables/MOD_CWD.md +11 -0
- package/doc/sc/api/index/variables/ROOT_CWD.md +13 -0
- package/doc/sc/api/index/variables/ROOT_PATH.md +13 -0
- package/doc/sc/api/index/variables/SYS_PATH.md +11 -0
- package/doc/sc/api/index/variables/VER.md +13 -0
- package/doc/sc/api/index/variables/VHOST_CWD.md +11 -0
- package/doc/sc/api/index/variables/WWW_CWD.md +11 -0
- package/doc/sc/api/index.md +48 -0
- package/doc/sc/api/lib/ai/classes/Ai.md +103 -0
- package/doc/sc/api/lib/ai/enumerations/ESERVICE.md +61 -0
- package/doc/sc/api/lib/ai/functions/get.md +29 -0
- package/doc/sc/api/lib/ai/index.md +23 -0
- package/doc/sc/api/lib/ai/interfaces/IOptions.md +65 -0
- package/doc/sc/api/lib/buffer/classes/Reader.md +177 -0
- package/doc/sc/api/lib/buffer/classes/Writer.md +147 -0
- package/doc/sc/api/lib/buffer/functions/getReader.md +25 -0
- package/doc/sc/api/lib/buffer/functions/getWriter.md +25 -0
- package/doc/sc/api/lib/buffer/index.md +17 -0
- package/doc/sc/api/lib/captcha/classes/Captcha.md +79 -0
- package/doc/sc/api/lib/captcha/functions/get.md +37 -0
- package/doc/sc/api/lib/captcha/index.md +15 -0
- package/doc/sc/api/lib/consistent/classes/Consistent.md +135 -0
- package/doc/sc/api/lib/consistent/functions/addToCircle.md +37 -0
- package/doc/sc/api/lib/consistent/functions/fast.md +37 -0
- package/doc/sc/api/lib/consistent/functions/findInCircle.md +37 -0
- package/doc/sc/api/lib/consistent/functions/get.md +21 -0
- package/doc/sc/api/lib/consistent/functions/getRange.md +37 -0
- package/doc/sc/api/lib/consistent/functions/hash.md +25 -0
- package/doc/sc/api/lib/consistent/index.md +20 -0
- package/doc/sc/api/lib/core/functions/checkType.md +37 -0
- package/doc/sc/api/lib/core/functions/clone.md +31 -0
- package/doc/sc/api/lib/core/functions/convert62.md +25 -0
- package/doc/sc/api/lib/core/functions/debug.md +31 -0
- package/doc/sc/api/lib/core/functions/display.md +31 -0
- package/doc/sc/api/lib/core/functions/emptyObject.md +31 -0
- package/doc/sc/api/lib/core/functions/exec.md +31 -0
- package/doc/sc/api/lib/core/functions/getLog.md +71 -0
- package/doc/sc/api/lib/core/functions/ip.md +27 -0
- package/doc/sc/api/lib/core/functions/log.md +37 -0
- package/doc/sc/api/lib/core/functions/ls.md +39 -0
- package/doc/sc/api/lib/core/functions/muid.md +59 -0
- package/doc/sc/api/lib/core/functions/objectSort.md +31 -0
- package/doc/sc/api/lib/core/functions/passThroughAppend.md +37 -0
- package/doc/sc/api/lib/core/functions/purify.md +25 -0
- package/doc/sc/api/lib/core/functions/rand.md +37 -0
- package/doc/sc/api/lib/core/functions/random.md +37 -0
- package/doc/sc/api/lib/core/functions/realIP.md +29 -0
- package/doc/sc/api/lib/core/functions/removeGlobal.md +31 -0
- package/doc/sc/api/lib/core/functions/sendNpm.md +31 -0
- package/doc/sc/api/lib/core/functions/sendPm2.md +37 -0
- package/doc/sc/api/lib/core/functions/sendReload.md +24 -0
- package/doc/sc/api/lib/core/functions/sendRestart.md +24 -0
- package/doc/sc/api/lib/core/functions/setCookie.md +43 -0
- package/doc/sc/api/lib/core/functions/setGlobal.md +37 -0
- package/doc/sc/api/lib/core/functions/sleep.md +25 -0
- package/doc/sc/api/lib/core/functions/unconvert62.md +25 -0
- package/doc/sc/api/lib/core/functions/updateCode.md +49 -0
- package/doc/sc/api/lib/core/functions/write.md +31 -0
- package/doc/sc/api/lib/core/functions/writeEventStreamHead.md +21 -0
- package/doc/sc/api/lib/core/functions/writeHead.md +37 -0
- package/doc/sc/api/lib/core/index.md +66 -0
- package/doc/sc/api/lib/core/interfaces/ICookieOptions.md +59 -0
- package/doc/sc/api/lib/core/interfaces/ILogOptions.md +75 -0
- package/doc/sc/api/lib/core/type-aliases/TPm2Action.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_L.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LN.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LU.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LUN.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LUNS.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_N.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_U.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_UN.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_V.md +13 -0
- package/doc/sc/api/lib/core/variables/REAL_IP_CF.md +13 -0
- package/doc/sc/api/lib/core/variables/REAL_IP_X.md +13 -0
- package/doc/sc/api/lib/core/variables/global.md +13 -0
- package/doc/sc/api/lib/core/variables/globalConfig.md +47 -0
- package/doc/sc/api/lib/cron/functions/getRegulars.md +17 -0
- package/doc/sc/api/lib/cron/functions/regular.md +31 -0
- package/doc/sc/api/lib/cron/index.md +17 -0
- package/doc/sc/api/lib/cron/interfaces/IRegular.md +59 -0
- package/doc/sc/api/lib/cron/interfaces/IRegularData.md +101 -0
- package/doc/sc/api/lib/crypto/functions/aesDecrypt.md +91 -0
- package/doc/sc/api/lib/crypto/functions/aesEncrypt.md +95 -0
- package/doc/sc/api/lib/crypto/functions/base64Decode.md +59 -0
- package/doc/sc/api/lib/crypto/functions/base64Encode.md +25 -0
- package/doc/sc/api/lib/crypto/functions/cipherDecrypt.md +49 -0
- package/doc/sc/api/lib/crypto/functions/cipherEncrypt.md +49 -0
- package/doc/sc/api/lib/crypto/functions/gcmDecrypt.md +71 -0
- package/doc/sc/api/lib/crypto/functions/gcmEncrypt.md +71 -0
- package/doc/sc/api/lib/crypto/functions/generateKeyPair.md +61 -0
- package/doc/sc/api/lib/crypto/functions/hashHmac.md +79 -0
- package/doc/sc/api/lib/crypto/functions/hashHmacFile.md +79 -0
- package/doc/sc/api/lib/crypto/functions/privateDecrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/privateEncrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/publicDecrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/publicEncrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/sign.md +83 -0
- package/doc/sc/api/lib/crypto/functions/sm4Decrypt.md +91 -0
- package/doc/sc/api/lib/crypto/functions/sm4Encrypt.md +91 -0
- package/doc/sc/api/lib/crypto/functions/uuid.md +25 -0
- package/doc/sc/api/lib/crypto/functions/verify.md +43 -0
- package/doc/sc/api/lib/crypto/index.md +40 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_CBC.md +13 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_CTR.md +13 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_ECB.md +13 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_GCM.md +13 -0
- package/doc/sc/api/lib/crypto/variables/SM4_CBC.md +11 -0
- package/doc/sc/api/lib/crypto/variables/SM4_CFB.md +13 -0
- package/doc/sc/api/lib/crypto/variables/SM4_ECB.md +13 -0
- package/doc/sc/api/lib/db/conn/classes/Connection.md +315 -0
- package/doc/sc/api/lib/db/conn/index.md +11 -0
- package/doc/sc/api/lib/db/enumerations/ESERVICE.md +27 -0
- package/doc/sc/api/lib/db/functions/get.md +37 -0
- package/doc/sc/api/lib/db/index.md +50 -0
- package/doc/sc/api/lib/db/interfaces/IData.md +57 -0
- package/doc/sc/api/lib/db/interfaces/IPacket.md +75 -0
- package/doc/sc/api/lib/db/pool/classes/Pool.md +143 -0
- package/doc/sc/api/lib/db/pool/functions/getConnectionList.md +17 -0
- package/doc/sc/api/lib/db/pool/index.md +19 -0
- package/doc/sc/api/lib/db/pool/interfaces/IConnectionInfo.md +91 -0
- package/doc/sc/api/lib/db/tran/classes/Transaction.md +137 -0
- package/doc/sc/api/lib/db/tran/index.md +11 -0
- package/doc/sc/api/lib/dns/classes/Dns.md +187 -0
- package/doc/sc/api/lib/dns/enumerations/ERECORDLINE.md +59 -0
- package/doc/sc/api/lib/dns/enumerations/ERECORDTYPE.md +67 -0
- package/doc/sc/api/lib/dns/enumerations/ESERVICE.md +27 -0
- package/doc/sc/api/lib/dns/functions/get.md +29 -0
- package/doc/sc/api/lib/dns/index.md +27 -0
- package/doc/sc/api/lib/dns/interfaces/IAddDomainRecord.md +27 -0
- package/doc/sc/api/lib/dns/interfaces/IDomainList.md +43 -0
- package/doc/sc/api/lib/dns/interfaces/IOptions.md +41 -0
- package/doc/sc/api/lib/fs/functions/chmod.md +31 -0
- package/doc/sc/api/lib/fs/functions/copyFile.md +31 -0
- package/doc/sc/api/lib/fs/functions/copyFolder.md +37 -0
- package/doc/sc/api/lib/fs/functions/createReadStream.md +31 -0
- package/doc/sc/api/lib/fs/functions/createWriteStream.md +31 -0
- package/doc/sc/api/lib/fs/functions/getContent.md +63 -0
- package/doc/sc/api/lib/fs/functions/isDir.md +25 -0
- package/doc/sc/api/lib/fs/functions/isFile.md +25 -0
- package/doc/sc/api/lib/fs/functions/mkdir.md +31 -0
- package/doc/sc/api/lib/fs/functions/pipe.md +39 -0
- package/doc/sc/api/lib/fs/functions/putContent.md +47 -0
- package/doc/sc/api/lib/fs/functions/readDir.md +29 -0
- package/doc/sc/api/lib/fs/functions/readLink.md +31 -0
- package/doc/sc/api/lib/fs/functions/readToResponse.md +43 -0
- package/doc/sc/api/lib/fs/functions/rename.md +31 -0
- package/doc/sc/api/lib/fs/functions/rmdir.md +25 -0
- package/doc/sc/api/lib/fs/functions/rmdirDeep.md +25 -0
- package/doc/sc/api/lib/fs/functions/stats.md +25 -0
- package/doc/sc/api/lib/fs/functions/symlink.md +37 -0
- package/doc/sc/api/lib/fs/functions/unlink.md +25 -0
- package/doc/sc/api/lib/fs/index.md +30 -0
- package/doc/sc/api/lib/kv/classes/Kv.md +1161 -0
- package/doc/sc/api/lib/kv/functions/get.md +41 -0
- package/doc/sc/api/lib/kv/index.md +20 -0
- package/doc/sc/api/lib/kv/interfaces/IConnectionInfo.md +43 -0
- package/doc/sc/api/lib/kv/interfaces/IZRangeOptions.md +52 -0
- package/doc/sc/api/lib/lan/functions/card.md +17 -0
- package/doc/sc/api/lib/lan/functions/scan.md +17 -0
- package/doc/sc/api/lib/lan/index.md +12 -0
- package/doc/sc/api/lib/lang/functions/getCodeByAccept.md +25 -0
- package/doc/sc/api/lib/lang/index.md +17 -0
- package/doc/sc/api/lib/lang/variables/codes.md +13 -0
- package/doc/sc/api/lib/lang/variables/map.md +13 -0
- package/doc/sc/api/lib/lang/variables/names.md +11 -0
- package/doc/sc/api/lib/net/formdata/classes/FormData.md +157 -0
- package/doc/sc/api/lib/net/formdata/index.md +15 -0
- package/doc/sc/api/lib/net/formdata/interfaces/IItem.md +55 -0
- package/doc/sc/api/lib/net/functions/buildCookieQuery.md +31 -0
- package/doc/sc/api/lib/net/functions/fetch.md +31 -0
- package/doc/sc/api/lib/net/functions/filterHeaders.md +37 -0
- package/doc/sc/api/lib/net/functions/get.md +31 -0
- package/doc/sc/api/lib/net/functions/getCa.md +17 -0
- package/doc/sc/api/lib/net/functions/getFormData.md +17 -0
- package/doc/sc/api/lib/net/functions/mproxy.md +38 -0
- package/doc/sc/api/lib/net/functions/mproxyData.md +25 -0
- package/doc/sc/api/lib/net/functions/open.md +23 -0
- package/doc/sc/api/lib/net/functions/post.md +37 -0
- package/doc/sc/api/lib/net/functions/postJson.md +37 -0
- package/doc/sc/api/lib/net/functions/postJsonResponseJson.md +39 -0
- package/doc/sc/api/lib/net/functions/request.md +33 -0
- package/doc/sc/api/lib/net/functions/resetCookieSession.md +25 -0
- package/doc/sc/api/lib/net/functions/rproxy.md +37 -0
- package/doc/sc/api/lib/net/functions/setCookie.md +63 -0
- package/doc/sc/api/lib/net/index.md +37 -0
- package/doc/sc/api/lib/net/interfaces/ICookie.md +69 -0
- package/doc/sc/api/lib/net/interfaces/IMproxyOptions.md +85 -0
- package/doc/sc/api/lib/net/interfaces/IRequestOptions.md +133 -0
- package/doc/sc/api/lib/net/interfaces/IRproxyOptions.md +107 -0
- package/doc/sc/api/lib/net/request/classes/Request.md +297 -0
- package/doc/sc/api/lib/net/request/index.md +11 -0
- package/doc/sc/api/lib/net/response/classes/Response.md +109 -0
- package/doc/sc/api/lib/net/response/index.md +11 -0
- package/doc/sc/api/lib/net/type-aliases/THttpHeaders.md +27 -0
- package/doc/sc/api/lib/s3/classes/S3.md +220 -0
- package/doc/sc/api/lib/s3/enumerations/ESERVICE.md +43 -0
- package/doc/sc/api/lib/s3/functions/get.md +29 -0
- package/doc/sc/api/lib/s3/index.md +23 -0
- package/doc/sc/api/lib/s3/interfaces/IOptions.md +71 -0
- package/doc/sc/api/lib/scan/classes/Scan.md +127 -0
- package/doc/sc/api/lib/scan/functions/get.md +33 -0
- package/doc/sc/api/lib/scan/functions/scanned.md +37 -0
- package/doc/sc/api/lib/scan/functions/setData.md +35 -0
- package/doc/sc/api/lib/scan/index.md +22 -0
- package/doc/sc/api/lib/scan/interfaces/IOptions.md +43 -0
- package/doc/sc/api/lib/scan/interfaces/IStaticOptions.md +35 -0
- package/doc/sc/api/lib/session/classes/Session.md +103 -0
- package/doc/sc/api/lib/session/index.md +15 -0
- package/doc/sc/api/lib/session/interfaces/IOptions.md +41 -0
- package/doc/sc/api/lib/socket/functions/rwebsocket.md +37 -0
- package/doc/sc/api/lib/socket/index.md +15 -0
- package/doc/sc/api/lib/socket/interfaces/IRwebsocketOptions.md +91 -0
- package/doc/sc/api/lib/sql/classes/Sql.md +791 -0
- package/doc/sc/api/lib/sql/enumerations/EJSON.md +61 -0
- package/doc/sc/api/lib/sql/enumerations/ESERVICE.md +27 -0
- package/doc/sc/api/lib/sql/functions/aoMix.md +25 -0
- package/doc/sc/api/lib/sql/functions/column.md +35 -0
- package/doc/sc/api/lib/sql/functions/format.md +37 -0
- package/doc/sc/api/lib/sql/functions/get.md +43 -0
- package/doc/sc/api/lib/sql/index.md +23 -0
- package/doc/sc/api/lib/ssh/classes/Connection.md +123 -0
- package/doc/sc/api/lib/ssh/functions/get.md +25 -0
- package/doc/sc/api/lib/ssh/index.md +19 -0
- package/doc/sc/api/lib/ssh/interfaces/IExtOptions.md +33 -0
- package/doc/sc/api/lib/ssh/sftp/classes/Connection.md +628 -0
- package/doc/sc/api/lib/ssh/sftp/index.md +11 -0
- package/doc/sc/api/lib/ssh/shell/classes/Connection.md +189 -0
- package/doc/sc/api/lib/ssh/shell/index.md +11 -0
- package/doc/sc/api/lib/text/functions/getFilename.md +25 -0
- package/doc/sc/api/lib/text/functions/htmlescape.md +25 -0
- package/doc/sc/api/lib/text/functions/int2str.md +42 -0
- package/doc/sc/api/lib/text/functions/isAscii.md +25 -0
- package/doc/sc/api/lib/text/functions/isDomain.md +27 -0
- package/doc/sc/api/lib/text/functions/isEMail.md +23 -0
- package/doc/sc/api/lib/text/functions/isFalsy.md +25 -0
- package/doc/sc/api/lib/text/functions/isIPv4.md +23 -0
- package/doc/sc/api/lib/text/functions/isIPv6.md +23 -0
- package/doc/sc/api/lib/text/functions/isIdCardCN.md +25 -0
- package/doc/sc/api/lib/text/functions/isPhoneCN.md +25 -0
- package/doc/sc/api/lib/text/functions/isRealPath.md +25 -0
- package/doc/sc/api/lib/text/functions/isTruthy.md +31 -0
- package/doc/sc/api/lib/text/functions/logicalOr.md +41 -0
- package/doc/sc/api/lib/text/functions/match.md +31 -0
- package/doc/sc/api/lib/text/functions/nlReplace.md +31 -0
- package/doc/sc/api/lib/text/functions/parseDomain.md +25 -0
- package/doc/sc/api/lib/text/functions/parseJson.md +25 -0
- package/doc/sc/api/lib/text/functions/parseUrl.md +23 -0
- package/doc/sc/api/lib/text/functions/queryParse.md +25 -0
- package/doc/sc/api/lib/text/functions/queryStringify.md +69 -0
- package/doc/sc/api/lib/text/functions/sizeFormat.md +31 -0
- package/doc/sc/api/lib/text/functions/str2int.md +36 -0
- package/doc/sc/api/lib/text/functions/stringifyBuffer.md +25 -0
- package/doc/sc/api/lib/text/functions/stringifyJson.md +31 -0
- package/doc/sc/api/lib/text/functions/stringifyResult.md +25 -0
- package/doc/sc/api/lib/text/functions/trimJson.md +23 -0
- package/doc/sc/api/lib/text/functions/urlAtom.md +25 -0
- package/doc/sc/api/lib/text/functions/urlResolve.md +31 -0
- package/doc/sc/api/lib/text/index.md +55 -0
- package/doc/sc/api/lib/text/interfaces/IDomain.md +43 -0
- package/doc/sc/api/lib/text/type-aliases/TFalsy.md +13 -0
- package/doc/sc/api/lib/text/variables/REGEXP_ASCII.md +13 -0
- package/doc/sc/api/lib/text/variables/REGEXP_DOMAIN.md +11 -0
- package/doc/sc/api/lib/text/variables/REGEXP_EMAIL.md +11 -0
- package/doc/sc/api/lib/text/variables/REGEXP_IPV4.md +11 -0
- package/doc/sc/api/lib/text/variables/REGEXP_IPV6.md +11 -0
- package/doc/sc/api/lib/time/classes/Time.md +125 -0
- package/doc/sc/api/lib/time/functions/format.md +37 -0
- package/doc/sc/api/lib/time/functions/get.md +27 -0
- package/doc/sc/api/lib/time/functions/isMs.md +25 -0
- package/doc/sc/api/lib/time/functions/stamp.md +31 -0
- package/doc/sc/api/lib/time/index.md +28 -0
- package/doc/sc/api/lib/time/interfaces/IOptions.md +29 -0
- package/doc/sc/api/lib/time/variables/DAY.md +13 -0
- package/doc/sc/api/lib/time/variables/HOUR.md +13 -0
- package/doc/sc/api/lib/time/variables/YEAR.md +13 -0
- package/doc/sc/api/lib/turnstile/enumerations/EFACTORY.md +27 -0
- package/doc/sc/api/lib/turnstile/functions/verify.md +35 -0
- package/doc/sc/api/lib/turnstile/index.md +15 -0
- package/doc/sc/api/lib/vector/classes/Vector.md +141 -0
- package/doc/sc/api/lib/vector/functions/get.md +25 -0
- package/doc/sc/api/lib/vector/index.md +19 -0
- package/doc/sc/api/lib/vector/interfaces/IOptions.md +61 -0
- package/doc/sc/api/lib/ws/classes/Socket.md +331 -0
- package/doc/sc/api/lib/ws/enumerations/EFrameReceiveMode.md +35 -0
- package/doc/sc/api/lib/ws/enumerations/EOpcode.md +59 -0
- package/doc/sc/api/lib/ws/functions/connect.md +31 -0
- package/doc/sc/api/lib/ws/functions/createServer.md +45 -0
- package/doc/sc/api/lib/ws/functions/mproxy.md +38 -0
- package/doc/sc/api/lib/ws/functions/rproxy.md +37 -0
- package/doc/sc/api/lib/ws/functions/rsocket.md +37 -0
- package/doc/sc/api/lib/ws/index.md +30 -0
- package/doc/sc/api/lib/ws/interfaces/IConnectOptions.md +95 -0
- package/doc/sc/api/lib/ws/interfaces/IMproxyOptions.md +87 -0
- package/doc/sc/api/lib/ws/interfaces/IRproxyOptions.md +105 -0
- package/doc/sc/api/lib/zip/classes/Zip.md +392 -0
- package/doc/sc/api/lib/zip/functions/get.md +25 -0
- package/doc/sc/api/lib/zip/index.md +29 -0
- package/doc/sc/api/lib/zip/interfaces/IZipInputByType.md +81 -0
- package/doc/sc/api/lib/zip/interfaces/IZipItem.md +65 -0
- package/doc/sc/api/lib/zip/interfaces/IZipMetadata.md +25 -0
- package/doc/sc/api/lib/zip/interfaces/IZipOutputByType.md +81 -0
- package/doc/sc/api/lib/zip/interfaces/IZipStats.md +49 -0
- package/doc/sc/api/lib/zip/type-aliases/TZipInputFileFormat.md +11 -0
- package/doc/sc/api/lib/zip/type-aliases/TZipInputType.md +11 -0
- package/doc/sc/api/lib/zip/type-aliases/TZipOutputType.md +11 -0
- package/doc/sc/api/lib/zlib/functions/brotliCompress.md +31 -0
- package/doc/sc/api/lib/zlib/functions/brotliDecompress.md +25 -0
- package/doc/sc/api/lib/zlib/functions/compress.md +37 -0
- package/doc/sc/api/lib/zlib/functions/createBrotliCompress.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createBrotliDecompress.md +17 -0
- package/doc/sc/api/lib/zlib/functions/createCompress.md +31 -0
- package/doc/sc/api/lib/zlib/functions/createDecompress.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createDeflate.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createGunzip.md +17 -0
- package/doc/sc/api/lib/zlib/functions/createGzip.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createInflate.md +17 -0
- package/doc/sc/api/lib/zlib/functions/decompress.md +31 -0
- package/doc/sc/api/lib/zlib/functions/deflate.md +31 -0
- package/doc/sc/api/lib/zlib/functions/gunzip.md +25 -0
- package/doc/sc/api/lib/zlib/functions/gzip.md +31 -0
- package/doc/sc/api/lib/zlib/functions/inflate.md +25 -0
- package/doc/sc/api/lib/zlib/index.md +31 -0
- package/doc/sc/api/lib/zlib/interfaces/ICompress.md +27 -0
- package/doc/sc/api/lib/zlib/interfaces/ICompressBuffer.md +27 -0
- package/doc/sc/api/main/index.md +7 -0
- package/doc/sc/api/sys/ctr/classes/Ctr.md +1242 -0
- package/doc/sc/api/sys/ctr/functions/clearLocaleData.md +17 -0
- package/doc/sc/api/sys/ctr/index.md +15 -0
- package/doc/sc/api/sys/mod/classes/Rows.md +165 -0
- package/doc/sc/api/sys/mod/classes/default.md +2175 -0
- package/doc/sc/api/sys/mod/index.md +21 -0
- package/doc/sc/api/sys/mod/interfaces/IModUnionItem.md +25 -0
- package/doc/sc/api/sys/mod/interfaces/IRows.md +57 -0
- package/doc/sc/api/sys/mod/type-aliases/TOnlyProperties.md +19 -0
- package/doc/sc/api/sys/route/functions/clearKebabConfigs.md +17 -0
- package/doc/sc/api/sys/route/functions/getFormData.md +47 -0
- package/doc/sc/api/sys/route/functions/getPost.md +25 -0
- package/doc/sc/api/sys/route/functions/run.md +83 -0
- package/doc/sc/api/sys/route/functions/unlinkUploadFiles.md +25 -0
- package/doc/sc/api/sys/route/functions/waitCtr.md +26 -0
- package/doc/sc/api/sys/route/index.md +16 -0
- package/doc/sc/quick-start.md +30 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/text.d.ts +12 -1
- package/lib/text.js +13 -15
- package/package.json +1 -1
- package/sys/child.js +9 -3
- package/sys/master.js +1 -1
- package/www/example/ctr/test.d.ts +1 -1
- package/www/example/ctr/test.js +17 -7
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../../index.md) / [lib/ssh/shell](../index.md) / Connection
|
|
6
|
+
|
|
7
|
+
# Class: Connection
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/ssh/shell.ts:9](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L9)
|
|
10
|
+
|
|
11
|
+
## Constructors
|
|
12
|
+
|
|
13
|
+
### Constructor
|
|
14
|
+
|
|
15
|
+
> **new Connection**(`stream`): `Connection`
|
|
16
|
+
|
|
17
|
+
Defined in: [lib/ssh/shell.ts:14](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L14)
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
##### stream
|
|
22
|
+
|
|
23
|
+
`ClientChannel`
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Connection`
|
|
28
|
+
|
|
29
|
+
## Methods
|
|
30
|
+
|
|
31
|
+
### close()
|
|
32
|
+
|
|
33
|
+
> **close**(`cmd?`, `encoding?`): `Promise`\<`void`\>
|
|
34
|
+
|
|
35
|
+
Defined in: [lib/ssh/shell.ts:77](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L77)
|
|
36
|
+
|
|
37
|
+
关闭 shell
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### cmd?
|
|
42
|
+
|
|
43
|
+
命令
|
|
44
|
+
|
|
45
|
+
`string` | `Buffer`\<`ArrayBufferLike`\>
|
|
46
|
+
|
|
47
|
+
##### encoding?
|
|
48
|
+
|
|
49
|
+
`BufferEncoding`
|
|
50
|
+
|
|
51
|
+
编码
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
`Promise`\<`void`\>
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### getContent()
|
|
60
|
+
|
|
61
|
+
> **getContent**(`tryCount`): `Promise`\<`Buffer`\<`ArrayBufferLike`\>\>
|
|
62
|
+
|
|
63
|
+
Defined in: [lib/ssh/shell.ts:96](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L96)
|
|
64
|
+
|
|
65
|
+
获取返回值
|
|
66
|
+
|
|
67
|
+
#### Parameters
|
|
68
|
+
|
|
69
|
+
##### tryCount
|
|
70
|
+
|
|
71
|
+
`number` = `10`
|
|
72
|
+
|
|
73
|
+
如果无知重试次数,1 次为 10 毫秒
|
|
74
|
+
|
|
75
|
+
#### Returns
|
|
76
|
+
|
|
77
|
+
`Promise`\<`Buffer`\<`ArrayBufferLike`\>\>
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### getStream()
|
|
82
|
+
|
|
83
|
+
> **getStream**(): `ClientChannel`
|
|
84
|
+
|
|
85
|
+
Defined in: [lib/ssh/shell.ts:119](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L119)
|
|
86
|
+
|
|
87
|
+
获取响应读取流对象
|
|
88
|
+
|
|
89
|
+
#### Returns
|
|
90
|
+
|
|
91
|
+
`ClientChannel`
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### send()
|
|
96
|
+
|
|
97
|
+
> **send**(`cmd`, `encoding?`): `Promise`\<`boolean`\>
|
|
98
|
+
|
|
99
|
+
Defined in: [lib/ssh/shell.ts:23](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L23)
|
|
100
|
+
|
|
101
|
+
发送指令
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
|
|
105
|
+
##### cmd
|
|
106
|
+
|
|
107
|
+
指令
|
|
108
|
+
|
|
109
|
+
`string` | `Buffer`\<`ArrayBufferLike`\>
|
|
110
|
+
|
|
111
|
+
##### encoding?
|
|
112
|
+
|
|
113
|
+
`BufferEncoding`
|
|
114
|
+
|
|
115
|
+
编码
|
|
116
|
+
|
|
117
|
+
#### Returns
|
|
118
|
+
|
|
119
|
+
`Promise`\<`boolean`\>
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
### sendCtrlC()
|
|
124
|
+
|
|
125
|
+
> **sendCtrlC**(): `Promise`\<`boolean`\>
|
|
126
|
+
|
|
127
|
+
Defined in: [lib/ssh/shell.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L68)
|
|
128
|
+
|
|
129
|
+
发送中断
|
|
130
|
+
|
|
131
|
+
#### Returns
|
|
132
|
+
|
|
133
|
+
`Promise`\<`boolean`\>
|
|
134
|
+
|
|
135
|
+
***
|
|
136
|
+
|
|
137
|
+
### sendEnter()
|
|
138
|
+
|
|
139
|
+
> **sendEnter**(): `Promise`\<`boolean`\>
|
|
140
|
+
|
|
141
|
+
Defined in: [lib/ssh/shell.ts:54](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L54)
|
|
142
|
+
|
|
143
|
+
发送 Enter 键
|
|
144
|
+
|
|
145
|
+
#### Returns
|
|
146
|
+
|
|
147
|
+
`Promise`\<`boolean`\>
|
|
148
|
+
|
|
149
|
+
***
|
|
150
|
+
|
|
151
|
+
### sendLine()
|
|
152
|
+
|
|
153
|
+
> **sendLine**(`cmd`, `encoding?`): `Promise`\<`boolean`\>
|
|
154
|
+
|
|
155
|
+
Defined in: [lib/ssh/shell.ts:47](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L47)
|
|
156
|
+
|
|
157
|
+
发送带换行的内容(发送并执行)
|
|
158
|
+
|
|
159
|
+
#### Parameters
|
|
160
|
+
|
|
161
|
+
##### cmd
|
|
162
|
+
|
|
163
|
+
`string`
|
|
164
|
+
|
|
165
|
+
指令
|
|
166
|
+
|
|
167
|
+
##### encoding?
|
|
168
|
+
|
|
169
|
+
`BufferEncoding`
|
|
170
|
+
|
|
171
|
+
编码
|
|
172
|
+
|
|
173
|
+
#### Returns
|
|
174
|
+
|
|
175
|
+
`Promise`\<`boolean`\>
|
|
176
|
+
|
|
177
|
+
***
|
|
178
|
+
|
|
179
|
+
### sendTab()
|
|
180
|
+
|
|
181
|
+
> **sendTab**(): `Promise`\<`boolean`\>
|
|
182
|
+
|
|
183
|
+
Defined in: [lib/ssh/shell.ts:61](https://github.com/maiyunnet/kebab/blob/master/lib/ssh/shell.ts#L61)
|
|
184
|
+
|
|
185
|
+
发送 Tab 键
|
|
186
|
+
|
|
187
|
+
#### Returns
|
|
188
|
+
|
|
189
|
+
`Promise`\<`boolean`\>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / getFilename
|
|
6
|
+
|
|
7
|
+
# Function: getFilename()
|
|
8
|
+
|
|
9
|
+
> **getFilename**(`path`): `string`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:476](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L476)
|
|
12
|
+
|
|
13
|
+
获取文件名
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### path
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
文件路径
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`string`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / htmlescape
|
|
6
|
+
|
|
7
|
+
# Function: htmlescape()
|
|
8
|
+
|
|
9
|
+
> **htmlescape**(`html`): `string`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:452](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L452)
|
|
12
|
+
|
|
13
|
+
HTML 特殊字符转换为实体字符
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### html
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
待转换的 HTML
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`string`
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / int2str
|
|
6
|
+
|
|
7
|
+
# Function: int2str()
|
|
8
|
+
|
|
9
|
+
> **int2str**(`int`, `digits`, `decimal`): `string`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:667](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L667)
|
|
12
|
+
|
|
13
|
+
为解决精度问题,将整数转换为小数字符串
|
|
14
|
+
以下几个示例都是当 digits 为 3、decimal 为 2 时
|
|
15
|
+
int 传入 2341,返回 '2.34'
|
|
16
|
+
int 传入 2345,返回 '2.35'
|
|
17
|
+
int 传入 23,返回 '0.02'
|
|
18
|
+
int 传入 2,返回 '0.00'
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
|
|
22
|
+
### int
|
|
23
|
+
|
|
24
|
+
`number`
|
|
25
|
+
|
|
26
|
+
要转换的整数
|
|
27
|
+
|
|
28
|
+
### digits
|
|
29
|
+
|
|
30
|
+
`number` = `4`
|
|
31
|
+
|
|
32
|
+
小数点左移位数
|
|
33
|
+
|
|
34
|
+
### decimal
|
|
35
|
+
|
|
36
|
+
`number` = `2`
|
|
37
|
+
|
|
38
|
+
最终保留的小数位数
|
|
39
|
+
|
|
40
|
+
## Returns
|
|
41
|
+
|
|
42
|
+
`string`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isAscii
|
|
6
|
+
|
|
7
|
+
# Function: isAscii()
|
|
8
|
+
|
|
9
|
+
> **isAscii**(`text`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:234](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L234)
|
|
12
|
+
|
|
13
|
+
判断是否在 ascii 字符集内,仅可输入部分
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### text
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
要判断的文本
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`boolean`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isDomain
|
|
6
|
+
|
|
7
|
+
# Function: isDomain()
|
|
8
|
+
|
|
9
|
+
> **isDomain**(`domain`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:223](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L223)
|
|
12
|
+
|
|
13
|
+
判断是否是域名
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### domain
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
域名
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`boolean`
|
|
26
|
+
|
|
27
|
+
bool
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isEMail
|
|
6
|
+
|
|
7
|
+
# Function: isEMail()
|
|
8
|
+
|
|
9
|
+
> **isEMail**(`email`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:192](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L192)
|
|
12
|
+
|
|
13
|
+
是否是邮件地址
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### email
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`boolean`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isFalsy
|
|
6
|
+
|
|
7
|
+
# Function: isFalsy()
|
|
8
|
+
|
|
9
|
+
> **isFalsy**(`val`): `val is TFalsy`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:618](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L618)
|
|
12
|
+
|
|
13
|
+
判断一个值是否是虚假的(为 null/undefined/空字符串/false/0)
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### val
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
要判断的值
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`val is TFalsy`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isIPv4
|
|
6
|
+
|
|
7
|
+
# Function: isIPv4()
|
|
8
|
+
|
|
9
|
+
> **isIPv4**(`ip`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:202](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L202)
|
|
12
|
+
|
|
13
|
+
是否是 IPv4
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### ip
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`boolean`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isIPv6
|
|
6
|
+
|
|
7
|
+
# Function: isIPv6()
|
|
8
|
+
|
|
9
|
+
> **isIPv6**(`ip`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:212](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L212)
|
|
12
|
+
|
|
13
|
+
是否是 IPv6
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### ip
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`boolean`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isIdCardCN
|
|
6
|
+
|
|
7
|
+
# Function: isIdCardCN()
|
|
8
|
+
|
|
9
|
+
> **isIdCardCN**(`idcard`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:346](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L346)
|
|
12
|
+
|
|
13
|
+
是否是中国大陆身份证号码
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### idcard
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
身份证号
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`boolean`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isPhoneCN
|
|
6
|
+
|
|
7
|
+
# Function: isPhoneCN()
|
|
8
|
+
|
|
9
|
+
> **isPhoneCN**(`p`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:338](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L338)
|
|
12
|
+
|
|
13
|
+
判断手机号是否是 11 位,不做真实性校验
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### p
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
手机号
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`boolean`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isRealPath
|
|
6
|
+
|
|
7
|
+
# Function: isRealPath()
|
|
8
|
+
|
|
9
|
+
> **isRealPath**(`path`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:464](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L464)
|
|
12
|
+
|
|
13
|
+
判断是否是绝对路径,是返回 true,相对路径返回 false
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### path
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
要判断的路径字符串
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`boolean`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / isTruthy
|
|
6
|
+
|
|
7
|
+
# Function: isTruthy()
|
|
8
|
+
|
|
9
|
+
> **isTruthy**\<`T`\>(`val`): `val is Exclude<T, TFalsy>`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:626](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L626)
|
|
12
|
+
|
|
13
|
+
判断一个值是否是真实的(不为 null/undefined/空字符串/false/0)
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
### T
|
|
18
|
+
|
|
19
|
+
`T`
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
### val
|
|
24
|
+
|
|
25
|
+
`T`
|
|
26
|
+
|
|
27
|
+
要判断的值
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`val is Exclude<T, TFalsy>`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / logicalOr
|
|
6
|
+
|
|
7
|
+
# Function: logicalOr()
|
|
8
|
+
|
|
9
|
+
> **logicalOr**\<`T`, `T2`\>(`v1`, `v2`): `T` *extends* [`TFalsy`](../type-aliases/TFalsy.md) ? `T2` : `T`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:635](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L635)
|
|
12
|
+
|
|
13
|
+
类似 || 运算符的效果
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
### T
|
|
18
|
+
|
|
19
|
+
`T`
|
|
20
|
+
|
|
21
|
+
### T2
|
|
22
|
+
|
|
23
|
+
`T2`
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
|
|
27
|
+
### v1
|
|
28
|
+
|
|
29
|
+
`T`
|
|
30
|
+
|
|
31
|
+
比对值
|
|
32
|
+
|
|
33
|
+
### v2
|
|
34
|
+
|
|
35
|
+
`T2`
|
|
36
|
+
|
|
37
|
+
比对值
|
|
38
|
+
|
|
39
|
+
## Returns
|
|
40
|
+
|
|
41
|
+
`T` *extends* [`TFalsy`](../type-aliases/TFalsy.md) ? `T2` : `T`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / match
|
|
6
|
+
|
|
7
|
+
# Function: match()
|
|
8
|
+
|
|
9
|
+
> **match**(`str`, `regs`): `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:323](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L323)
|
|
12
|
+
|
|
13
|
+
传入正则进行匹配 str 是否有一项满足
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### str
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
要检测的字符串
|
|
22
|
+
|
|
23
|
+
### regs
|
|
24
|
+
|
|
25
|
+
`RegExp`[]
|
|
26
|
+
|
|
27
|
+
正则列表
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`boolean`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / nlReplace
|
|
6
|
+
|
|
7
|
+
# Function: nlReplace()
|
|
8
|
+
|
|
9
|
+
> **nlReplace**(`str`, `to`): `string`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:243](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L243)
|
|
12
|
+
|
|
13
|
+
换行替换为别的
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### str
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
要替换的字符串
|
|
22
|
+
|
|
23
|
+
### to
|
|
24
|
+
|
|
25
|
+
`string` = '\n'
|
|
26
|
+
|
|
27
|
+
换行替换符
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`string`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / parseDomain
|
|
6
|
+
|
|
7
|
+
# Function: parseDomain()
|
|
8
|
+
|
|
9
|
+
> **parseDomain**(`domain`): `Promise`\<[`IDomain`](../interfaces/IDomain.md)\>
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/text.ts:266](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L266)
|
|
12
|
+
|
|
13
|
+
解析域名并获取 tld/sld/domain/sub
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### domain
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
域名
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<[`IDomain`](../interfaces/IDomain.md)\>
|