Giter Club home page Giter Club logo

doraemon's Introduction

doraemon

项目常用但lodash又没有的工具函数集合,哆啦A梦般方便实用。

使用

安装

npm i @mlz/doraemon@latest

按需引入

  1. 安装babel-plugin-import
npm i -D babel-plugin-import
  1. .babelrc
{
  "plugins": [
    ["import", {
      "libraryName": "@mlz/doraemon",
      "camel2DashComponentName": false
    }]
  ]
}
  1. 引入(省略前两步时就不是按需引入了)
import { getUrlQuery } from '@mlz/doraemon';

getUrlQuery('https://da.ithen.cn?name=doraemon');
  1. 若不想安装babel-plugin-import,又想按需引入:
import getUrlQuery from '@mlz/doraemon/lib/getUrlQuery';

getUrlQuery('https://da.ithen.cn?name=doraemon');

更多使用文档详看Doraemon

TODO

TODOS;

开发

常用命令

# 单个文件测试
jest test/limitStringToTarget.test.ts

须知

  • 如有问题或提需求请提issue

doraemon's People

Contributors

urnotzane avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

duke-macos lipten

doraemon's Issues

TODO

  • getUrlQuery: 获取url上的参数。
  • addQueryToUrl: 向url后面添加参数。
  • type checker: 判断数据类型。
  • deleteFieldsFromObj: 从对象中删除元素。
  • deleteInvalidValue: 从对象中删除无效字段。
  • copyText: copy文字到粘贴板
  • checkPhoneNumber: 检查手机号是否合法。
  • isMobile: 是否是手机环境。
  • isIos: 是否是ios。
  • isWechat: 是否是微信环境。
  • numberToCoin: 数字转换成带逗号的金额。

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.