just-utils
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

license Build Status Coverage Status npm NPM downloads

Some commonly used utils in daily business code development. Lib provides limited functionality to support simple project which makes size of lib small.

Characteristics

  • ApiSender - Simple encapsulation of web api fetch.
  • SimpleDateFormat - Date Formatter which just support pattern: yyyy | M | MM | d | dd | H | HH | m | mm | s | ss.

Requirements

  • Polyfill of fetch should be included independently if your browser doesn't support fetch api.

Compatibility

Unit tests guarantee support on the following environment:

IE CH FF SF OP IOS Android Node
untested untested untested untested untested untested untested untested

Note: Compiling code depend on ES5, so you need import es5-shim to compatible with IE6-8, here is a demo

Directory

├── demo - Using demo
├── dist - Compiler output code
├── doc - Project documents
├── src - Source code directory
├── test - Unit tests
├── CHANGELOG.md - Change log
└── TODO.md - Planned features

Usage Instructions

Using npm, download and install the code.

$ npm install --save just-utils

For node environment:

var JustUtils = require('just-utils');

For webpack or similar environment:

import JustUtils from 'just-utils';

For requirejs environment:

requirejs(['node_modules/just-utils/dist/index.aio.js'], function (JustUtils) {
    // do something...
})

For browser environment:

<script src="node_modules/just-utils/dist/index.aio.js"></script>

Documents

API

Contribution Guide

For the first time to run, you need to install dependencies firstly.

$ npm install

To build the project:

$ npm run build

To run unit tests:

$ npm test

Note: The browser environment needs to be tested manually under test/browser

Modify the version number in package.json, modify the version number in README.md, modify the CHANGELOG.md, and then release the new version.

$ npm run release

Publish the new version to NPM.

$ npm publish

Contributors

contributors

Change Log

CHANGELOG.md

TODO

TODO.md

Readme

Keywords

none

Package Sidebar

Install

npm i just-utils

Weekly Downloads

1

Version

0.4.1

License

MIT

Unpacked Size

25.5 kB

Total Files

11

Last publish

Collaborators

  • sixwinds