chore(js): added glue for version function

This commit is contained in:
frelodev 2024-09-25 14:09:24 +02:00 committed by alemi.dev
parent e0ea884b53
commit 3da0bfd40a

View file

@ -1,8 +1,12 @@
use napi_derive::napi; use napi_derive::napi;
use crate::ext::hash;
#[napi(js_name = "hash")] #[napi(js_name = "hash")]
pub fn js_hash(str : String) -> napi::Result<i64>{ pub fn js_hash(str : String) -> napi::Result<i64>{
Ok(hash(str)) Ok(crate::ext::hash(str))
}
#[napi(js_name = "version")]
pub fn js_version(str : String) -> napi::Result<String>{
Ok(crate::version())
} }