npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ebooker/ipid

v0.1.3

Published

IPID is an unique identification code of digital assets in blockchain network

Downloads

7

Readme

什么是IPID

IPID是区块链网络中数字资产的唯一识别码,该数字资产可以是某个文本,书籍,图片,音视频,模型,抽象概念,人物形象等等。 IPID可以进行组合和拆分从而生成一个新的IPID(如由几篇文章组合成一本杂志,文集,从书籍中分出人物,吉祥物,特有概念等),并且生成,组合,更新等所有信息均可在区块链上公开查询和追溯,不可篡改。

为什么需要IPID,它能做什么

  1. 任何文章,书籍都有其创作历程,有多个版本,在区块链上存储的哈希值可以表示文章或书籍的某个版本,但不能表示该文章或书籍中的某个主体(如海贼王),而IPID代表的就是一个主体,它可以有时间历程,可以进行拆分(如海贼王中的场景,武器,果实),也可以进行组合,形成一个系列,也可以进行提取和抽象(如人物公仔,海报,卡通形象,表情等)形成新的IPID。
  2. 通过IPID可以在区块链上进行查询和追溯该IP的来源,历史变更信息,并能更好地进行组合与重构。
  3. 通过IPID可以很容易看出该IP的产生时间,种类,类型及使用语种等等信息,方便后续的IP交易

IPID 规则

  1. IPID字符包括:大写字符, 数字, '-'
  2. 其组成字段:(8个)
    • IPID
    • 规则版本号 - (A-Z, 该版本代表的是规则的版本,而不是代码,数据的更新版本)
    • 时间 - 20181113(具体到某一天)
    • 大类型 - AR(两位:音像,图书,期刊杂志,文章,电影...)
    • 小类型 - UDC: 小说,诗歌,哲学...)
    • 随机数(5位大写字符, 共有P(26*2+10, 5) = 45239040 种排序)
    • 文种(zh,en,jp..)
    • 校验码(所有字符AscII码值之和除以10的余数)
  3. 校验码规则(所有字符AscII码值之和除以10的余数)
  4. 详细分类请查看分类规则 例如:
    完整的 IPID 如:IPIDA20181113AR-A4-FG7RT-ZH3 其中:
        IPID        - 为前缀
        A           - 代表当前版本规则为A
        20181113    - 该IPID注册时间为2018年11月13日,该时间统一以国际时间为准
        AR          - 该IPID的种类为文章
        A4          - 该IPID为游戏类文章
        FG7RT       - 5位随机生成的字符,代表其唯一性
        ZH          - 语种为中文
        3           - 校验码,方便检测该字符串的合规性, AscII码值之和除以10的余数

IPID的安装使用

安装

npm install @ebooker/ipid --save

使用

const IPID = require('@ebooker/ipid')
const Text = 'IPIDA20181113AR-A4-FG7RT-ZH3'
const ipid = new IPID(Text)
console.log(IPID.isIpid(Text))
// true
console.log(ipid)
{
    version: 'A',
    date: '20181113',
    kind: '文章',
    type: '游戏',
    language: '中文',
    hash: 'FG7RT',
    value: 'IPIDA20181113AR-A4-FG7RT-ZH3',
}

测试

npm run test

APIS

IPID 模块 API

let ipidText = 'IPIDA20181113AR-A4-FG7RT-ZH3'

属性

ipid.

  • version
  • date
  • kind
  • type
  • language
  • hash
  • value

方法

  • ipid.getYear()
  • ipid.getMonth()
  • ipid.getDay()

静态方法

  • IPID.isIpid(ipidText) => "True"
  • IPID.getCheckCode(ipidText) => "3"
  • IPID.getKind(langCode, kindCode) => kindValue
  • IPID.getType(langCode, kindCode, typeCode) => typeValue
  • IPID.getKindCode(langCode, kindValue ) => kindCode
  • IPID.getTypeCode(langCode, kindCode, typeValue ) => typeCode
  • IPID.getAllKindCodes() => ["AR", "BO", ...]
  • IPID.getAllTypeCodes("AR") => ["A1", "A2", ...]

语言模块 API

  • IPID.Lang.getLanguages()
  • IPID.Lang.getCode()
  • IPID.Lang.getName()
  • IPID.Lang.getNativeName()
  • IPID.Lang.getLocalName()
  • IPID.Lang.getAllNames()
  • IPID.Lang.getAllNativeNames()

如何参与并完善IPID

IPID的规则如上,数据现在仅限于文章,图片和书籍,语言也仅限中文和英文,后续会陆续增加 希望参与的小伙伴可以通过PR的形式参与完善该模块,也可以通过Issue来提供更好的建议 建议或代码被采纳,可根据贡献大小获取对应开发者EOK奖励

参考

ISLI是国际标准关联标识符(International Standard Link Identifier) ISBN国际标准书号 ISSN国际标准连续出版物号