0.1.6 • Published 3 years ago
@hansuhhi-don/lifehash-vue v0.1.6
![]()
@hansuhhi-don/lifehash-vue
Wrapper component for the WASM LifeHash implementation powered identicons in Vue.js
Installation
npm i @hansuhhi-don/lifehash-vue --saveUsage
The default export is a Vue component that can be used in a Vue template.
<template>
<div>
<LifeHash input="Hello, world!" />
</div>
</template>
<script setup>
import LifeHash from '@hansuhhi-don/lifehash-vue';
</script>See the demo directory for a working live example.
Props
Following props are available:
| Name | Type | Description |
|---|---|---|
| input | String | The input string to hash |
| version | Number | The version of LifeHash to use (Default: 1) |
Global registration (in main.js)
import { createApp } from 'vue'
import App from './App.vue'
import LifeHash from '@hansuhhi-don/lifehash-vue';
createApp(App)
.component('LifeHash', LifeHash)
.mount('#app')Fiducial version
optimized for recognition by machine vision algorithms
<LifeHash input="Hello, world!" version="3" />Example results
| Version | Description | Samples |
|---|---|---|
| 0 | Version 1 | ![]() |
| 1 | Version 2 | ![]() |
| 2 | Version 2 - Detailed | ![]() |
| 3 | Fiducial | ![]() |
| 4 | Fiducial - Monochrome | ![]() |




