micell

授权协议 MIT License
开发语言 JavaScript
所属分类 程序开发、 正则表达式工具
软件类型 开源软件
地区 不详
投 递 者 阮阳曦
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

micell

Build StatuscodecovnpmDavidnpm bundle sizeNPMNetlify Status

English | 简体中文

A collection of functions for web development.

  • Base64 encoding and decoding a string or binary data
  • Character range checking
  • Cookie manipulation
  • Date diff and format
  • DOM computing and manipulation
  • Easing functions
  • Deciding the type of Javascript value
  • File path operation
  • Querystring parse and stringify
  • Common regular expressions
  • String manipulation
  • UserAgent detection
  • Ajax, css, jsonp, random string, uuid and more.

Install

Npm

npm i -S micell

Yarn

yarn add micell

CDN

If you want use micell with <script> directly, you can use jsDelivr.

The latest version:

<script src="https://cdn.jsdelivr.net/npm/micell"></script>

The specific version:

<script src="https://cdn.jsdelivr.net/npm/micell@0.1.0/dist/micell.js"></script>

The ES Modules version:

<script src="https://cdn.jsdelivr.net/npm/micell@0.1.0/dist/micell.esm.browser.js"></script>

The micell also exists in unpkg.

Usage

import micell from 'micell'

// Generate a random string
micell.randomString();

// Get a cookie value
micell.cookie.get('name')

More functions see the Docs.

Reduce the bundle size

You can use the babel-plugin-lodash to bundlethe methods as you needed.

.babelrc

{
  "plugins": [
    ["lodash", { "id": ["micell"] }]
  ]
}

Docs

See Docs.

Compatibility

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE >= 11
  • iOS >= 10
  • Android >= 5

Changelog

See Release notes.

Contributing

If you have a bug or feature request or document improvement about micell, you can open an issue or create a pull request to main branch.

Also, you can read the CONTRIBUTING guide.

License

MIT

Copyright (c) 2019-preset, Alex Chao