Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 666 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 666 Bytes

unique-id

A helper function that returns a unique id

License: MIT

How to use?

In your working directory create a folder called helpers and add this file(uid.js).
If you're using frameworks you can create something like this

|--src
| --helpers
|   --uid.js
 

If you are not using any frameworks, you can still create the helpers folder and add uid.js file.

|--helpers
| --uid.js
// src/main.js
import { uid } from './helpers/uid.js';
uid(); // ⇨ 'gP1aKD40g5e11Pe00ZbK'

For other reasons if you are not using JavaScript, feel free to convert this logic in your own programming language.