MCPcopy
hub / github.com/layui/layui / add

Function add

src/modules/jquery.js:8958–8968  ·  view source on GitHub ↗
(key, valueOrFunction)

Source from the content-addressed store, hash-verified

8956 var prefix,
8957 s = [],
8958 add = function (key, valueOrFunction) {
8959 // If value is a function, invoke it and use its return value
8960 var value = isFunction(valueOrFunction)
8961 ? valueOrFunction()
8962 : valueOrFunction;
8963
8964 s[s.length] =
8965 encodeURIComponent(key) +
8966 '=' +
8967 encodeURIComponent(value == null ? '' : value);
8968 };
8969
8970 if (a == null) {
8971 return '';

Callers 2

jquery.jsFile · 0.85
buildParamsFunction · 0.85

Calls 1

isFunctionFunction · 0.85

Tested by

no test coverage detected