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

uhooks-fx

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uhooks-fx - npm Package Compare versions

Comparing version 0.1.7 to 0.2.0

async.js

4

cjs/index.js

@@ -41,7 +41,7 @@ 'use strict';

outer ?
function hook() {
/*async*/ function hook() {
const [ph, pc, pa] = [h, c, a];
[h, c, a] = [hook, this, arguments];
try {
return callback.apply(c, a);
return /*await*/ callback.apply(c, a);
}

@@ -48,0 +48,0 @@ finally {

@@ -40,7 +40,7 @@ /*! (c) Andrea Giammarchi - ISC */

outer ?
function hook() {
/*async*/ function hook() {
const [ph, pc, pa] = [h, c, a];
[h, c, a] = [hook, this, arguments];
try {
return callback.apply(c, a);
return /*await*/ callback.apply(c, a);
}

@@ -47,0 +47,0 @@ finally {

@@ -255,3 +255,5 @@ self.uhooksFX = (function (exports) {

var hooked$1 = function hooked$1(callback, outer) {
return hooked(outer ? function hook() {
return hooked(outer ?
/*async*/
function hook() {
var ph = h$1,

@@ -265,3 +267,6 @@ pc = c,

try {
return callback.apply(c, a);
return (
/*await*/
callback.apply(c, a)
);
} finally {

@@ -268,0 +273,0 @@ h$1 = ph;

{
"name": "uhooks-fx",
"version": "0.1.7",
"version": "0.2.0",
"description": "uhooks with propagated states",
"main": "./cjs/index.js",
"scripts": {
"build": "npm run cjs && npm run rollup:es && npm run rollup:babel && npm run min && npm run test && npm run size",
"build": "npm run async && npm run cjs && npm run rollup:async && npm run rollup:es && npm run rollup:babel && npm run min && npm run test && npm run size",
"cjs": "ascjs --no-default esm cjs",
"async": "cp esm/index.js esm/async.js && sed -i.bck 's/uhooks/uhooks\\/async/; s/\\/\\*async\\*\\//async/; s/\\/\\*await\\*\\//await/' esm/async.js && rm -rf esm/async.js.bck",
"rollup:async": "rollup --config rollup/async.config.js && sed -i.bck 's/^var /self./; s/Object.defineProperty[^)]*).//' async.js && rm -rf async.js.bck",
"rollup:es": "rollup --config rollup/es.config.js && sed -i.bck 's/^var /self./; s/Object.defineProperty[^)]*).//' es.js && rm -rf es.js.bck",
"rollup:babel": "rollup --config rollup/babel.config.js && sed -i.bck 's/^var /self./; s/Object.define[^;]*;//' index.js && rm -rf index.js.bck",
"min": "terser index.js --comments='/^!/' -c -m -o min.js",
"size": "cat min.js | brotli | wc -c && cat es.js | brotli | wc -c",
"size": "echo 'async ES6' && cat async.js | brotli | wc -c && echo '' && echo 'sync ES5 / ES6' && cat min.js | brotli | wc -c && cat es.js | brotli | wc -c",
"test": "node test/index.js"

@@ -43,2 +45,6 @@ },

},
"./async": {
"import": "./esm/async.js",
"default": "./cjs/async.js"
},
"./package.json": "./package.json"

@@ -48,3 +54,3 @@ },

"dependencies": {
"uhooks": "^0.1.19"
"uhooks": "^0.2.0"
},

@@ -51,0 +57,0 @@ "repository": {

@@ -5,2 +5,4 @@ # <em>µ</em>hooks-fx

This module exports same utilities via `uhooks-fx/async`, which is based on `uhooks/async` for asynchronous hooks.
### Example

@@ -7,0 +9,0 @@ ```js

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