0.2.4 • Published 2 years ago
@flexem/utils v0.2.4
公共方法库
npm install @flexem/utils
或者
yarn add @flexem/utils
1、 cookie 相关操作
import { getCookie, setCookie, removeCookie } from '@flexem/utils';
getCookie(cookieName: string, defaultValue = '');
setCookie(domain:string, cookieName: string, value: string, defaultDays = 90);
removeCookie(domain:string, cookieName: string);
2、exec 执行方法
import exec from '@flexem/utils/dist/src/exec';
const [err, currentUser] = await exec(queryCurrent());
if (err) {
removeCookie(AppConfig.domain, AppConsts.accessToken);
window.location.href = AppConfig.loginUrl;
} else {
return currentUser;
}
3、生成16位guid
import { GuidGenerator } from '@flexem/utils';
GuidGenerator.newGuid()
0.2.1
2 years ago
0.2.0
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.9
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.1.6
2 years ago
0.2.4
2 years ago
0.1.5
2 years ago
0.1.0
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.3
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago