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

@zodash/onion

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zodash/onion - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.7](https://github.com/zcorky/zodash/compare/@zodash/onion@0.1.6...@zodash/onion@0.1.7) (2021-09-22)
**Note:** Version bump only for package @zodash/onion
## [0.1.6](https://github.com/zcorky/zodash/compare/@zodash/onion@0.1.5...@zodash/onion@0.1.6) (2021-03-25)

@@ -8,0 +16,0 @@

31

lib/onion.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -30,17 +21,15 @@ exports.Onion = void 0;

}
return (input, output) => __awaiter(this, void 0, void 0, function* () {
return async (input, output) => {
const context = this.createContext(input, output);
yield this.handler(context);
await this.handler(context);
return context;
});
};
}
execute(input) {
return __awaiter(this, void 0, void 0, function* () {
if (!this._callback) {
this._callback = this.callback();
}
const output = {};
const context = yield this._callback(input, output);
return context.output;
});
async execute(input) {
if (!this._callback) {
this._callback = this.callback();
}
const output = {};
const context = await this._callback(input, output);
return context.output;
}

@@ -47,0 +36,0 @@ createContext(input, output) {

{
"name": "@zodash/onion",
"version": "0.1.6",
"version": "0.1.7",
"description": "simple onion model",

@@ -60,3 +60,5 @@ "keywords": [

"scripts": {
"build": "tsc",
"build": "yarn clean && tsc",
"watch": "yarn clean && tsc -w",
"clean": "rm -rf lib",
"test": "jest -w 1",

@@ -69,5 +71,5 @@ "coverage": "codecov"

"dependencies": {
"@zodash/compose": "^0.1.6"
"@zodash/compose": "^0.1.7"
},
"gitHead": "bd85904bdf3094ed8d65df0fa57c695c74d4dc87"
"gitHead": "94dc8d1577cd67a4cf89884b10c23eb9caeef9f7"
}
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