ciam-commons
Advanced tools
Comparing version 1.22.0 to 1.23.0
@@ -79,3 +79,4 @@ export interface DiscordUser { | ||
export declare const validFlag: (perm: string) => boolean; | ||
export declare class Flag extends String { | ||
export declare class Flag { | ||
value: string; | ||
isWildcard: boolean; | ||
@@ -90,2 +91,3 @@ cooldown: number; | ||
equals(other: Flag | StrictFlag): boolean; | ||
toString(): string; | ||
} | ||
@@ -92,0 +94,0 @@ export declare class StrictFlag extends String { |
@@ -45,3 +45,5 @@ export const isPermissionHolder = (value) => { | ||
// Our lord an savior Ash has come to bless us | ||
export class Flag extends String { | ||
// Thanks for the help❤️ | ||
export class Flag { | ||
value; | ||
isWildcard; | ||
@@ -55,3 +57,3 @@ cooldown; | ||
flag(value); | ||
super(value); | ||
this.value = value; | ||
const parts = value.split(':'); | ||
@@ -80,2 +82,5 @@ this.isWildcard = parts[0] === '*' || parts[0].endsWith('.*'); | ||
} | ||
toString() { | ||
return this.value; | ||
} | ||
} | ||
@@ -82,0 +87,0 @@ export class StrictFlag extends String { |
{ | ||
"name": "ciam-commons", | ||
"version": "1.22.0", | ||
"version": "1.23.0", | ||
"description": "Common types and functions for CIAM", | ||
@@ -8,3 +8,3 @@ "main": "./lib/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\"", | ||
"test": "mocha --recursive --enable-source-maps --exit", | ||
"build": "tsc", | ||
@@ -28,2 +28,4 @@ "format": "prettier --write \"src/**/*.ts\"", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"mocha": "^10.0.0", | ||
"mocha-suppress-logs": "^0.3.1", | ||
"prettier": "^2.6.2", | ||
@@ -30,0 +32,0 @@ "typescript": "^4.6.3" |
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
10641
291
1
10