4.0.0 • Published 3 years ago

uuid-by-string v4.0.0

Weekly downloads
12,489
License
MIT
Repository
github
Last release
3 years ago

uuid-by-string NPM Downloads

Build Status

Generates the RFC-4122 Name-Based UUID. Supports 3 and 5 versions of UUID.

Installation

# via NPM
npm install uuid-by-string

# or Yarn
yarn add uuid-by-string

Usage

The package has only one default exported method. Method receives any string and returns generated hash

const getUuid = require('uuid-by-string');

const uuidHash = getUuid('Hello world!');
// d3486ae9-136e-5856-bc42-212385ea7970

The string Hello world! will always returns d3486ae9-136e-5856-bc42-212385ea7970.

You can specify the UUID version. Available versions is 3 and 5 according to RFC-4122. The version is responsible for the hashing algorithm: version 3 uses MD5, and version 5 uses SHA-1. SHA-1 used by default if version is not specified.

const uuidV3Hash = getUuid('Hello world!', 3);
// 86fb269d-190d-3c85-b6e0-468ceca42a20

const uuidV5Hash = getUuid('Hello world!', 5);
// d3486ae9-136e-5856-bc42-212385ea7970

API

getUuid(name [, version]);

getUuid(name [, namespace, version]);

  • name — hashing target
  • namespace Optional — UUID namespace
  • version Optional — 3 or 5, version of UUID

License

MIT licensed

@halodex/apitrista_cal5-htp@everything-registry/sub-chunk-3034@vectara/searchdropcell_coresynflows-crmwhatsappiwyze-apixeno-testsvag-utilsthree-coverdropcell_datajest-allure2-adapterhomebridge-wyze-smart-homehomebridge-wyze-smart-home-justoy-forkedlib-log-testlupdo-postgresloop-hapi-pluginsmaioresenimlde@vdtn359/utils@umuthopeyildirim/react-chatbot@tomlbz/koishi-plugin-openai@vdtn359/news-utils@vectara/react-chatbotall-airportsandoncloud-widget-previewapify-google-authappium-gridashton-design-system@golemio/waste-collection@golemio/vehiclesharing@golemio/shared-bikes@golemio/sorted-waste-stations@golemio/parkings@comet/cms-api@alicloud/funsaashq-apitristacle_coretristacle_enginez-deduperyc-tx-api-walletyosqlzindexerupload-server-1@infinitebrahmanuniverse/nolb-uumeshblu-connector-installer-windows-msimerloc-climinecraft-launchermigratortronosp-client-jsosp-jsparse-eth-tokenssengled-apiraven-readerreact-bug-traprehype-idremarkable-timesreact-flatifycssnode-athena-utilsnovel-epubpocket-architect-corepostman-collection-generatorpostman-sdkqr-utilsshortnrsharedstreetsglobular-mvccia-world-leadersautokubeforward-emailfume-fhir-convertergenerator-jhipster-postgres-uuidds-directuseinvoicingepub-maker2erxes-apiextract-md-datafilen-clifactbookfactbookjs@rikclaessens/backstage-plugin-news@rikclaessens/backstage-plugin-news-backend@ringkasan.net/queuebatch@open-social-protocol/osp-client@open-social-protocol/osp-client-core@open_social_protocol/osp-client@david-vectara/react-chatbot@gleisbelegung/frontend@gleisbelegung/server@ellementul/uee-local-loader@eohjsc/react-native-smart-city@eohjsc/react-native-smart-parking@nimra-traiq/sources@arkahna/nx-terraform@filen/cli@invokerw/koishi-plugin-openai@pocket-architect/core@mmisty/cypress-allure-adapter
4.0.0

3 years ago

3.0.7

4 years ago

3.0.6

4 years ago

3.0.5

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

2.0.0-alpha.1

7 years ago

2.0.0-alpha.0

7 years ago

0.6.0

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago