adding more flexibilty
hopefully this is how you do amd support
This commit is contained in:
@@ -54,14 +54,24 @@
|
||||
<pre
|
||||
class="sunlight-highlight-javascript linenums">'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 || {}));
|
||||
}));
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -260,7 +270,7 @@ return wildstring;
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
|
||||
on Wed Aug 5th 2015 using the <a
|
||||
on Sun Aug 9th 2015 using the <a
|
||||
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user