npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sl-wechat-sdk

v1.0.57

Published

简爱官方商城sdk

Downloads

5

Readme

sl.wap.sdk文档

h5活动专用,直接引入sdk地址
sdk地址 https://simlove-sdk.oss-cn-shenzhen.aliyuncs.com/simpLove-web-sdk/index.js

1.将毫秒转换成标准时间格式

sl.getDate(date:number) 
参数 date=毫秒

2.将标准时间格式转换成毫秒 date/标准时间

sl.getMillisecond(date:string) 
参数 date=时间(如:2022-05-30 13:22:22)

3.将xxxx-xx-xx xx:xx:xx转为 xxxx/xx/xx xx:xx:xx

sl.startTime(date:string) 
参数 date=时间(如:2022-05-30 13:22:22)

4.数字千分位

sl.holdThousandth(nb:number)
参数 nb=数值(如:12345)

5.数字超过大小显示单位

sl.largeNumbers(nb:number,maxNb:number,unit:string)
参数 nb=数字 maxNb=最大值 unit=单位

6.数组去重

sl.weightRemoval(arr:array,key:string)
参数 arr=数组 key=依据元素(数组对象传,非必传)

7.数组排序

sl.arrSort(arr:array,key:string,reverse:boolean)
参数 arr=要排序的数组 key=排序的元素 reverse=是否反序(非必传)

8.将 URL 参数转换为对象

sl.getUrlParams(url:string)
参数 url=链接

9.从 URL 获取参数的值

sl.getParam(url:string,param:string)
参数 url=链接 param=要获取的参数名

10.将数字四舍五入到给定的数字位数

sl.prefixWithZeros(number:number,length:number)
参数 number=要转换的数字 length长度

11.将字符串截断为完整的单词(超出隐藏)

sl.truncate(str:string,max:number,suffix:string)
参数 str=文本 max=最大长度 suffix="替换的字符,如:。。。"

12.滚动到页面顶部(返回顶部)

sl.goToTop()

13.字符串转大小写

sl.toCase(val:string,type:string)
参数 val=要转换的值 type=min/小写 type=max/大写

14.微信方法-跳转

sl.wxGoPage(name:string,url:string)
参数 name=跳转方式 url=跳转小程序路径

15.微信分享

sl.wxPostMessage(param:object)
参数 param={title:'分享标题',imageUrl:'分享图片'}

simplove-mini-sdk文档

npm i simplove-mini-sdk
yarn add simplove-mini-sdk

"dependencies": { "babel-loader": "^9.1.3", "javascript-obfuscator": "^4.1.0" }