Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/typecheck-array.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The following patterns are considered problems;
// invalid
Object.prototype.toString.call(someArray) === '[object Array]'; // error: You should use the angular.isArray method

// invalid
Array.isArray(someArray) // error: You should use the angular.isArray method

The following patterns are **not** considered problems;

/*eslint angular/typecheck-array: 2*/
Expand Down
3 changes: 3 additions & 0 deletions examples/typecheck-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ angular.isArray(someArray);

// example - valid: false, errorMessage: "You should use the angular.isArray method"
Object.prototype.toString.call(someArray) === '[object Array]';

// example - valid: false, errorMessage: "You should use the angular.isArray method"
Array.isArray(someArray)