1.2.1 • Published 3 years ago

@saekitominaga/document-generate-id v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Generate a unique ID in Document

npm version

Generate a unique ID in Document.

Demo

Examples

import DocumentGenerateId from '@saekitominaga/document-generate-id';

const documentGenerateId1 = new DocumentGenerateId();
documentGenerateId1.generate(); // e.g. GUaHJ6ao5m

const documentGenerateId2 = new DocumentGenerateId(8, {
  alphalower: true,
  alphaupper: false,
  number: true,
  symbol: '-_:.',
}, 'js-', 3);
documentGenerateId2.generate(); // e.g. js-7f3h1w:l

Constructor

new DocumentGenerateId(
	length = 10,
	charactorType = {
		alphalower: true,
		alphaupper: true,
		number: true,
		symbol: '',
	},
	prefix = '',
	trialLimit = 10
)

Parameters

Methods

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago