// qrcode53bytes_lib_for_javascript lib.rs

use unwrap::unwrap;
use wasm_bindgen::prelude::*;

/// qrcode svg
#[wasm_bindgen]
pub fn svg_qrcode(link: &str) -> String {
    let qr = unwrap!(qrcode53bytes::Qr::new(&link));
    let renderer = qrcode53bytes::SvgRenderer::new();
    let svg = renderer.render(&qr);
    // return
    svg
}
