Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sn-js-utils

CozySnail30MIT0.1.7TypeScript support: included

JS | TS 常用工具类库

utils, js-utils, jsUtils, ts-utils, tsUtil

readme

sn-js-utils

license Build Status Coveralls npm NPM downloads Percentage of issues still open

简体中文 | 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>

:bookmark_tabs: Documents

API

Contributors

contributors

:gear: Change Log

CHANGELOG.md

:airplane: TODO

TODO.md

:bulb: Current Users

changelog

变更日志

0.5.0 / 2018-12-17

  • TS支持测试源文件,改用nyc

0.4.0 / 2018-11-27

  • JS支持测试源文件,改用nyc

0.3.0 / 2018-11-23

  • 添加对typescript的支持
  • 升级babel7
  • 添加对测试覆盖率的支持
  • 文档添加emoji

0.2.0 / 2018-3-10

  • 支持banner
  • 添加es5-shim

0.1.0 / 2018-3-1

  • ES6编写源码,编译生成生产代码
  • 第三方依赖自动注入
  • 支持浏览器原生
  • 支持AMD,CMD
  • 支持Webpack,Rollup,fis等
  • 支持Node
  • 集成单元测试环境
  • 集成eslint
  • 集成travis-ci