0.0.26 • Published 2 years ago

@icreate/core v0.0.26

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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
0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago