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.
alpinejs-form-data
Advanced tools
Get the data from the form in a key/value pair of name and value 🥯
<script
defer
src="https://unpkg.com/alpinejs-form-data@latest/dist/form-data.min.js"
></script>
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
yarn add -D alpinejs-form-data
npm install -D alpinejs-form-data
import Alpine from 'alpinejs'
import formData from 'alpinejs-form-data'
Alpine.plugin(formData)
Alpine.start()
<form x-data x-on:submit.prevent="console.log($formData)">
<input type="text" name="title" />
<input type="text" name="slug" />
<button>Submit</button>
</form>
On submit this will return the following:
{title: 'My New Blog Post', slug: 'my-new-blog-post'}
You may want the data returned to be a nested array:
[
['title', 'My New Blog Post'],
['slug', 'my-new-blog-post'],
]
To do this you can use $formDataArray
instead of $formData
.
FAQs
Get the data from the form in a key/value pair of name and value 🥯
The npm package alpinejs-form-data receives a total of 151 weekly downloads. As such, alpinejs-form-data popularity was classified as not popular.
We found that alpinejs-form-data 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’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.