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-cover@comet/cms-apidropcell_datajest-allure2-adaptersaashq-apitristacle_coretristacle_engine@arkahna/nx-terraform@alicloud/fun5htp-core@david-vectara/react-chatbotz-deduperyc-tx-api-walletyosqlzindexerupload-server-1@ellementul/uee-local-loader@golemio/parkings@golemio/shared-bikes@golemio/sorted-waste-stations@golemio/vehiclesharing@gleisbelegung/frontend@gleisbelegung/server@infinitebrahmanuniverse/nolb-uu@kothawleprem/vectara-react-chatbot@kothawleprem/vectara-react-search-metadatafilter@invokerw/koishi-plugin-openai@nimra-traiq/sources@eohjsc/react-native-smart-city@eohjsc/react-native-smart-parking@mmisty/cypress-allure-adapter@js-soft/native-cordova@js-soft/native-electron@kenyip/bull@ringkasan.net/queuebatch@open-social-protocol/osp-client@open_social_protocol/osp-client@pocket-architect/core@os1-platform/console-ui-js@outburn/fume-enginemeshblu-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-mvchomebridge-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-systemcia-world-leadersautokubeds-directuseinvoicingepub-maker2erxes-apiextract-md-datafilen-clifactbookfactbookjs
4.0.0

3 years ago

3.0.7

3 years ago

3.0.6

3 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

6 years ago

2.1.0

6 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

7 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

8 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