🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

@58fe/utils

Package Overview
Dependencies
Maintainers
11
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@58fe/utils

JS-Utils

latest
npmnpm
Version
1.0.10
Version published
Maintainers
11
Created
Source

Utils

JS哆啦A梦工具包

Install

npm install @58fe/utils  --save

Usage

import { cookie } from '@58fe/utils';

cookie.getCookie(name);
cookie.setCookie(name, value, outdays, path, domain);

getOS

import { getOs } from '@58fe/utils';

console.log(getOs()); // android/wp/ios

urlQuery

import { urlQuery } from '@58fe/utils';

// for example url: https://www.baidu.com/?a=1&b=2
console.log(urlQuery.query('a'));
// 1
console.log(urlQuery.queryAll());
// {a: 1, b: 2}

calcaulate

import { calcaulate } from '@58fe/utils';
calcaulate(); // must do
const num = 7;
console.log(num.add(1));
// 8
console.log(num.sub(2));
// 5
console.log(num.mul(2));
// 14
console.log(num.div(2));
// 3.5
console.log(num.toFixedNew(2));
// 7
console.log(7.3456.toFixedNew(2));
// 7.35

ĺ…¶ä»–

Keywords

58

FAQs

Package last updated on 20 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts