@blackglory/uid-js

npm install --save @blackglory/uid-js

Usage no npm install needed!

<script type="module">
  import blackgloryUidJs from 'https://cdn.skypack.dev/@blackglory/uid-js';
</script>

README

uid-js

Install

npm install --save @blackglory/uid-js
# or
yarn add @blackglory/uid-js

API

UIDClient

new UIDClient({
  server: string
, basicAuth?: {
    username: string
  , password: string
  }
, keepalive?: boolean
, timeout?: number
})
interface IUIDClientRequestOptions {
  signal?: AbortSignal
  keepalive?: boolean
  timeout?: number | false
}

nanoid

UIDClient#nanoid(options?: IUIDClientRequestOptions): Promise<string>

uuid

UIDClient#uuid(options?: IUIDClientRequestOptions): Promise<string>