2.1.5 • Published 16 days ago
@yoronsoft/js-utils v2.1.5
js-utils
npm install @yoronsoft/js-utils
使用说明
utils 工具
import {utilsIs, utilsTo, utilsDate, utilsReplace,utilsContrast} from '@yoronsoft/js-utils'
XmlHttpRequest 数据请求
// header 类型
import {RequestData} from "@yoronsoft/js-utils";
RequestData.Header
// contentType 类型
RequestData.ContentType
// responseType 类型
RequestData.ResponseType
// method 类型
RequestData.Method
// 请求数据
const http = new RequestData();
// GET 方法
http.get(url, body)
// POST 方法
http.post(url, body)
// PUT 方法
http.put(url, body)
// DELETE 方法
http.delete(url, body)
// 设置异步,默认为异步
http.setAsync(data);
// 设置 header
http.setHeader(name, value);
// 设置 HeaderBasic
http.setHeaderBasic(value);
// 设置 HeaderBasicBy
http.setHeaderBasicBy(account, password);
// 设置 HeaderBearer
http.setHeaderBearer(value);
// 设置 ResponseType
http.setResponseType(data);
// 设置 过期时间
http.setTimeout(name, value);
redux
import {redux} from "@yoronsoft/js-utils";
redux.all();
// => any
redux.get<T>(name)
// => T
redux.create<T>(name, params, isInit)
// => T
redux.update<T>(name, params)
// => T
redux.remove(name)
// => void
redux.removeAndInit(name)
// => void
2.1.5
16 days ago
2.1.4
2 months ago
2.1.2
2 months ago
2.1.1
2 months ago
2.1.3
2 months ago
2.1.0
2 months ago
2.0.0
2 months ago
1.2.0
3 months ago
1.1.7
4 months ago
1.1.6
4 months ago
1.1.5
4 months ago
1.1.4
4 months ago
1.1.3
4 months ago
1.1.1
5 months ago
1.1.0
5 months ago
1.1.2
5 months ago
1.0.2
6 months ago
1.0.1
7 months ago
1.0.0
11 months ago