1.0.3 • Published 5 years ago

texttoid v1.0.3

Weekly downloads
51
License
ISC
Repository
gitlab
Last release
5 years ago

This module convert a text to unique id. Unique ID is autoincrement number. It return always the same number for the same text. Only for Nodejs

Installation

  1. $ npm i -g npm
  2. $ npm init
  3. $ npm i --save texttoid

DEMO 1

const textToID = require('texttoid')

For Example:

let x = textToID('Hakan Özdaşçı')
console.log(x)

1

let x = textToID('Today is Weater Cold')
console.log(x)

2

If you want to use difference databases

DEMO 2

const textToID = require('texttoid')

For Example:

let x = textToID('İlknur Işık', true, 'documents')
console.log(x)

1

let x = textToID('Today is Weater Cold', true, 'projects')
console.log(x)

1

let x = textToID('Istanbul Metropolitan Municipality', true, 'projects')
console.log(x)

2

If you dont want to a new ID, and then make second parameter false

let x = textToID('Istanbul Metropolitan Municipality', false, 'projects')
console.log(x)
>>> false (cant found id)
>>> 5 (id found)

It gives back always the same ID for the same textes

If you want to a new start for IDs (or remove database)

For Example 1:

let x = textToID('', true, 'documents', 'delete')
console.log(x)

documents removed. Now documents ID will start 1.

For Example 2:

let x = textToID('', true, 'projects', 'delete')
console.log(x)

projects removed. Now projects ID will start 1.

For Example 3: (Remove default database)

let x = textToID('', true, '', 'delete')
console.log(x)

db removed. Now db ID will start 1.

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago