mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Expose Dish (SyncDish) in API and make it composable.
This commit is contained in:
parent
f73452e01f
commit
f6c4b5073c
6 changed files with 66 additions and 13 deletions
|
@ -18,13 +18,13 @@ import * as ops from "./index";
|
|||
class SyncDish extends Dish {
|
||||
|
||||
/** */
|
||||
constructor(dish=null) {
|
||||
super(dish);
|
||||
|
||||
constructor(inputOrDish=null, type=null) {
|
||||
super(inputOrDish);
|
||||
|
||||
// Add operations to make it composable
|
||||
for (const op in ops) {
|
||||
this[op] = () => ops[op](this.value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue