seeq
Version:
Search or detect name on some resource (GitHub, NPM, Bower, ...)
868 lines (334 loc) • 16.7 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>seeq Module: seeq</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.spacelab.css">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top ">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">seeq</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="topNavigation">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="module-bower.html">bower</a></li><li><a href="module-cdnjs.html">cdnjs</a></li><li><a href="module-cli.html">cli</a></li><li><a href="module-format.html">format</a></li><li><a href="module-format_util.html">format/util</a></li><li><a href="module-github.html">github</a></li><li><a href="module-grunt.html">grunt</a></li><li><a href="module-gulp.html">gulp</a></li><li><a href="module-json.html">json</a></li><li><a href="module-jster.html">jster</a></li><li><a href="module-markdown.html">markdown</a></li><li><a href="module-microjs.html">microjs</a></li><li><a href="module-npm.html">npm</a></li><li><a href="module-raw.html">raw</a></li><li><a href="module-resource.html">resource</a></li><li><a href="module-resource_util.html">resource/util</a></li><li><a href="module-seeq.html">seeq</a></li><li><a href="module-text.html">text</a></li><li><a href="module-webcomponents.html">webcomponents</a></li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="module-resource_util-FailedHttpRequestError.html">resource/util~FailedHttpRequestError</a></li><li><a href="module-resource_util-IncorrectResponseError.html">resource/util~IncorrectResponseError</a></li>
</ul>
</li>
</ul>
<div class="col-sm-3 col-md-3">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
<div class="input-group-btn">
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="container" id="toc-content">
<div class="row">
<div class="col-md-8">
<div id="main">
<h1 class="page-title">Module: seeq</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description">Detect whether a name is registered or present on some resource, or make search for string on specified resources.</div>
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<hr>
<dt class="name" id=".format">
<h4 id=".format"><span class="type-signature"><static> </span>format<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Reference to <a href="module-format.html">format</a> module.
</div>
<dl class="details">
</dl>
</dd>
<hr>
<dt class="name" id=".resource">
<h4 id=".resource"><span class="type-signature"><static> </span>resource<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Reference to <a href="module-resource.html">resource</a> module.
</div>
<dl class="details">
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<hr>
<dt>
<h4 class="name" id=".search"><span class="type-signature"><static> </span>search(names, callback [, settings])</h4>
</dt>
<dd>
<div class="description">
Check existence of each name from the list on specified resources
or search for each string on specified resources.
Result of checking/searching will be passed into callback as object.
Each field of the object is a name that was checked/searched.
Value of result's field is object that is returned by <a href="module-seeq.html#.searchName">searchName</a> function.
<code>null</code> will be passed into callback when no name is specified to check/search.
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>names</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="description last">The list of names or a name that should be checked/searched.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">Function that should be called to process operation's result.</td>
</tr>
<tr>
<td class="name"><code>settings</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Operation settings. See <a href="module-seeq.html#.searchName">searchName</a> for details.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id=".searchName"><span class="type-signature"><static> </span>searchName(name, callback [, settings])</h4>
</dt>
<dd>
<div class="description">
Check existence of name or search for given string on specified resources.
Result of checking/searching will be passed into callback as object.
Each field of the object is name of resource that was checked/searched.
Value of result's field is object with the following fields (name - type - description):
<ul>
<li><code>name</code> - <code>String</code> - resource name
<li><code>description</code> - <code>String</code> - resource description
<li><code>url</code> - <code>String</code> - URL of resource
<li><code>query</code> - <code>String</code> - name/string that was checked/searched
<li><code>result</code> - <code>Array</code> - result that was received from resource;
each item in the array is object that represents data about found element
<li><code>error</code> - <code>Object | String</code> - error that was got while checking resource;
this field is present only when there was an error
</ul>
<code>null</code> will be passed into callback when the name is not given or resources with specified names are not found.
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="description last">The name that should be checked/searched.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">Function that should be called to process operation's result.</td>
</tr>
<tr>
<td class="name"><code>settings</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Operation settings. The following settings are supported (name - type - description):
<ul>
<li><code>progressCallback</code> - <code>Function</code> - function that should be called after getting result
from each resource; object with the following fields will be passed into callback:
<ul>
<li><code>name</code> - <code>String</code> - name that was checked/searched
<li><code>resource</code> - <code>String</code> - resource that was checked
<li><code>result</code> - <code>Object</code> - result of checking/searching (see above)
<li><code>number</code> - <code>Integer</code> - index number of checking/searching
<li><code>total</code> - <code>Integer</code> - total number of checks/searches
<li><code>error</code> - <code>Object | String</code> - error that was got while checking/searching resource;
this field is present only when there was an error
</ul>
<li><code>resource</code> - <code>Array | String</code> - specifies filter for available resources by name;
list of names of resources or name of resource (case-insensitive) that should be checked/searched
<li><code>resourceTag</code> - <code>Array | String</code> - specifies filter for available resources by tag;
list of tags or tag (case-insensitive) that should be used to select resources;
resources that satisfy to specified tags (depending on <code>checkAllTags</code> setting)
will be checked/searched; see <a href="module-resource.html#.checkResourceTags">checkResourceTags</a> for details
<li><code>checkAllTags</code> - <code>Boolean</code> - whether all tags specified in <code>resourceTag</code>
should be used to select resources; see <a href="module-resource.html#.checkResourceTags">checkResourceTags</a> for details
<li><code>search</code> - <code>Boolean</code> - whether search should be made instead of check;
it is used only when <code>search</code> setting for a resource is not specified (see below)
<li><code>settings</code> - <code>Object</code> - settings for resources usage;
fields are resource identifiers, values are objects representing settings for the corresponding resources;
value of <code>_general</code> field can be used to specify settings that should be applied to all resources
</ul>
Filter by name (<code>resource</code>) and filter by tag (<code>resourceTag</code>)
can be used separately or together.
If no filter is specified, all resources will be checked/searched.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
</dd>
</dl>
</article>
</section>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-3">
<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
</div>
</div>
</div>
<div class="modal fade" id="searchResults">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Search results</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<footer>
<span class="copyright">
Copyright (c) 2014-2020 Denis Sikuler
</span>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on 2020-03-08T01:34:36+03:00
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>
<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
<script>
$( function () {
$( "[id*='$']" ).each( function () {
var $this = $( this );
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} );
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
var $this = $( this );
var example = $this.find( "code" );
exampleText = example.html();
var lang = /{@lang (.*?)}/.exec( exampleText );
if ( lang && lang[1] ) {
exampleText = exampleText.replace( lang[0], "" );
example.html( exampleText );
lang = lang[1];
} else {
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
}
if ( lang ) {
$this
.addClass( "sunlight-highlight-" + lang )
.addClass( "linenums" )
.html( example.html() );
}
} );
Sunlight.highlightAll( {
lineNumbers : true,
showMenu : true,
enableDoclinks : true
} );
$.catchAnchorLinks( {
navbarOffset: 10
} );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
showAndHide : false,
smoothScrolling: true
} );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} );
</script>
<!--Navigation and Symbol Display-->
<!--Google Analytics-->
<script type="text/javascript">
$(document).ready(function() {
SearcherDisplay.init();
});
</script>
</body>
</html>