lifehash-vue
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i lifehash-vue

Weekly Downloads

10

Version

0.1.5

License

none

Unpacked Size

221 kB

Total Files

9

Last publish

Collaborators

  • inconspicuous