hashids.js 介绍
hashids.js 一个小型JavaScript库,可以从数字生成类似YouTube的ID。 当您不希望向用户公开数据库ID时使用它。
安装
yarn add hashids
#or
bower install hashids
#or
jam install hashids
使用
const hashids = new Hashids()
const id = hashids.encode(1,2,3) // o2fXhV
const numbers = hashids.decode(id) // [1,3]
网站地址:https://hashids.org/javascript
GitHub:https://github.com/niieani/hashids.js
网站描述:数字生成类似YouTube的ID的js库
hashids.js
官方网站:https://hashids.org/javascript
小编说
以上是编程之家为你收集整理的hashids.js全部内容。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。