# sec-id

> Generate an unique id for your application

Latest version **2.4.3** (published 2022-11-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install sec-id
pnpm add sec-id
yarn add sec-id
bun add sec-id
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.3 |
| Published | 2022-11-05 |
| First published | 2022-08-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | S-Studio |
| Maintainers | tktcpshfr-141424 |
| Keywords | Id, unique id, generate id, id generator, ids, Ids, generate unique id, token generator, generate token id, generate random string, generate random, random string generator, random generator |

## Links

- npm: https://www.npmjs.com/package/sec-id
- Repository: https://github.com/ScratchCoder135/IdGen-NPM
- Homepage: https://github.com/ScratchCoder135/IdGen-NPM#readme
- Issues: https://github.com/ScratchCoder135/IdGen-NPM/issues
- npm.io page: https://npm.io/package/sec-id

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.4.3 (latest) — 2022-11-05
- 2.4.2 — 2022-11-05
- 2.4.1 — 2022-09-17
- 2.4.0 — 2022-09-10
- 2.3.5 — 2022-09-10
- 2.3.4 — 2022-09-10
- 2.3.3 — 2022-09-10
- 2.3.2 — 2022-09-09
- 2.3.1 — 2022-09-09
- 2.3.0 — 2022-09-09
- 2.2.4 — 2022-08-20
- 2.2.3 — 2022-08-20
- 2.2.2 — 2022-08-20
- 2.2.1 — 2022-08-20
- 2.2.0 — 2022-08-20
- … 2 more at https://npm.io/package/sec-id/versions

## README

# Sec-Id 

# A package for generating unique IDs.

### 🔽Install
```bash
$ npm install sec-id
```

### 🔨Usage:

```javascript
const Generator=require('sec-id')

var NormalId=Generator.GenerateId({length:15})
//Put the length of the Id into the parameter field.

var NumberId=Generator.GenerateNumberId({length:15})

console.log(NormalId)

console.log(NumberId)
//eugjdnsl471Gher
//295739587936457
```

```
[handler].[function]({length:Number,pattern:Sharp-Pattern})
```
#### Example of Shell execution
```javascript
#!/usr/bin/env node
const g=require("sec-id")
g.GenerateCustomizePatternId({length:999,pattern:"usr82194*#"})

//usr82194*u8ow3ehf45378tc54jo934c8jhzjhJKJYHKKOJGjw7hc87whrty7v4ryr9gterhtr97je4tc753w78gGFJGGJEGGFDSZJtzr6rewr4376r643r8wygfjsdgfjskd...

```
#### Secured-Ids
```javascript
const Generator=require('sec-id')

var NormalId=Generator.GenerateSecId()//This Id is suitable for Secure Purposes
```
#### Other Ids
```javascript
var MixId=Generator.GenerateMixedAlphaId()//Mixed alphabet id
var Upper=Generator.GenerateUpperId()//Uppercase only id
var Lower=Generator.GenerateLowerId()//Lowercase id
var NumberSlash=Generator.GenerateNumHyphId()//Id with number and hyphen -
var Customizr=Generator.GenerateCustomizeId({length:24,datastring:"YourDataString"})//Get ID with custumized characters
```

#### 🌄Patterns
We support customize patterns
```javascript
var Pattern=g.GenerateCustomizePatternId({length:15,pattern:"user123#"})
//Use # to be the part you want to have random id.
console.log(Pattern)
//user123E5Gc6K3d
```
##### Examples
You can use this function in many ways such as user management system(with the help of other packages)
```javascript
//Example
var db=[{userid:"User12345678901234567890",password:"1234567",
device:"Windows 11,Chrome,version 100"}]


var newUserID=g.GenerateCustomizePatternId({length:24,pattern:"User#"})
db.push({userid:newUserID,password:request.body.password,device:request.body.device})
response.send("User Created")
```
#### Structures
ModuleName.Function({length:number,datastring:string})
#### 🍪Example (Cookies)
```javascript
request.cookies.LoginId=Generator.GenerateId({length:Math.floor(Math.random()*88)+12})

//You can have an Id to identify users.
```
### 🎙Credits

- S-Studio

### 🎉Update Logs
#### 2022/08/20 v2.2
#### Updated New function
```javascript
var Pattern=g.GenerateCustomizePatternId({length:15,pattern:"user123#"})
```

2022/08/19 v2.0,v2.1
Add a function
Changed the name

2022/08/19 v1.0
Create the package

### 🧪Bug reports & Source Codes
Please find me on [Github](https://github.com/ScratchCoder135)
This project ▶ [Github Repo](https://github.com/ScratchCoder135/IdGen-NPM)

### 🌐Website

[Website](https://sec-id.netlify.app/index.html)

### 📕License
ISC Licensed.

---
_Source: https://npm.io/package/sec-id · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
