Skip to content

Vue 3 component wrapper for lifehash identicons

License

Notifications You must be signed in to change notification settings

CerxMe/lifehash-vue

 
 

Repository files navigation

0

lifehash-vue

Wrapper component for the WASM LifeHash implementation powered identicons in Vue.js

Installation

npm i lifehash-vue --save

Usage

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 'lifehash-vue';
</script>

See a working live example on codesandbox.

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 '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 0
1 Version 2 1
2 Version 2 - Detailed 2
3 Fiducial 3
4 Fiducial - Monochrome 4

About

Vue 3 component wrapper for lifehash identicons

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 59.9%
  • C++ 35.7%
  • Vue 1.8%
  • TypeScript 1.4%
  • Other 1.2%