Socket
Socket
Sign inDemoInstall

mdh-jsmethod

Package Overview
Dependencies
80
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mdh-jsmethod

js常用方法集合


Version published
Maintainers
1
Install size
14.4 MB
Created

Readme

Source

mdh-jsmethod

Functions

getUrlParam(key, url)

根据key返回地址的参数值

fmoney(s, n)

格式金额

sortObjByKey(obj)

按key字母顺序排序对象

random(min, max)

随机数

change1080ToNow(px)

把1080的像素变成当前的

get100Value(value)

数字变为百分之多少

getUrlParam(key, url)

根据key返回地址的参数值

Kind: global function

ParamTypeDescription
key*
url*不传默认location.href

fmoney(s, n)

格式金额

Kind: global function

ParamTypeDescription
s*要格式的金额
n*保留几位小数

sortObjByKey(obj)

按key字母顺序排序对象

Kind: global function

ParamType
obj*

random(min, max)

随机数

Kind: global function

ParamType
min*
max*

change1080ToNow(px)

把1080的像素变成当前的

Kind: global function

ParamType
px*

get100Value(value)

数字变为百分之多少

Kind: global function

ParamType
value*

FAQs

Last updated on 08 Nov 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc