From f6fa9ba5d4008d4cc02e4d360a103d81c6558dbe Mon Sep 17 00:00:00 2001 From: Matt Boris Date: Wed, 19 Jul 2023 10:45:22 -0400 Subject: [PATCH] v4.0.0 --- README.md | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d62e78e..00afe15 100644 --- a/README.md +++ b/README.md @@ -48,22 +48,22 @@ RFC 4122 defines the setting of 6 bits of the v4 UUID which determines these regular expressions. ```js -var slugid = require('slugid'); +const slugid = require('slugid'); // Generate "nice" URL-safe base64 encoded UUID version 4 (random) -var slug = slugid.nice(); // a8_YezW8T7e1jLxG7evy-A +const slug = slugid.nice(); // a8_YezW8T7e1jLxG7evy-A ``` Encode / Decode --------------- ```js -var slugid = require('slugid'); +const slugid = require('slugid'); // Generate URL-safe base64 encoded UUID version 4 (random) -var slug = slugid.v4(); +const slug = slugid.v4(); // Get UUID on the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx -var uuid = slugid.decode(slug); +const uuid = slugid.decode(slug); // Compress to slug again assert(slug == slugid.encode(uuid)); diff --git a/package.json b/package.json index 353b601..8b2fc1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slugid", - "version": "3.2.0", + "version": "4.0.0", "author": "Jonas Finnemann Jensen ", "description": "URL-safe base64 UUID encoder for generating 22 character slugs", "license": "MIT",