mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
Wrote some tests, fixed imports for node
This commit is contained in:
parent
768fef502d
commit
3ad5f889a0
8 changed files with 127 additions and 11 deletions
41
src/core/operations/HTMLToText.mjs
Normal file
41
src/core/operations/HTMLToText.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* @author tlwr [toby@toby.codes]
|
||||
* @author Matt C [me@mitt.dev]
|
||||
* @copyright Crown Copyright 2019
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import Operation from "../Operation";
|
||||
|
||||
/**
|
||||
* HTML To Text operation
|
||||
*/
|
||||
class HTMLToText extends Operation {
|
||||
|
||||
/**
|
||||
* HTMLToText constructor
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.name = "HTML To Text";
|
||||
this.module = "Default";
|
||||
this.description = "Converts a HTML ouput from an operation to a readable string instead of being rendered in the DOM.";
|
||||
this.infoURL = "";
|
||||
this.inputType = "html";
|
||||
this.outputType = "string";
|
||||
this.args = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {html} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
return input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default HTMLToText;
|
Loading…
Add table
Add a link
Reference in a new issue