nuke-util
v2.3.12
Published
工具库
Downloads
31
Readme
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,which support next object and array parse
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
is.url(value);
is.emptyObj(value);
is.alphaNumeric(value);
is.decimal(value);
is.existy(value);
is.func(value);
The Other
- Chat with @翊晨[yichen] in Dingtalk desktop App Download
- DingTalk Group