Socket
Socket
Sign inDemoInstall

@festardoctor/utils-util

Package Overview
Dependencies
0
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

4

package.json

@@ -34,4 +34,4 @@ {

},
"version": "0.0.1",
"gitHead": "01a09802ef5a2ca679055348f42ace19c79c7620"
"version": "0.0.2",
"gitHead": "917032c1f34379b83878543c6699fa15efe14624"
}
## Modules
<dl>
<dt><a href="#module_@bbt/mt-utils-util/Base64Utils">@bbt/mt-utils-util/Base64Utils</a></dt>
<dt><a href="#module_@festardoctor/utils-util/Base64Utils">@festardoctor/utils-util/Base64Utils</a></dt>
<dd><p>Base64操作模块</p>
</dd>
<dt><a href="#module_@bbt/mt-utils-util/LoadScript">@bbt/mt-utils-util/LoadScript</a></dt>
<dt><a href="#module_@festardoctor/utils-util/LoadScript">@festardoctor/utils-util/LoadScript</a></dt>
<dd></dd>
<dt><a href="#module_@bbt/mt-utils-util/NumUtils">@bbt/mt-utils-util/NumUtils</a></dt>
<dt><a href="#module_@festardoctor/utils-util/NumUtils">@festardoctor/utils-util/NumUtils</a></dt>
<dd><p>数字操作工具模块</p>
</dd>
<dt><a href="#module_@bbt/mt-utils-util/ObjUtils">@bbt/mt-utils-util/ObjUtils</a></dt>
<dt><a href="#module_@festardoctor/utils-util/ObjUtils">@festardoctor/utils-util/ObjUtils</a></dt>
<dd><p>数据操作工具模块</p>
</dd>
<dt><a href="#module_@bbt/mt-utils-util/UrlUtils">@bbt/mt-utils-util/UrlUtils</a></dt>
<dt><a href="#module_@festardoctor/utils-util/UrlUtils">@festardoctor/utils-util/UrlUtils</a></dt>
<dd><p>URL操作工具模块</p>

@@ -20,8 +20,8 @@ </dd>

<a name="module_@bbt/mt-utils-util/Base64Utils"></a>
<a name="module_@festardoctor/utils-util/Base64Utils"></a>
## @bbt/mt-utils-util/Base64Utils
## @festardoctor/utils-util/Base64Utils
Base64操作模块
<a name="exp_module_@bbt/mt-utils-util/Base64Utils--base64Decode"></a>
<a name="exp_module_@festardoctor/utils-util/Base64Utils--base64Decode"></a>

@@ -31,16 +31,16 @@ ### base64Decode(str) ⇒ <code>String</code> ⏏

**Kind**: Exported function
**Kind**: Exported function
| Param | Type |
| --- | --- |
| str | <code>String</code> |
| str | <code>String</code> |
**Example**
**Example**
```js
Base64Utils.base64Decode("Uy5ILkkuRS5MLkQ=") === 'S.H.I.E.L.D'
```
<a name="module_@bbt/mt-utils-util/LoadScript"></a>
<a name="module_@festardoctor/utils-util/LoadScript"></a>
## @bbt/mt-utils-util/LoadScript
<a name="exp_module_@bbt/mt-utils-util/LoadScript--loadScript"></a>
## @festardoctor/utils-util/LoadScript
<a name="exp_module_@festardoctor/utils-util/LoadScript--loadScript"></a>

@@ -50,20 +50,20 @@ ### loadScript(opts, callback) ⏏

**Kind**: Exported function
**Kind**: Exported function
| Param | Type |
| --- | --- |
| opts | <code>Object</code> |
| callback | <code>function</code> |
| opts | <code>Object</code> |
| callback | <code>function</code> |
<a name="module_@bbt/mt-utils-util/NumUtils"></a>
<a name="module_@festardoctor/utils-util/NumUtils"></a>
## @bbt/mt-utils-util/NumUtils
## @festardoctor/utils-util/NumUtils
数字操作工具模块
* [@bbt/mt-utils-util/NumUtils](#module_@bbt/mt-utils-util/NumUtils)
* [num2str(num)](#exp_module_@bbt/mt-utils-util/NumUtils--num2str) ⇒ <code>String</code> ⏏
* [fillNumber(number, len, char)](#exp_module_@bbt/mt-utils-util/NumUtils--fillNumber) ⏏
* [@festardoctor/utils-util/NumUtils](#module_@festardoctor/utils-util/NumUtils)
* [num2str(num)](#exp_module_@festardoctor/utils-util/NumUtils--num2str) ⇒ <code>String</code> ⏏
* [fillNumber(number, len, char)](#exp_module_@festardoctor/utils-util/NumUtils--fillNumber) ⏏
<a name="exp_module_@bbt/mt-utils-util/NumUtils--num2str"></a>
<a name="exp_module_@festardoctor/utils-util/NumUtils--num2str"></a>

@@ -73,13 +73,13 @@ ### num2str(num) ⇒ <code>String</code> ⏏

**Kind**: Exported function
**Kind**: Exported function
| Param | Type |
| --- | --- |
| num | <code>Number</code> |
| num | <code>Number</code> |
**Example**
**Example**
```js
NumUtil.num2str(654.560) === '654.56'
```
<a name="exp_module_@bbt/mt-utils-util/NumUtils--fillNumber"></a>
<a name="exp_module_@festardoctor/utils-util/NumUtils--fillNumber"></a>

@@ -89,3 +89,3 @@ ### fillNumber(number, len, char) ⏏

**Kind**: Exported function
**Kind**: Exported function

@@ -98,3 +98,3 @@ | Param | Type | Default | Description |

**Example**
**Example**
```js

@@ -104,13 +104,13 @@ NumUtil.fillNumber(34,3)==='034'

```
<a name="module_@bbt/mt-utils-util/ObjUtils"></a>
<a name="module_@festardoctor/utils-util/ObjUtils"></a>
## @bbt/mt-utils-util/ObjUtils
## @festardoctor/utils-util/ObjUtils
数据操作工具模块
* [@bbt/mt-utils-util/ObjUtils](#module_@bbt/mt-utils-util/ObjUtils)
* [ObjUtils.extend(destination)](#exp_module_@bbt/mt-utils-util/ObjUtils--ObjUtils.extend) ⏏
* [ObjUtils.isEmptyObject(obj)](#exp_module_@bbt/mt-utils-util/ObjUtils--ObjUtils.isEmptyObject) ⇒ <code>Boolean</code> ⏏
* [@festardoctor/utils-util/ObjUtils](#module_@festardoctor/utils-util/ObjUtils)
* [ObjUtils.extend(destination)](#exp_module_@festardoctor/utils-util/ObjUtils--ObjUtils.extend) ⏏
* [ObjUtils.isEmptyObject(obj)](#exp_module_@festardoctor/utils-util/ObjUtils--ObjUtils.isEmptyObject) ⇒ <code>Boolean</code> ⏏
<a name="exp_module_@bbt/mt-utils-util/ObjUtils--ObjUtils.extend"></a>
<a name="exp_module_@festardoctor/utils-util/ObjUtils--ObjUtils.extend"></a>

@@ -120,9 +120,9 @@ ### ObjUtils.extend(destination) ⏏

**Kind**: Exported function
**Kind**: Exported function
| Param | Type |
| --- | --- |
| destination | <code>Object</code> |
| destination | <code>Object</code> |
<a name="exp_module_@bbt/mt-utils-util/ObjUtils--ObjUtils.isEmptyObject"></a>
<a name="exp_module_@festardoctor/utils-util/ObjUtils--ObjUtils.isEmptyObject"></a>

@@ -132,3 +132,3 @@ ### ObjUtils.isEmptyObject(obj) ⇒ <code>Boolean</code> ⏏

**Kind**: Exported function
**Kind**: Exported function

@@ -139,18 +139,18 @@ | Param | Type | Description |

<a name="module_@bbt/mt-utils-util/UrlUtils"></a>
<a name="module_@festardoctor/utils-util/UrlUtils"></a>
## @bbt/mt-utils-util/UrlUtils
## @festardoctor/utils-util/UrlUtils
URL操作工具模块
* [@bbt/mt-utils-util/UrlUtils](#module_@bbt/mt-utils-util/UrlUtils)
* [parseUrl(url)](#exp_module_@bbt/mt-utils-util/UrlUtils--parseUrl) ⇒ <code>Object</code> ⏏
* [getParams(url)](#exp_module_@bbt/mt-utils-util/UrlUtils--getParams) ⇒ <code>Object</code> ⏏
* [toCusString(obj)](#exp_module_@bbt/mt-utils-util/UrlUtils--toCusString) ⏏
* [appendParams(url, obj)](#exp_module_@bbt/mt-utils-util/UrlUtils--appendParams) ⏏
* [hasParam(url)](#exp_module_@bbt/mt-utils-util/UrlUtils--hasParam) ⏏
* [getUrlParamByName(name)](#exp_module_@bbt/mt-utils-util/UrlUtils--getUrlParamByName) ⇒ <code>\*</code> ⏏
* [appendHref(href, key, value)](#exp_module_@bbt/mt-utils-util/UrlUtils--appendHref) ⏏
* [@festardoctor/utils-util/UrlUtils](#module_@festardoctor/utils-util/UrlUtils)
* [parseUrl(url)](#exp_module_@festardoctor/utils-util/UrlUtils--parseUrl) ⇒ <code>Object</code> ⏏
* [getParams(url)](#exp_module_@festardoctor/utils-util/UrlUtils--getParams) ⇒ <code>Object</code> ⏏
* [toCusString(obj)](#exp_module_@festardoctor/utils-util/UrlUtils--toCusString) ⏏
* [appendParams(url, obj)](#exp_module_@festardoctor/utils-util/UrlUtils--appendParams) ⏏
* [hasParam(url)](#exp_module_@festardoctor/utils-util/UrlUtils--hasParam) ⏏
* [getUrlParamByName(name)](#exp_module_@festardoctor/utils-util/UrlUtils--getUrlParamByName) ⇒ <code>\*</code> ⏏
* [appendHref(href, key, value)](#exp_module_@festardoctor/utils-util/UrlUtils--appendHref) ⏏
<a name="exp_module_@bbt/mt-utils-util/UrlUtils--parseUrl"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--parseUrl"></a>

@@ -160,4 +160,4 @@ ### parseUrl(url) ⇒ <code>Object</code> ⏏

**Kind**: Exported function
**Returns**: <code>Object</code> - 解析后返回的对象, {"loc": loc,"params": params, "append": append}
**Kind**: Exported function
**Returns**: <code>Object</code> - 解析后返回的对象, {"loc": loc,"params": params, "append": append}

@@ -168,3 +168,3 @@ | Param | Type | Description |

**Example**
**Example**
```js

@@ -175,3 +175,3 @@ const url = 'https://m.meitun.com/pdetails.html?mtoapp=0&mtomeitun=302&sid=18405&pid=08010200640101&promotionId=18405&promotionType=1&topicType=1&url=//m.meitun.com/h5/group/group.html&index=1&referer_url=joingroup&referer_code=joingroupHot'

```
<a name="exp_module_@bbt/mt-utils-util/UrlUtils--getParams"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--getParams"></a>

@@ -181,10 +181,10 @@ ### getParams(url) ⇒ <code>Object</code> ⏏

**Kind**: Exported function
**Returns**: <code>Object</code> - 返回qs
**Kind**: Exported function
**Returns**: <code>Object</code> - 返回qs
| Param | Type |
| --- | --- |
| url | <code>String</code> |
| url | <code>String</code> |
**Example**
**Example**
```js

@@ -195,3 +195,3 @@ const url = 'https://m.meitun.com/pdetails.html?mtoapp=0&mtomeitun=302&sid=18405&pid=08010200640101&promotionId=18405&promotionType=1&topicType=1&url=//m.meitun.com/h5/group/group.html&index=1&referer_url=joingroup&referer_code=joingroupHot'

```
<a name="exp_module_@bbt/mt-utils-util/UrlUtils--toCusString"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--toCusString"></a>

@@ -201,3 +201,3 @@ ### toCusString(obj) ⏏

**Kind**: Exported function
**Kind**: Exported function

@@ -208,3 +208,3 @@ | Param | Type | Description |

**Example**
**Example**
```js

@@ -215,3 +215,3 @@ let obj = {loc: "https://m.meitun.com/pdetails.html",params: {a: 1, b: 2},append: "#aaa"}

```
<a name="exp_module_@bbt/mt-utils-util/UrlUtils--appendParams"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--appendParams"></a>

@@ -221,3 +221,3 @@ ### appendParams(url, obj) ⏏

**Kind**: Exported function
**Kind**: Exported function

@@ -229,3 +229,3 @@ | Param | Type | Description |

**Example**
**Example**
```js

@@ -236,3 +236,3 @@ let url = 'https://m.meitun.com/pdetails.html?a=1&b=2#aaa';

```
<a name="exp_module_@bbt/mt-utils-util/UrlUtils--hasParam"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--hasParam"></a>

@@ -242,3 +242,3 @@ ### hasParam(url) ⏏

**Kind**: Exported function
**Kind**: Exported function

@@ -249,3 +249,3 @@ | Param | Type | Description |

<a name="exp_module_@bbt/mt-utils-util/UrlUtils--getUrlParamByName"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--getUrlParamByName"></a>

@@ -255,4 +255,4 @@ ### getUrlParamByName(name) ⇒ <code>\*</code> ⏏

**Kind**: Exported function
**Returns**: <code>\*</code> - 返回url 查询参数值 没有则返回null
**Kind**: Exported function
**Returns**: <code>\*</code> - 返回url 查询参数值 没有则返回null

@@ -263,3 +263,3 @@ | Param | Description |

<a name="exp_module_@bbt/mt-utils-util/UrlUtils--appendHref"></a>
<a name="exp_module_@festardoctor/utils-util/UrlUtils--appendHref"></a>

@@ -269,3 +269,3 @@ ### appendHref(href, key, value) ⏏

**Kind**: Exported function
**Kind**: Exported function

@@ -278,3 +278,3 @@ | Param | Type | Description |

**Example**
**Example**
```js

@@ -281,0 +281,0 @@ let url = 'https://m.meitun.com/pdetails.html?a=1&b=2#aaa';

/**
* Base64操作模块
* @module @bbt/mt-utils-util/Base64Utils
* @module @festardoctor/utils-util/Base64Utils
*/

@@ -10,5 +10,5 @@

* @kind function
* @param {String} str
* @param {String} str
* @returns {String}
* @alias module:@bbt/mt-utils-util/Base64Utils
* @alias module:@festardoctor/utils-util/Base64Utils
* @example

@@ -18,3 +18,3 @@ * Base64Utils.base64Decode("Uy5ILkkuRS5MLkQ=") === 'S.H.I.E.L.D'

const base64Decode = str => {
var c1, c2, c3, c4;

@@ -84,2 +84,2 @@ var base64DecodeChars = new Array(

base64Decode
};
};
/**
* @module @bbt/mt-utils-util/LoadScript
* @module @festardoctor/utils-util/LoadScript
*/

@@ -10,5 +10,5 @@

* 动态加载外部JS脚本
* @param {Object} opts
* @param {Function} callback
* @alias module:@bbt/mt-utils-util/LoadScript
* @param {Object} opts
* @param {Function} callback
* @alias module:@festardoctor/utils-util/LoadScript
*/

@@ -40,2 +40,2 @@ function loadScript(opts, callback) {

export default loadScript;
export default loadScript;
/**
* 数字操作工具模块
* @module @bbt/mt-utils-util/NumUtils
* @module @festardoctor/utils-util/NumUtils
*/

@@ -9,5 +9,5 @@

* @kind function
* @param {Number} num
* @param {Number} num
* @returns {String}
* @alias module:@bbt/mt-utils-util/NumUtils
* @alias module:@festardoctor/utils-util/NumUtils
* @example

@@ -31,3 +31,3 @@ * NumUtil.num2str(654.560) === '654.56'

/**
* 字符串首部占位填充
* 字符串首部占位填充
* @kind function

@@ -37,3 +37,3 @@ * @param {Number} number 要填充的字符串

* @param {String} char 占位的字符,默认为'0'
* @alias module:@bbt/mt-utils-util/NumUtils
* @alias module:@festardoctor/utils-util/NumUtils
* @example

@@ -54,2 +54,2 @@ * NumUtil.fillNumber(34,3)==='034'

num2str
}
}
/**
* 数据操作工具模块
* @module @bbt/mt-utils-util/ObjUtils
* @module @festardoctor/utils-util/ObjUtils
*/

@@ -21,5 +21,5 @@

* 对象合并,建议用Object.assign来替代
* @param {Object} destination
* @param {Object} destination
* @kind function
* @alias module:@bbt/mt-utils-util/ObjUtils
* @alias module:@festardoctor/utils-util/ObjUtils
*/

@@ -43,3 +43,3 @@ ObjUtils.extend = function (destination) {

* @kind function
* @alias module:@bbt/mt-utils-util/ObjUtils
* @alias module:@festardoctor/utils-util/ObjUtils
*/

@@ -46,0 +46,0 @@ ObjUtils.isEmptyObject = function(obj){

/**
* URL操作工具模块
* @module @bbt/mt-utils-util/UrlUtils
*
* @module @festardoctor/utils-util/UrlUtils
*
*/

@@ -14,3 +14,3 @@ import ObjUtils from './ObjUtils';

* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @example

@@ -69,8 +69,8 @@ * const url = 'https://m.meitun.com/pdetails.html?mtoapp=0&mtomeitun=302&sid=18405&pid=08010200640101&promotionId=18405&promotionType=1&topicType=1&url=//m.meitun.com/h5/group/group.html&index=1&referer_url=joingroup&referer_code=joingroupHot'

* 获取URL的qs
* @param {String} url
* @returns {Object} 返回qs
* @param {String} url
* @returns {Object} 返回qs
* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @example
*
*
* const url = 'https://m.meitun.com/pdetails.html?mtoapp=0&mtomeitun=302&sid=18405&pid=08010200640101&promotionId=18405&promotionType=1&topicType=1&url=//m.meitun.com/h5/group/group.html&index=1&referer_url=joingroup&referer_code=joingroupHot'

@@ -88,3 +88,3 @@ * UrlUtils.getParams(url)

* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @param {Object} obj 类型{"loc": loc,"params": params, "append": append}

@@ -125,3 +125,3 @@ * @example

* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @example

@@ -154,3 +154,3 @@ * let url = 'https://m.meitun.com/pdetails.html?a=1&b=2#aaa';

* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @param {String} url 给定的url

@@ -187,3 +187,3 @@ */

* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @param name url 查询参数名

@@ -207,3 +207,3 @@ * @returns {*} 返回url 查询参数值 没有则返回null

* @kind function
* @alias module:@bbt/mt-utils-util/UrlUtils
* @alias module:@festardoctor/utils-util/UrlUtils
* @example

@@ -210,0 +210,0 @@ * let url = 'https://m.meitun.com/pdetails.html?a=1&b=2#aaa';

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc