4.0.0 • Published 2 years ago

uuid-by-string v4.0.0

Weekly downloads
12,489
License
MIT
Repository
github
Last release
2 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_coreforward-emailfume-fhir-converterhomebridge-wyze-smart-homeldelib-log-testmerloc-climeshblu-connector-installer-windows-msimigratortronminecraft-launchernode-athena-utilsnovel-epubparse-eth-tokensosp-client-jsosp-jsjest-allure2-adapterloop-hapi-pluginslupdo-postgresmaioresenim@invokerw/koishi-plugin-openai@infinitebrahmanuniverse/nolb-uu@js-soft/native-cordova@js-soft/native-electron@kothawleprem/vectara-react-chatbot@kothawleprem/vectara-react-search-metadatafilter@kenyip/bull@mmisty/cypress-allure-adapterds-directusdropcell_data@umuthopeyildirim/react-chatbotepub-maker2extract-md-datafactbookfactbookjsreact-flatifycsspocket-architect-coreqr-utilspostman-collection-generatorpostman-sdkraven-readersaashq-apiremarkable-timesrehype-idsynflows-crmsengled-apisharedstreetssvag-utilsshortnryosqlz-deduper@comet/cms-apizindexerxeno-testwyze-apiwhatsappi@alicloud/fun@arkahna/nx-terraform5htp-corethree-covertristacle_coretristacle_engineupload-server-1yc-tx-api-wallet@golemio/shared-bikes@golemio/sorted-waste-stations@golemio/vehiclesharing@golemio/parkings@gleisbelegung/frontend@gleisbelegung/server@eohjsc/react-native-smart-city@eohjsc/react-native-smart-parking@ellementul/uee-local-loader@vdtn359/utils@vdtn359/news-utils@vectara/react-chatbot@tomlbz/koishi-plugin-openaiandoncloud-widget-previewall-airportsautokubecia-world-leadersappium-gridapify-google-authashton-design-system@serverless-cd/srm-aliyun-sls20201230@pocket-architect/core@os1-platform/console-ui-js@david-vectara/react-chatbot@ringkasan.net/queuebatch@outburn/fume-engine@nimra-traiq/sources@open-social-protocol/osp-client@open_social_protocol/osp-clientgenerator-jhipster-postgres-uuiderxes-apireact-bug-trap
4.0.0

2 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

2.0.0-alpha.1

6 years ago

2.0.0-alpha.0

6 years ago

0.6.0

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago