Skip to content

Commit

Permalink
Bumped Version to 0.2.1
Browse files Browse the repository at this point in the history
Fixed UUID validate export
  • Loading branch information
Pixelicc committed Jun 28, 2024
1 parent aa5578f commit 152af0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mowojang",
"version": "0.2.0",
"version": "0.2.1",
"description": "A simple JavaScript and TypeScript compatible API Wrapper for the Mowojang-API.",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Client = client;

export const validate = {
player: validatePlayer,
uuid: validateUUID,
UUID: validateUUID,
username: validateUsername,
};

Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ describe("Utility Functions", { timeout: 10000 }, function () {
describe("Validator Functions", { timeout: 10000 }, function () {
describe("#UUID()", function () {
it("Should be true on an valid UUIDv4 String", function () {
assert.strictEqual(validate.uuid("14727fae-fbdc-4aff-848c-d2713eb9939e"), true);
assert.strictEqual(validate.UUID("14727fae-fbdc-4aff-848c-d2713eb9939e"), true);
});
it("Should be false on an invalid UUIDv4 String", function () {
assert.strictEqual(validate.username("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), false);
assert.strictEqual(validate.UUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), false);
});
});
describe("#username()", function () {
Expand Down

0 comments on commit 152af0b

Please sign in to comment.