-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove unused variables #2086
Changes from 9 commits
0cbd661
ad69f55
4c80a73
70094ca
5e985c8
806dc57
34571a1
23cccf7
5b94c50
92545e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,12 @@ | ||
// @dynamic | ||
// https://github.com/ng-packagr/ng-packagr/issues/641 | ||
|
||
export class CustomRegex { | ||
public static readonly INT_REGEX = /^-?\d+$/; | ||
|
||
public static readonly DECIMAL_REGEX = /^[-+]?[0-9]*\.?[0-9]*$/; | ||
|
||
public static readonly URI_REGEX = | ||
/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,63}(:[0-9]{1,5})?(\/.*)?$/; | ||
|
||
public static readonly COLOR_REGEX = /^#(?:[0-9a-fA-F]{6})$/; | ||
|
||
public static readonly TIME_REGEX = /^([0-1]{1}[0-9]{1}|[2]{1}[0-4]{1}):{1}[0-5]{1}[0-9]{1}$/; | ||
|
||
public static readonly GEONAME_REGEX = /^[0-9]{7}$/; | ||
|
||
public static readonly EMAIL_REGEX = | ||
/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; | ||
|
||
public static readonly PASSWORD_REGEX = /^(?=.*\d)(?=.*[a-zA-Z]).{8,}$/i; | ||
|
||
public static readonly USERNAME_REGEX = /^[a-zA-Z0-9]+$/; | ||
|
||
public static readonly SHORTNAME_REGEX = /^[a-zA-Z]+\S*$/; | ||
|
||
public static readonly ONTOLOGYNAME_REGEX = /^(?![vV][0-9]|[0-9]|[\u00C0-\u017F]).[a-zA-Z0-9]+\S*$/; | ||
|
||
// regex to check ontology name: shouldn't start with a number or with 'v' followed by a number, spaces or special characters are not allowed | ||
public static readonly ID_NAME_REGEX = /^(?![vV]+[0-9])+^([a-zA-Z])[a-zA-Z0-9_.-]*$/; | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Base service should contain a common code for all services. Currently, it only has isDestroyed subject which should be used at the component level to check if the service was destroyed after a tab was closed or the page was refreshed, mostly for subscriptions. Sentry indicates that we have a lot of those kind of leaks and we should keep reducing them. So instead of deleting it, I suggest thinking about in which services we should use it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. base service has been deleted, cause not used |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, destroying services is a good practice to avoid memory leaks and reset the state. If this service doesn't have any active subscriptions then it is ok to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not