sn-js-utils
v0.1.7
Published
JS | TS 常用工具类库
Downloads
38
Readme
sn-js-utils
简体中文 | English
The third party JS|TS
common library
:star: special
- The third party
JS|TS
common library
:pill: Compatibility
Unit tests guarantee support on the following environment:
| IE | CH | FF | SF | OP | IOS | Android | Node | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- | | 6+ | 29+ | 55+ | 9+ | 50+ | 9+ | 4+ | 4+ |
:rocket: Usage Instructions
Using npm, download and install the code.
$ npm install --save sn-js-utils
For node environment:
const snJsUtils = require('../dist/index.js');
For webpack or similar environment:
import { DateUtil } from 'sn-js-utils';
For requirejs environment:
requirejs(['node_modules/sn-js-utils/dist/index.aio.js'], function (snJsUtils) {
console.log(snJsUtils.DateUtil.formatDate(new Date(), 'yyyy-MM-dd'));
})
For browser environment:
<script src="node_modules/sn-js-utils/dist/index.aio.js"></script>