fix(node): enable asynchronous operation support in Node.js API (#2342)
Authored-by: engin0223 <engineda2014@hotmail.com> Changes cherry-picked by GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> Breaking change: Alters Node API - "bake" and "execute" are now declared async.
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
|
||||
const assert = require("assert");
|
||||
|
||||
require("cyberchef").then(chef => {
|
||||
require("cyberchef").then(async chef => {
|
||||
|
||||
const d = chef.bake("Testing, 1 2 3", [
|
||||
const d = await chef.bake("Testing, 1 2 3", [
|
||||
chef.toHex,
|
||||
chef.reverse,
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ import assert from "assert";
|
||||
import chef from "cyberchef";
|
||||
import { bake, toHex, reverse, unique, multiply } from "cyberchef";
|
||||
|
||||
const a = bake("Testing, 1 2 3", [
|
||||
const a = await bake("Testing, 1 2 3", [
|
||||
toHex,
|
||||
reverse,
|
||||
{
|
||||
@@ -28,7 +28,7 @@ const a = bake("Testing, 1 2 3", [
|
||||
|
||||
assert.equal(a.value, "630957449041920");
|
||||
|
||||
const b = chef.bake("Testing, 1 2 3", [
|
||||
const b = await chef.bake("Testing, 1 2 3", [
|
||||
chef.toHex,
|
||||
chef.reverse,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user