Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
easy-web-share
Advanced tools
[![Npm](https://badgen.net/npm/v/easy-web-share)](https://www.npmjs.com/package/easy-web-share) [![Bundlephobia](https://badgen.net/bundlephobia/minzip/easy-web-share)](https://bundlephobia.com/result?p=easy-web-share)
网页端经常遇到的场景:点击右上角转发给好友或直接调起原生 APP 的分享。为了让分享后等到比较好的展示效果,比如标题、简略图片、描述等,开发者部的不对每个平台进行配置。由于但平台众多,每个平台都不一致,让人十分头疼。
import webShare from 'easy-web-share'
// 创建并配置全局分享信息
const webShare = createWebShare({
url: '分享地址',
title: '分享标题',
desc: '分享描述',
imageUrl: '分享图片地址
})
// 更新分享信息,在需要的页面调用
webShare.setShareInfo({
url: '分享地址',
title: '分享标题',
desc: '分享描述',
imageUrl: '分享图片地址
})
在需要 SDK 才能设置分享内容的环境中,如微信、QQ ,如果没有加载对应的 jssdk,本项目会自动加载对应的 jssdk。
在微信内分享必须借助微信 jssdk,且获取相应的接口权限,因此需要在页面加载时调用 wx.config 初始化 SDK.
wx.config({
debugger: false,
appId: 'your appId',
timestamp,
nonceStr: noncestr,
signature,
jsApiList: ['updateAppMessageShareData'],
})
FAQs
[![Npm](https://badgen.net/npm/v/easy-web-share)](https://www.npmjs.com/package/easy-web-share) [![Bundlephobia](https://badgen.net/bundlephobia/minzip/easy-web-share)](https://bundlephobia.com/result?p=easy-web-share)
We found that easy-web-share demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.