Socket
Socket
Sign inDemoInstall

linkfunction

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.12 to 0.0.13

2

package.json
{
"name": "linkfunction",
"amdName": "linkFunction",
"version": "0.0.12",
"version": "0.0.13",
"description": "Link input value into function",

@@ -6,0 +6,0 @@ "main": "dist/linkfunction.js",

@@ -48,3 +48,22 @@ # linkFunction

Check the javascript vanilla usage:
```js
const linkfunction = require('linkfunction')
const e = { // Will be your SyntheticEvent for input
target: {
nodeName: 'any',
type: 'text',
value: 'Riderman'
}
}
const setName = name => console.log(name) // Output Riderman
const handler = linkfunction(setName)
handler(e)
```
Here's two equivalent event handlers, one created manually and one created with linkFunction:

@@ -67,3 +86,3 @@

```js
import linkFunction from '@ridermansb/linkfunction';
import linkFunction from 'linkfunction';

@@ -70,0 +89,0 @@ class Foo extends Component {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc