Skip to content

GiantAxeWhy/doraemon

Repository files navigation

doraemon

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

使用

安装

npm i @giantaxewhy/doraemon@latest

按需引入

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

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

getUrlQuery('https://www.baidu.com?name=doraemon');

更多请使用文档查看

TODO

TODOS;

开发

常用命令

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

须知

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published