Gathering detailed insights and metrics for uniqid
Gathering detailed insights and metrics for uniqid
Gathering detailed insights and metrics for uniqid
Gathering detailed insights and metrics for uniqid
npm install uniqid
Typescript
Module System
Node Version
NPM Version
100
Supply Chain
99.5
Quality
76
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
613 Stars
66 Commits
44 Forks
13 Watchers
6 Branches
14 Contributors
Updated on Jun 25, 2025
Latest Version
5.4.0
Package Id
uniqid@5.4.0
Size
2.56 kB
NPM Version
6.14.13
Node Version
14.17.2
Published on
Aug 18, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
It will always create unique id's based on the current time, process and machine name.
1// install with npm 2npm install uniqid 3 4// install with yarn 5yarn add uniqid
1import uniqid from 'uniqid'; 2 3console.log(uniqid()); // -> 4n5pxq24kpiob12og9 4console.log(uniqid(), uniqid()); // -> 4n5pxq24kriob12ogd, 4n5pxq24ksiob12ogl
1var uniqid = require('uniqid'); 2 3console.log(uniqid()); // -> 4n5pxq24kpiob12og9 4console.log(uniqid(), uniqid()); // -> 4n5pxq24kriob12ogd, 4n5pxq24ksiob12ogl
Generate 18 byte unique id's based on the time, process id and mac address. Works on multiple processes and machines.
1uniqid() -> "4n5pxq24kpiob12og9" 2uniqid('hello-') -> "hello-4n5pxq24kpiob12og9" 3uniqid('hello-', '-goodbye') -> "hello-4n5pxq24kpiob12og9-goodbye" 4 5// usage with suffix only 6uniqid('', '-goodbye') -> "4n5pxq24kpiob12og9-goodbye" 7uniqid(undefined, '-goodbye') -> "4n5pxq24kpiob12og9-goodbye"
Generate 12 byte unique id's based on the time and the process id. Works on multiple processes within a single machine but not on multiple machines.
1uniqid.process() -> "24ieiob0te82"
Generate 8 byte unique id's based on the current time only. Recommended only on a single process on a single machine.
1uniqid.time() -> "iob0ucoj"
Since browsers don't provide a Process ID and in most cases neither give a Mac Address using uniqid from Webpack, Browserify and Vite falls back to uniqid.time()
for all the other methods too. The browser is the single process, single machine case anyway.
Debug messages are turned off by default as of v4.1.0
. To turn on debug messages you'll need to set uniqid_debug
to true
before you require the module.
1// enable debug messages 2module.uniqid_debug = true; 3 4// require the module 5var uniqid = require('uniqid');
(The MIT License)
Copyright (c) 2014-2021 Halász Ádám adam@aimform.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 7/22 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
20 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More