0.2.4 • Published 3 years ago

@flexem/utils v0.2.4

Weekly downloads
-
License
UTILS
Repository
github
Last release
3 years ago

公共方法库

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

3 years ago

0.2.0

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.1.6

3 years ago

0.2.4

3 years ago

0.1.5

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago