Socket
Socket
Sign inDemoInstall

degenerator

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

degenerator - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

6

dist/src/index.d.ts
/// <reference types="node" />
import { Context } from 'vm';
import { Context, RunningScriptOptions } from 'vm';
/**

@@ -18,7 +18,7 @@ * Turns sync JavaScript code into an JavaScript with async Functions.

}
interface CompileOptions extends DegeneratorOptions {
type CompileOptions = DegeneratorOptions & RunningScriptOptions & {
sandbox?: Context;
}
};
function compile<T>(code: string, returnName: string, names: DegeneratorNames, options?: CompileOptions): T;
}
export = degenerator;

@@ -9,4 +9,4 @@ "use strict";

const esprima_1 = require("esprima");
const ast_types_1 = require("ast-types");
const vm_1 = require("vm");
const ast_types_1 = require("ast-types");
const supports_async_1 = __importDefault(require("./supports-async"));

@@ -127,3 +127,3 @@ /**

const compiled = degenerator(code, names, Object.assign(Object.assign({}, options), { output }));
const fn = vm_1.runInNewContext(`${compiled};${returnName}`, options.sandbox);
const fn = vm_1.runInNewContext(`${compiled};${returnName}`, options.sandbox, options);
if (supports_async_1.default) {

@@ -130,0 +130,0 @@ return fn;

{
"name": "degenerator",
"version": "2.1.0",
"version": "2.1.1",
"description": "Turns sync functions into async generator functions",

@@ -5,0 +5,0 @@ "main": "dist/src/index",

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