Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hable

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hable - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="0.0.6"></a>
## [0.0.6](https://github.com/pi0/hable/compare/v0.0.5...v0.0.6) (2018-01-26)
### Performance Improvements
* reduce transpiled dist size ([df607cf](https://github.com/pi0/hable/commit/df607cf))
<a name="0.0.5"></a>

@@ -7,0 +17,0 @@ ## [0.0.5](https://github.com/pi0/hable/compare/v0.0.4...v0.0.5) (2018-01-26)

32

dist/hable.cjs.js

@@ -30,14 +30,6 @@ 'use strict';

return new Promise(function ($return, $error) {
if (!this.$hooks[name]) {
return $return();
}
return Promise.resolve(lib_1(this.$hooks[name], function (fn) { return fn.apply(void 0, args); })).then(function ($await_1) {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
}.bind(this), $error);
}.bind(this));
if (!this.$hooks[name]) {
return;
}
return lib_1(this.$hooks[name], function (fn) { return fn.apply(fn, args); });
};

@@ -49,14 +41,6 @@

return new Promise(function ($return, $error) {
if (!this.$hooks[name]) {
return $return();
}
return Promise.resolve(lib_2(this.$hooks[name], function (fn) { return fn.apply(void 0, args); })).then(function ($await_2) {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
}.bind(this), $error);
}.bind(this));
if (!this.$hooks[name]) {
return;
}
return lib_2(this.$hooks[name], function (fn) { return fn.apply(fn, args); });
};

@@ -63,0 +47,0 @@

@@ -28,14 +28,6 @@ function serial(tasks, fn) {

return new Promise(function ($return, $error) {
if (!this.$hooks[name]) {
return $return();
}
return Promise.resolve(lib_1(this.$hooks[name], function (fn) { return fn.apply(void 0, args); })).then(function ($await_1) {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
}.bind(this), $error);
}.bind(this));
if (!this.$hooks[name]) {
return;
}
return lib_1(this.$hooks[name], function (fn) { return fn.apply(fn, args); });
};

@@ -47,14 +39,6 @@

return new Promise(function ($return, $error) {
if (!this.$hooks[name]) {
return $return();
}
return Promise.resolve(lib_2(this.$hooks[name], function (fn) { return fn.apply(void 0, args); })).then(function ($await_2) {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
}.bind(this), $error);
}.bind(this));
if (!this.$hooks[name]) {
return;
}
return lib_2(this.$hooks[name], function (fn) { return fn.apply(fn, args); });
};

@@ -61,0 +45,0 @@

{
"name": "hable",
"version": "0.0.5",
"version": "0.0.6",
"description": "A simpler tapable alternative, which can be used to create hooks for plugins",

@@ -5,0 +5,0 @@ "main": "dist/hable.cjs.js",

@@ -11,14 +11,14 @@ import { serial, parallel } from 'items-promise'

async callHook(name, ...args) {
callHook(name, ...args) {
if (!this.$hooks[name]) {
return
}
await serial(this.$hooks[name], fn => fn(...args))
return serial(this.$hooks[name], fn => fn.apply(fn, args))
}
async callHookAsync(name, ...args) {
callHookAsync(name, ...args) {
if (!this.$hooks[name]) {
return
}
await parallel(this.$hooks[name], fn => fn(...args))
return parallel(this.$hooks[name], fn => fn.apply(fn, args))
}

@@ -25,0 +25,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