mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 17:56:15 -04:00
Fixed Node imports
This commit is contained in:
parent
4ef65589e8
commit
9e3733b33b
6 changed files with 1393 additions and 826 deletions
|
@ -6,24 +6,27 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
const chef = require("cyberchef");
|
||||
const assert = require("assert");
|
||||
|
||||
const d = chef.bake("Testing, 1 2 3", [
|
||||
chef.toHex,
|
||||
chef.reverse,
|
||||
{
|
||||
op: chef.unique,
|
||||
args: {
|
||||
delimiter: "Space",
|
||||
}
|
||||
},
|
||||
{
|
||||
op: chef.multiply,
|
||||
args: {
|
||||
delimiter: "Space",
|
||||
}
|
||||
}
|
||||
]);
|
||||
require("cyberchef").then(chef => {
|
||||
|
||||
assert.equal(d.value, "630957449041920");
|
||||
const d = chef.bake("Testing, 1 2 3", [
|
||||
chef.toHex,
|
||||
chef.reverse,
|
||||
{
|
||||
op: chef.unique,
|
||||
args: {
|
||||
delimiter: "Space",
|
||||
}
|
||||
},
|
||||
{
|
||||
op: chef.multiply,
|
||||
args: {
|
||||
delimiter: "Space",
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
assert.equal(d.value, "630957449041920");
|
||||
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
import assert from "assert";
|
||||
import { bake, toHex, reverse, unique, multiply } from "cyberchef/src/node/index.mjs";
|
||||
import { bake, toHex, reverse, unique, multiply } from "cyberchef";
|
||||
|
||||
const d = bake("Testing, 1 2 3", [
|
||||
toHex,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue