JSPM

  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q64759F
  • License ISC

前端 JavaScript 常用函数/工具/方法库

Package Exports

  • js-xxx
  • js-xxx/es/index.js
  • js-xxx/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-xxx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

前端 JavaScript 常用函数/工具/方法库

文档(x.biugle.cn)

OSCS Status

封装前端常用函数/方法/工具库,支持按需引入;无依赖和第三方库,无冗余代码,无需改动原代码结构;拆箱即用,简单便捷。

Install-安装

npm i js-xxx

Use-使用

// Es or Node
import { xFunctionName } from 'js-xxx';
const { xFunctionName } = require('js-xxx');
xFunctionName();

// Browser
<script src="/iife/index.min.js"></script>
$xxx.xFunctionName();
$xxx.formatDate(new Date(), 'mm-dd');

// 可参考 ./demo/test.js,示例如下。
import { showToast, md5, scrollToTop, formatDate, uuid } from 'js-xxx';
const { showToast, md5, scrollToTop, formatDate, uuid } = require('js-xxx');
formatDate(new Date(), 'yyyy-mm-dd hh:ii:ss');

Docs-文档

Others