mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-21 14:54:49 +01:00
chore(js): added glue for version function
This commit is contained in:
parent
e0ea884b53
commit
3da0bfd40a
1 changed files with 6 additions and 2 deletions
|
@ -1,8 +1,12 @@
|
|||
use napi_derive::napi;
|
||||
use crate::ext::hash;
|
||||
|
||||
|
||||
#[napi(js_name = "hash")]
|
||||
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())
|
||||
}
|
Loading…
Reference in a new issue