Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy-web-share

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-web-share - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/index.d.mts

88

package.json
{
"name": "easy-web-share",
"version": "1.0.0",
"main": "dist/webShare.cjs.js",
"module": "dist/webShare.esm.js",
"types": "src/types/index.d.ts",
"scripts": {
"build": "node scripts/build"
},
"keywords": [
"h5 share",
"web share",
"native share",
"QQ空间分享",
"微信分享"
],
"author": "onelong",
"repository": {
"type": "git",
"url": "https://github.com/lbb/easy-web-share"
},
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.10.3",
"@babel/preset-env": "^7.1.5",
"@rollup/plugin-babel": "^5.0.0",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"@rollup/plugin-replace": "^2.3.3",
"@typescript-eslint/eslint-plugin": "^3.4.0",
"@typescript-eslint/parser": "^3.3.0",
"del": "^5.1.0",
"eslint": "^7.3.1",
"eslint-config-standard-with-typescript": "^18.0.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"rollup": "^2.18.1",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-typescript2": "^0.27.1",
"typescript": "^3.0.1"
}
"name": "easy-web-share",
"version": "1.0.1",
"type": "commonjs",
"exports": {
".": {
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
}
},
"main": "./dist/index.umd.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "vite build",
"format": "biome format --write ./"
},
"keywords": [
"h5 share",
"web share",
"native share",
"QQ空间分享",
"微信分享"
],
"author": "onelong",
"repository": {
"type": "git",
"url": "git+https://github.com/lbb00/easy-web-share.git"
},
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "^1.7.3",
"terser": "^5.31.0",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-plugin-dts": "^3.9.1"
}
}

@@ -10,3 +10,3 @@ # WebShare - 网页分享 SDK

- web social
- Web Social
- QQ

@@ -21,5 +21,3 @@ - QQ 空间

// 创建并配置全局分享信息
const webShare = createWebShare({
webShare.setGlobalShareInfo({
url: '分享地址',

@@ -31,3 +29,4 @@ title: '分享标题',

// 更新分享信息,在需要的页面调用
// 更新分享信息
// SPA 应用需要在每个页面调用,否则会使用 GlobalShareInfo 的配置
webShare.setShareInfo({

@@ -39,9 +38,20 @@ url: '分享地址',

})
```
### 手动创建
```javascript
import { createWebShare } from 'easy-web-share'
const webShare = createWebShare({
url: '分享地址',
title: '分享标题',
desc: '分享描述',
imageUrl: '分享图片地址
})
```
### 特殊配置
> 在需要 SDK 才能设置分享内容的环境中,如微信、QQ ,如果没有加载对应的 jssdk,本项目会自动加载对应的 jssdk。
### 特殊配置
#### 微信

@@ -48,0 +58,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc