From 202320b4be306de6a01d71514c3641b8b89a2674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E7=A8=8B=E8=AE=AD?= Date: Fri, 7 Apr 2023 20:08:51 +0800 Subject: [PATCH] Version_0.0.22 --- device.d.ts | 1 + dist/index.aio.js | 30 +++- dist/index.aio.min.js | 2 +- dist/index.esm.js | 31 +++- dist/index.esm.min.js | 2 +- dist/index.js | 30 +++- dist/index.min.js | 2 +- docs/404.html | 8 +- docs/README.html | 10 +- docs/api/cookie.html | 22 +-- docs/api/device.html | 27 ++++ docs/api/index.html | 10 +- docs/api/string.html | 24 +-- docs/api/url.html | 20 +-- ....5f7e0040.js => api_cookie.md.1c4ad4a1.js} | 12 +- docs/assets/api_cookie.md.1c4ad4a1.lean.js | 1 + docs/assets/api_cookie.md.5f7e0040.lean.js | 1 - docs/assets/api_device.md.6585d07d.js | 4 + docs/assets/api_device.md.6585d07d.lean.js | 1 + ....a6aa527a.js => api_string.md.1ed2f4ad.js} | 10 +- ...lean.js => api_string.md.1ed2f4ad.lean.js} | 0 ....md.9c04f055.js => api_url.md.417e0b08.js} | 6 +- ...55.lean.js => api_url.md.417e0b08.lean.js} | 0 .../{app.48061d79.js => app.ba2fac9d.js} | 2 +- .../{theme.590836bb.js => theme.262b2f72.js} | 2 +- .../chunks/virtual_search-data.3dbabb59.js | 152 ++++++++++++++++++ .../chunks/virtual_search-data.8ba04493.js | 144 ----------------- docs/assets/guide_changelog.md.9c43410b.js | 1 + .../guide_changelog.md.9c43410b.lean.js | 1 + docs/assets/guide_changelog.md.f04ab608.js | 1 - .../guide_changelog.md.f04ab608.lean.js | 1 - ...34f2e2ef.js => guide_index.md.3c263829.js} | 2 +- ...ean.js => guide_index.md.3c263829.lean.js} | 2 +- ...c07266.js => guide_install.md.5995f391.js} | 6 +- docs/assets/guide_install.md.5995f391.lean.js | 1 + docs/assets/guide_install.md.d1c07266.lean.js | 1 - docs/guide/changelog.html | 12 +- docs/guide/contribute.html | 10 +- docs/guide/index.html | 12 +- docs/guide/install.html | 16 +- docs/guide/todo.html | 10 +- docs/hashmap.json | 2 +- docs/index.html | 10 +- index.d.ts | 1 + package.json | 2 +- src/device.ts | 21 +++ src/index.ts | 3 +- src/string.ts | 2 +- wiki/.vitepress/config.js | 1 + wiki/api/device.md | 31 ++++ wiki/guide/changelog.md | 4 + 51 files changed, 447 insertions(+), 260 deletions(-) create mode 100644 device.d.ts create mode 100644 docs/api/device.html rename docs/assets/{api_cookie.md.5f7e0040.js => api_cookie.md.1c4ad4a1.js} (86%) create mode 100644 docs/assets/api_cookie.md.1c4ad4a1.lean.js delete mode 100644 docs/assets/api_cookie.md.5f7e0040.lean.js create mode 100644 docs/assets/api_device.md.6585d07d.js create mode 100644 docs/assets/api_device.md.6585d07d.lean.js rename docs/assets/{api_string.md.a6aa527a.js => api_string.md.1ed2f4ad.js} (95%) rename docs/assets/{api_string.md.a6aa527a.lean.js => api_string.md.1ed2f4ad.lean.js} (100%) rename docs/assets/{api_url.md.9c04f055.js => api_url.md.417e0b08.js} (91%) rename docs/assets/{api_url.md.9c04f055.lean.js => api_url.md.417e0b08.lean.js} (100%) rename docs/assets/{app.48061d79.js => app.ba2fac9d.js} (95%) rename docs/assets/chunks/{theme.590836bb.js => theme.262b2f72.js} (99%) create mode 100644 docs/assets/chunks/virtual_search-data.3dbabb59.js delete mode 100644 docs/assets/chunks/virtual_search-data.8ba04493.js create mode 100644 docs/assets/guide_changelog.md.9c43410b.js create mode 100644 docs/assets/guide_changelog.md.9c43410b.lean.js delete mode 100644 docs/assets/guide_changelog.md.f04ab608.js delete mode 100644 docs/assets/guide_changelog.md.f04ab608.lean.js rename docs/assets/{guide_index.md.34f2e2ef.js => guide_index.md.3c263829.js} (98%) rename docs/assets/{guide_index.md.34f2e2ef.lean.js => guide_index.md.3c263829.lean.js} (93%) rename docs/assets/{guide_install.md.d1c07266.js => guide_install.md.5995f391.js} (76%) create mode 100644 docs/assets/guide_install.md.5995f391.lean.js delete mode 100644 docs/assets/guide_install.md.d1c07266.lean.js create mode 100644 src/device.ts create mode 100644 wiki/api/device.md diff --git a/device.d.ts b/device.d.ts new file mode 100644 index 0000000..440b6c3 --- /dev/null +++ b/device.d.ts @@ -0,0 +1 @@ +export declare function checkDeviceType(): "android" | "ios" | "pad" | "watch" | "desktop"; diff --git a/dist/index.aio.js b/dist/index.aio.js index b095111..10c8a13 100644 --- a/dist/index.aio.js +++ b/dist/index.aio.js @@ -1,5 +1,5 @@ /*! - * galanga 0.0.21 (https://github.com/censujiang/galanga) + * galanga 0.0.22 (https://github.com/censujiang/galanga) * API https://github.com/censujiang/galanga/blob/master/doc/api.md * Copyright 2014-2023 censujiang. All Rights Reserved * Licensed under Apache License 2.0 (https://github.com/censujiang/galanga/blob/master/LICENSE) @@ -182,9 +182,37 @@ return reg.test(email); } + //根据UA检查设备是手机、平板、手表还是桌面 + //启动此函数后,将会检查当前浏览器的UA。 + //安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop + function checkDeviceType() { + var ua = navigator.userAgent; + if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua)) { + if (/Android/i.test(ua)) { + return 'android'; + } + else if (/iPhone|iPad|iPod/i.test(ua)) { + return 'ios'; + } + else if (/iPad/i.test(ua)) { + return 'pad'; + } + else if (/Watch/i.test(ua)) { + return 'watch'; + } + else { + return 'desktop'; + } + } + else { + return 'desktop'; + } + } + //导出自己的名字 var name = 'galanga'; + exports.checkDeviceType = checkDeviceType; exports.checkEmail = checkEmail; exports.checkNull = checkNull; exports.checkPassword = checkPassword; diff --git a/dist/index.aio.min.js b/dist/index.aio.min.js index c37f2fa..0852fac 100644 --- a/dist/index.aio.min.js +++ b/dist/index.aio.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).galanga={})}(this,function(e){"use strict";var t={getItem:function(e){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,n,o,a,r){if(!e||/^(?:expires|max-age|path|domain|secure)$/i.test(e))return!1;var i="";if(n)switch(n.constructor){case Number:i=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:i="; expires="+n;break;case Date:i="; expires="+n.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+i+(a?"; domain="+a:"")+(o?"; path="+o:"")+(r?"; secure":"")},removeItem:function(e,t,n){if(!e||!this.hasItem(e))return!1;document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:"")},hasItem:function(e){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^]+)(?=;|$)|^\s*|\s*(?:[^;]*)?(?:|$)/g,"").split(/\s*(?:[^;]*)?;\s*/),t=0;t(void 0===o?16:o)||(n=0,-1?,.\/]/.test(e)&&n++,n(void 0===n?16:n)||(o=0,-1?,.\/]/.test(e)&&o++,o255?t+=2:t++;return t}return 0}function r(e,t){var n=void 0===t?{}:t,o=n.decimals,a=void 0===o?1:o,i=n.from,c=void 0===i?"B":i,s=n.to,u=void 0===s?"auto":s;if(e<0)return"-"+r(-e,{decimals:a,from:c,to:u});if(0===e)return"0 B";var l=1024,d=a<0?0:a,m=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],p="auto"===c?Math.floor(Math.log(e)/Math.log(l)):m.indexOf(c);if(e/=Math.pow(l,p),"auto"===u){var h=Math.floor(Math.log(e)/Math.log(l));return parseFloat((e/Math.pow(l,h)).toFixed(d))+" "+m[h]}return parseFloat(e.toFixed(d))+" "+u}function a(e,t){var n=void 0===t?{}:t,o=n.minLength,r=void 0===o?8:o,a=n.maxLength,i=void 0===a?16:a,c=n.types,s=void 0===c?["number","lowercase","uppercase","special"]:c,u=n.minTypes,l=void 0===u?2:u,d=n.maxTypes,m=void 0===d?4:d;if(e.lengthi)return!1;var p=0;return s.indexOf("number")>-1&&/\d/.test(e)&&p++,s.indexOf("lowercase")>-1&&/[a-z]/.test(e)&&p++,s.indexOf("uppercase")>-1&&/[A-Z]/.test(e)&&p++,s.indexOf("special")>-1&&/[~!@#$%^&*()_+`\-={}:";'<>?,.\/]/.test(e)&&p++,!(pm)}function i(e){return/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(e)}var c="galanga";export{i as checkEmail,n as checkNull,a as checkPassword,r as formatBytes,e as localCookie,c as name,o as strLength,t as url}; +var e={getItem:function(e){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,n,o,r,i){if(!e||/^(?:expires|max-age|path|domain|secure)$/i.test(e))return!1;var a="";if(n)switch(n.constructor){case Number:a=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:a="; expires="+n;break;case Date:a="; expires="+n.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(r?"; domain="+r:"")+(o?"; path="+o:"")+(i?"; secure":"")},removeItem:function(e,t,n){if(!e||!this.hasItem(e))return!1;document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:"")},hasItem:function(e){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^]+)(?=;|$)|^\s*|\s*(?:[^;]*)?(?:|$)/g,"").split(/\s*(?:[^;]*)?;\s*/),t=0;t255?t+=2:t++;return t}return 0}function r(e,t){var n=void 0===t?{}:t,o=n.decimals,i=void 0===o?1:o,a=n.from,c=void 0===a?"B":a,s=n.to,u=void 0===s?"auto":s;if(e<0)return"-"+r(-e,{decimals:i,from:c,to:u});if(0===e)return"0 B";var d=1024,l=i<0?0:i,p=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],h="auto"===c?Math.floor(Math.log(e)/Math.log(d)):p.indexOf(c);if(e/=Math.pow(d,h),"auto"===u){var m=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,m)).toFixed(l))+" "+p[m]}return parseFloat(e.toFixed(l))+" "+u}function i(e,t){var n=void 0===t?{}:t,o=n.minLength,r=void 0===o?8:o,i=n.maxLength,a=void 0===i?16:i,c=n.types,s=void 0===c?["number","lowercase","uppercase","special"]:c,u=n.minTypes,d=void 0===u?2:u,l=n.maxTypes,p=void 0===l?4:l;if(e.lengtha)return!1;var h=0;return s.indexOf("number")>-1&&/\d/.test(e)&&h++,s.indexOf("lowercase")>-1&&/[a-z]/.test(e)&&h++,s.indexOf("uppercase")>-1&&/[A-Z]/.test(e)&&h++,s.indexOf("special")>-1&&/[~!@#$%^&*()_+`\-={}:";'<>?,.\/]/.test(e)&&h++,!(hp)}function a(e){return/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(e)}function c(){var e=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)?/Android/i.test(e)?"android":/iPhone|iPad|iPod/i.test(e)?"ios":/iPad/i.test(e)?"pad":/Watch/i.test(e)?"watch":"desktop":"desktop"}var s="galanga";export{c as checkDeviceType,a as checkEmail,n as checkNull,i as checkPassword,r as formatBytes,e as localCookie,s as name,o as strLength,t as url}; diff --git a/dist/index.js b/dist/index.js index df1de8f..4e30bbc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,5 +1,5 @@ /*! - * galanga 0.0.21 (https://github.com/censujiang/galanga) + * galanga 0.0.22 (https://github.com/censujiang/galanga) * API https://github.com/censujiang/galanga/blob/master/doc/api.md * Copyright 2014-2023 censujiang. All Rights Reserved * Licensed under Apache License 2.0 (https://github.com/censujiang/galanga/blob/master/LICENSE) @@ -178,9 +178,37 @@ function checkEmail(email) { return reg.test(email); } +//根据UA检查设备是手机、平板、手表还是桌面 +//启动此函数后,将会检查当前浏览器的UA。 +//安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop +function checkDeviceType() { + var ua = navigator.userAgent; + if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua)) { + if (/Android/i.test(ua)) { + return 'android'; + } + else if (/iPhone|iPad|iPod/i.test(ua)) { + return 'ios'; + } + else if (/iPad/i.test(ua)) { + return 'pad'; + } + else if (/Watch/i.test(ua)) { + return 'watch'; + } + else { + return 'desktop'; + } + } + else { + return 'desktop'; + } +} + //导出自己的名字 var name = 'galanga'; +exports.checkDeviceType = checkDeviceType; exports.checkEmail = checkEmail; exports.checkNull = checkNull; exports.checkPassword = checkPassword; diff --git a/dist/index.min.js b/dist/index.min.js index 863836b..1b4289d 100644 --- a/dist/index.min.js +++ b/dist/index.min.js @@ -1 +1 @@ -"use strict";var localCookie={getItem:function(e){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,o,n,r,a){if(!e||/^(?:expires|max-age|path|domain|secure)$/i.test(e))return!1;var c="";if(o)switch(o.constructor){case Number:c=o===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+o;break;case String:c="; expires="+o;break;case Date:c="; expires="+o.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+c+(r?"; domain="+r:"")+(n?"; path="+n:"")+(a?"; secure":"")},removeItem:function(e,t,o){if(!e||!this.hasItem(e))return!1;document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(o?"; domain="+o:"")+(t?"; path="+t:"")},hasItem:function(e){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^]+)(?=;|$)|^\s*|\s*(?:[^;]*)?(?:|$)/g,"").split(/\s*(?:[^;]*)?;\s*/),t=0;t(void 0===n?16:n)||(o=0,-1?,.\/]/.test(e)&&o++,o(void 0===n?16:n)||(o=0,-1?,.\/]/.test(e)&&o++,o404 | 山奈Galanga - + -
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/README.html b/docs/README.html index deac8a3..cfe82cf 100644 --- a/docs/README.html +++ b/docs/README.html @@ -6,19 +6,19 @@ 提示 | 山奈Galanga - + - + -
Skip to content
On this page

提示

这是一个基于 VitePress 的文档站点。您也可以直接在这里浏览文档源文件。

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content
On this page

提示

这是一个基于 VitePress 的文档站点。您也可以直接在这里浏览文档源文件。

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/api/cookie.html b/docs/api/cookie.html index 82d7355..3e65448 100644 --- a/docs/api/cookie.html +++ b/docs/api/cookie.html @@ -6,28 +6,28 @@ Cookie | 山奈Galanga - + - - + + -
Skip to content
On this page

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/api/device.html b/docs/api/device.html new file mode 100644 index 0000000..5708b58 --- /dev/null +++ b/docs/api/device.html @@ -0,0 +1,27 @@ + + + + + + Device | 山奈Galanga + + + + + + + + + + + + +
Skip to content
On this page

Device

山奈提供了一些有关设备操作的API,可用来获取设备的信息,或者进行一些操作。

checkDeviceType()

介绍

检查当前设备的类型。

导入

js
import { checkDeviceType } from 'galanga'
+

使用

安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop

js
checkDeviceType()
+
js
galanga.checkDeviceType()
+

Released under Apache License 2.0 and package version 0.0.22

+ + + + \ No newline at end of file diff --git a/docs/api/index.html b/docs/api/index.html index 33b060f..c869ab7 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -6,19 +6,19 @@ 前言 | 山奈Galanga - + - + -
Skip to content
On this page

前言

在本站的API信息栏目中,您可以查看您所需要的API的详细信息。

请注意的是,在这里演示的所有API均以ES6的语法为基础,如果您使用的是其他类型的语法或者安装方法,您需要自行转换。

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content
On this page

前言

在本站的API信息栏目中,您可以查看您所需要的API的详细信息。

请注意的是,在这里演示的所有API均以ES6的语法为基础,如果您使用的是其他类型的语法或者安装方法,您需要自行转换。

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/api/string.html b/docs/api/string.html index ee3dc3a..3861569 100644 --- a/docs/api/string.html +++ b/docs/api/string.html @@ -6,24 +6,24 @@ String | 山奈Galanga - + - - + + -
Skip to content
On this page

String

山奈提供了一些字符串处理的函数,用于处理字符串。

checkNull

介绍

判断字符串是否为空,如果字符串为空,则返回 true,否则返回 false

导入

js
import { checkNull } from 'galanga'
-

使用

js
checkNull(name)
+    
Skip to content
On this page

String

山奈提供了一些字符串处理的函数,用于处理字符串。

checkNull

介绍

判断字符串是否为空,如果字符串为空,则返回 true,否则返回 false

导入

js
import { checkNull } from 'galanga'
+

使用

js
checkNull(name)
 
js
galanga.checkNull(name)
 

strLength

介绍

获取字符串的长度,如果字符串为空,则返回 0

导入

js
import { strLength } from 'galanga'
-

使用

js
strLength(name)
+

使用

js
strLength(name)
 
js
galanga.strLength(name)
 

formatBytes

介绍

将字节格式化为 BKBMBGBTBPBEBZBYB

导入

js
import { formatBytes } from 'galanga'
-

使用

输入参数:

  • bytes:字节数

  • 一个json对象(可选),有以下内容:

    • decimals:保留的小数位数,默认为1

    • from:输入的字节单位,默认为B

    • to:输出的字节单位

js
const json = {
+

使用

输入参数:

  • bytes:字节数

  • 一个json对象(可选),有以下内容:

    • decimals:保留的小数位数,默认为1

    • from:输入的字节单位,默认为B

    • to:输出的字节单位

js
const json = {
   decimals: 1,
   from: 'B',
   to: 'KB'
@@ -36,7 +36,7 @@
 }
 galanga.formatBytes(1024,json)
 

checkPassword

介绍

检查密码强度的函数,如果符合要求,则返回 true,否则返回 false

导入

js
import { checkPassword } from 'galanga'
-

使用

输入参数:

  • password:密码

  • 一个json对象(可选),有以下内容:

    • minLength:密码最小长度,默认为8

    • maxLength:密码最大长度,默认为16

    • types:字符类型,分别为数字、小写字母、大写字母、特殊字符,默认为['number', 'lowercase', 'uppercase', 'special'],

    • minTypes:最少包含的字符类型,默认为2

    • maxTypes:最多包含的字符类型,默认为4

js
const json = {
+

使用

输入参数:

  • password:密码

  • 一个json对象(可选),有以下内容:

    • minLength:密码最小长度,默认为8

    • maxLength:密码最大长度,默认为16

    • types:字符类型,分别为数字、小写字母、大写字母、特殊字符,默认为['number', 'lowercase', 'uppercase', 'special'],

    • minTypes:最少包含的字符类型,默认为2

    • maxTypes:最多包含的字符类型,默认为4

js
const json = {
   minLength: 8,
   maxLength: 16,
   types: ['number', 'lowercase', 'uppercase', 'special'],
@@ -53,11 +53,11 @@
 }
 galanga.checkPassword('12345678',json)
 

checkEmail

介绍

检查邮箱格式的函数,如果符合要求,则返回 true,否则返回 false

导入

js
import { checkEmail } from 'galanga'
-

使用

js
checkEmail('info@sancerain.com')
+

使用

js
checkEmail('info@sancerain.com')
 
js
galanga.checkEmail('info@sancerain.com')
-

Released under Apache License 2.0 and package version 0.0.21

- +

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/api/url.html b/docs/api/url.html index 14e5792..8a3a101 100644 --- a/docs/api/url.html +++ b/docs/api/url.html @@ -6,26 +6,26 @@ URL | 山奈Galanga - + - - + + -
Skip to content
On this page

URL

山奈提供了一些方便的方法来处理 URL。

url

介绍

url 是一个用于处理 URL 的函数,它提供了一些方便的方法来处理 URL。

导入

js
import { url } from 'galanga'
-

使用

获取URL的参数

获取 URL 参数的值,如果参数不存在,则返回 null

js
url.getQuery('name')
+    
Skip to content
On this page

URL

山奈提供了一些方便的方法来处理 URL。

url

介绍

url 是一个用于处理 URL 的函数,它提供了一些方便的方法来处理 URL。

导入

js
import { url } from 'galanga'
+

使用

获取URL的参数

获取 URL 参数的值,如果参数不存在,则返回 null

js
url.getQuery('name')
 
js
galanga.url.getQuery('name')
-

获取URL的hash

获取 URL 的 hash 值,如果 hash 不存在,则返回 null

js
url.getHash()
+

获取URL的hash

获取 URL 的 hash 值,如果 hash 不存在,则返回 null

js
url.getHash()
 
js
galanga.url.getHash()
-

获取URL的路径

获取 URL 的路径,如果路径不存在,则返回 null

js
url.getPath()
+

获取URL的路径

获取 URL 的路径,如果路径不存在,则返回 null

js
url.getPath()
 
js
galanga.url.getPath()
-

Released under Apache License 2.0 and package version 0.0.21

- +

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/assets/api_cookie.md.5f7e0040.js b/docs/assets/api_cookie.md.1c4ad4a1.js similarity index 86% rename from docs/assets/api_cookie.md.5f7e0040.js rename to docs/assets/api_cookie.md.1c4ad4a1.js index ef9b438..c86b4d3 100644 --- a/docs/assets/api_cookie.md.5f7e0040.js +++ b/docs/assets/api_cookie.md.1c4ad4a1.js @@ -1,10 +1,10 @@ -import{_ as a,o as s,c as o,U as e}from"./chunks/framework.fd4dbc48.js";const F=JSON.parse('{"title":"Cookie","description":"","frontmatter":{},"headers":[],"relativePath":"api/cookie.md","lastUpdated":1679483547000}'),l={name:"api/cookie.md"},n=e(`

Cookie

山奈提供了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。

localCookie

简介

localCookie 是一个对象,包含了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。

导入

js
import { localCookie } from 'galanga'
-

使用

获取 Cookie 的值,如果 Cookie 不存在,则返回 null

js
localCookie.getItem('name')
+import{_ as a,o as s,c as o,U as l}from"./chunks/framework.fd4dbc48.js";const F=JSON.parse('{"title":"Cookie","description":"","frontmatter":{},"headers":[],"relativePath":"api/cookie.md","lastUpdated":1679483547000}'),e={name:"api/cookie.md"},n=l(`

Cookie

山奈提供了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。

localCookie

简介

localCookie 是一个对象,包含了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。

导入

js
import { localCookie } from 'galanga'
+

使用

获取 Cookie 的值,如果 Cookie 不存在,则返回 null

js
localCookie.getItem('name')
 
js
galanga.localCookie.getItem('name')
-

设置 Cookie 的值,如果 Cookie 不存在,则创建 Cookie。

js
localCookie.setItem('name', 'value')
+

设置 Cookie 的值,如果 Cookie 不存在,则创建 Cookie。

js
localCookie.setItem('name', 'value')
 
js
galanga.localCookie.setItem('name', 'value')
-

删除 Cookie。

js
localCookie.removeItem('name')
+

删除 Cookie。

js
localCookie.removeItem('name')
 
js
galanga.localCookie.removeItem('name')
-

清空所有 Cookie。

js
localCookie.clear()
+

清空所有 Cookie。

js
localCookie.clear()
 
js
galanga.localCookie.clear()
-
`,20),p=[n];function t(c,i,r,d,C,D){return s(),o("div",null,p)}const A=a(l,[["render",t]]);export{F as __pageData,A as default}; +
`,20),p=[n];function t(c,i,r,d,C,y){return s(),o("div",null,p)}const A=a(e,[["render",t]]);export{F as __pageData,A as default}; diff --git a/docs/assets/api_cookie.md.1c4ad4a1.lean.js b/docs/assets/api_cookie.md.1c4ad4a1.lean.js new file mode 100644 index 0000000..990944b --- /dev/null +++ b/docs/assets/api_cookie.md.1c4ad4a1.lean.js @@ -0,0 +1 @@ +import{_ as a,o as s,c as o,U as l}from"./chunks/framework.fd4dbc48.js";const F=JSON.parse('{"title":"Cookie","description":"","frontmatter":{},"headers":[],"relativePath":"api/cookie.md","lastUpdated":1679483547000}'),e={name:"api/cookie.md"},n=l("",20),p=[n];function t(c,i,r,d,C,y){return s(),o("div",null,p)}const A=a(e,[["render",t]]);export{F as __pageData,A as default}; diff --git a/docs/assets/api_cookie.md.5f7e0040.lean.js b/docs/assets/api_cookie.md.5f7e0040.lean.js deleted file mode 100644 index b4e72e2..0000000 --- a/docs/assets/api_cookie.md.5f7e0040.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as s,c as o,U as e}from"./chunks/framework.fd4dbc48.js";const F=JSON.parse('{"title":"Cookie","description":"","frontmatter":{},"headers":[],"relativePath":"api/cookie.md","lastUpdated":1679483547000}'),l={name:"api/cookie.md"},n=e("",20),p=[n];function t(c,i,r,d,C,D){return s(),o("div",null,p)}const A=a(l,[["render",t]]);export{F as __pageData,A as default}; diff --git a/docs/assets/api_device.md.6585d07d.js b/docs/assets/api_device.md.6585d07d.js new file mode 100644 index 0000000..c92194b --- /dev/null +++ b/docs/assets/api_device.md.6585d07d.js @@ -0,0 +1,4 @@ +import{_ as a,o as e,c as s,U as n}from"./chunks/framework.fd4dbc48.js";const D=JSON.parse('{"title":"Device","description":"","frontmatter":{},"headers":[],"relativePath":"api/device.md","lastUpdated":null}'),l={name:"api/device.md"},t=n(`

Device

山奈提供了一些有关设备操作的API,可用来获取设备的信息,或者进行一些操作。

checkDeviceType()

介绍

检查当前设备的类型。

导入

js
import { checkDeviceType } from 'galanga'
+

使用

安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop

js
checkDeviceType()
+
js
galanga.checkDeviceType()
+
`,10),c=[t];function o(p,i,r,d,h,y){return e(),s("div",null,c)}const v=a(l,[["render",o]]);export{D as __pageData,v as default}; diff --git a/docs/assets/api_device.md.6585d07d.lean.js b/docs/assets/api_device.md.6585d07d.lean.js new file mode 100644 index 0000000..df1603c --- /dev/null +++ b/docs/assets/api_device.md.6585d07d.lean.js @@ -0,0 +1 @@ +import{_ as a,o as e,c as s,U as n}from"./chunks/framework.fd4dbc48.js";const D=JSON.parse('{"title":"Device","description":"","frontmatter":{},"headers":[],"relativePath":"api/device.md","lastUpdated":null}'),l={name:"api/device.md"},t=n("",10),c=[t];function o(p,i,r,d,h,y){return e(),s("div",null,c)}const v=a(l,[["render",o]]);export{D as __pageData,v as default}; diff --git a/docs/assets/api_string.md.a6aa527a.js b/docs/assets/api_string.md.1ed2f4ad.js similarity index 95% rename from docs/assets/api_string.md.a6aa527a.js rename to docs/assets/api_string.md.1ed2f4ad.js index abcc60f..ad49d97 100644 --- a/docs/assets/api_string.md.a6aa527a.js +++ b/docs/assets/api_string.md.1ed2f4ad.js @@ -1,11 +1,11 @@ import{_ as s,o as a,c as l,U as n}from"./chunks/framework.fd4dbc48.js";const C=JSON.parse('{"title":"String","description":"","frontmatter":{},"headers":[],"relativePath":"api/string.md","lastUpdated":1679483547000}'),o={name:"api/string.md"},p=n(`

String

山奈提供了一些字符串处理的函数,用于处理字符串。

checkNull

介绍

判断字符串是否为空,如果字符串为空,则返回 true,否则返回 false

导入

js
import { checkNull } from 'galanga'
-

使用

js
checkNull(name)
+

使用

js
checkNull(name)
 
js
galanga.checkNull(name)
 

strLength

介绍

获取字符串的长度,如果字符串为空,则返回 0

导入

js
import { strLength } from 'galanga'
-

使用

js
strLength(name)
+

使用

js
strLength(name)
 
js
galanga.strLength(name)
 

formatBytes

介绍

将字节格式化为 BKBMBGBTBPBEBZBYB

导入

js
import { formatBytes } from 'galanga'
-

使用

输入参数:

  • bytes:字节数

  • 一个json对象(可选),有以下内容:

    • decimals:保留的小数位数,默认为1

    • from:输入的字节单位,默认为B

    • to:输出的字节单位

js
const json = {
+

使用

输入参数:

  • bytes:字节数

  • 一个json对象(可选),有以下内容:

    • decimals:保留的小数位数,默认为1

    • from:输入的字节单位,默认为B

    • to:输出的字节单位

js
const json = {
   decimals: 1,
   from: 'B',
   to: 'KB'
@@ -18,7 +18,7 @@ import{_ as s,o as a,c as l,U as n}from"./chunks/framework.fd4dbc48.js";const C=
 }
 galanga.formatBytes(1024,json)
 

checkPassword

介绍

检查密码强度的函数,如果符合要求,则返回 true,否则返回 false

导入

js
import { checkPassword } from 'galanga'
-

使用

输入参数:

  • password:密码

  • 一个json对象(可选),有以下内容:

    • minLength:密码最小长度,默认为8

    • maxLength:密码最大长度,默认为16

    • types:字符类型,分别为数字、小写字母、大写字母、特殊字符,默认为['number', 'lowercase', 'uppercase', 'special'],

    • minTypes:最少包含的字符类型,默认为2

    • maxTypes:最多包含的字符类型,默认为4

js
const json = {
+

使用

输入参数:

  • password:密码

  • 一个json对象(可选),有以下内容:

    • minLength:密码最小长度,默认为8

    • maxLength:密码最大长度,默认为16

    • types:字符类型,分别为数字、小写字母、大写字母、特殊字符,默认为['number', 'lowercase', 'uppercase', 'special'],

    • minTypes:最少包含的字符类型,默认为2

    • maxTypes:最多包含的字符类型,默认为4

js
const json = {
   minLength: 8,
   maxLength: 16,
   types: ['number', 'lowercase', 'uppercase', 'special'],
@@ -35,6 +35,6 @@ import{_ as s,o as a,c as l,U as n}from"./chunks/framework.fd4dbc48.js";const C=
 }
 galanga.checkPassword('12345678',json)
 

checkEmail

介绍

检查邮箱格式的函数,如果符合要求,则返回 true,否则返回 false

导入

js
import { checkEmail } from 'galanga'
-

使用

js
checkEmail('info@sancerain.com')
+

使用

js
checkEmail('info@sancerain.com')
 
js
galanga.checkEmail('info@sancerain.com')
 
`,41),e=[p];function c(t,r,i,y,D,d){return a(),l("div",null,e)}const A=s(o,[["render",c]]);export{C as __pageData,A as default}; diff --git a/docs/assets/api_string.md.a6aa527a.lean.js b/docs/assets/api_string.md.1ed2f4ad.lean.js similarity index 100% rename from docs/assets/api_string.md.a6aa527a.lean.js rename to docs/assets/api_string.md.1ed2f4ad.lean.js diff --git a/docs/assets/api_url.md.9c04f055.js b/docs/assets/api_url.md.417e0b08.js similarity index 91% rename from docs/assets/api_url.md.9c04f055.js rename to docs/assets/api_url.md.417e0b08.js index a9f4c38..ff42be2 100644 --- a/docs/assets/api_url.md.9c04f055.js +++ b/docs/assets/api_url.md.417e0b08.js @@ -1,8 +1,8 @@ import{_ as a,o as s,c as l,U as e}from"./chunks/framework.fd4dbc48.js";const D=JSON.parse('{"title":"URL","description":"","frontmatter":{},"headers":[],"relativePath":"api/url.md","lastUpdated":1679483547000}'),n={name:"api/url.md"},o=e(`

URL

山奈提供了一些方便的方法来处理 URL。

url

介绍

url 是一个用于处理 URL 的函数,它提供了一些方便的方法来处理 URL。

导入

js
import { url } from 'galanga'
-

使用

获取URL的参数

获取 URL 参数的值,如果参数不存在,则返回 null

js
url.getQuery('name')
+

使用

获取URL的参数

获取 URL 参数的值,如果参数不存在,则返回 null

js
url.getQuery('name')
 
js
galanga.url.getQuery('name')
-

获取URL的hash

获取 URL 的 hash 值,如果 hash 不存在,则返回 null

js
url.getHash()
+

获取URL的hash

获取 URL 的 hash 值,如果 hash 不存在,则返回 null

js
url.getHash()
 
js
galanga.url.getHash()
-

获取URL的路径

获取 URL 的路径,如果路径不存在,则返回 null

js
url.getPath()
+

获取URL的路径

获取 URL 的路径,如果路径不存在,则返回 null

js
url.getPath()
 
js
galanga.url.getPath()
 
`,17),p=[o];function t(c,r,i,d,h,u){return s(),l("div",null,p)}const C=a(n,[["render",t]]);export{D as __pageData,C as default}; diff --git a/docs/assets/api_url.md.9c04f055.lean.js b/docs/assets/api_url.md.417e0b08.lean.js similarity index 100% rename from docs/assets/api_url.md.9c04f055.lean.js rename to docs/assets/api_url.md.417e0b08.lean.js diff --git a/docs/assets/app.48061d79.js b/docs/assets/app.ba2fac9d.js similarity index 95% rename from docs/assets/app.48061d79.js rename to docs/assets/app.ba2fac9d.js index ef7b803..791a7b2 100644 --- a/docs/assets/app.48061d79.js +++ b/docs/assets/app.ba2fac9d.js @@ -1 +1 @@ -import{d as p,O as s,a5 as i,u,h as c,l,a6 as d,a7 as f,a8 as m,a9 as h,aa as A,ab as g,ac as P,ad as v,ae as y,af as C,ag as w,ah as E,ai as _,E as b}from"./chunks/framework.fd4dbc48.js";import{t as R}from"./chunks/theme.590836bb.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(R),D=p({name:"VitePressApp",setup(){const{site:e}=u();return c(()=>{l(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),d(),f(),m(),n.setup&&n.setup(),()=>h(n.Layout)}});async function O(){const e=T(),a=S();a.provide(A,e);const t=g(e.route);return a.provide(P,t),a.component("Content",v),a.component("ClientOnly",y),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:C}),{app:a,router:e,data:t}}function S(){return w(D)}function T(){let e=s,a;return E(t=>{let o=_(t);return e&&(a=o),(e||a===o)&&(o=o.replace(/\.js$/,".lean.js")),s&&(e=!1),b(()=>import(o),[])},n.NotFound)}s&&O().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{O as createApp}; +import{d as p,O as s,a5 as i,u,h as c,l,a6 as d,a7 as f,a8 as m,a9 as h,aa as A,ab as g,ac as P,ad as v,ae as y,af as C,ag as w,ah as E,ai as _,E as b}from"./chunks/framework.fd4dbc48.js";import{t as R}from"./chunks/theme.262b2f72.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(R),D=p({name:"VitePressApp",setup(){const{site:e}=u();return c(()=>{l(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),d(),f(),m(),n.setup&&n.setup(),()=>h(n.Layout)}});async function O(){const e=T(),a=S();a.provide(A,e);const t=g(e.route);return a.provide(P,t),a.component("Content",v),a.component("ClientOnly",y),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:C}),{app:a,router:e,data:t}}function S(){return w(D)}function T(){let e=s,a;return E(t=>{let o=_(t);return e&&(a=o),(e||a===o)&&(o=o.replace(/\.js$/,".lean.js")),s&&(e=!1),b(()=>import(o),[])},n.NotFound)}s&&O().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{O as createApp}; diff --git a/docs/assets/chunks/theme.590836bb.js b/docs/assets/chunks/theme.262b2f72.js similarity index 99% rename from docs/assets/chunks/theme.590836bb.js rename to docs/assets/chunks/theme.262b2f72.js index 1272667..7e2bbd2 100644 --- a/docs/assets/chunks/theme.590836bb.js +++ b/docs/assets/chunks/theme.262b2f72.js @@ -1,4 +1,4 @@ -import{d as $,o as i,c as r,r as h,n as B,a as E,t as S,_ as m,u as it,b as l,e as V,f as L,g as wt,h as X,i as ct,j as Vt,k as St,w as ee,l as ae,m as Lt,P as Mt,p as ge,q as te,s as ce,v as Ie,x as u,F as T,y as x,z as v,T as Ce,A as y,B as ue,C as p,D as Q,E as It,G as Re,H as Ct,I as lt,J as Tt,K as H,L as Bt,M as J,N as rt,O as Nt,Q as At,R as U,S as W,U as zt,V as Ue,W as Te,X as de,Y as Ot,Z as Be,$ as Et,a0 as Ht,a1 as Dt,a2 as Ft,a3 as jt,a4 as Gt}from"./framework.fd4dbc48.js";const qt=$({__name:"VPBadge",props:{text:null,type:null},setup(e){return(t,n)=>(i(),r("span",{class:B(["VPBadge",e.type??"tip"])},[h(t.$slots,"default",{},()=>[E(S(e.text),1)],!0)],2))}});const Rt=m(qt,[["__scopeId","data-v-350d3852"]]),M=it;var We;const ut=typeof window<"u",Ut=e=>typeof e=="string",Wt=()=>{};ut&&((We=window==null?void 0:window.navigator)!=null&&We.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dt(e){return typeof e=="function"?e():l(e)}function Kt(e){return e}function _t(e){return Vt()?(St(e),!0):!1}function Qt(e){return typeof e=="function"?V(e):L(e)}function Yt(e,t=!0){wt()?X(e):t?e():ct(e)}function Xt(e){var t;const n=dt(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Ne=ut?window:void 0;function Jt(...e){let t,n,s,o;if(Ut(e[0])||Array.isArray(e[0])?([n,s,o]=e,t=Ne):[t,n,s,o]=e,!t)return Wt;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const a=[],c=()=>{a.forEach(b=>b()),a.length=0},d=(b,k,P,g)=>(b.addEventListener(k,P,g),()=>b.removeEventListener(k,P,g)),_=ee(()=>[Xt(t),dt(o)],([b,k])=>{c(),b&&a.push(...n.flatMap(P=>s.map(g=>d(b,P,g,k))))},{immediate:!0,flush:"post"}),f=()=>{_(),c()};return _t(f),f}function Zt(e,t=!1){const n=L(),s=()=>n.value=!!e();return s(),Yt(s,t),n}function Ve(e,t={}){const{window:n=Ne}=t,s=Zt(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const a=L(!1),c=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",d):o.removeListener(d))},d=()=>{s.value&&(c(),o=n.matchMedia(Qt(e).value),a.value=o.matches,"addEventListener"in o?o.addEventListener("change",d):o.addListener(d))};return ae(d),_t(()=>c()),a}const Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qe="__vueuse_ssr_handlers__";Ke[Qe]=Ke[Qe]||{};var Ye;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Ye||(Ye={}));var en=Object.defineProperty,Xe=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,Je=(e,t,n)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sn=(e,t)=>{for(var n in t||(t={}))tn.call(t,n)&&Je(e,n,t[n]);if(Xe)for(var n of Xe(t))nn.call(t,n)&&Je(e,n,t[n]);return e};const on={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};sn({linear:Kt},on);function an({window:e=Ne}={}){if(!e)return{x:L(0),y:L(0)};const t=L(e.scrollX),n=L(e.scrollY);return Jt(e,"scroll",()=>{t.value=e.scrollX,n.value=e.scrollY},{capture:!1,passive:!0}),{x:t,y:n}}function cn(e,t){let n,s=!1;return()=>{n&&clearTimeout(n),s?n=setTimeout(e,t):(e(),s=!0,setTimeout(()=>{s=!1},t))}}function Se(e){return/^\//.test(e)?e:`/${e}`}function ie(e){if(Lt(e))return e.replace(Mt,"");const{site:t}=M(),{pathname:n,search:s,hash:o}=new URL(e,"http://example.com"),a=n.endsWith("/")||n.endsWith(".html")?e:e.replace(/(?:(^\.+)\/)?.*$/,`$1${n.replace(/(\.md)?$/,t.value.cleanUrls?"":".html")}${s}${o}`);return ge(a)}function ht(e,t){if(Array.isArray(e))return e;if(e==null)return[];t=Se(t);const n=Object.keys(e).sort((s,o)=>o.split("/").length-s.split("/").length).find(s=>t.startsWith(Se(s)));return n?e[n]:[]}function ln(e){const t=[];let n=0;for(const s in e){const o=e[s];if(o.items){n=t.push(o);continue}t[n]||t.push({items:[]}),t[n].items.push(o)}return t}function rn(e){const t=[];function n(s){for(const o of s)o.text&&o.link&&t.push({text:o.text,link:o.link}),o.items&&n(o.items)}return n(e),t}function Le(e,t){return Array.isArray(t)?t.some(n=>Le(e,n)):te(e,t.link)?!0:t.items?Le(e,t.items):!1}function K(){const e=ce(),{theme:t,frontmatter:n}=M(),s=Ve("(min-width: 960px)"),o=L(!1),a=V(()=>{const g=t.value.sidebar,w=e.data.relativePath;return g?ht(g,w):[]}),c=V(()=>n.value.sidebar!==!1&&a.value.length>0&&n.value.layout!=="home"),d=V(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),_=V(()=>c.value&&s.value),f=V(()=>c.value?ln(a.value):[]);function b(){o.value=!0}function k(){o.value=!1}function P(){o.value?k():b()}return{isOpen:o,sidebar:a,sidebarGroups:f,hasSidebar:c,hasAside:d,isSidebarEnabled:_,open:b,close:k,toggle:P}}function un(e,t){let n;ae(()=>{n=e.value?document.activeElement:void 0}),X(()=>{window.addEventListener("keyup",s)}),Ie(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&e.value&&(t(),n==null||n.focus())}}function dn(e){const{page:t}=M(),n=L(!1),s=V(()=>e.value.collapsed!=null),o=V(()=>!!e.value.link),a=V(()=>te(t.value.relativePath,e.value.link)),c=V(()=>a.value?!0:e.value.items?Le(t.value.relativePath,e.value.items):!1),d=V(()=>!!(e.value.items&&e.value.items.length));ae(()=>{n.value=!!(s.value&&e.value.collapsed)}),ae(()=>{(a.value||c.value)&&(n.value=!1)});function _(){s.value&&(n.value=!n.value)}return{collapsed:n,collapsible:s,isLink:o,isActiveLink:a,hasActiveLink:c,hasChildren:d,toggle:_}}const _n=$({__name:"VPSkipLink",setup(e){const t=ce(),n=L();ee(()=>t.path,()=>n.value.focus());function s({target:o}){const a=document.querySelector(o.hash);if(a){const c=()=>{a.removeAttribute("tabindex"),a.removeEventListener("blur",c)};a.setAttribute("tabindex","-1"),a.addEventListener("blur",c),a.focus(),window.scrollTo(0,0)}}return(o,a)=>(i(),r(T,null,[u("span",{ref_key:"backToTop",ref:n,tabindex:"-1"},null,512),u("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}});const hn=m(_n,[["__scopeId","data-v-151f2593"]]),vn={key:0,class:"VPBackdrop"},fn=$({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(e){return(t,n)=>(i(),x(Ce,{name:"fade"},{default:v(()=>[e.show?(i(),r("div",vn)):y("",!0)]),_:1}))}});const pn=m(fn,[["__scopeId","data-v-c79a1216"]]);function mn(){const e=L(!1);function t(){e.value=!0,window.addEventListener("resize",o)}function n(){e.value=!1,window.removeEventListener("resize",o)}function s(){e.value?n():t()}function o(){window.outerWidth>=768&&n()}const a=ce();return ee(()=>a.path,n),{isScreenOpen:e,openScreen:t,closeScreen:n,toggleScreen:s}}function le({removeCurrent:e=!0,correspondingLink:t=!1}={}){const{site:n,localeIndex:s,page:o,theme:a}=M(),c=V(()=>{var _,f;return{label:(_=n.value.locales[s.value])==null?void 0:_.label,link:((f=n.value.locales[s.value])==null?void 0:f.link)||(s.value==="root"?"/":`/${s.value}/`)}});return{localeLinks:V(()=>Object.entries(n.value.locales).flatMap(([_,f])=>e&&c.value.label===f.label?[]:{text:f.label,link:gn(f.link||(_==="root"?"/":`/${_}/`),a.value.i18nRouting!==!1&&t,o.value.relativePath.slice(c.value.link.length-1),!n.value.cleanUrls)})),currentLang:c}}function gn(e,t,n,s){return t?e.replace(/\/$/,"")+Se(n.replace(/(^|\/)?index.md$/,"$1").replace(/\.md$/,s?".html":"")):e}const yn=["src","alt"],bn={inheritAttrs:!1},kn=$({...bn,__name:"VPImage",props:{image:null,alt:null},setup(e){return(t,n)=>{const s=Q("VPImage",!0);return e.image?(i(),r(T,{key:0},[typeof e.image=="string"||"src"in e.image?(i(),r("img",ue({key:0,class:"VPImage"},typeof e.image=="string"?t.$attrs:{...e.image,...t.$attrs},{src:l(ge)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,yn)):(i(),r(T,{key:1},[p(s,ue({class:"dark",image:e.image.dark,alt:e.image.alt},t.$attrs),null,16,["image","alt"]),p(s,ue({class:"light",image:e.image.light,alt:e.image.alt},t.$attrs),null,16,["image","alt"])],64))],64)):y("",!0)}}});const Ae=m(kn,[["__scopeId","data-v-6db2186b"]]),$n=["href"],Pn=$({__name:"VPNavBarTitle",setup(e){const{site:t,theme:n}=M(),{hasSidebar:s}=K(),{currentLang:o}=le();return(a,c)=>(i(),r("div",{class:B(["VPNavBarTitle",{"has-sidebar":l(s)}])},[u("a",{class:"title",href:l(ie)(l(o).link)},[h(a.$slots,"nav-bar-title-before",{},void 0,!0),l(n).logo?(i(),x(Ae,{key:0,class:"logo",image:l(n).logo},null,8,["image"])):y("",!0),l(n).siteTitle?(i(),r(T,{key:1},[E(S(l(n).siteTitle),1)],64)):l(n).siteTitle===void 0?(i(),r(T,{key:2},[E(S(l(t).title),1)],64)):y("",!0),h(a.$slots,"nav-bar-title-after",{},void 0,!0)],8,$n)],2))}});const xn=m(Pn,[["__scopeId","data-v-6d2fb2d9"]]),wn="/assets/flex-logo.2489261b.svg";function Pe(e,t){return typeof e>"u"?t:e}function Ze(e){const t=Array(e);for(let n=0;n=this.minlength&&(d||!c[b])){let P=re(_,o,f),g="";switch(this.tokenize){case"full":if(3w;N--)if(N-w>=this.minlength){const A=re(_,o,f,k,w);g=b.substring(w,N),this.push_index(c,g,A,e,n)}break}case"reverse":if(2=this.minlength){const N=re(_,o,f,k,w);this.push_index(c,g,N,e,n)}g=""}case"forward":if(1=this.minlength&&this.push_index(c,g,P,e,n);break}default:if(this.boost&&(P=Math.min(0|P/this.boost(t,b,f),_-1)),this.push_index(c,b,P,e,n),d&&1=this.minlength&&!w[b]){w[b]=1;const I=re(N+(o/2>N?0:1),o,f,O-1,C-1),z=this.bidirectional&&b>A;this.push_index(a,z?A:b,I,e,n,z?b:A)}}}}}this.fastupdate||(this.register[e]=1)}}return this};function re(e,t,n,s,o){return n&&1=this.minlength&&!k[g]){if(!this.optimize&&!a&&!this.map[g])return c;P[N++]=g,k[g]=1}e=P,s=e.length}if(!s)return c;t||(t=100);let _,f=this.depth&&1=n)))));g++);if(f)return o?nt(d,n,0):void(e[e.length]=d)}return!t&&d};function nt(e,t,n){return e=e.length===1?e[0]:Sn(e),n||e.length>t?e.slice(n,n+t):e}function st(e,t,n,s){if(n){const o=s&&t>n;e=e[o?t:n],e=e&&e[o?n:t]}else e=e[t];return e}F.prototype.contain=function(e){return!!this.register[e]},F.prototype.update=function(e,t){return this.remove(e).add(e,t)},F.prototype.remove=function(e,t){const n=this.register[e];if(n){if(this.fastupdate)for(let s,o=0;o{if(a.value){for(var C=k.value.search(a.value,{enrich:!0}),I=[],z=0;z!C||!C.length?[]:C.reduce((z,D)=>(z[I(D)]||(z[I(D)]=[]),z[I(D)].push(D),z),{}),A=()=>{setTimeout(()=>{d.value&&d.value.focus()},100),O(),o.value=!0};X(async()=>{var D,G;const C=await It(()=>import("./virtual_search-data.8ba04493.js"),[]);_.value=C.default.INDEX_DATA,f.value=C.default.PREVIEW_LOOKUP,b.value=C.default.Options,c.value=window.location.origin+ge(n.value==="root"?"/":n.value),P.value=((D=b.value)==null?void 0:D.buttonLabel)||P.value,g.value=((G=b.value)==null?void 0:G.placeholder)||g.value;var I=new F(b.value);I.import("reg",_.value.reg),I.import("cfg",_.value.cfg),I.import("map",_.value.map),I.import("ctx",_.value.ctx),k.value=I,s.value.innerHTML=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl";const z=q=>{q.key==="k"&&(q.ctrlKey||q.metaKey)&&(q.preventDefault(),A())};window.addEventListener("keydown",z)});function O(){o.value=!1,a.value=""}return(C,I)=>{const z=Q("ClientOnly");return i(),r("div",Wn,[p(z,null,{default:v(()=>[(i(),x(Bt,{to:"body"},[Re(u("div",{class:"modal-back",onClick:I[2]||(I[2]=D=>o.value=!1)},[u("div",{class:"modal",onClick:I[1]||(I[1]=lt(()=>{},["stop"]))},[u("form",Kn,[Qn,Re(u("input",{class:"DocSearch-Input","aria-autocomplete":"both","aria-labelledby":"docsearch-label",id:"docsearch-input",autocomplete:"off",autocorrect:"off",autocapitalize:"off",enterkeyhint:"search",spellcheck:"false",autofocus:"true","onUpdate:modelValue":I[0]||(I[0]=D=>a.value=D),placeholder:g.value,maxlength:"64",type:"search",ref_key:"input",ref:d},null,8,Yn),[[Tt,a.value]])]),u("div",Xn,[(i(!0),r(T,null,H(N(l(w),D=>D.link.split("/").slice(0,-1).join("-")),(D,G)=>(i(),r("div",{key:G},[u("span",Jn,S(G?G.toString()[0].toUpperCase()+G.toString().slice(1):"Home"),1),(i(!0),r(T,null,H(D,q=>(i(),r("a",{href:c.value+q.link,key:q.id,onClick:O},[u("div",es,[u("span",ts,S(q.link.includes("#")?"#":"▤"),1),u("div",ns,[u("h3",null,S(q.title),1),u("p",null,[u("div",{innerHTML:q.preview},null,8,ss)])]),os])],8,Zn))),128))]))),128))]),as])],512),[[Ct,o.value]])]))]),_:1}),u("div",{id:"docsearch",onClick:I[3]||(I[3]=D=>A())},[u("button",is,[u("span",cs,[ls,u("span",rs,S(P.value),1)]),u("span",us,[u("span",{class:"DocSearch-Button-Key",ref_key:"metaKey",ref:s},"Meta",512),ds])])])])}}});const hs={},vs={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",height:"24px",viewBox:"0 0 24 24",width:"24px"},fs=u("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),ps=u("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"},null,-1),ms=[fs,ps];function gs(e,t){return i(),r("svg",vs,ms)}const ys=m(hs,[["render",gs]]),bs=$({__name:"VPLink",props:{tag:null,href:null,noIcon:{type:Boolean},target:null,rel:null},setup(e){const t=e,n=V(()=>t.tag??t.href?"a":"span"),s=V(()=>t.href&&rt.test(t.href));return(o,a)=>(i(),x(J(l(n)),{class:B(["VPLink",{link:e.href}]),href:e.href?l(ie)(e.href):void 0,target:e.target||(l(s)?"_blank":void 0),rel:e.rel||(l(s)?"noreferrer":void 0)},{default:v(()=>[h(o.$slots,"default",{},void 0,!0),l(s)&&!e.noIcon?(i(),x(ys,{key:0,class:"icon"})):y("",!0)]),_:3},8,["class","href","target","rel"]))}});const R=m(bs,[["__scopeId","data-v-a8b5c975"]]),ks=$({__name:"VPNavBarMenuLink",props:{item:null},setup(e){const{page:t}=M();return(n,s)=>(i(),x(R,{class:B({VPNavBarMenuLink:!0,active:l(te)(l(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel,tabindex:"0"},{default:v(()=>[E(S(e.item.text),1)]),_:1},8,["class","href","target","rel"]))}});const $s=m(ks,[["__scopeId","data-v-bbf845a0"]]),ze=L();let vt=!1,we=0;function Ps(e){const t=L(!1);if(Nt){!vt&&xs(),we++;const n=ee(ze,s=>{var o,a,c;s===e.el.value||(o=e.el.value)!=null&&o.contains(s)?(t.value=!0,(a=e.onFocus)==null||a.call(e)):(t.value=!1,(c=e.onBlur)==null||c.call(e))});Ie(()=>{n(),we--,we||ws()})}return At(t)}function xs(){document.addEventListener("focusin",ft),vt=!0,ze.value=document.activeElement}function ws(){document.removeEventListener("focusin",ft)}function ft(){ze.value=document.activeElement}const Vs={},Ss={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Ls=u("path",{d:"M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"},null,-1),Ms=[Ls];function Is(e,t){return i(),r("svg",Ss,Ms)}const pt=m(Vs,[["render",Is]]),Cs={},Ts={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Bs=u("circle",{cx:"12",cy:"12",r:"2"},null,-1),Ns=u("circle",{cx:"19",cy:"12",r:"2"},null,-1),As=u("circle",{cx:"5",cy:"12",r:"2"},null,-1),zs=[Bs,Ns,As];function Os(e,t){return i(),r("svg",Ts,zs)}const Es=m(Cs,[["render",Os]]),Hs={class:"VPMenuLink"},Ds=$({__name:"VPMenuLink",props:{item:null},setup(e){const{page:t}=M();return(n,s)=>(i(),r("div",Hs,[p(R,{class:B({active:l(te)(l(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel},{default:v(()=>[E(S(e.item.text),1)]),_:1},8,["class","href","target","rel"])]))}});const ye=m(Ds,[["__scopeId","data-v-88f937c6"]]),Fs={class:"VPMenuGroup"},js={key:0,class:"title"},Gs=$({__name:"VPMenuGroup",props:{text:null,items:null},setup(e){return(t,n)=>(i(),r("div",Fs,[e.text?(i(),r("p",js,S(e.text),1)):y("",!0),(i(!0),r(T,null,H(e.items,s=>(i(),r(T,null,["link"in s?(i(),x(ye,{key:0,item:s},null,8,["item"])):y("",!0)],64))),256))]))}});const qs=m(Gs,[["__scopeId","data-v-69e747b5"]]),Rs={class:"VPMenu"},Us={key:0,class:"items"},Ws=$({__name:"VPMenu",props:{items:null},setup(e){return(t,n)=>(i(),r("div",Rs,[e.items?(i(),r("div",Us,[(i(!0),r(T,null,H(e.items,s=>(i(),r(T,{key:s.text},["link"in s?(i(),x(ye,{key:0,item:s},null,8,["item"])):(i(),x(qs,{key:1,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):y("",!0),h(t.$slots,"default",{},void 0,!0)]))}});const Ks=m(Ws,[["__scopeId","data-v-e7ea1737"]]),Qs=["aria-expanded","aria-label"],Ys={key:0,class:"text"},Xs={class:"menu"},Js=$({__name:"VPFlyout",props:{icon:null,button:null,label:null,items:null},setup(e){const t=L(!1),n=L();Ps({el:n,onBlur:s});function s(){t.value=!1}return(o,a)=>(i(),r("div",{class:"VPFlyout",ref_key:"el",ref:n,onMouseenter:a[1]||(a[1]=c=>t.value=!0),onMouseleave:a[2]||(a[2]=c=>t.value=!1)},[u("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":t.value,"aria-label":e.label,onClick:a[0]||(a[0]=c=>t.value=!t.value)},[e.button||e.icon?(i(),r("span",Ys,[e.icon?(i(),x(J(e.icon),{key:0,class:"option-icon"})):y("",!0),E(" "+S(e.button)+" ",1),p(pt,{class:"text-icon"})])):(i(),x(Es,{key:1,class:"icon"}))],8,Qs),u("div",Xs,[p(Ks,{items:e.items},{default:v(()=>[h(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}});const Oe=m(Js,[["__scopeId","data-v-96001b6b"]]),Zs=$({__name:"VPNavBarMenuGroup",props:{item:null},setup(e){const{page:t}=M();return(n,s)=>(i(),x(Oe,{class:B({VPNavBarMenuGroup:!0,active:l(te)(l(t).relativePath,e.item.activeMatch,!!e.item.activeMatch)}),button:e.item.text,items:e.item.items},null,8,["class","button","items"]))}}),eo=e=>(U("data-v-bdedfc22"),e=e(),W(),e),to={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},no=eo(()=>u("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),so=$({__name:"VPNavBarMenu",setup(e){const{theme:t}=M();return(n,s)=>l(t).nav?(i(),r("nav",to,[no,(i(!0),r(T,null,H(l(t).nav,o=>(i(),r(T,{key:o.text},["link"in o?(i(),x($s,{key:0,item:o},null,8,["item"])):(i(),x(Zs,{key:1,item:o},null,8,["item"]))],64))),128))])):y("",!0)}});const oo=m(so,[["__scopeId","data-v-bdedfc22"]]),ao={},io={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},co=u("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1),lo=u("path",{d:" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z ",class:"css-c4d79v"},null,-1),ro=[co,lo];function uo(e,t){return i(),r("svg",io,ro)}const mt=m(ao,[["render",uo]]),_o={class:"items"},ho={class:"title"},vo=$({__name:"VPNavBarTranslations",setup(e){const{theme:t}=M(),{localeLinks:n,currentLang:s}=le({correspondingLink:!0});return(o,a)=>l(n).length&&l(s).label?(i(),x(Oe,{key:0,class:"VPNavBarTranslations",icon:mt,label:l(t).langMenuLabel||"Change language"},{default:v(()=>[u("div",_o,[u("p",ho,S(l(s).label),1),(i(!0),r(T,null,H(l(n),c=>(i(),x(ye,{key:c.link,item:c},null,8,["item"]))),128))])]),_:1},8,["label"])):y("",!0)}});const fo=m(vo,[["__scopeId","data-v-b009e5cf"]]);const po={},mo={class:"VPSwitch",type:"button",role:"switch"},go={class:"check"},yo={key:0,class:"icon"};function bo(e,t){return i(),r("button",mo,[u("span",go,[e.$slots.default?(i(),r("span",yo,[h(e.$slots,"default",{},void 0,!0)])):y("",!0)])])}const ko=m(po,[["render",bo],["__scopeId","data-v-f3c41672"]]),$o={},Po={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},xo=zt('',9),wo=[xo];function Vo(e,t){return i(),r("svg",Po,wo)}const So=m($o,[["render",Vo]]),Lo={},Mo={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Io=u("path",{d:"M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"},null,-1),Co=[Io];function To(e,t){return i(),r("svg",Mo,Co)}const Bo=m(Lo,[["render",To]]),No={title:"toggle dark mode"},Ao=$({__name:"VPSwitchAppearance",setup(e){const{site:t,isDark:n}=M(),s=L(!1),o=typeof localStorage<"u"?a():()=>{};X(()=>{s.value=document.documentElement.classList.contains("dark")});function a(){const c=window.matchMedia("(prefers-color-scheme: dark)"),d=document.documentElement.classList;let _=localStorage.getItem(Ue),f=t.value.appearance==="dark"&&_==null||(_==="auto"||_==null?c.matches:_==="dark");c.onchange=P=>{_==="auto"&&k(f=P.matches)};function b(){k(f=!f),_=f?c.matches?"auto":"dark":c.matches?"light":"auto",localStorage.setItem(Ue,_)}function k(P){const g=document.createElement("style");g.type="text/css",g.appendChild(document.createTextNode(`:not(.VPSwitchAppearance):not(.VPSwitchAppearance *) { +import{d as $,o as i,c as r,r as h,n as B,a as E,t as S,_ as m,u as it,b as l,e as V,f as L,g as wt,h as X,i as ct,j as Vt,k as St,w as ee,l as ae,m as Lt,P as Mt,p as ge,q as te,s as ce,v as Ie,x as u,F as T,y as x,z as v,T as Ce,A as y,B as ue,C as p,D as Q,E as It,G as Re,H as Ct,I as lt,J as Tt,K as H,L as Bt,M as J,N as rt,O as Nt,Q as At,R as U,S as W,U as zt,V as Ue,W as Te,X as de,Y as Ot,Z as Be,$ as Et,a0 as Ht,a1 as Dt,a2 as Ft,a3 as jt,a4 as Gt}from"./framework.fd4dbc48.js";const qt=$({__name:"VPBadge",props:{text:null,type:null},setup(e){return(t,n)=>(i(),r("span",{class:B(["VPBadge",e.type??"tip"])},[h(t.$slots,"default",{},()=>[E(S(e.text),1)],!0)],2))}});const Rt=m(qt,[["__scopeId","data-v-350d3852"]]),M=it;var We;const ut=typeof window<"u",Ut=e=>typeof e=="string",Wt=()=>{};ut&&((We=window==null?void 0:window.navigator)!=null&&We.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dt(e){return typeof e=="function"?e():l(e)}function Kt(e){return e}function _t(e){return Vt()?(St(e),!0):!1}function Qt(e){return typeof e=="function"?V(e):L(e)}function Yt(e,t=!0){wt()?X(e):t?e():ct(e)}function Xt(e){var t;const n=dt(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Ne=ut?window:void 0;function Jt(...e){let t,n,s,o;if(Ut(e[0])||Array.isArray(e[0])?([n,s,o]=e,t=Ne):[t,n,s,o]=e,!t)return Wt;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const a=[],c=()=>{a.forEach(b=>b()),a.length=0},d=(b,k,P,g)=>(b.addEventListener(k,P,g),()=>b.removeEventListener(k,P,g)),_=ee(()=>[Xt(t),dt(o)],([b,k])=>{c(),b&&a.push(...n.flatMap(P=>s.map(g=>d(b,P,g,k))))},{immediate:!0,flush:"post"}),f=()=>{_(),c()};return _t(f),f}function Zt(e,t=!1){const n=L(),s=()=>n.value=!!e();return s(),Yt(s,t),n}function Ve(e,t={}){const{window:n=Ne}=t,s=Zt(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const a=L(!1),c=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",d):o.removeListener(d))},d=()=>{s.value&&(c(),o=n.matchMedia(Qt(e).value),a.value=o.matches,"addEventListener"in o?o.addEventListener("change",d):o.addListener(d))};return ae(d),_t(()=>c()),a}const Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qe="__vueuse_ssr_handlers__";Ke[Qe]=Ke[Qe]||{};var Ye;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Ye||(Ye={}));var en=Object.defineProperty,Xe=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,Je=(e,t,n)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sn=(e,t)=>{for(var n in t||(t={}))tn.call(t,n)&&Je(e,n,t[n]);if(Xe)for(var n of Xe(t))nn.call(t,n)&&Je(e,n,t[n]);return e};const on={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};sn({linear:Kt},on);function an({window:e=Ne}={}){if(!e)return{x:L(0),y:L(0)};const t=L(e.scrollX),n=L(e.scrollY);return Jt(e,"scroll",()=>{t.value=e.scrollX,n.value=e.scrollY},{capture:!1,passive:!0}),{x:t,y:n}}function cn(e,t){let n,s=!1;return()=>{n&&clearTimeout(n),s?n=setTimeout(e,t):(e(),s=!0,setTimeout(()=>{s=!1},t))}}function Se(e){return/^\//.test(e)?e:`/${e}`}function ie(e){if(Lt(e))return e.replace(Mt,"");const{site:t}=M(),{pathname:n,search:s,hash:o}=new URL(e,"http://example.com"),a=n.endsWith("/")||n.endsWith(".html")?e:e.replace(/(?:(^\.+)\/)?.*$/,`$1${n.replace(/(\.md)?$/,t.value.cleanUrls?"":".html")}${s}${o}`);return ge(a)}function ht(e,t){if(Array.isArray(e))return e;if(e==null)return[];t=Se(t);const n=Object.keys(e).sort((s,o)=>o.split("/").length-s.split("/").length).find(s=>t.startsWith(Se(s)));return n?e[n]:[]}function ln(e){const t=[];let n=0;for(const s in e){const o=e[s];if(o.items){n=t.push(o);continue}t[n]||t.push({items:[]}),t[n].items.push(o)}return t}function rn(e){const t=[];function n(s){for(const o of s)o.text&&o.link&&t.push({text:o.text,link:o.link}),o.items&&n(o.items)}return n(e),t}function Le(e,t){return Array.isArray(t)?t.some(n=>Le(e,n)):te(e,t.link)?!0:t.items?Le(e,t.items):!1}function K(){const e=ce(),{theme:t,frontmatter:n}=M(),s=Ve("(min-width: 960px)"),o=L(!1),a=V(()=>{const g=t.value.sidebar,w=e.data.relativePath;return g?ht(g,w):[]}),c=V(()=>n.value.sidebar!==!1&&a.value.length>0&&n.value.layout!=="home"),d=V(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),_=V(()=>c.value&&s.value),f=V(()=>c.value?ln(a.value):[]);function b(){o.value=!0}function k(){o.value=!1}function P(){o.value?k():b()}return{isOpen:o,sidebar:a,sidebarGroups:f,hasSidebar:c,hasAside:d,isSidebarEnabled:_,open:b,close:k,toggle:P}}function un(e,t){let n;ae(()=>{n=e.value?document.activeElement:void 0}),X(()=>{window.addEventListener("keyup",s)}),Ie(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&e.value&&(t(),n==null||n.focus())}}function dn(e){const{page:t}=M(),n=L(!1),s=V(()=>e.value.collapsed!=null),o=V(()=>!!e.value.link),a=V(()=>te(t.value.relativePath,e.value.link)),c=V(()=>a.value?!0:e.value.items?Le(t.value.relativePath,e.value.items):!1),d=V(()=>!!(e.value.items&&e.value.items.length));ae(()=>{n.value=!!(s.value&&e.value.collapsed)}),ae(()=>{(a.value||c.value)&&(n.value=!1)});function _(){s.value&&(n.value=!n.value)}return{collapsed:n,collapsible:s,isLink:o,isActiveLink:a,hasActiveLink:c,hasChildren:d,toggle:_}}const _n=$({__name:"VPSkipLink",setup(e){const t=ce(),n=L();ee(()=>t.path,()=>n.value.focus());function s({target:o}){const a=document.querySelector(o.hash);if(a){const c=()=>{a.removeAttribute("tabindex"),a.removeEventListener("blur",c)};a.setAttribute("tabindex","-1"),a.addEventListener("blur",c),a.focus(),window.scrollTo(0,0)}}return(o,a)=>(i(),r(T,null,[u("span",{ref_key:"backToTop",ref:n,tabindex:"-1"},null,512),u("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}});const hn=m(_n,[["__scopeId","data-v-151f2593"]]),vn={key:0,class:"VPBackdrop"},fn=$({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(e){return(t,n)=>(i(),x(Ce,{name:"fade"},{default:v(()=>[e.show?(i(),r("div",vn)):y("",!0)]),_:1}))}});const pn=m(fn,[["__scopeId","data-v-c79a1216"]]);function mn(){const e=L(!1);function t(){e.value=!0,window.addEventListener("resize",o)}function n(){e.value=!1,window.removeEventListener("resize",o)}function s(){e.value?n():t()}function o(){window.outerWidth>=768&&n()}const a=ce();return ee(()=>a.path,n),{isScreenOpen:e,openScreen:t,closeScreen:n,toggleScreen:s}}function le({removeCurrent:e=!0,correspondingLink:t=!1}={}){const{site:n,localeIndex:s,page:o,theme:a}=M(),c=V(()=>{var _,f;return{label:(_=n.value.locales[s.value])==null?void 0:_.label,link:((f=n.value.locales[s.value])==null?void 0:f.link)||(s.value==="root"?"/":`/${s.value}/`)}});return{localeLinks:V(()=>Object.entries(n.value.locales).flatMap(([_,f])=>e&&c.value.label===f.label?[]:{text:f.label,link:gn(f.link||(_==="root"?"/":`/${_}/`),a.value.i18nRouting!==!1&&t,o.value.relativePath.slice(c.value.link.length-1),!n.value.cleanUrls)})),currentLang:c}}function gn(e,t,n,s){return t?e.replace(/\/$/,"")+Se(n.replace(/(^|\/)?index.md$/,"$1").replace(/\.md$/,s?".html":"")):e}const yn=["src","alt"],bn={inheritAttrs:!1},kn=$({...bn,__name:"VPImage",props:{image:null,alt:null},setup(e){return(t,n)=>{const s=Q("VPImage",!0);return e.image?(i(),r(T,{key:0},[typeof e.image=="string"||"src"in e.image?(i(),r("img",ue({key:0,class:"VPImage"},typeof e.image=="string"?t.$attrs:{...e.image,...t.$attrs},{src:l(ge)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,yn)):(i(),r(T,{key:1},[p(s,ue({class:"dark",image:e.image.dark,alt:e.image.alt},t.$attrs),null,16,["image","alt"]),p(s,ue({class:"light",image:e.image.light,alt:e.image.alt},t.$attrs),null,16,["image","alt"])],64))],64)):y("",!0)}}});const Ae=m(kn,[["__scopeId","data-v-6db2186b"]]),$n=["href"],Pn=$({__name:"VPNavBarTitle",setup(e){const{site:t,theme:n}=M(),{hasSidebar:s}=K(),{currentLang:o}=le();return(a,c)=>(i(),r("div",{class:B(["VPNavBarTitle",{"has-sidebar":l(s)}])},[u("a",{class:"title",href:l(ie)(l(o).link)},[h(a.$slots,"nav-bar-title-before",{},void 0,!0),l(n).logo?(i(),x(Ae,{key:0,class:"logo",image:l(n).logo},null,8,["image"])):y("",!0),l(n).siteTitle?(i(),r(T,{key:1},[E(S(l(n).siteTitle),1)],64)):l(n).siteTitle===void 0?(i(),r(T,{key:2},[E(S(l(t).title),1)],64)):y("",!0),h(a.$slots,"nav-bar-title-after",{},void 0,!0)],8,$n)],2))}});const xn=m(Pn,[["__scopeId","data-v-6d2fb2d9"]]),wn="/assets/flex-logo.2489261b.svg";function Pe(e,t){return typeof e>"u"?t:e}function Ze(e){const t=Array(e);for(let n=0;n=this.minlength&&(d||!c[b])){let P=re(_,o,f),g="";switch(this.tokenize){case"full":if(3w;N--)if(N-w>=this.minlength){const A=re(_,o,f,k,w);g=b.substring(w,N),this.push_index(c,g,A,e,n)}break}case"reverse":if(2=this.minlength){const N=re(_,o,f,k,w);this.push_index(c,g,N,e,n)}g=""}case"forward":if(1=this.minlength&&this.push_index(c,g,P,e,n);break}default:if(this.boost&&(P=Math.min(0|P/this.boost(t,b,f),_-1)),this.push_index(c,b,P,e,n),d&&1=this.minlength&&!w[b]){w[b]=1;const I=re(N+(o/2>N?0:1),o,f,O-1,C-1),z=this.bidirectional&&b>A;this.push_index(a,z?A:b,I,e,n,z?b:A)}}}}}this.fastupdate||(this.register[e]=1)}}return this};function re(e,t,n,s,o){return n&&1=this.minlength&&!k[g]){if(!this.optimize&&!a&&!this.map[g])return c;P[N++]=g,k[g]=1}e=P,s=e.length}if(!s)return c;t||(t=100);let _,f=this.depth&&1=n)))));g++);if(f)return o?nt(d,n,0):void(e[e.length]=d)}return!t&&d};function nt(e,t,n){return e=e.length===1?e[0]:Sn(e),n||e.length>t?e.slice(n,n+t):e}function st(e,t,n,s){if(n){const o=s&&t>n;e=e[o?t:n],e=e&&e[o?n:t]}else e=e[t];return e}F.prototype.contain=function(e){return!!this.register[e]},F.prototype.update=function(e,t){return this.remove(e).add(e,t)},F.prototype.remove=function(e,t){const n=this.register[e];if(n){if(this.fastupdate)for(let s,o=0;o{if(a.value){for(var C=k.value.search(a.value,{enrich:!0}),I=[],z=0;z!C||!C.length?[]:C.reduce((z,D)=>(z[I(D)]||(z[I(D)]=[]),z[I(D)].push(D),z),{}),A=()=>{setTimeout(()=>{d.value&&d.value.focus()},100),O(),o.value=!0};X(async()=>{var D,G;const C=await It(()=>import("./virtual_search-data.3dbabb59.js"),[]);_.value=C.default.INDEX_DATA,f.value=C.default.PREVIEW_LOOKUP,b.value=C.default.Options,c.value=window.location.origin+ge(n.value==="root"?"/":n.value),P.value=((D=b.value)==null?void 0:D.buttonLabel)||P.value,g.value=((G=b.value)==null?void 0:G.placeholder)||g.value;var I=new F(b.value);I.import("reg",_.value.reg),I.import("cfg",_.value.cfg),I.import("map",_.value.map),I.import("ctx",_.value.ctx),k.value=I,s.value.innerHTML=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl";const z=q=>{q.key==="k"&&(q.ctrlKey||q.metaKey)&&(q.preventDefault(),A())};window.addEventListener("keydown",z)});function O(){o.value=!1,a.value=""}return(C,I)=>{const z=Q("ClientOnly");return i(),r("div",Wn,[p(z,null,{default:v(()=>[(i(),x(Bt,{to:"body"},[Re(u("div",{class:"modal-back",onClick:I[2]||(I[2]=D=>o.value=!1)},[u("div",{class:"modal",onClick:I[1]||(I[1]=lt(()=>{},["stop"]))},[u("form",Kn,[Qn,Re(u("input",{class:"DocSearch-Input","aria-autocomplete":"both","aria-labelledby":"docsearch-label",id:"docsearch-input",autocomplete:"off",autocorrect:"off",autocapitalize:"off",enterkeyhint:"search",spellcheck:"false",autofocus:"true","onUpdate:modelValue":I[0]||(I[0]=D=>a.value=D),placeholder:g.value,maxlength:"64",type:"search",ref_key:"input",ref:d},null,8,Yn),[[Tt,a.value]])]),u("div",Xn,[(i(!0),r(T,null,H(N(l(w),D=>D.link.split("/").slice(0,-1).join("-")),(D,G)=>(i(),r("div",{key:G},[u("span",Jn,S(G?G.toString()[0].toUpperCase()+G.toString().slice(1):"Home"),1),(i(!0),r(T,null,H(D,q=>(i(),r("a",{href:c.value+q.link,key:q.id,onClick:O},[u("div",es,[u("span",ts,S(q.link.includes("#")?"#":"▤"),1),u("div",ns,[u("h3",null,S(q.title),1),u("p",null,[u("div",{innerHTML:q.preview},null,8,ss)])]),os])],8,Zn))),128))]))),128))]),as])],512),[[Ct,o.value]])]))]),_:1}),u("div",{id:"docsearch",onClick:I[3]||(I[3]=D=>A())},[u("button",is,[u("span",cs,[ls,u("span",rs,S(P.value),1)]),u("span",us,[u("span",{class:"DocSearch-Button-Key",ref_key:"metaKey",ref:s},"Meta",512),ds])])])])}}});const hs={},vs={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",height:"24px",viewBox:"0 0 24 24",width:"24px"},fs=u("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),ps=u("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"},null,-1),ms=[fs,ps];function gs(e,t){return i(),r("svg",vs,ms)}const ys=m(hs,[["render",gs]]),bs=$({__name:"VPLink",props:{tag:null,href:null,noIcon:{type:Boolean},target:null,rel:null},setup(e){const t=e,n=V(()=>t.tag??t.href?"a":"span"),s=V(()=>t.href&&rt.test(t.href));return(o,a)=>(i(),x(J(l(n)),{class:B(["VPLink",{link:e.href}]),href:e.href?l(ie)(e.href):void 0,target:e.target||(l(s)?"_blank":void 0),rel:e.rel||(l(s)?"noreferrer":void 0)},{default:v(()=>[h(o.$slots,"default",{},void 0,!0),l(s)&&!e.noIcon?(i(),x(ys,{key:0,class:"icon"})):y("",!0)]),_:3},8,["class","href","target","rel"]))}});const R=m(bs,[["__scopeId","data-v-a8b5c975"]]),ks=$({__name:"VPNavBarMenuLink",props:{item:null},setup(e){const{page:t}=M();return(n,s)=>(i(),x(R,{class:B({VPNavBarMenuLink:!0,active:l(te)(l(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel,tabindex:"0"},{default:v(()=>[E(S(e.item.text),1)]),_:1},8,["class","href","target","rel"]))}});const $s=m(ks,[["__scopeId","data-v-bbf845a0"]]),ze=L();let vt=!1,we=0;function Ps(e){const t=L(!1);if(Nt){!vt&&xs(),we++;const n=ee(ze,s=>{var o,a,c;s===e.el.value||(o=e.el.value)!=null&&o.contains(s)?(t.value=!0,(a=e.onFocus)==null||a.call(e)):(t.value=!1,(c=e.onBlur)==null||c.call(e))});Ie(()=>{n(),we--,we||ws()})}return At(t)}function xs(){document.addEventListener("focusin",ft),vt=!0,ze.value=document.activeElement}function ws(){document.removeEventListener("focusin",ft)}function ft(){ze.value=document.activeElement}const Vs={},Ss={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Ls=u("path",{d:"M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"},null,-1),Ms=[Ls];function Is(e,t){return i(),r("svg",Ss,Ms)}const pt=m(Vs,[["render",Is]]),Cs={},Ts={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Bs=u("circle",{cx:"12",cy:"12",r:"2"},null,-1),Ns=u("circle",{cx:"19",cy:"12",r:"2"},null,-1),As=u("circle",{cx:"5",cy:"12",r:"2"},null,-1),zs=[Bs,Ns,As];function Os(e,t){return i(),r("svg",Ts,zs)}const Es=m(Cs,[["render",Os]]),Hs={class:"VPMenuLink"},Ds=$({__name:"VPMenuLink",props:{item:null},setup(e){const{page:t}=M();return(n,s)=>(i(),r("div",Hs,[p(R,{class:B({active:l(te)(l(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel},{default:v(()=>[E(S(e.item.text),1)]),_:1},8,["class","href","target","rel"])]))}});const ye=m(Ds,[["__scopeId","data-v-88f937c6"]]),Fs={class:"VPMenuGroup"},js={key:0,class:"title"},Gs=$({__name:"VPMenuGroup",props:{text:null,items:null},setup(e){return(t,n)=>(i(),r("div",Fs,[e.text?(i(),r("p",js,S(e.text),1)):y("",!0),(i(!0),r(T,null,H(e.items,s=>(i(),r(T,null,["link"in s?(i(),x(ye,{key:0,item:s},null,8,["item"])):y("",!0)],64))),256))]))}});const qs=m(Gs,[["__scopeId","data-v-69e747b5"]]),Rs={class:"VPMenu"},Us={key:0,class:"items"},Ws=$({__name:"VPMenu",props:{items:null},setup(e){return(t,n)=>(i(),r("div",Rs,[e.items?(i(),r("div",Us,[(i(!0),r(T,null,H(e.items,s=>(i(),r(T,{key:s.text},["link"in s?(i(),x(ye,{key:0,item:s},null,8,["item"])):(i(),x(qs,{key:1,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):y("",!0),h(t.$slots,"default",{},void 0,!0)]))}});const Ks=m(Ws,[["__scopeId","data-v-e7ea1737"]]),Qs=["aria-expanded","aria-label"],Ys={key:0,class:"text"},Xs={class:"menu"},Js=$({__name:"VPFlyout",props:{icon:null,button:null,label:null,items:null},setup(e){const t=L(!1),n=L();Ps({el:n,onBlur:s});function s(){t.value=!1}return(o,a)=>(i(),r("div",{class:"VPFlyout",ref_key:"el",ref:n,onMouseenter:a[1]||(a[1]=c=>t.value=!0),onMouseleave:a[2]||(a[2]=c=>t.value=!1)},[u("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":t.value,"aria-label":e.label,onClick:a[0]||(a[0]=c=>t.value=!t.value)},[e.button||e.icon?(i(),r("span",Ys,[e.icon?(i(),x(J(e.icon),{key:0,class:"option-icon"})):y("",!0),E(" "+S(e.button)+" ",1),p(pt,{class:"text-icon"})])):(i(),x(Es,{key:1,class:"icon"}))],8,Qs),u("div",Xs,[p(Ks,{items:e.items},{default:v(()=>[h(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}});const Oe=m(Js,[["__scopeId","data-v-96001b6b"]]),Zs=$({__name:"VPNavBarMenuGroup",props:{item:null},setup(e){const{page:t}=M();return(n,s)=>(i(),x(Oe,{class:B({VPNavBarMenuGroup:!0,active:l(te)(l(t).relativePath,e.item.activeMatch,!!e.item.activeMatch)}),button:e.item.text,items:e.item.items},null,8,["class","button","items"]))}}),eo=e=>(U("data-v-bdedfc22"),e=e(),W(),e),to={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},no=eo(()=>u("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),so=$({__name:"VPNavBarMenu",setup(e){const{theme:t}=M();return(n,s)=>l(t).nav?(i(),r("nav",to,[no,(i(!0),r(T,null,H(l(t).nav,o=>(i(),r(T,{key:o.text},["link"in o?(i(),x($s,{key:0,item:o},null,8,["item"])):(i(),x(Zs,{key:1,item:o},null,8,["item"]))],64))),128))])):y("",!0)}});const oo=m(so,[["__scopeId","data-v-bdedfc22"]]),ao={},io={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},co=u("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1),lo=u("path",{d:" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z ",class:"css-c4d79v"},null,-1),ro=[co,lo];function uo(e,t){return i(),r("svg",io,ro)}const mt=m(ao,[["render",uo]]),_o={class:"items"},ho={class:"title"},vo=$({__name:"VPNavBarTranslations",setup(e){const{theme:t}=M(),{localeLinks:n,currentLang:s}=le({correspondingLink:!0});return(o,a)=>l(n).length&&l(s).label?(i(),x(Oe,{key:0,class:"VPNavBarTranslations",icon:mt,label:l(t).langMenuLabel||"Change language"},{default:v(()=>[u("div",_o,[u("p",ho,S(l(s).label),1),(i(!0),r(T,null,H(l(n),c=>(i(),x(ye,{key:c.link,item:c},null,8,["item"]))),128))])]),_:1},8,["label"])):y("",!0)}});const fo=m(vo,[["__scopeId","data-v-b009e5cf"]]);const po={},mo={class:"VPSwitch",type:"button",role:"switch"},go={class:"check"},yo={key:0,class:"icon"};function bo(e,t){return i(),r("button",mo,[u("span",go,[e.$slots.default?(i(),r("span",yo,[h(e.$slots,"default",{},void 0,!0)])):y("",!0)])])}const ko=m(po,[["render",bo],["__scopeId","data-v-f3c41672"]]),$o={},Po={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},xo=zt('',9),wo=[xo];function Vo(e,t){return i(),r("svg",Po,wo)}const So=m($o,[["render",Vo]]),Lo={},Mo={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Io=u("path",{d:"M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"},null,-1),Co=[Io];function To(e,t){return i(),r("svg",Mo,Co)}const Bo=m(Lo,[["render",To]]),No={title:"toggle dark mode"},Ao=$({__name:"VPSwitchAppearance",setup(e){const{site:t,isDark:n}=M(),s=L(!1),o=typeof localStorage<"u"?a():()=>{};X(()=>{s.value=document.documentElement.classList.contains("dark")});function a(){const c=window.matchMedia("(prefers-color-scheme: dark)"),d=document.documentElement.classList;let _=localStorage.getItem(Ue),f=t.value.appearance==="dark"&&_==null||(_==="auto"||_==null?c.matches:_==="dark");c.onchange=P=>{_==="auto"&&k(f=P.matches)};function b(){k(f=!f),_=f?c.matches?"auto":"dark":c.matches?"light":"auto",localStorage.setItem(Ue,_)}function k(P){const g=document.createElement("style");g.type="text/css",g.appendChild(document.createTextNode(`:not(.VPSwitchAppearance):not(.VPSwitchAppearance *) { -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; diff --git a/docs/assets/chunks/virtual_search-data.3dbabb59.js b/docs/assets/chunks/virtual_search-data.3dbabb59.js new file mode 100644 index 0000000..60ff075 --- /dev/null +++ b/docs/assets/chunks/virtual_search-data.3dbabb59.js @@ -0,0 +1,152 @@ +const a={map:'[{"cookie":["0.0"],"localcookie":["0.1"],"简介":["0.2"],"导入":["0.3","1.3","3.3","3.7","3.11","3.15","3.19","4.3"],"使用":["0.4","1.4","3.4","3.8","3.12","3.16","3.20","4.4"],"获取":["0.5"],"设置":["0.6"],"删除":["0.7"],"清空":["0.8"],"device":["1.0"],"checkdevicetype":["1.1"],"介绍":["1.2","3.2","3.6","3.10","3.14","3.18","4.2"],"前言":["2.0"],"string":["3.0"],"checknull":["3.1"],"strlength":["3.5"],"formatbytes":["3.9"],"checkpassword":["3.13"],"checkemail":["3.17"],"url":["4.0","4.1"],"获取url的参数":["4.5"],"获取url的hash":["4.6"],"获取url的路径":["4.7"],"更新日志":["5.0"],"贡献指南":["6.0"],"入门":["7.0"],"项目简介":["7.1"],"使用理由":["7.2"],"兼容性":["7.3"],"开发人员":["7.4"],"负责人":["7.5"],"贡献者":["7.6"],"入群交流":["7.7"],"安装":["8.0"],"在npm项目下使用":["8.1"],"全部引入":["8.2"],"按需引入":["8.3"],"在html单页面下使用":["8.4"],"项目计划":["9.0"],"提示":["11.0"]},{"0":["5.1","5.2","5.3","5.4","5.5"],"山奈提供了一些常用的":["0.0"],"localcookie":["0.2"],"js":["0.3","1.3","3.3","3.7","3.11","3.15","3.19","4.3","8.2","8.3"],"cookie":["0.5","0.6","0.7","0.8"],"山奈提供了一些有关设备操作的api":["1.0"],"检查当前设备的类型":["1.2"],"安卓手机返回android":["1.4"],"在本站的api信息栏目中":["2.0"],"山奈提供了一些字符串处理的函数":["3.0"],"判断字符串是否为空":["3.2"],"code":["3.4","3.8","3.20","8.1"],"获取字符串的长度":["3.6"],"将字节格式化为":["3.10"],"输入参数":["3.12","3.16"],"bytes":["3.12"],"字节数":["3.12"],"一个json对象":["3.12","3.16"],"可选":["3.12","3.16"],"检查密码强度的函数":["3.14"],"password":["3.16"],"密码":["3.16"],"有以下内容":["3.16"],"minlength":["3.16"],"密码最小长度":["3.16"],"默认为8":["3.16"],"检查邮箱格式的函数":["3.18"],"group":["3.20"],"山奈提供了一些方便的方法来处理":["4.0"],"url":["4.2","4.5","4.6","4.7"],"获取":["4.5","4.6","4.7"],"我们使用":["6.0"],"yarn":["6.0"],"作为包管理工具":["6.0"],"请先安装":["6.0"],"warning":["7.0"],"山奈":["7.1"],"galanga":["7.1"],"以下简称山奈":["7.1"],"相比其他的函数库":["7.2"],"单元测试保证支持如下环境":["7.3"],"ie":["7.3"],"vpteammembers":["7.5"],"请在github上或者gitee上查看贡献者名单":["7.6"],"为了方便各位开发者的交流":["7.7"],"在npm项目下":["8.1"],"您可以通过以下命令安装山奈":["8.1"],"在html单页面下":["8.4"],"您可以在官方仓库内下载山奈的打包产物":["8.4"],"然后引入至您的html文件中":["8.4"],"这里列出会在未来添加的新功能":["9.0"],"这是一个基于":["11.0"]},{"22":["5.1"],"是一个对象":["0.2"],"import":["0.3","1.3","3.3","3.7","3.11","3.15","3.19","4.3","8.2","8.3"],"的值":["0.5","0.6"],"如果":["0.5","0.6"],"code":["0.7"],"清空所有":["0.8"],"可用来获取设备的信息":["1.0"],"苹果手机返回ios":["1.4"],"平板返回pad":["1.4"],"您可以查看您所需要的api的详细信息":["2.0"],"用于处理字符串":["3.0"],"如果字符串为空":["3.2","3.6"],"group":["3.4","3.8","8.1"],"js":["3.4","3.8","3.20","8.4"],"b":["3.10"],"有以下内容":["3.12"],"decimals":["3.12"],"保留的小数位数":["3.12"],"默认为1":["3.12"],"from":["3.12"],"输入的字节单位":["3.12"],"如果符合要求":["3.14","3.18"],"maxlength":["3.16"],"密码最大长度":["3.16"],"默认为16":["3.16"],"types":["3.16"],"字符类型":["3.16"],"分别为数字":["3.16"],"小写字母":["3.16"],"大写字母":["3.16"],"特殊字符":["3.16"],"按需引入":["3.20"],"是一个用于处理":["4.2"],"参数的值":["4.5"],"如果参数不存在":["4.5"],"则返回":["4.5"],"的":["4.6"],"hash":["4.6"],"值":["4.6"],"的路径":["4.7"],"如果路径不存在":["4.7"],"bash":["6.0","8.1"],"npm":["6.0"],"install":["6.0"],"g":["6.0"],"安装依赖":["6.0"],"本项目仍处于开发阶段":["7.0"],"是川菜中常用的调味品":["7.1"],"也可以用作腌制成为单独的菜品":["7.1"],"而这一辅料被人们俗称为姜":["7.1"],"山奈希望提供在业务中常用的一些函数":["7.2"],"ch":["7.3"],"ff":["7.3"],"sf":["7.3"],"size":["7.5"],"如果您也想对山奈做出贡献":["7.6"],"我们在各大平台都开设了有关山奈的交流群":["7.7"],"欢迎大家加入":["7.7"],"yarn":["8.1"],"例如您将山奈的打包产物放在":["8.4"],"galanga":["8.4"],"目录下":["8.4"],"和已经完成的功能":["9.0"],"vitepress":["11.0"]},{"1":["5.5"],"4":["5.1"],"19":["5.4"],"20":["5.3"],"21":["5.2"],"2023":["5.1","5.2","5.3","5.4"],"操作函数":["0.0"],"包含了一些常用的":["0.2"],"cookie":["0.2"],"localcookie":["0.3"],"不存在":["0.5","0.6","4.6"],"则返回":["0.5","3.2","3.6","3.14","3.18","4.7"],"则创建":["0.6"],"group":["0.7","0.8","3.12"],"js":["0.7"],"code":["0.8","3.12","4.5","4.7"],"或者进行一些操作":["1.0"],"checkdevicetype":["1.3"],"手表返回watch":["1.4"],"桌面返回desktop":["1.4"],"请注意的是":["2.0"],"checknull":["3.3"],"按需引入":["3.4","3.8"],"strlength":["3.7"],"kb":["3.10"],"mb":["3.10"],"formatbytes":["3.11"],"默认为b":["3.12"],"to":["3.12"],"输出的字节单位":["3.12"],"checkpassword":["3.15"],"默认为":["3.16"],"number":["3.16"],"lowercase":["3.16"],"uppercase":["3.16"],"special":["3.16"],"mintypes":["3.16"],"最少包含的字符类型":["3.16"],"默认为2":["3.16"],"maxtypes":["3.16"],"checkemail":["3.19","3.20"],"info":["3.20"],"url":["4.3"],"null":["4.5","4.7"],"如果":["4.6"],"一键打包生成生产代码":["6.0"],"api可能会发生变化":["7.0"],"在web的世界里":["7.1"],"它是一个开源的实用的js函数库":["7.1"],"它的目标是提供一些常用的函数":["7.1"],"让你的代码更简洁更易读":["7.1"],"而山奈也是基于typescript开发的":["7.2"],"op":["7.3"],"ios":["7.3"],"android":["7.3"],"small":["7.5"],"请参考贡献指南":["7.6"],"qq":["7.7"],"add":["8.1"],"galanga":["8.1","8.2"],"from":["8.2","8.3"],"name":["8.3"],"您可以通过以下方式引入山奈":["8.4"],"html":["8.4"],"当然":["8.4"],"x":["9.0"],"的文档站点":["11.0"]},{"0":["3.6"],"1":["3.12"],"3":["5.2","5.3","5.4"],"6":["7.3"],"7":["5.1"],"29":["7.3"],"2023":["5.5"],"346363551":["7.7"],"包括获取":["0.0"],"操作函数":["0.2"],"from":["0.3","1.3","3.3","3.7","3.11","3.15","3.19","4.3"],"null":["0.5","4.6"],"code":["0.5","0.6","1.4","3.16","4.6"],"group":["0.5","0.6","1.4","3.16","4.5","4.7"],"js":["0.6","0.8","3.12","3.16","4.5","4.7"],"按需引入":["0.7","0.8","3.12","3.16","4.5"],"localcookie":["0.7"],"在这里演示的所有api均以es6的语法为基础":["2.0"],"true":["3.2","3.14","3.18"],"checknull":["3.4"],"name":["3.4","3.8"],"strlength":["3.8"],"gb":["3.10"],"const":["3.12","3.16"],"json":["3.12","3.16"],"最多包含的字符类型":["3.16"],"默认为4":["3.16"],"sancerain":["3.20"],"com":["3.20"],"的函数":["4.2"],"则返回":["4.6"],"run":["6.0"],"build":["6.0"],"运行单元测试":["6.0"],"test":["6.0"],"请勿用于生产环境":["7.0"],"我们希望利用姜来让您的代码更加美味":["7.1"],"让您更加专注于业务逻辑的实现":["7.1"],"使用es6":["7.1"],"因此在使用时":["7.2"],"node":["7.3"],"members":["7.5"],"以下是山奈的贡献者名单头像缩略图":["7.6"],"钉钉":["7.7"],"npm":["8.1"],"install":["8.1"],"galanga":["8.3"],"您也可以引入山奈的cdn链接":["8.4"],"引入完成后":["8.4"],"您可以在项目中使用全部功能":["8.4"],"已完成":["9.0"],"您也可以直接在这里浏览文档源文件":["11.0"]},{"2":["3.16","5.5"],"8":["3.16"],"9":["7.3"],"16":["3.16"],"19":["5.3"],"22":["5.2"],"50":["7.3"],"55":["7.3"],"1024":["3.12"],"设置":["0.0","0.2"],"删除":["0.0"],"包括获取":["0.2"],"galanga":["0.3","1.3","3.3","3.7","3.11","3.15","3.19","4.3"],"js":["0.5","1.4","4.6"],"按需引入":["0.5","0.6","1.4","4.6","4.7"],"localcookie":["0.5","0.6","0.8"],"setitem":["0.6"],"name":["0.6","0.7","4.5"],"removeitem":["0.7"],"clear":["0.8"],"如果您使用的是其他类型的语法或者安装方法":["2.0"],"否则返回":["3.2","3.14","3.18"],"全局引入":["3.4","3.8","3.20"],"tb":["3.10"],"pb":["3.10"],"b":["3.12"],"kb":["3.12"],"formatbytes":["3.12"],"它提供了一些方便的方法来处理":["4.2"],"getquery":["4.5"],"group":["4.6"],"新增了":["5.1","5.2","5.3"],"checkdevicetype":["5.1"],"注意":["6.0"],"浏览器环境需要手动测试":["6.0"],"位于":["6.0"],"browser":["6.0"],"修改":["6.0"],"和typescript编写源码":["7.1"],"编译生成生产代码":["7.1"],"多环境支持":["7.1"],"您可以获得更好的类型提示":["7.2"],"贡献者名单":["7.6"],"山奈galanga开源js函数库交流群":["7.7"],"telegram":["7.7"],"pnpm":["8.1"],"console":["8.2","8.3","8.4"],"log":["8.3","8.4"],"目前暂不支持将部分函数单独引入至项目内":["8.4"],"未完成":["9.0"]},{"4":["3.16","7.3"],"12345678":["3.16"],"删除":["0.2"],"getitem":["0.5"],"name":["0.5","8.4"],"value":["0.6"],"全局引入":["0.6","0.7","0.8","3.12","3.16","4.5","4.7"],"galanga":["0.7","3.4","3.8","3.20"],"checkdevicetype":["1.4"],"您需要自行转换":["2.0"],"false":["3.2","3.14","3.18"],"eb":["3.10"],"var":["3.12","3.16"],"checkpassword":["3.16","5.3"],"gethash":["4.6"],"getpath":["4.7"],"函数":["5.1"],"用于检查设备类型":["5.1"],"checkemail":["5.2"],"修复了":["5.4"],"formatbytes":["5.4"],"package":["6.0"],"json":["6.0"],"中的版本号":["6.0"],"readme":["6.0"],"支持浏览器原生":["7.1"],"支持amd":["7.1"],"cmd":["7.1"],"支持webpack":["7.1"],"censujiang":["7.7"],"log":["8.2"],"我们更推荐使用npm项目的方式引入山奈":["8.4"]},{"等":["0.0","0.2"],"全局引入":["0.5","1.4","4.6"],"galanga":["0.5","0.6","0.8","1.4","4.5","4.6","4.7"],"zb":["3.10"],"yb":["3.10"],"此函数不稳定":["5.1"],"可能会在后续版本中修改":["5.1"],"函数":["5.2","5.3"],"用于检查邮箱格式":["5.2"],"用于检查密码强度":["5.3"],"函数的两个bug":["5.4"],"项目发布测试版本":["5.5"],"md":["6.0"],"changelog":["6.0"],"然后发布新版":["6.0"],"rollup":["7.1"],"fis等":["7.1"],"支持node":["7.1"],"注意":["7.3"],"编译代码依赖es5环境":["7.3"],"对于ie6":["7.3"],"group":["7.7"],"微信":["7.7"],"cnpm":["8.1"],"name":["8.2"],"我们在后文的使用示例中":["8.3"],"基本上都是使用这种方式引入山奈的":["8.3"],"因为这样不仅可以更好地管理依赖":["8.4"],"还可以使用您的打包工具的摇树功能动态修剪您的代码":["8.4"],"在查看后文的使用示例时":["8.4"],"请使用":["8.4"]},{"galanga":["3.12","3.16"],"release":["6.0"],"无依赖":["7.1"],"体积小巧":["7.1"],"8需要引入es5":["7.3"],"shim才可以兼容":["7.3"],"微信群":["7.7"],"安装完成后":["8.1"],"您可以在项目中引入山奈并使用对应的功能":["8.1"],"作为全局变量后再加具体的功能函数名":["8.4"]}]'},l={"0.0":{t:"cookie",p:`山奈提供了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。 +`,l:"api/cookie.html",a:"cookie"},"0.1":{t:"localcookie",p:"\r",l:"api/cookie.html#localcookie",a:"localcookie"},"0.2":{t:"简介",p:`localCookie 是一个对象,包含了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。 +`,l:"api/cookie.html#简介",a:"简介"},"0.3":{t:"导入",p:`import { localCookie } from 'galanga' + +`,l:"api/cookie.html#导入",a:"导入"},"0.4":{t:"使用",p:"\r",l:"api/cookie.html#使用",a:"使用"},"0.5":{t:"获取-cookie",p:`获取 Cookie 的值,如果 Cookie 不存在,则返回 null。 +::: code-group +localCooki ...`,l:"api/cookie.html#获取-cookie",a:"获取-cookie"},"0.6":{t:"设置-cookie",p:`设置 Cookie 的值,如果 Cookie 不存在,则创建 Cookie。 +::: code-group +localCoo ...`,l:"api/cookie.html#设置-cookie",a:"设置-cookie"},"0.7":{t:"删除-cookie",p:`删除 Cookie。 +::: code-group +localCookie.removeItem('name') + +gala ...`,l:"api/cookie.html#删除-cookie",a:"删除-cookie"},"0.8":{t:"清空-cookie",p:`清空所有 Cookie。 +::: code-group +localCookie.clear() + +galanga.local ...`,l:"api/cookie.html#清空-cookie",a:"清空-cookie"},"1.0":{t:"device",p:`山奈提供了一些有关设备操作的API,可用来获取设备的信息,或者进行一些操作。 +`,l:"api/device.html",a:"device"},"1.1":{t:"checkdevicetype",p:"\r",l:"api/device.html#checkdevicetype",a:"checkdevicetype"},"1.2":{t:"介绍",p:`检查当前设备的类型。 +`,l:"api/device.html#介绍",a:"介绍"},"1.3":{t:"导入",p:`import { checkDeviceType } from 'galanga' + +`,l:"api/device.html#导入",a:"导入"},"1.4":{t:"使用",p:`安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop +::: code ...`,l:"api/device.html#使用",a:"使用"},"2.0":{t:"前言",p:`在本站的API信息栏目中,您可以查看您所需要的API的详细信息。 +请注意的是,在这里演示的所有API均以ES6的语法为基础, ...`,l:"api/index.html",a:"前言"},"3.0":{t:"string",p:`山奈提供了一些字符串处理的函数,用于处理字符串。 +`,l:"api/string.html",a:"string"},"3.1":{t:"checknull",p:"\r",l:"api/string.html#checknull",a:"checknull"},"3.2":{t:"介绍",p:`判断字符串是否为空,如果字符串为空,则返回 true,否则返回 false。 +`,l:"api/string.html#介绍",a:"介绍"},"3.3":{t:"导入",p:`import { checkNull } from 'galanga' + +`,l:"api/string.html#导入",a:"导入"},"3.4":{t:"使用",p:`::: code-group +checkNull(name) + +galanga.checkNull(name) + +::: +`,l:"api/string.html#使用",a:"使用"},"3.5":{t:"strlength",p:"\r",l:"api/string.html#strlength",a:"strlength"},"3.6":{t:"介绍",p:`获取字符串的长度,如果字符串为空,则返回 0。 +`,l:"api/string.html#介绍",a:"介绍"},"3.7":{t:"导入",p:`import { strLength } from 'galanga' + +`,l:"api/string.html#导入",a:"导入"},"3.8":{t:"使用",p:`::: code-group +strLength(name) + +galanga.strLength(name) + +::: +`,l:"api/string.html#使用",a:"使用"},"3.9":{t:"formatbytes",p:"\r",l:"api/string.html#formatbytes",a:"formatbytes"},"3.10":{t:"介绍",p:`将字节格式化为 B、KB、MB、GB、TB、PB、EB、ZB、YB。 +`,l:"api/string.html#介绍",a:"介绍"},"3.11":{t:"导入",p:`import { formatBytes } from 'galanga' + +`,l:"api/string.html#导入",a:"导入"},"3.12":{t:"使用",p:`输入参数: + + +bytes:字节数 + + +一个json对象(可选),有以下内容: + + +decimals:保留的小数位数,默认为 ...`,l:"api/string.html#使用",a:"使用"},"3.13":{t:"checkpassword",p:"\r",l:"api/string.html#checkpassword",a:"checkpassword"},"3.14":{t:"介绍",p:`检查密码强度的函数,如果符合要求,则返回 true,否则返回 false。 +`,l:"api/string.html#介绍",a:"介绍"},"3.15":{t:"导入",p:`import { checkPassword } from 'galanga' + +`,l:"api/string.html#导入",a:"导入"},"3.16":{t:"使用",p:`输入参数: + + +password:密码 + + +一个json对象(可选),有以下内容: + + +minLength:密码最小长度,默 ...`,l:"api/string.html#使用",a:"使用"},"3.17":{t:"checkemail",p:"\r",l:"api/string.html#checkemail",a:"checkemail"},"3.18":{t:"介绍",p:`检查邮箱格式的函数,如果符合要求,则返回 true,否则返回 false。 +`,l:"api/string.html#介绍",a:"介绍"},"3.19":{t:"导入",p:`import { checkEmail } from 'galanga' + +`,l:"api/string.html#导入",a:"导入"},"3.20":{t:"使用",p:`::: code-group +checkEmail('info@sancerain.com') + +galanga.check ...`,l:"api/string.html#使用",a:"使用"},"4.0":{t:"url",p:`山奈提供了一些方便的方法来处理 URL。 +`,l:"api/url.html",a:"url"},"4.1":{t:"url",p:"",l:"api/url.html#url",a:"url"},"4.2":{t:"介绍",p:`url 是一个用于处理 URL 的函数,它提供了一些方便的方法来处理 URL。 +`,l:"api/url.html#介绍",a:"介绍"},"4.3":{t:"导入",p:`import { url } from 'galanga' + +`,l:"api/url.html#导入",a:"导入"},"4.4":{t:"使用",p:"\r",l:"api/url.html#使用",a:"使用"},"4.5":{t:"获取url的参数",p:`获取 URL 参数的值,如果参数不存在,则返回 null。 +::: code-group +url.getQuery('nam ...`,l:"api/url.html#获取url的参数",a:"获取url的参数"},"4.6":{t:"获取url的hash",p:`获取 URL 的 hash 值,如果 hash 不存在,则返回 null。 +::: code-group +url.getHa ...`,l:"api/url.html#获取url的hash",a:"获取url的hash"},"4.7":{t:"获取url的路径",p:`获取 URL 的路径,如果路径不存在,则返回 null。 +::: code-group +url.getPath() + +gal ...`,l:"api/url.html#获取url的路径",a:"获取url的路径"},"5.0":{t:"更新日志",p:"",l:"guide/changelog.html",a:"更新日志"},"5.1":{t:"_0-0-22-2023-4-7",p:` +新增了 checkDeviceType 函数,用于检查设备类型,此函数不稳定,可能会在后续版本中修改 + +`,l:"guide/changelog.html#_0-0-22-2023-4-7",a:"_0-0-22-2023-4-7"},"5.2":{t:"_0-0-21-2023-3-22",p:` +新增了 checkEmail 函数,用于检查邮箱格式 + +`,l:"guide/changelog.html#_0-0-21-2023-3-22",a:"_0-0-21-2023-3-22"},"5.3":{t:"_0-0-20-2023-3-19",p:` +新增了 checkPassword 函数,用于检查密码强度 + +`,l:"guide/changelog.html#_0-0-20-2023-3-19",a:"_0-0-20-2023-3-19"},"5.4":{t:"_0-0-19-2023-3-19",p:` +修复了 formatBytes 函数的两个bug + +`,l:"guide/changelog.html#_0-0-19-2023-3-19",a:"_0-0-19-2023-3-19"},"5.5":{t:"_0-0-1-2023-2-1",p:` +项目发布测试版本 + +`,l:"guide/changelog.html#_0-0-1-2023-2-1",a:"_0-0-1-2023-2-1"},"6.0":{t:"贡献指南",p:`我们使用 yarn 作为包管理工具,请先安装 yarn +npm install yarn -g + +安装依赖 +yarn + +一键 ...`,l:"guide/contribute.html",a:"贡献指南"},"7.0":{t:"入门",p:`::: warning +本项目仍处于开发阶段,API可能会发生变化,请勿用于生产环境。 +::: +`,l:"guide/index.html",a:"入门"},"7.1":{t:"项目简介",p:`山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。 +在Web ...`,l:"guide/index.html#项目简介",a:"项目简介"},"7.2":{t:"使用理由",p:"相比其他的函数库,山奈希望提供在业务中常用的一些函数,而山奈也是基于TypeScript开发的,因此在使用时,您可以获得更好 ...",l:"guide/index.html#使用理由",a:"使用理由"},"7.3":{t:"兼容性",p:`单元测试保证支持如下环境: + + + +IE +CH +FF +SF +OP +IOS +Android +Node + + + + +6+ +29+ +55 ...`,l:"guide/index.html#兼容性",a:"兼容性"},"7.4":{t:"开发人员",p:"\r",l:"guide/index.html#开发人员",a:"开发人员"},"7.5":{t:"负责人",p:"<VPTeamMembers size="small" :members="member ...",l:"guide/index.html#负责人",a:"负责人"},"7.6":{t:"贡献者",p:`请在Github上或者Gitee上查看贡献者名单,如果您也想对山奈做出贡献,请参考贡献指南。 +以下是山奈的贡献者名单头像缩略 ...`,l:"guide/index.html#贡献者",a:"贡献者"},"7.7":{t:"入群交流",p:`为了方便各位开发者的交流,我们在各大平台都开设了有关山奈的交流群,欢迎大家加入。 + + +QQ:346363551 + + +钉钉:山 ...`,l:"guide/index.html#入群交流",a:"入群交流"},"8.0":{t:"安装",p:"\r",l:"guide/install.html",a:"安装"},"8.1":{t:"在npm项目下使用",p:`在NPM项目下,您可以通过以下命令安装山奈: +::: code-group +yarn add galanga + +npm in ...`,l:"guide/install.html#在npm项目下使用",a:"在npm项目下使用"},"8.2":{t:"全部引入",p:`import galanga from 'galanga' + +console.log(galanga.name) + +`,l:"guide/install.html#全部引入",a:"全部引入"},"8.3":{t:"按需引入",p:`import { name } from 'galanga' + +console.log(name) + +我们在后文的使用示例中 ...`,l:"guide/install.html#按需引入",a:"按需引入"},"8.4":{t:"在html单页面下使用",p:"在HTML单页面下,您可以在官方仓库内下载山奈的打包产物,然后引入至您的HTML文件中,例如您将山奈的打包产物放在 /js/ ...",l:"guide/install.html#在html单页面下使用",a:"在html单页面下使用"},"9.0":{t:"项目计划",p:`这里列出会在未来添加的新功能,和已经完成的功能 + +[X] 已完成 +[ ] 未完成 + +`,l:"guide/todo.html",a:"项目计划"},"11.0":{t:"提示",p:`这是一个基于 VitePress 的文档站点。您也可以直接在这里浏览文档源文件。 +`,l:"README.html",a:"提示"}},e={previewLength:62,buttonLabel:"搜索",placeholder:"搜索此文档..."},n={INDEX_DATA:a,PREVIEW_LOOKUP:l,Options:e};export{n as default}; diff --git a/docs/assets/chunks/virtual_search-data.8ba04493.js b/docs/assets/chunks/virtual_search-data.8ba04493.js deleted file mode 100644 index a07508c..0000000 --- a/docs/assets/chunks/virtual_search-data.8ba04493.js +++ /dev/null @@ -1,144 +0,0 @@ -const l={map:'[{"cookie":["0.0"],"localcookie":["0.1"],"简介":["0.2"],"导入":["0.3","2.3","2.7","2.11","2.15","2.19","3.3"],"使用":["0.4","2.4","2.8","2.12","2.16","2.20","3.4"],"获取":["0.5"],"设置":["0.6"],"删除":["0.7"],"清空":["0.8"],"前言":["1.0"],"string":["2.0"],"checknull":["2.1"],"介绍":["2.2","2.6","2.10","2.14","2.18","3.2"],"strlength":["2.5"],"formatbytes":["2.9"],"checkpassword":["2.13"],"checkemail":["2.17"],"url":["3.0","3.1"],"获取url的参数":["3.5"],"获取url的hash":["3.6"],"获取url的路径":["3.7"],"更新日志":["4.0"],"贡献指南":["5.0"],"入门":["6.0"],"项目简介":["6.1"],"使用理由":["6.2"],"兼容性":["6.3"],"开发人员":["6.4"],"负责人":["6.5"],"贡献者":["6.6"],"入群交流":["6.7"],"安装":["7.0"],"在npm项目下使用":["7.1"],"全部引入":["7.2"],"按需引入":["7.3"],"在html单页面下使用":["7.4"],"项目计划":["8.0"],"提示":["10.0"]},{"0":["4.1","4.2","4.3","4.4"],"山奈提供了一些常用的":["0.0"],"localcookie":["0.2"],"js":["0.3","2.3","2.7","2.11","2.15","2.19","3.3","7.2","7.3"],"cookie":["0.5","0.6","0.7","0.8"],"在本站的api信息栏目中":["1.0"],"山奈提供了一些字符串处理的函数":["2.0"],"判断字符串是否为空":["2.2"],"code":["2.4","2.8","2.20"],"获取字符串的长度":["2.6"],"将字节格式化为":["2.10"],"输入参数":["2.12","2.16"],"bytes":["2.12"],"字节数":["2.12"],"一个json对象":["2.12","2.16"],"可选":["2.12","2.16"],"检查密码强度的函数":["2.14"],"password":["2.16"],"密码":["2.16"],"有以下内容":["2.16"],"minlength":["2.16"],"密码最小长度":["2.16"],"默认为8":["2.16"],"检查邮箱格式的函数":["2.18"],"group":["2.20"],"山奈提供了一些方便的方法来处理":["3.0"],"url":["3.2","3.5","3.6","3.7"],"获取":["3.5","3.6","3.7"],"我们使用":["5.0"],"yarn":["5.0"],"作为包管理工具":["5.0"],"请先安装":["5.0"],"warning":["6.0"],"山奈":["6.1"],"galanga":["6.1"],"以下简称山奈":["6.1"],"相比其他的函数库":["6.2"],"单元测试保证支持如下环境":["6.3"],"ie":["6.3"],"vpteammembers":["6.5"],"请在github上或者gitee上查看贡献者名单":["6.6"],"为了方便各位开发者的交流":["6.7"],"在npm项目下":["7.1"],"您可以通过以下命令安装山奈":["7.1"],"在html单页面下":["7.4"],"您可以在官方仓库内下载山奈的打包产物":["7.4"],"然后引入至您的html文件中":["7.4"],"这里列出会在未来添加的新功能":["8.0"],"这是一个基于":["10.0"]},{"是一个对象":["0.2"],"import":["0.3","2.3","2.7","2.11","2.15","2.19","3.3","7.2","7.3"],"的值":["0.5","0.6"],"如果":["0.5","0.6"],"code":["0.7","7.1"],"清空所有":["0.8"],"您可以查看您所需要的api的详细信息":["1.0"],"用于处理字符串":["2.0"],"如果字符串为空":["2.2","2.6"],"group":["2.4","2.8","7.1"],"js":["2.4","2.8","2.20","7.4"],"b":["2.10"],"有以下内容":["2.12"],"decimals":["2.12"],"保留的小数位数":["2.12"],"默认为1":["2.12"],"from":["2.12"],"输入的字节单位":["2.12"],"如果符合要求":["2.14","2.18"],"maxlength":["2.16"],"密码最大长度":["2.16"],"默认为16":["2.16"],"types":["2.16"],"字符类型":["2.16"],"分别为数字":["2.16"],"小写字母":["2.16"],"大写字母":["2.16"],"特殊字符":["2.16"],"按需引入":["2.20"],"是一个用于处理":["3.2"],"参数的值":["3.5"],"如果参数不存在":["3.5"],"则返回":["3.5"],"的":["3.6"],"hash":["3.6"],"值":["3.6"],"的路径":["3.7"],"如果路径不存在":["3.7"],"bash":["5.0"],"npm":["5.0"],"install":["5.0"],"g":["5.0"],"安装依赖":["5.0"],"本项目仍处于开发阶段":["6.0"],"是川菜中常用的调味品":["6.1"],"也可以用作腌制成为单独的菜品":["6.1"],"而这一辅料被人们俗称为姜":["6.1"],"山奈希望提供在业务中常用的一些函数":["6.2"],"ch":["6.3"],"ff":["6.3"],"sf":["6.3"],"size":["6.5"],"如果您也想对山奈做出贡献":["6.6"],"我们在各大平台都开设了有关山奈的交流群":["6.7"],"欢迎大家加入":["6.7"],"例如您将山奈的打包产物放在":["7.4"],"galanga":["7.4"],"目录下":["7.4"],"和已经完成的功能":["8.0"],"vitepress":["10.0"]},{"1":["4.4"],"19":["4.3"],"20":["4.2"],"21":["4.1"],"2023":["4.1","4.2","4.3"],"操作函数":["0.0"],"包含了一些常用的":["0.2"],"cookie":["0.2"],"localcookie":["0.3"],"不存在":["0.5","0.6","3.6"],"则返回":["0.5","2.2","2.6","2.14","2.18","3.7"],"则创建":["0.6"],"group":["0.7","0.8","2.12"],"js":["0.7"],"code":["0.8","2.12","3.5","3.7"],"请注意的是":["1.0"],"checknull":["2.3"],"按需引入":["2.4","2.8"],"strlength":["2.7"],"kb":["2.10"],"mb":["2.10"],"formatbytes":["2.11"],"默认为b":["2.12"],"to":["2.12"],"输出的字节单位":["2.12"],"checkpassword":["2.15"],"默认为":["2.16"],"number":["2.16"],"lowercase":["2.16"],"uppercase":["2.16"],"special":["2.16"],"mintypes":["2.16"],"最少包含的字符类型":["2.16"],"默认为2":["2.16"],"maxtypes":["2.16"],"checkemail":["2.19","2.20"],"info":["2.20"],"url":["3.3"],"null":["3.5","3.7"],"如果":["3.6"],"一键打包生成生产代码":["5.0"],"api可能会发生变化":["6.0"],"在web的世界里":["6.1"],"它是一个开源的实用的js函数库":["6.1"],"它的目标是提供一些常用的函数":["6.1"],"让你的代码更简洁更易读":["6.1"],"而山奈也是基于typescript开发的":["6.2"],"op":["6.3"],"ios":["6.3"],"android":["6.3"],"small":["6.5"],"请参考贡献指南":["6.6"],"qq":["6.7"],"bash":["7.1"],"yarn":["7.1"],"galanga":["7.2"],"from":["7.2","7.3"],"name":["7.3"],"您可以通过以下方式引入山奈":["7.4"],"html":["7.4"],"当然":["7.4"],"x":["8.0"],"的文档站点":["10.0"]},{"0":["2.6"],"1":["2.12"],"3":["4.1","4.2","4.3"],"6":["6.3"],"29":["6.3"],"2023":["4.4"],"346363551":["6.7"],"包括获取":["0.0"],"操作函数":["0.2"],"from":["0.3","2.3","2.7","2.11","2.15","2.19","3.3"],"null":["0.5","3.6"],"code":["0.5","0.6","2.16","3.6"],"group":["0.5","0.6","2.16","3.5","3.7"],"js":["0.6","0.8","2.12","2.16","3.5","3.7"],"按需引入":["0.7","0.8","2.12","2.16","3.5"],"localcookie":["0.7"],"在这里演示的所有api均以es6的语法为基础":["1.0"],"true":["2.2","2.14","2.18"],"checknull":["2.4"],"name":["2.4","2.8"],"strlength":["2.8"],"gb":["2.10"],"const":["2.12","2.16"],"json":["2.12","2.16"],"最多包含的字符类型":["2.16"],"默认为4":["2.16"],"sancerain":["2.20"],"com":["2.20"],"的函数":["3.2"],"则返回":["3.6"],"run":["5.0"],"build":["5.0"],"运行单元测试":["5.0"],"test":["5.0"],"请勿用于生产环境":["6.0"],"我们希望利用姜来让您的代码更加美味":["6.1"],"让您更加专注于业务逻辑的实现":["6.1"],"使用es6":["6.1"],"因此在使用时":["6.2"],"node":["6.3"],"members":["6.5"],"以下是山奈的贡献者名单头像缩略图":["6.6"],"钉钉":["6.7"],"add":["7.1"],"galanga":["7.3"],"您也可以引入山奈的cdn链接":["7.4"],"引入完成后":["7.4"],"您可以在项目中使用全部功能":["7.4"],"已完成":["8.0"],"您也可以直接在这里浏览文档源文件":["10.0"]},{"2":["2.16","4.4"],"8":["2.16"],"9":["6.3"],"16":["2.16"],"19":["4.2"],"22":["4.1"],"50":["6.3"],"55":["6.3"],"1024":["2.12"],"设置":["0.0","0.2"],"删除":["0.0"],"包括获取":["0.2"],"galanga":["0.3","2.3","2.7","2.11","2.15","2.19","3.3","7.1"],"js":["0.5","3.6"],"按需引入":["0.5","0.6","3.6","3.7"],"localcookie":["0.5","0.6","0.8"],"setitem":["0.6"],"name":["0.6","0.7","3.5"],"removeitem":["0.7"],"clear":["0.8"],"如果您使用的是其他类型的语法或者安装方法":["1.0"],"否则返回":["2.2","2.14","2.18"],"全局引入":["2.4","2.8","2.20"],"tb":["2.10"],"pb":["2.10"],"b":["2.12"],"kb":["2.12"],"formatbytes":["2.12"],"它提供了一些方便的方法来处理":["3.2"],"getquery":["3.5"],"group":["3.6"],"新增了":["4.1","4.2"],"注意":["5.0"],"浏览器环境需要手动测试":["5.0"],"位于":["5.0"],"browser":["5.0"],"修改":["5.0"],"和typescript编写源码":["6.1"],"编译生成生产代码":["6.1"],"多环境支持":["6.1"],"您可以获得更好的类型提示":["6.2"],"贡献者名单":["6.6"],"山奈galanga开源js函数库交流群":["6.7"],"telegram":["6.7"],"npm":["7.1"],"console":["7.2","7.3","7.4"],"log":["7.3","7.4"],"目前暂不支持将部分函数单独引入至项目内":["7.4"],"未完成":["8.0"]},{"4":["2.16","6.3"],"12345678":["2.16"],"删除":["0.2"],"getitem":["0.5"],"name":["0.5","7.4"],"value":["0.6"],"全局引入":["0.6","0.7","0.8","2.12","2.16","3.5","3.7"],"galanga":["0.7","2.4","2.8","2.20"],"您需要自行转换":["1.0"],"false":["2.2","2.14","2.18"],"eb":["2.10"],"var":["2.12","2.16"],"checkpassword":["2.16","4.2"],"gethash":["3.6"],"getpath":["3.7"],"checkemail":["4.1"],"修复了":["4.3"],"formatbytes":["4.3"],"package":["5.0"],"json":["5.0"],"中的版本号":["5.0"],"readme":["5.0"],"支持浏览器原生":["6.1"],"支持amd":["6.1"],"cmd":["6.1"],"支持webpack":["6.1"],"censujiang":["6.7"],"install":["7.1"],"log":["7.2"],"我们更推荐使用npm项目的方式引入山奈":["7.4"]},{"等":["0.0","0.2"],"全局引入":["0.5","3.6"],"galanga":["0.5","0.6","0.8","3.5","3.6","3.7"],"zb":["2.10"],"yb":["2.10"],"函数":["4.1","4.2"],"用于检查邮箱格式":["4.1"],"用于检查密码强度":["4.2"],"函数的两个bug":["4.3"],"项目发布测试版本":["4.4"],"md":["5.0"],"changelog":["5.0"],"然后发布新版":["5.0"],"rollup":["6.1"],"fis等":["6.1"],"支持node":["6.1"],"注意":["6.3"],"编译代码依赖es5环境":["6.3"],"对于ie6":["6.3"],"group":["6.7"],"微信":["6.7"],"安装完成后":["7.1"],"name":["7.2"],"我们在后文的使用示例中":["7.3"],"基本上都是使用这种方式引入山奈的":["7.3"],"因为这样不仅可以更好地管理依赖":["7.4"],"还可以使用您的打包工具的摇树功能动态修剪您的代码":["7.4"],"在查看后文的使用示例时":["7.4"],"请使用":["7.4"]},{"galanga":["2.12","2.16"],"release":["5.0"],"无依赖":["6.1"],"体积小巧":["6.1"],"8需要引入es5":["6.3"],"shim才可以兼容":["6.3"],"微信群":["6.7"],"您可以在项目中引入山奈并使用对应的功能":["7.1"],"作为全局变量后再加具体的功能函数名":["7.4"]}]'},a={"0.0":{t:"cookie",p:`山奈提供了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。 -`,l:"api/cookie.html",a:"cookie"},"0.1":{t:"localcookie",p:"\r",l:"api/cookie.html#localcookie",a:"localcookie"},"0.2":{t:"简介",p:`localCookie 是一个对象,包含了一些常用的 Cookie 操作函数,包括获取、设置、删除 Cookie 等。 -`,l:"api/cookie.html#简介",a:"简介"},"0.3":{t:"导入",p:`import { localCookie } from 'galanga' - -`,l:"api/cookie.html#导入",a:"导入"},"0.4":{t:"使用",p:"\r",l:"api/cookie.html#使用",a:"使用"},"0.5":{t:"获取-cookie",p:`获取 Cookie 的值,如果 Cookie 不存在,则返回 null。 -::: code-group -localCooki ...`,l:"api/cookie.html#获取-cookie",a:"获取-cookie"},"0.6":{t:"设置-cookie",p:`设置 Cookie 的值,如果 Cookie 不存在,则创建 Cookie。 -::: code-group -localCoo ...`,l:"api/cookie.html#设置-cookie",a:"设置-cookie"},"0.7":{t:"删除-cookie",p:`删除 Cookie。 -::: code-group -localCookie.removeItem('name') - -gala ...`,l:"api/cookie.html#删除-cookie",a:"删除-cookie"},"0.8":{t:"清空-cookie",p:`清空所有 Cookie。 -::: code-group -localCookie.clear() - -galanga.local ...`,l:"api/cookie.html#清空-cookie",a:"清空-cookie"},"1.0":{t:"前言",p:`在本站的API信息栏目中,您可以查看您所需要的API的详细信息。 -请注意的是,在这里演示的所有API均以ES6的语法为基础, ...`,l:"api/index.html",a:"前言"},"2.0":{t:"string",p:`山奈提供了一些字符串处理的函数,用于处理字符串。 -`,l:"api/string.html",a:"string"},"2.1":{t:"checknull",p:"\r",l:"api/string.html#checknull",a:"checknull"},"2.2":{t:"介绍",p:`判断字符串是否为空,如果字符串为空,则返回 true,否则返回 false。 -`,l:"api/string.html#介绍",a:"介绍"},"2.3":{t:"导入",p:`import { checkNull } from 'galanga' - -`,l:"api/string.html#导入",a:"导入"},"2.4":{t:"使用",p:`::: code-group -checkNull(name) - -galanga.checkNull(name) - -::: -`,l:"api/string.html#使用",a:"使用"},"2.5":{t:"strlength",p:"\r",l:"api/string.html#strlength",a:"strlength"},"2.6":{t:"介绍",p:`获取字符串的长度,如果字符串为空,则返回 0。 -`,l:"api/string.html#介绍",a:"介绍"},"2.7":{t:"导入",p:`import { strLength } from 'galanga' - -`,l:"api/string.html#导入",a:"导入"},"2.8":{t:"使用",p:`::: code-group -strLength(name) - -galanga.strLength(name) - -::: -`,l:"api/string.html#使用",a:"使用"},"2.9":{t:"formatbytes",p:"\r",l:"api/string.html#formatbytes",a:"formatbytes"},"2.10":{t:"介绍",p:`将字节格式化为 B、KB、MB、GB、TB、PB、EB、ZB、YB。 -`,l:"api/string.html#介绍",a:"介绍"},"2.11":{t:"导入",p:`import { formatBytes } from 'galanga' - -`,l:"api/string.html#导入",a:"导入"},"2.12":{t:"使用",p:`输入参数: - - -bytes:字节数 - - -一个json对象(可选),有以下内容: - - -decimals:保留的小数位数,默认为 ...`,l:"api/string.html#使用",a:"使用"},"2.13":{t:"checkpassword",p:"\r",l:"api/string.html#checkpassword",a:"checkpassword"},"2.14":{t:"介绍",p:`检查密码强度的函数,如果符合要求,则返回 true,否则返回 false。 -`,l:"api/string.html#介绍",a:"介绍"},"2.15":{t:"导入",p:`import { checkPassword } from 'galanga' - -`,l:"api/string.html#导入",a:"导入"},"2.16":{t:"使用",p:`输入参数: - - -password:密码 - - -一个json对象(可选),有以下内容: - - -minLength:密码最小长度,默 ...`,l:"api/string.html#使用",a:"使用"},"2.17":{t:"checkemail",p:"\r",l:"api/string.html#checkemail",a:"checkemail"},"2.18":{t:"介绍",p:`检查邮箱格式的函数,如果符合要求,则返回 true,否则返回 false。 -`,l:"api/string.html#介绍",a:"介绍"},"2.19":{t:"导入",p:`import { checkEmail } from 'galanga' - -`,l:"api/string.html#导入",a:"导入"},"2.20":{t:"使用",p:`::: code-group -checkEmail('info@sancerain.com') - -galanga.check ...`,l:"api/string.html#使用",a:"使用"},"3.0":{t:"url",p:`山奈提供了一些方便的方法来处理 URL。 -`,l:"api/url.html",a:"url"},"3.1":{t:"url",p:"",l:"api/url.html#url",a:"url"},"3.2":{t:"介绍",p:`url 是一个用于处理 URL 的函数,它提供了一些方便的方法来处理 URL。 -`,l:"api/url.html#介绍",a:"介绍"},"3.3":{t:"导入",p:`import { url } from 'galanga' - -`,l:"api/url.html#导入",a:"导入"},"3.4":{t:"使用",p:"\r",l:"api/url.html#使用",a:"使用"},"3.5":{t:"获取url的参数",p:`获取 URL 参数的值,如果参数不存在,则返回 null。 -::: code-group -url.getQuery('nam ...`,l:"api/url.html#获取url的参数",a:"获取url的参数"},"3.6":{t:"获取url的hash",p:`获取 URL 的 hash 值,如果 hash 不存在,则返回 null。 -::: code-group -url.getHa ...`,l:"api/url.html#获取url的hash",a:"获取url的hash"},"3.7":{t:"获取url的路径",p:`获取 URL 的路径,如果路径不存在,则返回 null。 -::: code-group -url.getPath() - -gal ...`,l:"api/url.html#获取url的路径",a:"获取url的路径"},"4.0":{t:"更新日志",p:"",l:"guide/changelog.html",a:"更新日志"},"4.1":{t:"_0-0-21-2023-3-22",p:` -新增了 checkEmail 函数,用于检查邮箱格式 - -`,l:"guide/changelog.html#_0-0-21-2023-3-22",a:"_0-0-21-2023-3-22"},"4.2":{t:"_0-0-20-2023-3-19",p:` -新增了 checkPassword 函数,用于检查密码强度 - -`,l:"guide/changelog.html#_0-0-20-2023-3-19",a:"_0-0-20-2023-3-19"},"4.3":{t:"_0-0-19-2023-3-19",p:` -修复了 formatBytes 函数的两个bug - -`,l:"guide/changelog.html#_0-0-19-2023-3-19",a:"_0-0-19-2023-3-19"},"4.4":{t:"_0-0-1-2023-2-1",p:` -项目发布测试版本 - -`,l:"guide/changelog.html#_0-0-1-2023-2-1",a:"_0-0-1-2023-2-1"},"5.0":{t:"贡献指南",p:`我们使用 yarn 作为包管理工具,请先安装 yarn -npm install yarn -g - -安装依赖 -yarn - -一键 ...`,l:"guide/contribute.html",a:"贡献指南"},"6.0":{t:"入门",p:`::: warning -本项目仍处于开发阶段,API可能会发生变化,请勿用于生产环境。 -::: -`,l:"guide/index.html",a:"入门"},"6.1":{t:"项目简介",p:`山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。 -在Web ...`,l:"guide/index.html#项目简介",a:"项目简介"},"6.2":{t:"使用理由",p:"相比其他的函数库,山奈希望提供在业务中常用的一些函数,而山奈也是基于TypeScript开发的,因此在使用时,您可以获得更好 ...",l:"guide/index.html#使用理由",a:"使用理由"},"6.3":{t:"兼容性",p:`单元测试保证支持如下环境: - - - -IE -CH -FF -SF -OP -IOS -Android -Node - - - - -6+ -29+ -55 ...`,l:"guide/index.html#兼容性",a:"兼容性"},"6.4":{t:"开发人员",p:"\r",l:"guide/index.html#开发人员",a:"开发人员"},"6.5":{t:"负责人",p:"<VPTeamMembers size="small" :members="member ...",l:"guide/index.html#负责人",a:"负责人"},"6.6":{t:"贡献者",p:`请在Github上或者Gitee上查看贡献者名单,如果您也想对山奈做出贡献,请参考贡献指南。 -以下是山奈的贡献者名单头像缩略 ...`,l:"guide/index.html#贡献者",a:"贡献者"},"6.7":{t:"入群交流",p:`为了方便各位开发者的交流,我们在各大平台都开设了有关山奈的交流群,欢迎大家加入。 - - -QQ:346363551 - - -钉钉:山 ...`,l:"guide/index.html#入群交流",a:"入群交流"},"7.0":{t:"安装",p:"\r",l:"guide/install.html",a:"安装"},"7.1":{t:"在npm项目下使用",p:`在NPM项目下,您可以通过以下命令安装山奈: -::: code-group -yarn add galanga - -npm in ...`,l:"guide/install.html#在npm项目下使用",a:"在npm项目下使用"},"7.2":{t:"全部引入",p:`import galanga from 'galanga' - -console.log(galanga.name) - -`,l:"guide/install.html#全部引入",a:"全部引入"},"7.3":{t:"按需引入",p:`import { name } from 'galanga' - -console.log(name) - -我们在后文的使用示例中 ...`,l:"guide/install.html#按需引入",a:"按需引入"},"7.4":{t:"在html单页面下使用",p:"在HTML单页面下,您可以在官方仓库内下载山奈的打包产物,然后引入至您的HTML文件中,例如您将山奈的打包产物放在 /js/ ...",l:"guide/install.html#在html单页面下使用",a:"在html单页面下使用"},"8.0":{t:"项目计划",p:`这里列出会在未来添加的新功能,和已经完成的功能 - -[X] 已完成 -[ ] 未完成 - -`,l:"guide/todo.html",a:"项目计划"},"10.0":{t:"提示",p:`这是一个基于 VitePress 的文档站点。您也可以直接在这里浏览文档源文件。 -`,l:"README.html",a:"提示"}},n={previewLength:62,buttonLabel:"搜索",placeholder:"搜索此文档..."},e={INDEX_DATA:l,PREVIEW_LOOKUP:a,Options:n};export{e as default}; diff --git a/docs/assets/guide_changelog.md.9c43410b.js b/docs/assets/guide_changelog.md.9c43410b.js new file mode 100644 index 0000000..2638715 --- /dev/null +++ b/docs/assets/guide_changelog.md.9c43410b.js @@ -0,0 +1 @@ +import{_ as a,o as e,c as o,U as t}from"./chunks/framework.fd4dbc48.js";const f=JSON.parse('{"title":"更新日志","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md","lastUpdated":1679483547000}'),l={name:"guide/changelog.md"},r=t('

更新日志

0.0.22 (2023-4-7)

  • 新增了 checkDeviceType 函数,用于检查设备类型,此函数不稳定,可能会在后续版本中修改

0.0.21 (2023-3-22)

  • 新增了 checkEmail 函数,用于检查邮箱格式

0.0.20 (2023-3-19)

  • 新增了 checkPassword 函数,用于检查密码强度

0.0.19 (2023-3-19)

  • 修复了 formatBytes 函数的两个bug

0.0.1 (2023-2-1)

  • 项目发布测试版本
',11),i=[r];function c(d,h,n,s,_,u){return e(),o("div",null,i)}const b=a(l,[["render",c]]);export{f as __pageData,b as default}; diff --git a/docs/assets/guide_changelog.md.9c43410b.lean.js b/docs/assets/guide_changelog.md.9c43410b.lean.js new file mode 100644 index 0000000..f2c44bc --- /dev/null +++ b/docs/assets/guide_changelog.md.9c43410b.lean.js @@ -0,0 +1 @@ +import{_ as a,o as e,c as o,U as t}from"./chunks/framework.fd4dbc48.js";const f=JSON.parse('{"title":"更新日志","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md","lastUpdated":1679483547000}'),l={name:"guide/changelog.md"},r=t("",11),i=[r];function c(d,h,n,s,_,u){return e(),o("div",null,i)}const b=a(l,[["render",c]]);export{f as __pageData,b as default}; diff --git a/docs/assets/guide_changelog.md.f04ab608.js b/docs/assets/guide_changelog.md.f04ab608.js deleted file mode 100644 index 585c546..0000000 --- a/docs/assets/guide_changelog.md.f04ab608.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as t,U as o}from"./chunks/framework.fd4dbc48.js";const f=JSON.parse('{"title":"更新日志","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md","lastUpdated":1679483547000}'),l={name:"guide/changelog.md"},r=o('

更新日志

0.0.21 (2023-3-22)

  • 新增了 checkEmail 函数,用于检查邮箱格式

0.0.20 (2023-3-19)

  • 新增了 checkPassword 函数,用于检查密码强度

0.0.19 (2023-3-19)

  • 修复了 formatBytes 函数的两个bug

0.0.1 (2023-2-1)

  • 项目发布测试版本
',9),i=[r];function c(d,n,h,s,_,u){return e(),t("div",null,i)}const p=a(l,[["render",c]]);export{f as __pageData,p as default}; diff --git a/docs/assets/guide_changelog.md.f04ab608.lean.js b/docs/assets/guide_changelog.md.f04ab608.lean.js deleted file mode 100644 index cf61884..0000000 --- a/docs/assets/guide_changelog.md.f04ab608.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as t,U as o}from"./chunks/framework.fd4dbc48.js";const f=JSON.parse('{"title":"更新日志","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md","lastUpdated":1679483547000}'),l={name:"guide/changelog.md"},r=o("",9),i=[r];function c(d,n,h,s,_,u){return e(),t("div",null,i)}const p=a(l,[["render",c]]);export{f as __pageData,p as default}; diff --git a/docs/assets/guide_index.md.34f2e2ef.js b/docs/assets/guide_index.md.3c263829.js similarity index 98% rename from docs/assets/guide_index.md.34f2e2ef.js rename to docs/assets/guide_index.md.3c263829.js index bc4d2b6..1118ae1 100644 --- a/docs/assets/guide_index.md.34f2e2ef.js +++ b/docs/assets/guide_index.md.3c263829.js @@ -1 +1 @@ -import{V as e}from"./chunks/theme.590836bb.js";import{o as r,c as i,C as n,b as o,U as a}from"./chunks/framework.fd4dbc48.js";const s="/assets/group_wechat.c21961d2.jpg",l="/assets/censujiang.5d873e4b.jpg",h=a('

入门

WARNING

本项目仍处于开发阶段,API可能会发生变化,请勿用于生产环境。

项目简介

山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。

在Web的世界里,它是一个开源的实用的JS函数库,它的目标是提供一些常用的函数,让你的代码更简洁更易读。我们希望利用姜来让您的代码更加美味,让您更加专注于业务逻辑的实现。

  • 使用ES6+和TypeScript编写源码,编译生成生产代码
  • 多环境支持(支持浏览器原生,支持AMD,CMD,支持Webpack,Rollup,fis等,支持Node)
  • 无依赖,体积小巧

使用理由

相比其他的函数库,山奈希望提供在业务中常用的一些函数,而山奈也是基于TypeScript开发的,因此在使用时,您可以获得更好的类型提示。

兼容性

单元测试保证支持如下环境:

IECHFFSFOPIOSAndroidNode
6+29+55+9+50+9+4+4+

注意:编译代码依赖ES5环境,对于ie6-8需要引入es5-shim才可以兼容。

开发人员

负责人

',14),c=a('

贡献者

请在Github上或者Gitee上查看贡献者名单,如果您也想对山奈做出贡献,请参考贡献指南

以下是山奈的贡献者名单头像缩略图:

贡献者名单

入群交流

为了方便各位开发者的交流,我们在各大平台都开设了有关山奈的交流群,欢迎大家加入。

',7),b=JSON.parse('{"title":"入门","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","lastUpdated":1679159525000}'),p={name:"guide/index.md"},k=Object.assign(p,{setup(d){const t=[{avatar:l,name:"江程训",title:"CTO",org:"山茨昕雨",orgLink:"https://sancerain.com",desc:"Web前端/WordPress/开源爱好者",links:[{icon:"github",link:"https://github.com/censujiang"},{icon:"twitter",link:"https://twitter.com/censujiang"},{icon:"facebook",link:"https://www.facebook.com/censujiang/"},{icon:"instagram",link:"https://www.instagram.com/censujiang/"},{icon:"youtube",link:"https://www.youtube.com/@censujiang"}]}];return(u,m)=>(r(),i("div",null,[h,n(o(e),{size:"small",members:t}),c]))}});export{b as __pageData,k as default}; +import{V as e}from"./chunks/theme.262b2f72.js";import{o as r,c as i,C as n,b as o,U as a}from"./chunks/framework.fd4dbc48.js";const s="/assets/group_wechat.c21961d2.jpg",l="/assets/censujiang.5d873e4b.jpg",h=a('

入门

WARNING

本项目仍处于开发阶段,API可能会发生变化,请勿用于生产环境。

项目简介

山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。

在Web的世界里,它是一个开源的实用的JS函数库,它的目标是提供一些常用的函数,让你的代码更简洁更易读。我们希望利用姜来让您的代码更加美味,让您更加专注于业务逻辑的实现。

  • 使用ES6+和TypeScript编写源码,编译生成生产代码
  • 多环境支持(支持浏览器原生,支持AMD,CMD,支持Webpack,Rollup,fis等,支持Node)
  • 无依赖,体积小巧

使用理由

相比其他的函数库,山奈希望提供在业务中常用的一些函数,而山奈也是基于TypeScript开发的,因此在使用时,您可以获得更好的类型提示。

兼容性

单元测试保证支持如下环境:

IECHFFSFOPIOSAndroidNode
6+29+55+9+50+9+4+4+

注意:编译代码依赖ES5环境,对于ie6-8需要引入es5-shim才可以兼容。

开发人员

负责人

',14),c=a('

贡献者

请在Github上或者Gitee上查看贡献者名单,如果您也想对山奈做出贡献,请参考贡献指南

以下是山奈的贡献者名单头像缩略图:

贡献者名单

入群交流

为了方便各位开发者的交流,我们在各大平台都开设了有关山奈的交流群,欢迎大家加入。

',7),b=JSON.parse('{"title":"入门","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","lastUpdated":1679159525000}'),p={name:"guide/index.md"},k=Object.assign(p,{setup(d){const t=[{avatar:l,name:"江程训",title:"CTO",org:"山茨昕雨",orgLink:"https://sancerain.com",desc:"Web前端/WordPress/开源爱好者",links:[{icon:"github",link:"https://github.com/censujiang"},{icon:"twitter",link:"https://twitter.com/censujiang"},{icon:"facebook",link:"https://www.facebook.com/censujiang/"},{icon:"instagram",link:"https://www.instagram.com/censujiang/"},{icon:"youtube",link:"https://www.youtube.com/@censujiang"}]}];return(u,m)=>(r(),i("div",null,[h,n(o(e),{size:"small",members:t}),c]))}});export{b as __pageData,k as default}; diff --git a/docs/assets/guide_index.md.34f2e2ef.lean.js b/docs/assets/guide_index.md.3c263829.lean.js similarity index 93% rename from docs/assets/guide_index.md.34f2e2ef.lean.js rename to docs/assets/guide_index.md.3c263829.lean.js index 12e99e2..a88a3e6 100644 --- a/docs/assets/guide_index.md.34f2e2ef.lean.js +++ b/docs/assets/guide_index.md.3c263829.lean.js @@ -1 +1 @@ -import{V as e}from"./chunks/theme.590836bb.js";import{o as r,c as i,C as n,b as o,U as a}from"./chunks/framework.fd4dbc48.js";const s="/assets/group_wechat.c21961d2.jpg",l="/assets/censujiang.5d873e4b.jpg",h=a("",14),c=a("",7),b=JSON.parse('{"title":"入门","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","lastUpdated":1679159525000}'),p={name:"guide/index.md"},k=Object.assign(p,{setup(d){const t=[{avatar:l,name:"江程训",title:"CTO",org:"山茨昕雨",orgLink:"https://sancerain.com",desc:"Web前端/WordPress/开源爱好者",links:[{icon:"github",link:"https://github.com/censujiang"},{icon:"twitter",link:"https://twitter.com/censujiang"},{icon:"facebook",link:"https://www.facebook.com/censujiang/"},{icon:"instagram",link:"https://www.instagram.com/censujiang/"},{icon:"youtube",link:"https://www.youtube.com/@censujiang"}]}];return(u,m)=>(r(),i("div",null,[h,n(o(e),{size:"small",members:t}),c]))}});export{b as __pageData,k as default}; +import{V as e}from"./chunks/theme.262b2f72.js";import{o as r,c as i,C as n,b as o,U as a}from"./chunks/framework.fd4dbc48.js";const s="/assets/group_wechat.c21961d2.jpg",l="/assets/censujiang.5d873e4b.jpg",h=a("",14),c=a("",7),b=JSON.parse('{"title":"入门","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","lastUpdated":1679159525000}'),p={name:"guide/index.md"},k=Object.assign(p,{setup(d){const t=[{avatar:l,name:"江程训",title:"CTO",org:"山茨昕雨",orgLink:"https://sancerain.com",desc:"Web前端/WordPress/开源爱好者",links:[{icon:"github",link:"https://github.com/censujiang"},{icon:"twitter",link:"https://twitter.com/censujiang"},{icon:"facebook",link:"https://www.facebook.com/censujiang/"},{icon:"instagram",link:"https://www.instagram.com/censujiang/"},{icon:"youtube",link:"https://www.youtube.com/@censujiang"}]}];return(u,m)=>(r(),i("div",null,[h,n(o(e),{size:"small",members:t}),c]))}});export{b as __pageData,k as default}; diff --git a/docs/assets/guide_install.md.d1c07266.js b/docs/assets/guide_install.md.5995f391.js similarity index 76% rename from docs/assets/guide_install.md.d1c07266.js rename to docs/assets/guide_install.md.5995f391.js index 3db906a..526cea4 100644 --- a/docs/assets/guide_install.md.d1c07266.js +++ b/docs/assets/guide_install.md.5995f391.js @@ -1,5 +1,7 @@ -import{_ as s,o as a,c as n,U as l}from"./chunks/framework.fd4dbc48.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{},"headers":[],"relativePath":"guide/install.md","lastUpdated":1679483547000}'),p={name:"guide/install.md"},o=l(`

安装

在NPM项目下使用

在NPM项目下,您可以通过以下命令安装山奈:

bash
yarn add galanga
+import{_ as s,o as a,c as n,U as l}from"./chunks/framework.fd4dbc48.js";const F=JSON.parse('{"title":"安装","description":"","frontmatter":{},"headers":[],"relativePath":"guide/install.md","lastUpdated":1679483920000}'),p={name:"guide/install.md"},o=l(`

安装

在NPM项目下使用

在NPM项目下,您可以通过以下命令安装山奈:

bash
yarn add galanga
 
bash
npm install galanga
+
bash
pnpm install galanga
+
bash
cnpm install galanga
 

安装完成后,您可以在项目中引入山奈并使用对应的功能:

全部引入

js
import galanga from 'galanga'
 
 console.log(galanga.name)
@@ -9,4 +11,4 @@ import{_ as s,o as a,c as n,U as l}from"./chunks/framework.fd4dbc48.js";const g=
 

我们在后文的使用示例中,基本上都是使用这种方式引入山奈的。

在HTML单页面下使用

在HTML单页面下,您可以在官方仓库内下载山奈的打包产物,然后引入至您的HTML文件中,例如您将山奈的打包产物放在 /js/galanga/ 目录下,您可以通过以下方式引入山奈:

html
<script src="/js/galanga/index.js"></script>
 

当然,您也可以引入山奈的CDN链接:

html
<script src="https://cdn.jsdelivr.net/npm/galanga"></script>
 

引入完成后,您可以在项目中使用全部功能(目前暂不支持将部分函数单独引入至项目内):

js
console.log(galanga.name)
-

我们更推荐使用NPM项目的方式引入山奈,因为这样不仅可以更好地管理依赖,还可以使用您的打包工具的摇树功能动态修剪您的代码。

在查看后文的使用示例时,请使用 galanga 作为全局变量后再加具体的功能函数名。

`,19),e=[o];function t(c,r,i,d,y,D){return a(),n("div",null,e)}const C=s(p,[["render",t]]);export{g as __pageData,C as default}; +

我们更推荐使用NPM项目的方式引入山奈,因为这样不仅可以更好地管理依赖,还可以使用您的打包工具的摇树功能动态修剪您的代码。

在查看后文的使用示例时,请使用 galanga 作为全局变量后再加具体的功能函数名。

`,19),e=[o];function t(c,r,i,y,d,D){return a(),n("div",null,e)}const g=s(p,[["render",t]]);export{F as __pageData,g as default}; diff --git a/docs/assets/guide_install.md.5995f391.lean.js b/docs/assets/guide_install.md.5995f391.lean.js new file mode 100644 index 0000000..3e1ed6f --- /dev/null +++ b/docs/assets/guide_install.md.5995f391.lean.js @@ -0,0 +1 @@ +import{_ as s,o as a,c as n,U as l}from"./chunks/framework.fd4dbc48.js";const F=JSON.parse('{"title":"安装","description":"","frontmatter":{},"headers":[],"relativePath":"guide/install.md","lastUpdated":1679483920000}'),p={name:"guide/install.md"},o=l("",19),e=[o];function t(c,r,i,y,d,D){return a(),n("div",null,e)}const g=s(p,[["render",t]]);export{F as __pageData,g as default}; diff --git a/docs/assets/guide_install.md.d1c07266.lean.js b/docs/assets/guide_install.md.d1c07266.lean.js deleted file mode 100644 index 69b08cc..0000000 --- a/docs/assets/guide_install.md.d1c07266.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,U as l}from"./chunks/framework.fd4dbc48.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{},"headers":[],"relativePath":"guide/install.md","lastUpdated":1679483547000}'),p={name:"guide/install.md"},o=l("",19),e=[o];function t(c,r,i,d,y,D){return a(),n("div",null,e)}const C=s(p,[["render",t]]);export{g as __pageData,C as default}; diff --git a/docs/guide/changelog.html b/docs/guide/changelog.html index 4af2d22..05523ef 100644 --- a/docs/guide/changelog.html +++ b/docs/guide/changelog.html @@ -6,19 +6,19 @@ 更新日志 | 山奈Galanga - + - - + + -
Skip to content
On this page

更新日志

0.0.21 (2023-3-22)

  • 新增了 checkEmail 函数,用于检查邮箱格式

0.0.20 (2023-3-19)

  • 新增了 checkPassword 函数,用于检查密码强度

0.0.19 (2023-3-19)

  • 修复了 formatBytes 函数的两个bug

0.0.1 (2023-2-1)

  • 项目发布测试版本

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content
On this page

更新日志

0.0.22 (2023-4-7)

  • 新增了 checkDeviceType 函数,用于检查设备类型,此函数不稳定,可能会在后续版本中修改

0.0.21 (2023-3-22)

  • 新增了 checkEmail 函数,用于检查邮箱格式

0.0.20 (2023-3-19)

  • 新增了 checkPassword 函数,用于检查密码强度

0.0.19 (2023-3-19)

  • 修复了 formatBytes 函数的两个bug

0.0.1 (2023-2-1)

  • 项目发布测试版本

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/guide/contribute.html b/docs/guide/contribute.html index 8773daa..2227e6d 100644 --- a/docs/guide/contribute.html +++ b/docs/guide/contribute.html @@ -6,10 +6,10 @@ 贡献指南 | 山奈Galanga - + - + @@ -21,9 +21,9 @@

一键打包生成生产代码

bash
yarn run build
 

运行单元测试:

bash
yarn test
 

注意:浏览器环境需要手动测试,位于test/browser

修改 package.json 中的版本号,修改 README.md 中的版本号,修改 CHANGELOG.md,然后发布新版

bash
yarn run release
-

Released under Apache License 2.0 and package version 0.0.21

- +

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/guide/index.html b/docs/guide/index.html index 42cbc7d..547d997 100644 --- a/docs/guide/index.html +++ b/docs/guide/index.html @@ -6,19 +6,19 @@ 入门 | 山奈Galanga - + - - + + -
Skip to content
On this page

入门

WARNING

本项目仍处于开发阶段,API可能会发生变化,请勿用于生产环境。

项目简介

山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。

在Web的世界里,它是一个开源的实用的JS函数库,它的目标是提供一些常用的函数,让你的代码更简洁更易读。我们希望利用姜来让您的代码更加美味,让您更加专注于业务逻辑的实现。

  • 使用ES6+和TypeScript编写源码,编译生成生产代码
  • 多环境支持(支持浏览器原生,支持AMD,CMD,支持Webpack,Rollup,fis等,支持Node)
  • 无依赖,体积小巧

使用理由

相比其他的函数库,山奈希望提供在业务中常用的一些函数,而山奈也是基于TypeScript开发的,因此在使用时,您可以获得更好的类型提示。

兼容性

单元测试保证支持如下环境:

IECHFFSFOPIOSAndroidNode
6+29+55+9+50+9+4+4+

注意:编译代码依赖ES5环境,对于ie6-8需要引入es5-shim才可以兼容。

开发人员

负责人

贡献者

请在Github上或者Gitee上查看贡献者名单,如果您也想对山奈做出贡献,请参考贡献指南

以下是山奈的贡献者名单头像缩略图:

贡献者名单

入群交流

为了方便各位开发者的交流,我们在各大平台都开设了有关山奈的交流群,欢迎大家加入。

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content
On this page

入门

WARNING

本项目仍处于开发阶段,API可能会发生变化,请勿用于生产环境。

项目简介

山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。

在Web的世界里,它是一个开源的实用的JS函数库,它的目标是提供一些常用的函数,让你的代码更简洁更易读。我们希望利用姜来让您的代码更加美味,让您更加专注于业务逻辑的实现。

  • 使用ES6+和TypeScript编写源码,编译生成生产代码
  • 多环境支持(支持浏览器原生,支持AMD,CMD,支持Webpack,Rollup,fis等,支持Node)
  • 无依赖,体积小巧

使用理由

相比其他的函数库,山奈希望提供在业务中常用的一些函数,而山奈也是基于TypeScript开发的,因此在使用时,您可以获得更好的类型提示。

兼容性

单元测试保证支持如下环境:

IECHFFSFOPIOSAndroidNode
6+29+55+9+50+9+4+4+

注意:编译代码依赖ES5环境,对于ie6-8需要引入es5-shim才可以兼容。

开发人员

负责人

贡献者

请在Github上或者Gitee上查看贡献者名单,如果您也想对山奈做出贡献,请参考贡献指南

以下是山奈的贡献者名单头像缩略图:

贡献者名单

入群交流

为了方便各位开发者的交流,我们在各大平台都开设了有关山奈的交流群,欢迎大家加入。

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/guide/install.html b/docs/guide/install.html index fdffece..1173439 100644 --- a/docs/guide/install.html +++ b/docs/guide/install.html @@ -6,18 +6,20 @@ 安装 | 山奈Galanga - + - - + + -
Skip to content
On this page

安装

在NPM项目下使用

在NPM项目下,您可以通过以下命令安装山奈:

bash
yarn add galanga
+    
Skip to content
On this page

安装

在NPM项目下使用

在NPM项目下,您可以通过以下命令安装山奈:

bash
yarn add galanga
 
bash
npm install galanga
+
bash
pnpm install galanga
+
bash
cnpm install galanga
 

安装完成后,您可以在项目中引入山奈并使用对应的功能:

全部引入

js
import galanga from 'galanga'
 
 console.log(galanga.name)
@@ -27,9 +29,9 @@
 

我们在后文的使用示例中,基本上都是使用这种方式引入山奈的。

在HTML单页面下使用

在HTML单页面下,您可以在官方仓库内下载山奈的打包产物,然后引入至您的HTML文件中,例如您将山奈的打包产物放在 /js/galanga/ 目录下,您可以通过以下方式引入山奈:

html
<script src="/js/galanga/index.js"></script>
 

当然,您也可以引入山奈的CDN链接:

html
<script src="https://cdn.jsdelivr.net/npm/galanga"></script>
 

引入完成后,您可以在项目中使用全部功能(目前暂不支持将部分函数单独引入至项目内):

js
console.log(galanga.name)
-

我们更推荐使用NPM项目的方式引入山奈,因为这样不仅可以更好地管理依赖,还可以使用您的打包工具的摇树功能动态修剪您的代码。

在查看后文的使用示例时,请使用 galanga 作为全局变量后再加具体的功能函数名。

Released under Apache License 2.0 and package version 0.0.21

- +

我们更推荐使用NPM项目的方式引入山奈,因为这样不仅可以更好地管理依赖,还可以使用您的打包工具的摇树功能动态修剪您的代码。

在查看后文的使用示例时,请使用 galanga 作为全局变量后再加具体的功能函数名。

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/guide/todo.html b/docs/guide/todo.html index 479a303..875be22 100644 --- a/docs/guide/todo.html +++ b/docs/guide/todo.html @@ -6,19 +6,19 @@ 项目计划 | 山奈Galanga - + - + -
Skip to content
On this page

项目计划

这里列出会在未来添加的新功能,和已经完成的功能

  • [X] 已完成
  • [ ] 未完成

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content
On this page

项目计划

这里列出会在未来添加的新功能,和已经完成的功能

  • [X] 已完成
  • [ ] 未完成

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/docs/hashmap.json b/docs/hashmap.json index fa04943..3e4cf31 100644 --- a/docs/hashmap.json +++ b/docs/hashmap.json @@ -1 +1 @@ -{"guide_todo.md":"6ffa3d64","index.md":"ad64cd78","api_url.md":"9c04f055","guide_changelog.md":"f04ab608","guide_install.md":"d1c07266","readme.md":"a84286f9","api_cookie.md":"5f7e0040","api_string.md":"a6aa527a","api_index.md":"12ac22bc","guide_index.md":"34f2e2ef","guide_contribute.md":"5785b259"} +{"guide_todo.md":"6ffa3d64","guide_contribute.md":"5785b259","guide_install.md":"5995f391","guide_index.md":"3c263829","readme.md":"a84286f9","api_index.md":"12ac22bc","api_cookie.md":"1c4ad4a1","index.md":"ad64cd78","api_url.md":"417e0b08","api_device.md":"6585d07d","api_string.md":"1ed2f4ad","guide_changelog.md":"9c43410b"} diff --git a/docs/index.html b/docs/index.html index 64e359e..b3276b0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,19 +6,19 @@ 山奈Galanga | 山奈Galanga - + - + -
Skip to content

山奈Galanga

开源的JS常用函数库

简单引入,美味享受

🛠️

简单易用

直接引入,即可使用

📦

体积小巧

无依赖,更轻便

🚀

高性能

优化的代码,更快速

Released under Apache License 2.0 and package version 0.0.21

- +
Skip to content

山奈Galanga

开源的JS常用函数库

简单引入,美味享受

🛠️

简单易用

直接引入,即可使用

📦

体积小巧

无依赖,更轻便

🚀

高性能

优化的代码,更快速

Released under Apache License 2.0 and package version 0.0.22

+ \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index ffc4303..606964b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,3 +2,4 @@ export declare const name = "galanga"; export { localCookie } from './cookie'; export { url } from './url'; export { checkNull, strLength, formatBytes, checkPassword, checkEmail } from './string'; +export { checkDeviceType } from './device'; diff --git a/package.json b/package.json index 66ffe81..4d38949 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "galanga", - "version": "0.0.21", + "version": "0.0.22", "description": "JS common function library", "main": "dist/index.js", "jsnext:main": "dist/index.esm.js", diff --git a/src/device.ts b/src/device.ts new file mode 100644 index 0000000..8f24b25 --- /dev/null +++ b/src/device.ts @@ -0,0 +1,21 @@ +//根据UA检查设备是手机、平板、手表还是桌面 +//启动此函数后,将会检查当前浏览器的UA。 +//安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop +export function checkDeviceType() { + const ua = navigator.userAgent; + if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua)) { + if (/Android/i.test(ua)) { + return 'android'; + } else if (/iPhone|iPad|iPod/i.test(ua)) { + return 'ios'; + } else if (/iPad/i.test(ua)) { + return 'pad'; + } else if (/Watch/i.test(ua)) { + return 'watch'; + } else { + return 'desktop'; + } + } else { + return 'desktop'; + } +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index a9e7f33..6851571 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,4 +4,5 @@ export const name = 'galanga'; //引入并导出所有子模块 export { localCookie } from './cookie'; export { url } from './url'; -export { checkNull, strLength, formatBytes, checkPassword, checkEmail } from './string'; \ No newline at end of file +export { checkNull, strLength, formatBytes, checkPassword, checkEmail } from './string'; +export { checkDeviceType } from './device'; \ No newline at end of file diff --git a/src/string.ts b/src/string.ts index 4ff606b..fb0d553 100644 --- a/src/string.ts +++ b/src/string.ts @@ -102,4 +102,4 @@ export function checkPassword(password: string, { export function checkEmail(email: string) { const reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/ return reg.test(email) -} \ No newline at end of file +} diff --git a/wiki/.vitepress/config.js b/wiki/.vitepress/config.js index b353ed5..88c3bd9 100644 --- a/wiki/.vitepress/config.js +++ b/wiki/.vitepress/config.js @@ -56,6 +56,7 @@ export default { { text: '饼干Cookie', link: '/api/cookie' }, { text: '网址URL', link: '/api/url' }, { text: '字符串String', link: '/api/string' }, + { text: '设备Device', link: '/api/device' }, ] }, editLink: { diff --git a/wiki/api/device.md b/wiki/api/device.md new file mode 100644 index 0000000..5a978f1 --- /dev/null +++ b/wiki/api/device.md @@ -0,0 +1,31 @@ +# Device + +山奈提供了一些有关设备操作的API,可用来获取设备的信息,或者进行一些操作。 + +## `checkDeviceType()` + +### 介绍 + +检查当前设备的类型。 + +### 导入 + +```js +import { checkDeviceType } from 'galanga' +``` + +### 使用 + +安卓手机返回android,苹果手机返回ios,平板返回pad,手表返回watch,桌面返回desktop + +::: code-group + +```js [按需引入] +checkDeviceType() +``` + +```js [全局引入] +galanga.checkDeviceType() +``` + +::: \ No newline at end of file diff --git a/wiki/guide/changelog.md b/wiki/guide/changelog.md index ed9032f..733e4ca 100644 --- a/wiki/guide/changelog.md +++ b/wiki/guide/changelog.md @@ -1,5 +1,9 @@ # 更新日志 +## 0.0.22 (2023-4-7) + +- 新增了 `checkDeviceType` 函数,用于检查设备类型,此函数不稳定,可能会在后续版本中修改 + ## 0.0.21 (2023-3-22) - 新增了 `checkEmail` 函数,用于检查邮箱格式