Giter VIP home page Giter VIP logo

wengfengtong / lime-util Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qq575792372/lime-util

0.0 1.0 0.0 5.03 MB

🔥 lime-util 🔥 是一个 前端模块化 JavaScript 工具库,目前共有 245+ ⚡️ 个 Api 方法,包含了开发中经常用到的一些模块方法集合,如字符串,数组,浏览器缓存,浏览器Cookie,Dom处理,日期工具,数学计算,文件处理,正则校验,微信小程序工具库等等

License: MIT License

JavaScript 98.68% HTML 1.32%

lime-util's Introduction

lime-util 前端模块化 JavaScript 工具库

npm version npm license

🔥 lime-util 🔥 是一个 前端模块化 JavaScript 工具库,目前共有 248+ ⚡️ 个 Api 方法,包含了开发中经常用到的一些模块方法集合,如字符串数组浏览器缓存浏览器CookieDom处理日期工具数学计算文件处理正则校验微信小程序工具库等等。

📦 安装

1. 使用 npm 安装

npm i @lime-util/util --save

2. 或在浏览器中直接引入

<!-- 将工具包下面 dist/index.js 文件拷贝出来引入 -->
<script src="dist/index.js"></script>
<!-- 使用 -->
<script>
  LimeUtil.loadedTest();
</script>

🎨 使用

1. es6 方式

// 全部引入
import LimeUtil from "@lime-util/util";
LimeUtil.loadedTest();

// 按需引入
import { loadedTest } from "@lime-util/util";
loadedTest();

2. require 方式

// 全部引入
const LimeUtil = require("@lime-util/util");
LimeUtil.loadedTest();

// 按需引入
const { loadedTest } = require("@lime-util/util");
loadedTest();

🔨 构建

工具库源码架构使用 pnpm 做为包管理工具,在 packages 目录中分为多个工程模块来构建。

# 构建所有模块的包
pnpm build

# 构建核心模块的包
pnpm build:core

# 构建日期模块的包
pnpm build:date

📚 模块介绍

lime-util 分为lime-util 整合工具库lime-core 核心工具库lime-date 日期工具库整合工具库包含所有的功能,如果你想轻量级使用,可以只引入核心库日期库

  1. lime-util 整合工具库(传送阵)
  2. lime-core 核心工具库(传送阵)
  3. lime-date 日期工具库(传送阵)

📝API 文档

  1. 常量集合 Constant

  2. 字符串 String

  3. 数字 Number

  4. 数组 Array

  5. 对象 Object

  6. 函数 Function

  7. 日期 Date

  8. 正则 Regexp

  9. 数学 Math

  10. 随机数 Random

  11. 文件 File

  12. 颜色 Color

  13. 校验 Validate

  14. 键盘 Keycode

  15. 浏览器 Url

  16. 浏览器 Storage

  17. 浏览器 Cookie

  18. 浏览器 Dom

  19. 浏览器 Device

  20. 微信小程序工具库 Weapp

🔖Git 提交规范

😝 主要

fix: 修复 bug
add: 增加功能
del: 删除功能
update: 更新功能

😉 次要

docs: 文档更新
merge: 合并分支
style: 颜色、字体大小等变动(不影响代码运行)
build: 构造工具或相关依赖变更
refactor: 代码重构
revert: 撤销,版本回退

😳 一般

test: 添加或修改测试
perf: 提高性能的改动
chore: 构建过程或辅助工具的变更
ci: CI 配置,脚本文件等改动

# <type>后面英文冒号,并且后跟一个空格
git commit -m <type>(<scope>): <description>

# 举个栗子
git commit -m 'fix: 修复了xxx问题'
git commit -m 'fix(string): 修复了string工具类的xxx问题'
git commit -m 'docs: 更新了字符串模块文档'

lime-util's People

Contributors

qq575792372 avatar 1020431880 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.