Comparing version 0.1.6 to 0.1.7
{ | ||
"version": "0.1.7", | ||
"name": "call-func", | ||
"version": "0.1.6", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/react-atomic/react-atomic-organism", | ||
"directory": "packages/lib/call-func" | ||
}, | ||
"homepage": "https://github.com/react-atomic/react-atomic-organism/tree/main/packages/lib/call-func", | ||
"description": "call function", | ||
"repository": "react-atomic/react-atomic-organism", | ||
"keywords": ["call-function", "dom-event-wrapper"], | ||
"main": "./build/cjs/src/index.js", | ||
"module": "./build/es/src/index.js", | ||
"keywords": [], | ||
"author": "Hill <hill@kimo.com>", | ||
@@ -10,0 +15,0 @@ "license": "MIT", |
Call Function | ||
=============== | ||
* GIT | ||
* https://github.com/react-atomic/react-atomic-organism/tree/master/packages/lib/call-func | ||
* https://github.com/react-atomic/react-atomic-organism/tree/main/packages/lib/call-func | ||
* NPM | ||
@@ -9,1 +9,26 @@ * https://www.npmjs.com/package/call-func | ||
## `Event addEventListener wrapper` | ||
* `subscribe` | ||
__HTML__ | ||
```html | ||
<button>Click</button> | ||
``` | ||
__JS__ | ||
```js | ||
import {register, cleanAllRegister} from "call-func"; | ||
const oReg = register(document.querySelector("button")); | ||
const regId = oReg.addEventListener("click", ()=>{console.log("click")}); | ||
``` | ||
* `unsubscribe` by id | ||
```js | ||
// clean one | ||
oReg.removeEventListener(regId); | ||
// clean all | ||
cleanAllRegister(); | ||
``` | ||
* [More Example](https://github.com/react-atomic/react-atomic-organism/blob/main/packages/lib/call-func/src/__tests__/registerTest.js) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
31880
34
0