GithubHelp home page GithubHelp logo

hashplate-cn's Introduction

hashplate-cn

A tiny and fast lib to generate human-readable hash from a string in the style of China license plates.

Use

pnpm add -D hashplate-cn
import { hashplate } from "hashplate-cn";

const hash = hashplate("Hello World!");
// returns "🍢 渝F·WGVA2 🪣"

Format

The hash is generated in the following format:

<emoji> <2 uppercase letters>-<3 digits>-<2 uppercase letters> <emoji>

You can remove emoji by passing the second parameter.

import { hashplate } from "hashplate-cn";

const hash = hashplate("Hello World!", {
    hasEmoji: false,
});
// returns "渝F·WGVA2"

Why?

I needed a way to generate a hash that was readable and easy to recognize to anonymize data. This is the result.

Credit

forked from Project hashplate

hashplate-cn's People

Contributors

cunzaizhuyi avatar

Stargazers

Jason Li avatar guoyucn avatar loozicing avatar ChaunceyXCX avatar  avatar Chen avatar Xsit avatar  avatar doudou avatar  avatar Wangsd823 avatar lfw avatar KILLUA avatar 天筑辉煌 avatar  avatar Wang Jie avatar  avatar Peter Chen avatar Paulo_hong avatar yushuisheng avatar  avatar Cao Zhengyang avatar  avatar wilbur.yu avatar  avatar Orange avatar 璀境石 avatar Alex.zhao avatar Libon avatar sugar avatar fengjutian avatar  avatar flyfire avatar Nianyi Wang avatar Ch3nyang avatar SNORLAX avatar allen.hu avatar lostpaul avatar CHOCO avatar Jiang10086 avatar Alex Liu avatar o1labs avatar Neko Null avatar  avatar Truman avatar aether avatar taliove avatar Lin. avatar  avatar  avatar UUCoder avatar Craeszy avatar Shane avatar  avatar Brynne Taylor avatar sz-p avatar Yuexiang Gao avatar zephyr avatar architect avatar XYZ avatar  avatar jxfffff avatar  avatar Renxing avatar William J H avatar 按点下班 avatar Shaw avatar Jerry avatar Hash Brown avatar CherryLover avatar RenXiao Huang avatar sakumyz avatar liu bo avatar 7ee avatar stevensunzh avatar Meng Ye avatar  avatar  avatar Alan avatar Joker_Runner avatar Holata Seminole avatar 关关来了 avatar longbow avatar Jaya avatar Lete avatar 李润泽 avatar  avatar

Watchers

 avatar

hashplate-cn's Issues

Allow user to configure not using `O` and `I`

It's more of a cosmetic/conformance thing.

The current standard for license plates rules out the use of O (upper case o) and I (upper case i) in favour of using 0 (zero) and 1 (one) only. Maybe we can add it as an option?

golang 版本

感觉这个非常有意思,特定看了下制作了个golang版本。
增加了O、I选项,还有支持了下原版
hashplate-go

feat: 可逆加解密~

哈哈,挺好玩的!

如果能做成可逆的,就能解锁很多新的场景和用法了。

下午我准备写个新包来试试

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.