@icreate/core
v0.0.26
Published
Ics核心包封装
Downloads
411
Maintainers
Keywords
Readme
Usage
npm i @icreate/core
Features
- Event:事件总线
- BlockUI:加载等待UI
- Logger:console.log封装
- Utils:工具类
- ics:ics对象
Importing library
You can import the generated bundle to use the whole library generated by this starter:
import { ics, Event, BlockUI, Logger, Utils, LogLevels, ExecOptons, UIOptions } from '@icreate/core'
Event
$on(eventName: string, callback: Function): void
$off(eventName: string, callback: Function): void
$emit(eventName: string): void
BlockUI
block(opts: UIOptions): void
unblock(opts: UIOptions): void
setBusy(opts: UIOptions): void
clearBusy(opts: UIOptions): void
Logger
level: LogLevels
debug(logObject: any): void
info(logObject: any): void
warn(logObject: any): void
error(logObject: any): void
fatal(logObject: any): void
Utils
createNamespace(root: any, ns: string): object
replaceAll(str: string, search: string, replacement: string): string
formatString(): string | null
toPascalCase(str: string): string
toCamelCase(str: string): string
truncateString(str: string, maxLength: number): string
truncateStringWithPostfix(str: string, maxLength: number, postfix: string): string
isFunction(obj: any): boolean
buildQueryString(key: string, value: string, expireDate: Date, path: string): void
getCookieValue(key: string): string | null
deleteCookie(key: string, path: string): void
htmlEscape(html: string): string
extend(dstObj: object, srcObj: object): object
command(opts: ExecOptons): void
function(opts: ExecOptons): Promise<any>
getFirstSpell(str: string): string | string[]
getFullSpell(str: string) : string
getStrokeCode(str: string): string