1.0.1 • Published 6 years ago

utils-used v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

utils-used

Installing

Using npm:

$ npm install utils-used

Using yarn:

$ yarn add utils-used

Example

Using es6:

import { fmtdate, fmturl } from 'utils-used';

console.log(fmtdate(new Date(), 'yyyy-MM'));
// 第二个参数选填
console.log(fmturl('name', 'https://github.com?name=github'));

Using commonjs:

const utils = require('utils-used');

console.log(utils.fmtdate(new Date(), 'yyyy-MM'));
// 第二个参数选填
console.log(utils.fmturl('name', 'https://github.com?name=github'));

Api List

const utils = require('utils-used');
// -- 可选参数
utils.getCookie(name);
utils.delCookie(name);
utils.setCookie(name, value);

utils.fmtdate(date, fmt);

utils.fmturl(name, --url);

utils.getBrowser();
utils.getOs();
1.0.1

6 years ago

1.0.0

6 years ago