
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@climple/web-share
Advanced tools
[](https://www.npmjs.com/package/@climple/web-share) [](https://bundlephobia.com/result?p=@climple/web-share)
网页端经常遇到的场景:点击右上角转发给好友或直接调起原生 APP 的分享。为了让分享后等到比较好的展示效果,比如标题、简略图片、描述等,开发者部的不对每个平台进行配置。由于但平台众多,每个平台都不一致,让人十分头疼。
事实上已有一个native-share项目,不过该项目 issue 已经有 40 多个,并且作者已经很久没有更新,于是决定重新写个轮子。
目前功能还不完善...
预计将在 20 年 7 月下旬补足大部分平台的支持
import { createWebShare } from '@climple/web-share'
// 创建并配置全局分享信息
const webShare = createWebShare({
url: '分享地址',
title: '分享标题',
desc: '分享描述',
imageUrl: '分享图片地址
})
// 更新分享信息,在每个页面调用一次
webShare.setShareInfo({
url: '分享地址',
title: '分享标题',
desc: '分享描述',
imageUrl: '分享图片地址
})
FAQs
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.