workflow-node 0.19.0

Utilities and curated re-exports for Node.js APIs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::node_sys::{class::stream::Transform, interface::StreamTransformOptions};
use wasm_bindgen::prelude::*;

#[wasm_bindgen(module = "crypto")]
extern "C" {
    #[wasm_bindgen(extends = Transform)]
    #[derive(Clone, Debug)]
    pub type Hash;

    #[wasm_bindgen]
    pub fn copy(this: &Hash, options: Option<StreamTransformOptions>) -> Hash;

    #[wasm_bindgen(method)]
    pub fn digest(this: &Hash, encoding: Option<&str>) -> JsValue;

    #[wasm_bindgen(method)]
    pub fn update(this: &Hash, data: &JsValue, input_encoding: Option<&str>) -> Hash;
}