Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-mobile-share
Advanced tools
Readme
Provides an easy and simple way to share data (such as text, url and media) via mobile’s built-in share module. It is based on Web Share API.
This works only with secure contexts (HTTPS).
npm i react-mobile-share # npm
yarn add react-mobile-share # yarn
import React from "react";
import { shareOnMobile } from "react-mobile-share";
const imgBase64 = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2...";
const App = () => {
return (
<div>
<button
onClick={() =>
shareOnMobile({
text: "Hey checkout our package react-mobile-share",
url: "https://www.npmjs.com/package/react-mobile-share",
title: "React-Mobile-Share",
images: [imgBase64],
})
}
>
Share
</button>
</div>
);
};
export default App;
shareOnMobile(data, fallbackFn)
Takes the following parameters:
Parameter | Type | Description |
---|---|---|
data | object | Required |
fallbackFn | function | Options: return a message |
{
text: <string>,
url: "https://www.npmjs.com/package/react-mobile-share",
title: "React-Mobile-Share",
images: [imgBase64],
}
Object must contains the following fields:
Field | Type | Description |
---|---|---|
title | string | Required. Must have a title. |
text | string | Optional. Add a description. |
url | string | Optional. Any valid url. |
images | array | Optional. Should be a valid array of base64 strings. |
function(message) {
console.log("fallback", message)
}
This will invoked when any failure occures.
FAQs
Provides an easy and simple way to share data (such as text, url and media) via mobile’s built-in share module. It is based on [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share).
The npm package react-mobile-share receives a total of 270 weekly downloads. As such, react-mobile-share popularity was classified as not popular.
We found that react-mobile-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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.