New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tnid

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tnid

tnid는 네트워크 전송을 위한 가볍고 확장 가능한 문자열 고유식별자입니다. MQTT의 topic과 같이 실시간으로 전송되는 패킷에 포함해야 할 경우에 적합합니다.

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

tnid

The tnid is a light, scalable string unique identifier for network transmission. It is suitable for situations where it should be included in packets transmitted in real-time, such as MQTT's topic.

It consists 64 characters within the ASCII and randomly generates identifiers of varying lengths, including 4, 8, 12, 16, and 20.

usage

const tnid = require("tnid");
// or
import tnid from "tnid";

const id = tnid();

signature

(scale?: number, key?: string) => string

scale

default value: 5

  • The length of the identifier to be returned is 4 * scale.
  • The number of cases is 2^{20 * scale}.

alphabet

default value: "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"

The string to consist identifier.

  • The length of the string is 64. each character is unique.
  • We recommend using characters within the ASCII code.

Keywords

id

FAQs

Package last updated on 24 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts