Socket
Socket
Sign inDemoInstall

@wordpress/hooks

Package Overview
Dependencies
Maintainers
6
Versions
162
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.3.3 to 2.0.0

2

build-module/createAddHook.js

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

import "core-js/modules/es6.function.name";
import "core-js/modules/web.dom.iterable";
import validateNamespace from './validateNamespace.js';

@@ -4,0 +2,0 @@ import validateHookName from './validateHookName.js';

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

import "core-js/modules/es6.function.name";
/**

@@ -4,0 +2,0 @@ * Returns a function which, when invoked, will return the name of the

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

import "core-js/modules/es6.function.name";
/**

@@ -4,0 +2,0 @@ * Returns a function which, when invoked, will return whether a hook is

7

build-module/createHooks.js

@@ -1,2 +0,1 @@

import _Object$create from "@babel/runtime-corejs2/core-js/object/create";
import createAddHook from './createAddHook';

@@ -16,6 +15,4 @@ import createRemoveHook from './createRemoveHook';

function createHooks() {
var actions = _Object$create(null);
var filters = _Object$create(null);
var actions = Object.create(null);
var filters = Object.create(null);
actions.__current = [];

@@ -22,0 +19,0 @@ filters.__current = [];

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

import "core-js/modules/es6.function.name";
import "core-js/modules/web.dom.iterable";
import validateNamespace from './validateNamespace.js';

@@ -4,0 +2,0 @@ import validateHookName from './validateHookName.js';

"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -10,6 +10,2 @@ Object.defineProperty(exports, "__esModule", {

require("core-js/modules/es6.function.name");
require("core-js/modules/web.dom.iterable");
var _validateNamespace = _interopRequireDefault(require("./validateNamespace.js"));

@@ -16,0 +12,0 @@

@@ -8,4 +8,2 @@ "use strict";

require("core-js/modules/es6.function.name");
/**

@@ -12,0 +10,0 @@ * Returns a function which, when invoked, will return the name of the

"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -5,0 +5,0 @@ Object.defineProperty(exports, "__esModule", {

@@ -8,4 +8,2 @@ "use strict";

require("core-js/modules/es6.function.name");
/**

@@ -12,0 +10,0 @@ * Returns a function which, when invoked, will return whether a hook is

"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -10,4 +10,2 @@ Object.defineProperty(exports, "__esModule", {

var _create = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/create"));
var _createAddHook = _interopRequireDefault(require("./createAddHook"));

@@ -33,4 +31,4 @@

function createHooks() {
var actions = (0, _create.default)(null);
var filters = (0, _create.default)(null);
var actions = Object.create(null);
var filters = Object.create(null);
actions.__current = [];

@@ -37,0 +35,0 @@ filters.__current = [];

"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -10,6 +10,2 @@ Object.defineProperty(exports, "__esModule", {

require("core-js/modules/es6.function.name");
require("core-js/modules/web.dom.iterable");
var _validateNamespace = _interopRequireDefault(require("./validateNamespace.js"));

@@ -16,0 +12,0 @@

"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -5,0 +5,0 @@ Object.defineProperty(exports, "__esModule", {

@@ -0,4 +1,15 @@

## 2.0.0 (Unreleased)
### Breaking Change
- Change how required built-ins are polyfilled with Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)). If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods.
## 1.2.0 (2018-07-12)
### New Feature
- Updated build to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))
### Polish
- Moved `@WordPress/packages` repository to `@WordPress/gutenberg` ([#7805](https://github.com/WordPress/gutenberg/pull/7805))

@@ -8,2 +19,4 @@

### Polish
- Documentation: Improve usage examples ([#121](https://github.com/WordPress/packages/pull/121))

@@ -13,2 +26,4 @@

### Bug Fix
- Fix: Resolves issue where action argument would be undefined on all but the first action callback.
{
"name": "@wordpress/hooks",
"version": "1.3.3",
"version": "2.0.0",
"description": "WordPress hooks library.",

@@ -22,3 +22,3 @@ "author": "The WordPress Contributors",

"dependencies": {
"@babel/runtime-corejs2": "7.0.0-beta.56"
"@babel/runtime": "^7.0.0"
},

@@ -31,3 +31,3 @@ "devDependencies": {

},
"gitHead": "f02064f12a148df60b8d79801858ce3699bdfb89"
"gitHead": "df6f8da7b557894e4364c17db2dd4af0d1e20252"
}

@@ -13,3 +13,6 @@ # Hooks

_This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods. Learn more about it in [Babel docs](https://babeljs.io/docs/en/next/caveats)._
### Usage
In your JavaScript project, use hooks as follows:

@@ -16,0 +19,0 @@ ```javascript

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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