How to use the nanoid/url.substr function in nanoid

To help you get started, we’ve selected a few nanoid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xkcd / alto / src / Client.js View on Github external
constructor(baseURL) {
    this.baseURL = baseURL
    this.cache = new Map()
    this.sessionId = nanoid(nanoidChars.substr(2), 22)
  }

nanoid

A tiny (116 bytes), secure URL-friendly unique string ID generator

MIT
Latest version published 6 days ago

Package Health Score

91 / 100
Full package analysis