forked from EmmanuelDemey/eslint-plugin-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefinedundefined.js
More file actions
19 lines (12 loc) · 751 Bytes
/
definedundefined.js
File metadata and controls
19 lines (12 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// example - valid: true
angular.isUndefined(value)
// example - valid: true
angular.isDefined(value)
// example - valid: false, errorMessage: "You should not use directly the \"undefined\" keyword. Prefer angular.isUndefined or angular.isDefined"
value === undefined
// example - valid: false, errorMessage: "You should not use directly the \"undefined\" keyword. Prefer angular.isUndefined or angular.isDefined"
value !== undefined
// example - valid: false, errorMessage: "Instead of !angular.isUndefined, you can use the out-of-box angular.isDefined method"
!angular.isUndefined(value)
// example - valid: false, errorMessage: "Instead of !angular.isDefined, you can use the out-of-box angular.isUndefined method"
!angular.isDefined(value)