2.0.0 • Published 3 years ago

ult-meta v2.0.0

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

常量管理库

使用教程

`import UltMeta, {Meta} from "ult-meta";

class AppCodeMeta extends UltMeta { ACCOUNT = new Meta('lianxin-account', '001', 'processing'); ZM = new Meta("lianxin-zm", "002") AM = new Meta("lianxin-am", "003") WERM = new Meta("lianxin-werm", "004") FR = new Meta("lianxin-fr", "005") }

const APP_CODE_META = new AppCodeMeta();

获取常量code

APP_CODE_META.ACCOUNT.code; // 'lianxin-account'

获取常量intro

APP_CODE_META.ACCOUNT.intro; // 001'

获取常量状态

APP_CODE_META.ACCOUNT.state; // 'processing'

通过code获取intro

APP_CODE_META.getIntroByCode('lianxin-account'); // '001'

通过code获取state

APP_CODE_META.getStateByCode('lianxin-account');` // 'processing'

判断code是否匹配

APP_CODE_META.ACCOUNT.match('lianxin-account'); // true;

获取列表

APP_CODE_META.list // new Meta('lianxin-account', '001', 'processing'), new Meta("lianxin-zm", "002"), new Meta("lianxin-am", "003"),...

发布命令

npm run prepare npm version patch npm publish

2.0.0

3 years ago

1.0.9

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.12

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago