UNPKG

weex-nuke

Version:

基于 Rax 、Weex 的高性能组件体系 ~~

54 lines (33 loc) 1.2 kB
# Util * category: API * chinese: 工具库 * type: API --- ## API Util classes provide common methods ### Util.urlHelper getSearchParameter (searchStr,key) Parse the value of the key of the search string. > base on [qs](https://github.com/ljharb/qs/tree/master/lib),which support next object and array parse ```js import { Util } from 'weex-nuke'; const getSearchParameter = Util.urlHelper.getSearchParameter; //Parse the value of the key value which is in the location.search or the serialized string. const search = '?id=987&type=1'; // or Util.Location.search console.log('id==>', getSearchParameter(search, 'id')); console.log('type==>', getSearchParameter(search, 'type')); ``` ### Util.is all kinds of judge function inlcude ```js is.url(value); is.emptyObj(value); is.alphaNumeric(value); is.decimal(value); is.existy(value); is.func(value); ``` ## The Other * Chat with <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=kjwo3w5">@翊晨[yichen]</a> in Dingtalk desktop App <a href='https://tms.dingtalk.com/markets/dingtalk/download'>Download</a> * DingTalk Group <img src="https://img.alicdn.com/tfs/TB101EESpXXXXXFXpXXXXXXXXXX-1122-1362.jpg" width="260" />