Release: 1.0.9

This commit is contained in:
deltreey
2017-04-24 02:07:30 -04:00
parent e4312c71d6
commit d51154d450
24 changed files with 17203 additions and 7859 deletions
@@ -44,15 +44,14 @@
<div class="col-md-12"> <div class="col-md-12">
<div id="main"> <div id="main">
<h1 class="page-title">Source: F:/Git/wildstring/wildstring.js</h1>
<h1 class="page-title">Source: F:/Git/wildstring/wildstring.js</h1> <h1 class="page-title">Source: F:/Git/wildstring/wildstring.js</h1>
<section> <section>
<article> <article>
<pre <pre
class="sunlight-highlight-javascript linenums">'use strict'; class="sunlight-highlight-javascript linenums">'use strict';
/** /**
* @namespace wildstring * @namespace wildstring
@@ -84,7 +83,6 @@ var wildstring = {
rollbackStrings.push({ string: testString, index: patternIndex }); rollbackStrings.push({ string: testString, index: patternIndex });
if (testString.indexOf(patternSubstrings[patternIndex]) === -1) { if (testString.indexOf(patternSubstrings[patternIndex]) === -1) {
rollbackStrings.pop(); rollbackStrings.pop();
break;
} }
currentString = currentString.substr( currentString = currentString.substr(
@@ -230,7 +228,7 @@ if (typeof(module) !== 'undefined') { module.exports = wildstring; }
if (typeof(angular) !== 'undefined') { angular.module('wildstring', []).factory('wildstring', function() { return wildstring; }); } if (typeof(angular) !== 'undefined') { angular.module('wildstring', []).factory('wildstring', function() { return wildstring; }); }
if (typeof(define) !== 'undefined') { define([], wildstring); } if (typeof(define) !== 'undefined') { define([], wildstring); }
</pre> </pre>
</article> </article>
</section> </section>
@@ -254,12 +252,11 @@ if (typeof(define) !== 'undefined') { define([], wildstring); }
<span class="copyright"> <span class="copyright">
DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects. DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects.
</span> </span>
<br />
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>
on Tue Aug 25th 2015 using the <a on Mon Apr 24th 2017 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>
@@ -276,20 +273,6 @@ $( function () {
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : "100px"
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( ".tutorial-section pre, .readme-section pre" ).each( function () { $( ".tutorial-section pre, .readme-section pre" ).each( function () {
var $this = $( this ); var $this = $( this );
@@ -301,7 +284,8 @@ $( function () {
example.html( exampleText ); example.html( exampleText );
lang = lang[1]; lang = lang[1];
} else { } else {
lang = "javascript"; var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
} }
if ( lang ) { if ( lang ) {
@@ -319,6 +303,28 @@ $( function () {
showMenu : true, showMenu : true,
enableDoclinks : true enableDoclinks : true
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
var id = $( heading ).attr( "id" );
return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
navbarOffset: 10,
smoothScrolling: true
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} ); } );
</script> </script>
+28 -28
View File
@@ -44,12 +44,9 @@
<div class="col-md-8"> <div class="col-md-8">
<div id="main"> <div id="main">
<h1 class="page-title">Index</h1>
<span class="page-title">Index</span>
@@ -71,12 +68,7 @@
<section class="readme-section"> <section class="readme-section">
<article><h1><a href="https://www.youtube.com/watch?v=4qHX493bB3U">wildstring</a></h1><p>Simple String Wildcard Handling</p> <article><h1><a href="https://www.youtube.com/watch?v=4qHX493bB3U">wildstring</a></h1><p>Simple String Wildcard Handling</p>
<p><a href="http://travis-ci.org/deltreey/wildstring"><img src="https://secure.travis-ci.org/deltreey/wildstring.png" alt="build status"></a> <p><a href="http://travis-ci.org/deltreey/wildstring"><img src="https://secure.travis-ci.org/deltreey/wildstring.png" alt="build status"></a><br><a href="https://www.npmjs.com/package/wildstring"><img src="https://badge.fury.io/js/wildstring.svg" alt="npm version"></a><br><a href="https://www.codacy.com/app/suicidolt/wildstring"><img src="https://www.codacy.com/project/badge/8436bfefb89345d0933bb91f59ed3b22" alt="Codacy Badge"></a><br><a href="https://codeclimate.com/github/deltreey/wildstring"><img src="https://codeclimate.com/github/deltreey/wildstring/badges/gpa.svg" alt="Code Climate"></a><br><a href="https://www.bithound.io/github/deltreey/wildstring"><img src="https://www.bithound.io/github/deltreey/wildstring/badges/score.svg?" alt="bitHound Score"></a><br><a href="https://gitter.im/deltreey/wildstring?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Join the chat at https://gitter.im/deltreey/wildstring"></a></p>
<a href="https://www.npmjs.com/package/wildstring"><img src="https://badge.fury.io/js/wildstring.svg" alt="npm version"></a>
<a href="https://www.codacy.com/app/suicidolt/wildstring"><img src="https://www.codacy.com/project/badge/8436bfefb89345d0933bb91f59ed3b22" alt="Codacy Badge"></a>
<a href="https://codeclimate.com/github/deltreey/wildstring"><img src="https://codeclimate.com/github/deltreey/wildstring/badges/gpa.svg" alt="Code Climate"></a>
<a href="https://www.bithound.io/github/deltreey/wildstring"><img src="https://www.bithound.io/github/deltreey/wildstring/badges/score.svg?" alt="bitHound Score"></a>
<a href="https://gitter.im/deltreey/wildstring?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Join the chat at https://gitter.im/deltreey/wildstring"></a></p>
<h2>Shake it shake it</h2><p>Installing wildstring is a snap. wildstring has no dependencies, so you don't need anything else to run it. If you want to use tools though, here's some tips on how to install it with popular installers.</p> <h2>Shake it shake it</h2><p>Installing wildstring is a snap. wildstring has no dependencies, so you don't need anything else to run it. If you want to use tools though, here's some tips on how to install it with popular installers.</p>
<h4>node.js</h4><pre class="prettyprint source lang-bash"><code>npm install wildstring</code></pre><p>then:</p> <h4>node.js</h4><pre class="prettyprint source lang-bash"><code>npm install wildstring</code></pre><p>then:</p>
<pre class="prettyprint source lang-js"><code>var wildstring = require('wildstring');</code></pre><h4>bower</h4><pre class="prettyprint source lang-bash"><code>bower install wildstring</code></pre><h4>html</h4><pre class="prettyprint source lang-html"><code>&lt;script src=&quot;wildstring.js&quot;>&lt;/script></code></pre><h2>Hold me tight</h2><p>Especially with something that does something new, it's important to see how it works. Below are some examples, but here's a brief explanation as well.</p> <pre class="prettyprint source lang-js"><code>var wildstring = require('wildstring');</code></pre><h4>bower</h4><pre class="prettyprint source lang-bash"><code>bower install wildstring</code></pre><h4>html</h4><pre class="prettyprint source lang-html"><code>&lt;script src=&quot;wildstring.js&quot;>&lt;/script></code></pre><h2>Hold me tight</h2><p>Especially with something that does something new, it's important to see how it works. Below are some examples, but here's a brief explanation as well.</p>
@@ -134,12 +126,11 @@ grunt</code></pre><p>grunt will run all the tests and jshint, so just make sure
<span class="copyright"> <span class="copyright">
DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects. DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects.
</span> </span>
<br />
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>
on Tue Aug 25th 2015 using the <a on Mon Apr 24th 2017 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>
@@ -156,20 +147,6 @@ $( function () {
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : "100px"
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( ".tutorial-section pre, .readme-section pre" ).each( function () { $( ".tutorial-section pre, .readme-section pre" ).each( function () {
var $this = $( this ); var $this = $( this );
@@ -181,7 +158,8 @@ $( function () {
example.html( exampleText ); example.html( exampleText );
lang = lang[1]; lang = lang[1];
} else { } else {
lang = "javascript"; var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
} }
if ( lang ) { if ( lang ) {
@@ -199,6 +177,28 @@ $( function () {
showMenu : true, showMenu : true,
enableDoclinks : true enableDoclinks : true
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
var id = $( heading ).attr( "id" );
return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
navbarOffset: 10,
smoothScrolling: true
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} ); } );
</script> </script>
+28 -21
View File
@@ -44,7 +44,6 @@
<div class="col-md-8"> <div class="col-md-8">
<div id="main"> <div id="main">
<h1 class="page-title">Namespaces</h1>
<h1 class="page-title">Namespaces</h1> <h1 class="page-title">Namespaces</h1>
@@ -67,7 +66,7 @@
<dl class="details"> <dl class="details">
@@ -161,12 +160,11 @@
<span class="copyright"> <span class="copyright">
DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects. DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects.
</span> </span>
<br />
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>
on Tue Aug 25th 2015 using the <a on Mon Apr 24th 2017 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>
@@ -183,20 +181,6 @@ $( function () {
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : "100px"
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( ".tutorial-section pre, .readme-section pre" ).each( function () { $( ".tutorial-section pre, .readme-section pre" ).each( function () {
var $this = $( this ); var $this = $( this );
@@ -208,7 +192,8 @@ $( function () {
example.html( exampleText ); example.html( exampleText );
lang = lang[1]; lang = lang[1];
} else { } else {
lang = "javascript"; var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
} }
if ( lang ) { if ( lang ) {
@@ -226,6 +211,28 @@ $( function () {
showMenu : true, showMenu : true,
enableDoclinks : true enableDoclinks : true
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
var id = $( heading ).attr( "id" );
return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
navbarOffset: 10,
smoothScrolling: true
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} ); } );
</script> </script>
File diff suppressed because one or more lines are too long
+32 -12
View File
@@ -4,17 +4,20 @@ $.fn.toc = function(options) {
var opts = $.extend({}, jQuery.fn.toc.defaults, options); var opts = $.extend({}, jQuery.fn.toc.defaults, options);
var container = $(opts.container); var container = $(opts.container);
var tocs = [];
var headings = $(opts.selectors, container); var headings = $(opts.selectors, container);
var headingOffsets = []; var headingOffsets = [];
var activeClassName = opts.prefix+'-active'; var activeClassName = 'active';
var navbarHeight = $('.navbar').height(); var navbarHeight = $('.navbar').height();
var ANCHOR_PREFIX = "__anchor";
var scrollTo = function(e) { var scrollTo = function(e) {
if (opts.smoothScrolling) { if (opts.smoothScrolling) {
e.preventDefault(); e.preventDefault();
var elScrollTo = $(e.target).attr('href'); var elScrollTo = $(e.target).attr('href');
var $el = $(elScrollTo); var $el = $(elScrollTo.replace('#.', '#\\.') + ANCHOR_PREFIX);
var offsetTop = $el.offset().top - navbarHeight;
var offsetTop = $el.offset().top - (navbarHeight + opts.navbarOffset);
$('body,html').animate({ scrollTop: offsetTop }, 400, 'swing', function() { $('body,html').animate({ scrollTop: offsetTop }, 400, 'swing', function() {
location.hash = elScrollTo; location.hash = elScrollTo;
@@ -24,6 +27,14 @@ $.fn.toc = function(options) {
$(e.target).parent().addClass(activeClassName); $(e.target).parent().addClass(activeClassName);
}; };
var calcHadingOffsets = function() {
headingOffsets = [];
headings.each(function(i, heading) {
var top = $(heading).prev("span").offset().top - (navbarHeight + opts.navbarOffset);
headingOffsets.push(top > 0 ? top : 0);
});
}
//highlight on scroll //highlight on scroll
var timeout; var timeout;
var highlightOnScroll = function(e) { var highlightOnScroll = function(e) {
@@ -34,10 +45,10 @@ $.fn.toc = function(options) {
var top = $(window).scrollTop(), var top = $(window).scrollTop(),
highlighted; highlighted;
for (var i = 0, c = headingOffsets.length; i < c; i++) { for (var i = 0, c = headingOffsets.length; i < c; i++) {
if (headingOffsets[i] >= top) { if (headingOffsets[i] >= top || (headingOffsets[i + 1] && headingOffsets[i + 1] > top)) {
$('li', self).removeClass(activeClassName); $('li', self).removeClass(activeClassName);
if (i > 0) { if (i >= 0) {
highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName); highlighted = tocs[i].addClass(activeClassName);
opts.onHighlight(highlighted); opts.onHighlight(highlighted);
} }
break; break;
@@ -47,25 +58,27 @@ $.fn.toc = function(options) {
}; };
if (opts.highlightOnScroll) { if (opts.highlightOnScroll) {
$(window).bind('scroll', highlightOnScroll); $(window).bind('scroll', highlightOnScroll);
highlightOnScroll(); $(window).bind('load resize', function() {
calcHadingOffsets();
highlightOnScroll();
});
} }
return this.each(function() { return this.each(function() {
//build TOC //build TOC
var el = $(this); var el = $(this);
var ul = $('<ul/>'); var ul = $('<ul/>');
headings.each(function(i, heading) { headings.each(function(i, heading) {
var $h = $(heading); var $h = $(heading);
headingOffsets.push($h.offset().top - opts.highlightOffset);
//add anchor var anchor = $('<span/>').attr('id', opts.anchorName(i, heading, opts.prefix) + ANCHOR_PREFIX).insertBefore($h);
var anchor = $('<span/>').attr('id', opts.anchorName(i, heading, opts.prefix)).insertBefore($h);
//build TOC item //build TOC item
var a = $('<a/>') var a = $('<a/>')
.text(opts.headerText(i, heading, $h)) .text(opts.headerText(i, heading, $h))
.attr('href', '#' + opts.anchorName(i, heading, opts.prefix)) .attr('href', '#' + opts.anchorName(i, heading, opts.prefix))
.bind('click', function(e) { .bind('click', function(e) {
scrollTo(e); scrollTo(e);
el.trigger('selected', $(this).attr('href')); el.trigger('selected', $(this).attr('href'));
}); });
@@ -74,10 +87,17 @@ $.fn.toc = function(options) {
.addClass(opts.itemClass(i, heading, $h, opts.prefix)) .addClass(opts.itemClass(i, heading, $h, opts.prefix))
.append(a); .append(a);
tocs.push(li);
ul.append(li); ul.append(li);
}); });
el.html(ul); el.html(ul);
calcHadingOffsets();
}); });
}; };
@@ -88,7 +108,7 @@ jQuery.fn.toc.defaults = {
prefix: 'toc', prefix: 'toc',
onHighlight: function() {}, onHighlight: function() {},
highlightOnScroll: true, highlightOnScroll: true,
highlightOffset: 100, navbarOffset: 0,
anchorName: function(i, heading, prefix) { anchorName: function(i, heading, prefix) {
return prefix+i; return prefix+i;
}, },
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+138 -122
View File
@@ -44,7 +44,6 @@
<div class="col-md-8"> <div class="col-md-8">
<div id="main"> <div id="main">
<h1 class="page-title">Namespace: wildstring</h1>
<h1 class="page-title">Namespace: wildstring</h1> <h1 class="page-title">Namespace: wildstring</h1>
@@ -67,31 +66,31 @@
<dl class="details"> <dl class="details">
<h5 class="subsection-title">Properties:</h5> <h5 class="subsection-title">Properties:</h5>
<dl> <dl>
<table class="props table table-striped"> <table class="props table table-striped">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
@@ -104,6 +103,7 @@
<span class="param-type">string</span> <span class="param-type">string</span>
</td> </td>
@@ -114,7 +114,7 @@
<td class="description last"><p>the wildcard to use in your strings, defaults to '*'</p></td> <td class="description last"><p>the wildcard to use in your strings, defaults to '*'</p></td>
</tr> </tr>
<tr> <tr>
@@ -127,6 +127,7 @@
<span class="param-type">boolean</span> <span class="param-type">boolean</span>
</td> </td>
@@ -137,12 +138,12 @@
<td class="description last"><p>whether matches should care about case, defaults to true</p></td> <td class="description last"><p>whether matches should care about case, defaults to true</p></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</dl> </dl>
@@ -171,7 +172,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source"> <dd class="tag-source">
<ul class="dummy"> <ul class="dummy">
<li> <li>
@@ -211,13 +212,14 @@
<dl> <dl>
<hr>
<dt> <dt>
<h4 class="name" id=".checkRollbackStrings"><span class="type-signature">&lt;private, static> </span>checkRollbackStrings<span class="signature">(rollbackStrings, patternSubstrings)</span><span class="type-signature"></span></h4> <h4 class="name" id=".checkRollbackStrings"><span class="type-signature">&lt;private, static> </span>checkRollbackStrings(rollbackStrings, patternSubstrings)</h4>
</dt> </dt>
<dd> <dd>
<div class="description"> <div class="description">
<p>When a match doesn't continue to the end of the string, this function rolls back to try again with the rest of the string</p> <p>When a match doesn't continue to the end of the string, this function rolls back to try again with the rest of the string</p>
@@ -227,7 +229,7 @@
<h5>Parameters:</h5> <h5>Parameters:</h5>
@@ -235,23 +237,23 @@
<table class="params table table-striped"> <table class="params table table-striped">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
@@ -264,6 +266,7 @@
<span class="param-type">Array.&lt;string></span> <span class="param-type">Array.&lt;string></span>
</td> </td>
@@ -274,7 +277,7 @@
<td class="description last"><p>The list of substrings that appeared prior to the current match</p></td> <td class="description last"><p>The list of substrings that appeared prior to the current match</p></td>
</tr> </tr>
<tr> <tr>
@@ -287,6 +290,7 @@
<span class="param-type">Array.&lt;string></span> <span class="param-type">Array.&lt;string></span>
</td> </td>
@@ -297,15 +301,15 @@
<td class="description last"><p>The matching list of pattens that need to be matched before the current pattern</p></td> <td class="description last"><p>The matching list of pattens that need to be matched before the current pattern</p></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<dl class="details"> <dl class="details">
@@ -334,7 +338,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source"> <dd class="tag-source">
<ul class="dummy"> <ul class="dummy">
<li> <li>
@@ -352,7 +356,11 @@
</dl> </dl>
@@ -360,23 +368,20 @@
</dd> </dd>
<hr>
<dt> <dt>
<h4 class="name" id=".match"><span class="type-signature">&lt;static> </span>match<span class="signature">(pattern, string)</span><span class="type-signature"></span></h4> <h4 class="name" id=".match"><span class="type-signature">&lt;static> </span>match(pattern, string)</h4>
</dt> </dt>
<dd> <dd>
<div class="description"> <div class="description">
<p>Check if a string matches a pattern</p> <p>Check if a string matches a pattern</p>
@@ -386,7 +391,7 @@
<h5>Parameters:</h5> <h5>Parameters:</h5>
@@ -394,23 +399,23 @@
<table class="params table table-striped"> <table class="params table table-striped">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
@@ -423,6 +428,7 @@
<span class="param-type">string</span> <span class="param-type">string</span>
</td> </td>
@@ -433,7 +439,7 @@
<td class="description last"><p>The pattern to match using the configured wildcard</p></td> <td class="description last"><p>The pattern to match using the configured wildcard</p></td>
</tr> </tr>
<tr> <tr>
@@ -446,6 +452,7 @@
<span class="param-type">string</span> <span class="param-type">string</span>
</td> </td>
@@ -456,15 +463,15 @@
<td class="description last"><p>The string to test for a match</p></td> <td class="description last"><p>The string to test for a match</p></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<dl class="details"> <dl class="details">
@@ -493,12 +500,12 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source"> <dd class="tag-source">
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>, <a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>,
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-67">line 67</a> <a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-66">line 66</a>
</li> </li>
</ul> </ul>
</dd> </dd>
@@ -511,7 +518,11 @@
</dl> </dl>
@@ -519,23 +530,20 @@
</dd> </dd>
<hr>
<dt> <dt>
<h4 class="name" id=".replace"><span class="type-signature">&lt;static> </span>replace<span class="signature">(pattern, strings)</span><span class="type-signature"></span></h4> <h4 class="name" id=".replace"><span class="type-signature">&lt;static> </span>replace(pattern, strings)</h4>
</dt> </dt>
<dd> <dd>
<div class="description"> <div class="description">
<p>Replace wildcards in a pattern with strings (string interpolation)</p> <p>Replace wildcards in a pattern with strings (string interpolation)</p>
@@ -545,7 +553,7 @@
<h5>Parameters:</h5> <h5>Parameters:</h5>
@@ -553,23 +561,23 @@
<table class="params table table-striped"> <table class="params table table-striped">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
@@ -582,6 +590,7 @@
<span class="param-type">string</span> <span class="param-type">string</span>
</td> </td>
@@ -592,7 +601,7 @@
<td class="description last"><p>The start string, using wildcards as placeholders</p></td> <td class="description last"><p>The start string, using wildcards as placeholders</p></td>
</tr> </tr>
<tr> <tr>
@@ -608,6 +617,7 @@
<span class="param-type">Array.&lt;string></span> <span class="param-type">Array.&lt;string></span>
</td> </td>
@@ -615,20 +625,18 @@
<td class="description last"><p>The string or strings to replace the wildcards in the pattern. <td class="description last"><p>The string or strings to replace the wildcards in the pattern.<br> If you pass a single string, it will replace all the wildcards with the string.<br> If you pass an array of strings, they will replace the wildcards in order from left to right.</p></td>
If you pass a single string, it will replace all the wildcards with the string.
If you pass an array of strings, they will replace the wildcards in order from left to right.</p></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<dl class="details"> <dl class="details">
@@ -657,12 +665,12 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source"> <dd class="tag-source">
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>, <a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>,
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-144">line 144</a> <a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-143">line 143</a>
</li> </li>
</ul> </ul>
</dd> </dd>
@@ -675,7 +683,7 @@
</dl> </dl>
@@ -683,7 +691,7 @@
<h5>Throws:</h5> <h5>Throws:</h5>
<ul> <ul>
@@ -717,9 +725,9 @@
</li> </li>
</ul> </ul>
</dd> </dd>
@@ -757,12 +765,11 @@
<span class="copyright"> <span class="copyright">
DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects. DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects.
</span> </span>
<br />
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>
on Tue Aug 25th 2015 using the <a on Mon Apr 24th 2017 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>
@@ -779,20 +786,6 @@ $( function () {
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : "100px"
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( ".tutorial-section pre, .readme-section pre" ).each( function () { $( ".tutorial-section pre, .readme-section pre" ).each( function () {
var $this = $( this ); var $this = $( this );
@@ -804,7 +797,8 @@ $( function () {
example.html( exampleText ); example.html( exampleText );
lang = lang[1]; lang = lang[1];
} else { } else {
lang = "javascript"; var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
} }
if ( lang ) { if ( lang ) {
@@ -822,6 +816,28 @@ $( function () {
showMenu : true, showMenu : true,
enableDoclinks : true enableDoclinks : true
} ); } );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
var id = $( heading ).attr( "id" );
return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
navbarOffset: 10,
smoothScrolling: true
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} ); } );
</script> </script>
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "wildstring", "name": "wildstring",
"version": "1.0.8", "version": "1.0.9",
"description": "Simple String Wildcard Handling", "description": "Simple String Wildcard Handling",
"main": "wildstring.js", "main": "wildstring.js",
"scripts": { "scripts": {