Skip to content

SquareFactory/c2id

Repository files navigation

@csquare/c2id

licence version coverage

Generate nearly unique base62-based ids.

Maintained by Mathieu Bour, Lead Platform Engineer at Cohesive Computing SA.

Installation

Install with npm:

npm install --save @csquare/c2id

Install with Yarn:

yarn add @csquare/c2id

Usage

Basic usage

Using CommonJS syntax:

const { c2id } = require('@csquare/c2id');

const output = c2id();

Using ESM syntax (default import):

import c2id from '@csquare/c2id';

const output = c2id();

or

import { c2id } from '@csquare/c2id';

const output = c2id();