hero

Micell

A collection of functions for web development

Documentation →

Great Various

Many categories, such as character, string, date, dom, cookie and so on.

TypeScript Support

Including sufficient TypeScript type definitions

Small Size

Use the babel-plugin-lodash to reduce the bundle size.

# Install

Npm

npm i --save 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 bundle the methods as you needed.

.babelrc

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