Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@icreate/core

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icreate/core

Ics核心包封装

  • 0.0.16
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-86.67%
Maintainers
2
Weekly downloads
 
Created
Source

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> 

ics

  appPath: string = '/'
  pageLoadTime = new Date()
  toAbsAppPath(path: string): string
  event: IEvent
  ui: IBlockUI
  log: ILogger
  utils: Utils

FAQs

Package last updated on 11 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc