adding more flexibilty

hopefully this is how you do amd support
This commit is contained in:
deltreey
2015-08-09 18:11:21 -04:00
parent 042766d334
commit e1e1e6290b
4 changed files with 21 additions and 11 deletions

View File

@@ -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' &amp;&amp; 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>