Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
js-shared-data
Advanced tools
An easy way to work with the shared data delivered by "coderello/laravel-shared-data".
This package provides a front-end solution for the coderello/laravel-shared-data
package.
yarn add js-shared-data
Let's imagine that we shared such data from the backend using coderello/laravel-shared-data
:
share([
'user' => [
'full_name' => 'Ilya Sakovich',
'username' => 'hivokas',
'email' => 'me@hivokas.com',
],
'balance' => 120,
]);
On the front-end side we can access this data using shared()
helper.
import { shared } from 'js-shared-data';
// retrieve the user object
const user = shared('user');
// retrieve the username from the user object
const username = shared('user.username');
// retrieve the balance
const balance = shared('balance');
// specify the default value which will be used if value for specified path doesn't exist
const status = shared('status', 'Working...');
import { sharedData } from 'js-shared-data';
// specify the default value globally
sharedData.setDefaultValue(null);
// specify the namespace which contains an object with all shared data
sharedData.setNamespace('App');
// specify the source
sharedData.setSource(window);
FAQs
An easy way to work with the shared data delivered by "coderello/laravel-shared-data".
The npm package js-shared-data receives a total of 1 weekly downloads. As such, js-shared-data popularity was classified as not popular.
We found that js-shared-data demonstrated a not healthy version release cadence and project activity because the last version was released 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.