Socket
Socket
Sign inDemoInstall

@wordpress/hooks

Package Overview
Dependencies
Maintainers
6
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/hooks - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

6

CHANGELOG.md

@@ -1,3 +0,7 @@

**1.1.6 (2018-03-21)**
## 1.1.8 (2018-05-08)
- Documentation: Improve usage examples ([#121](https://github.com/WordPress/packages/pull/121))
## 1.1.6 (2018-03-21)
- Fix: Resolves issue where action argument would be undefined on all but the first action callback.

2

package.json
{
"name": "@wordpress/hooks",
"version": "1.1.7",
"version": "1.1.8",
"description": "WordPress Hooks library",

@@ -5,0 +5,0 @@ "author": "WordPress",

# @wordpress/hooks
A lightweight & efficient EventManager for JavaScript in WordPress.
A lightweight & efficient EventManager for JavaScript.

@@ -14,6 +14,11 @@ ## Installation

### Usage
In your JavaScript project, use hooks as follows:
```javascript
import { createHooks } from '@wordpress/hooks';
API functions can be called via the global `wp.hooks` like this `wp.hooks.addAction()`, etc.
myObject.hooks = createHooks();
myObject.hooks.addAction(); //etc...
```
A lightweight & efficient filter and action manager.
In the WordPress context, API functions can be called via the global `wp.hooks` like this `wp.hooks.addAction()`, etc.

@@ -40,9 +45,3 @@ ### API Usage

Hooks can be added to an object via composition:
`import { createHooks } from '@wordpress/hooks';`
`myObject.hooks = createHooks();`
API functions are then be called: `myObject.hooks.addAction()`.
### Events on action/filter add or remove

@@ -49,0 +48,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc