diff --git a/.jshintrc b/.jshintrc index 1ff65e8..70abbc7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -11,5 +11,20 @@ "node": true, "sub": true, "undef": true, - "esnext": true + "esnext": true, + "globals": { + "define": true, + "angular": true, + "console": true, + "moment": true, + "describe": true, + "beforeEach": true, + "module": true, + "inject": true, + "it": true, + "expect": true, + "browser": true, + "element": true, + "by": true + } } diff --git a/documentation/F__Git_wildstring_wildstring.js.html b/documentation/F__Git_wildstring_wildstring.js.html index 8de8c48..31c3500 100644 --- a/documentation/F__Git_wildstring_wildstring.js.html +++ b/documentation/F__Git_wildstring_wildstring.js.html @@ -54,14 +54,24 @@
'use strict';
-var wildstring = (function(module) {
+(function (root, definition) {
+ if (typeof(module) !== 'undefined') {
+ module.exports = definition();
+ }
+ else if (typeof(define) === 'function' && typeof(define.amd) === 'object') {
+ define(definition);
+ }
+ else {
+ this['wildstring'] = definition();
+ }
+}('wildstring', function () {
/**
* @namespace wildstring
* @property {string} wildcard the wildcard to use in your strings, defaults to '*'
* @property {boolean} caseSensitive whether matches should care about case, defaults to true
*/
-wildstring = {
+var wildstring = {
wildcard: '*',
caseSensitive: true
};
@@ -230,7 +240,7 @@ wildstring.replace = function (pattern, strings) {
module.exports = wildstring;
return wildstring;
-}(module || {}));
+}));
@@ -260,7 +270,7 @@ return wildstring;
diff --git a/documentation/index.html b/documentation/index.html
index 1b7676a..801f8bd 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -138,7 +138,7 @@ gruntgrunt will run all the tests and jshint, so just make sure diff --git a/documentation/namespaces.list.html b/documentation/namespaces.list.html index 7609ab3..8a785ca 100644 --- a/documentation/namespaces.list.html +++ b/documentation/namespaces.list.html @@ -165,7 +165,7 @@ diff --git a/documentation/wildstring.html b/documentation/wildstring.html index d385787..8bf67b6 100644 --- a/documentation/wildstring.html +++ b/documentation/wildstring.html @@ -176,7 +176,7 @@
@@ -339,7 +339,7 @@ @@ -498,7 +498,7 @@ @@ -662,7 +662,7 @@ @@ -761,7 +761,7 @@ diff --git a/wildstring.js b/wildstring.js index aa82ae3..67c721e 100644 --- a/wildstring.js +++ b/wildstring.js @@ -1,13 +1,23 @@ 'use strict'; -var wildstring = (function(module) { +(function (root, definition) { + if (typeof(module) !== 'undefined') { + module.exports = definition(); + } + else if (typeof(define) === 'function' && typeof(define.amd) === 'object') { + define(definition); + } + else { + this['wildstring'] = definition(); + } +}('wildstring', function () { /** * @namespace wildstring * @property {string} wildcard the wildcard to use in your strings, defaults to '*' * @property {boolean} caseSensitive whether matches should care about case, defaults to true */ -wildstring = { +var wildstring = { wildcard: '*', caseSensitive: true }; @@ -176,4 +186,4 @@ wildstring.replace = function (pattern, strings) { module.exports = wildstring; return wildstring; -}(module || {})); +}));