Reputation: 2181
I'm using AngularJS to create an app and i'm using an external library to hash strings.
<script src="bower_components/blueimp-md5/js/md5.js"></script>
In a controller i call md5() function that hash a string.
md5(myKey);
This works but Jshint gives me a warning : md5 is not defined
How to avoid that and what's the best way to call external libraries ?
Thks in advance.
Edit : I set "md5": true in my .jshintrc, I don't have the warning anymore but is that the best practice ?
Matt
Upvotes: 1
Views: 467
Reputation: 303
You can add definition in .jshintrc file in section "globals" to avoid warnings like this:
{
"blabla": true,
"globals": {
"md5": true
}
}
Upvotes: 3