UNPKG

@zkochan/pnpm

Version:

A fast implementation of npm install

3 lines 219 kB
<head> <script> var raw = [{"id":"1-1439115310824","name":"lunr","signiture":"lunr()","type":"function","ctx":{"type":"function","name":"lunr","string":"lunr()"},"description":{"full":"<p>Convenience function for instantiating a new lunr index and configuring it<br />with the default pipeline functions and the passed config function.</p>\n\n<p>When using this convenience function a new index will be created with the<br />following functions already in the pipeline:</p>\n\n<p>lunr.StopWordFilter - filters out any stop words before they enter the<br />index</p>\n\n<p>lunr.stemmer - stems the tokens before entering the index.</p>\n\n<p>Example:</p>\n\n<pre><code>var idx = lunr(function () {\n this.field('title', 10)\n this.field('tags', 100)\n this.field('body')\n\n this.ref('cid')\n\n this.pipeline.add(function () {\n // some custom pipeline function\n })\n\n})\n</code></pre>","summary":"<p>Convenience function for instantiating a new lunr index and configuring it<br />with the default pipeline functions and the passed config function.</p>","body":"<p>When using this convenience function a new index will be created with the<br />following functions already in the pipeline:</p>\n\n<p>lunr.StopWordFilter - filters out any stop words before they enter the<br />index</p>\n\n<p>lunr.stemmer - stems the tokens before entering the index.</p>\n\n<p>Example:</p>\n\n<pre><code>var idx = lunr(function () {\n this.field('title', 10)\n this.field('tags', 100)\n this.field('body')\n\n this.ref('cid')\n\n this.pipeline.add(function () {\n // some custom pipeline function\n })\n\n})\n</code></pre>"},"full_description":"<p>Convenience function for instantiating a new lunr index and configuring it with the default pipeline functions and the passed config function.</p>\n\n<p>When using this convenience function a new index will be created with the following functions already in the pipeline:</p>\n\n<p>lunr.StopWordFilter - filters out any stop words before they enter the index</p>\n\n<p>lunr.stemmer - stems the tokens before entering the index.</p>\n\n<p>Example:</p>\n\n<pre><code>var idx = lunr(function () {\n this.field('title', 10)\n this.field('tags', 100)\n this.field('body')\n\n this.ref('cid')\n\n this.pipeline.add(function () {\n // some custom pipeline function\n })\n\n})\n</code></pre>","code":"var lunr = function (config) {\n var idx = new lunr.Index\n\n idx.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n if (config) config.call(idx, idx)\n\n return idx\n}\n\nlunr.version = \"0.5.12\"","params":[{"type":"param","types":["Function"],"name":"config","description":"A function that will be called with the new instance"}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"config","description":"A function that will be called with the new instance"},{"type":"of","string":"the lunr.Index as both its context and first parameter. It can be used to"},{"type":"customize","string":"the instance of new lunr.Index."},{"type":"namespace","string":""},{"type":"module","string":""},{"type":"returns","string":"{lunr.Index}"}],"module":true,"related":{"href":""},"has_related":true,"methods":[]},{"id":"4-1439115310824","name":"EventEmitter","signiture":"lunr.EventEmitter()","type":"method","ctx":{"type":"method","receiver":"lunr","name":"EventEmitter","string":"lunr.EventEmitter()"},"description":{"full":"<p>lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers.</p>","summary":"<p>lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers.</p>","body":""},"full_description":"<p>lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers.</p>","code":"lunr.EventEmitter = function () {\n this.events = {}\n}","params":[],"has_params":false,"tags":[{"type":"constructor","string":""}],"module":true,"related":{"href":""},"has_related":true,"methods":[{"id":"5-1439115310824","name":"addListener","signiture":"lunr.EventEmitter.prototype.addListener()","type":"method","ctx":{"type":"method","receiver":"lunr.EventEmitter.prototype","name":"addListener","string":"lunr.EventEmitter.prototype.addListener()"},"description":{"full":"<p>Binds a handler function to a specific event(s).</p>\n\n<p>Can bind a single function to many different events in one call.</p>","summary":"<p>Binds a handler function to a specific event(s).</p>","body":"<p>Can bind a single function to many different events in one call.</p>"},"full_description":"<p>Binds a handler function to a specific event(s).</p>\n\n<p>Can bind a single function to many different events in one call.</p>","code":"lunr.EventEmitter.prototype.addListener = function () {\n var args = Array.prototype.slice.call(arguments),\n fn = args.pop(),\n names = args\n\n if (typeof fn !== \"function\") throw new TypeError (\"last argument must be a function\")\n\n names.forEach(function (name) {\n if (!this.hasHandler(name)) this.events[name] = []\n this.events[name].push(fn)\n }, this)\n}","params":[{"type":"param","types":["String"],"name":"[eventName]","description":"The name(s) of events to bind this function to."},{"type":"param","types":["Function"],"name":"fn","description":"The function to call when an event is fired."}],"has_params":true,"tags":[{"type":"param","types":["String"],"name":"[eventName]","description":"The name(s) of events to bind this function to."},{"type":"param","types":["Function"],"name":"fn","description":"The function to call when an event is fired."},{"type":"memberOf","parent":"EventEmitter"}],"module":false,"parent":"EventEmitter","related":{"href":""},"has_related":true},{"id":"6-1439115310824","name":"removeListener","signiture":"lunr.EventEmitter.prototype.removeListener()","type":"method","ctx":{"type":"method","receiver":"lunr.EventEmitter.prototype","name":"removeListener","string":"lunr.EventEmitter.prototype.removeListener()"},"description":{"full":"<p>Removes a handler function from a specific event.</p>","summary":"<p>Removes a handler function from a specific event.</p>","body":""},"full_description":"<p>Removes a handler function from a specific event.</p>","code":"lunr.EventEmitter.prototype.removeListener = function (name, fn) {\n if (!this.hasHandler(name)) return\n\n var fnIndex = this.events[name].indexOf(fn)\n this.events[name].splice(fnIndex, 1)\n\n if (!this.events[name].length) delete this.events[name]\n}","params":[{"type":"param","types":["String"],"name":"eventName","description":"The name of the event to remove this function from."},{"type":"param","types":["Function"],"name":"fn","description":"The function to remove from an event."}],"has_params":true,"tags":[{"type":"param","types":["String"],"name":"eventName","description":"The name of the event to remove this function from."},{"type":"param","types":["Function"],"name":"fn","description":"The function to remove from an event."},{"type":"memberOf","parent":"EventEmitter"}],"module":false,"parent":"EventEmitter","related":{"href":""},"has_related":true},{"id":"7-1439115310824","name":"emit","signiture":"lunr.EventEmitter.prototype.emit()","type":"method","ctx":{"type":"method","receiver":"lunr.EventEmitter.prototype","name":"emit","string":"lunr.EventEmitter.prototype.emit()"},"description":{"full":"<p>Calls all functions bound to the given event.</p>\n\n<p>Additional data can be passed to the event handler as arguments to <code>emit</code><br />after the event name.</p>","summary":"<p>Calls all functions bound to the given event.</p>","body":"<p>Additional data can be passed to the event handler as arguments to <code>emit</code><br />after the event name.</p>"},"full_description":"<p>Calls all functions bound to the given event.</p>\n\n<p>Additional data can be passed to the event handler as arguments to <code>emit</code> after the event name.</p>","code":"lunr.EventEmitter.prototype.emit = function (name) {\n if (!this.hasHandler(name)) return\n\n var args = Array.prototype.slice.call(arguments, 1)\n\n this.events[name].forEach(function (fn) {\n fn.apply(undefined, args)\n })\n}","params":[{"type":"param","types":["String"],"name":"eventName","description":"The name of the event to emit."}],"has_params":true,"tags":[{"type":"param","types":["String"],"name":"eventName","description":"The name of the event to emit."},{"type":"memberOf","parent":"EventEmitter"}],"module":false,"parent":"EventEmitter","related":{"href":""},"has_related":true},{"id":"8-1439115310824","name":"hasHandler","signiture":"lunr.EventEmitter.prototype.hasHandler()","type":"method","ctx":{"type":"method","receiver":"lunr.EventEmitter.prototype","name":"hasHandler","string":"lunr.EventEmitter.prototype.hasHandler()"},"description":{"full":"<p>Checks whether a handler has ever been stored against an event.</p>","summary":"<p>Checks whether a handler has ever been stored against an event.</p>","body":""},"full_description":"<p>Checks whether a handler has ever been stored against an event.</p>","code":"lunr.EventEmitter.prototype.hasHandler = function (name) {\n return name in this.events\n}","params":[{"type":"param","types":["String"],"name":"eventName","description":"The name of the event to check."}],"has_params":true,"tags":[{"type":"param","types":["String"],"name":"eventName","description":"The name of the event to check."},{"type":"private","string":""},{"type":"memberOf","parent":"EventEmitter"}],"module":false,"parent":"EventEmitter","related":{"href":""},"has_related":true}]},{"id":"9-1439115310824","name":"tokenizer","signiture":"lunr.tokenizer()","type":"method","ctx":{"type":"method","receiver":"lunr","name":"tokenizer","string":"lunr.tokenizer()"},"description":{"full":"<p>A function for splitting a string into tokens ready to be inserted into<br />the search index.</p>","summary":"<p>A function for splitting a string into tokens ready to be inserted into<br />the search index.</p>","body":""},"full_description":"<p>A function for splitting a string into tokens ready to be inserted into the search index.</p>","code":"lunr.tokenizer = function (obj) {\n if (!arguments.length || obj == null || obj == undefined) return []\n if (Array.isArray(obj)) return obj.map(function (t) { return t.toLowerCase() })\n\n return obj.toString().trim().toLowerCase().split(/[\\s\\-]+/)\n}","params":[{"type":"param","types":["String"],"name":"obj","description":"The string to convert into tokens"}],"has_params":true,"tags":[{"type":"module","string":""},{"type":"param","types":["String"],"name":"obj","description":"The string to convert into tokens"},{"type":"returns","string":"{Array}"}],"module":true,"related":{"href":""},"has_related":true,"methods":[]},{"id":"10-1439115310824","name":"Pipeline","signiture":"lunr.Pipeline()","type":"method","ctx":{"type":"method","receiver":"lunr","name":"Pipeline","string":"lunr.Pipeline()"},"description":{"full":"<p>lunr.Pipelines maintain an ordered list of functions to be applied to all<br />tokens in documents entering the search index and queries being ran against<br />the index.</p>\n\n<p>An instance of lunr.Index created with the lunr shortcut will contain a<br />pipeline with a stop word filter and an English language stemmer. Extra<br />functions can be added before or after either of these functions or these<br />default functions can be removed.</p>\n\n<p>When run the pipeline will call each function in turn, passing a token, the<br />index of that token in the original list of all tokens and finally a list of<br />all the original tokens.</p>\n\n<p>The output of functions in the pipeline will be passed to the next function<br />in the pipeline. To exclude a token from entering the index the function<br />should return undefined, the rest of the pipeline will not be called with<br />this token.</p>\n\n<p>For serialisation of pipelines to work, all functions used in an instance of<br />a pipeline should be registered with lunr.Pipeline. Registered functions can<br />then be loaded. If trying to load a serialised pipeline that uses functions<br />that are not registered an error will be thrown.</p>\n\n<p>If not planning on serialising the pipeline then registering pipeline functions<br />is not necessary.</p>","summary":"<p>lunr.Pipelines maintain an ordered list of functions to be applied to all<br />tokens in documents entering the search index and queries being ran against<br />the index.</p>","body":"<p>An instance of lunr.Index created with the lunr shortcut will contain a<br />pipeline with a stop word filter and an English language stemmer. Extra<br />functions can be added before or after either of these functions or these<br />default functions can be removed.</p>\n\n<p>When run the pipeline will call each function in turn, passing a token, the<br />index of that token in the original list of all tokens and finally a list of<br />all the original tokens.</p>\n\n<p>The output of functions in the pipeline will be passed to the next function<br />in the pipeline. To exclude a token from entering the index the function<br />should return undefined, the rest of the pipeline will not be called with<br />this token.</p>\n\n<p>For serialisation of pipelines to work, all functions used in an instance of<br />a pipeline should be registered with lunr.Pipeline. Registered functions can<br />then be loaded. If trying to load a serialised pipeline that uses functions<br />that are not registered an error will be thrown.</p>\n\n<p>If not planning on serialising the pipeline then registering pipeline functions<br />is not necessary.</p>"},"full_description":"<p>lunr.Pipelines maintain an ordered list of functions to be applied to all tokens in documents entering the search index and queries being ran against the index.</p>\n\n<p>An instance of lunr.Index created with the lunr shortcut will contain a pipeline with a stop word filter and an English language stemmer. Extra functions can be added before or after either of these functions or these default functions can be removed.</p>\n\n<p>When run the pipeline will call each function in turn, passing a token, the index of that token in the original list of all tokens and finally a list of all the original tokens.</p>\n\n<p>The output of functions in the pipeline will be passed to the next function in the pipeline. To exclude a token from entering the index the function should return undefined, the rest of the pipeline will not be called with this token.</p>\n\n<p>For serialisation of pipelines to work, all functions used in an instance of a pipeline should be registered with lunr.Pipeline. Registered functions can then be loaded. If trying to load a serialised pipeline that uses functions that are not registered an error will be thrown.</p>\n\n<p>If not planning on serialising the pipeline then registering pipeline functions is not necessary.</p>","code":"lunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = {}","params":[],"has_params":false,"tags":[{"type":"constructor","string":""}],"module":true,"related":{"href":""},"has_related":true,"methods":[{"id":"11-1439115310824","name":"registerFunction","signiture":"lunr.Pipeline.registerFunction()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline","name":"registerFunction","string":"lunr.Pipeline.registerFunction()"},"description":{"full":"<p>Register a function with the pipeline.</p>\n\n<p>Functions that are used in the pipeline should be registered if the pipeline<br />needs to be serialised, or a serialised pipeline needs to be loaded.</p>\n\n<p>Registering a function does not add it to a pipeline, functions must still be<br />added to instances of the pipeline for them to be used when running a pipeline.</p>","summary":"<p>Register a function with the pipeline.</p>","body":"<p>Functions that are used in the pipeline should be registered if the pipeline<br />needs to be serialised, or a serialised pipeline needs to be loaded.</p>\n\n<p>Registering a function does not add it to a pipeline, functions must still be<br />added to instances of the pipeline for them to be used when running a pipeline.</p>"},"full_description":"<p>Register a function with the pipeline.</p>\n\n<p>Functions that are used in the pipeline should be registered if the pipeline needs to be serialised, or a serialised pipeline needs to be loaded.</p>\n\n<p>Registering a function does not add it to a pipeline, functions must still be added to instances of the pipeline for them to be used when running a pipeline.</p>","code":"lunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}","params":[{"type":"param","types":["Function"],"name":"fn","description":"The function to check for."},{"type":"param","types":["String"],"name":"label","description":"The label to register this function with"}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"fn","description":"The function to check for."},{"type":"param","types":["String"],"name":"label","description":"The label to register this function with"},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"12-1439115310824","name":"warnIfFunctionNotRegistered","signiture":"lunr.Pipeline.warnIfFunctionNotRegistered()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline","name":"warnIfFunctionNotRegistered","string":"lunr.Pipeline.warnIfFunctionNotRegistered()"},"description":{"full":"<p>Warns if the function is not registered as a Pipeline function.</p>","summary":"<p>Warns if the function is not registered as a Pipeline function.</p>","body":""},"full_description":"<p>Warns if the function is not registered as a Pipeline function.</p>","code":"lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}","params":[{"type":"param","types":["Function"],"name":"fn","description":"The function to check for."}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"fn","description":"The function to check for."},{"type":"private","string":""},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"13-1439115310824","name":"load","signiture":"lunr.Pipeline.load()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline","name":"load","string":"lunr.Pipeline.load()"},"description":{"full":"<p>Loads a previously serialised pipeline.</p>\n\n<p>All functions to be loaded must already be registered with lunr.Pipeline.<br />If any function from the serialised data has not been registered then an<br />error will be thrown.</p>","summary":"<p>Loads a previously serialised pipeline.</p>","body":"<p>All functions to be loaded must already be registered with lunr.Pipeline.<br />If any function from the serialised data has not been registered then an<br />error will be thrown.</p>"},"full_description":"<p>Loads a previously serialised pipeline.</p>\n\n<p>All functions to be loaded must already be registered with lunr.Pipeline. If any function from the serialised data has not been registered then an error will be thrown.</p>","code":"lunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load un-registered function: ' + fnName)\n }\n })\n\n return pipeline\n}","params":[{"type":"param","types":["Object"],"name":"serialised","description":"The serialised pipeline to load."}],"has_params":true,"tags":[{"type":"param","types":["Object"],"name":"serialised","description":"The serialised pipeline to load."},{"type":"returns","string":"{lunr.Pipeline}"},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"14-1439115310824","name":"add","signiture":"lunr.Pipeline.prototype.add()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"add","string":"lunr.Pipeline.prototype.add()"},"description":{"full":"<p>Adds new functions to the end of the pipeline.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","summary":"<p>Adds new functions to the end of the pipeline.</p>","body":"<p>Logs a warning if the function has not been registered.</p>"},"full_description":"<p>Adds new functions to the end of the pipeline.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","code":"lunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}","params":[{"type":"param","types":["Function"],"name":"functions","description":"Any number of functions to add to the pipeline."}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"functions","description":"Any number of functions to add to the pipeline."},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"15-1439115310824","name":"after","signiture":"lunr.Pipeline.prototype.after()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"after","string":"lunr.Pipeline.prototype.after()"},"description":{"full":"<p>Adds a single function after a function that already exists in the<br />pipeline.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","summary":"<p>Adds a single function after a function that already exists in the<br />pipeline.</p>","body":"<p>Logs a warning if the function has not been registered.</p>"},"full_description":"<p>Adds a single function after a function that already exists in the pipeline.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","code":"lunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}","params":[{"type":"param","types":["Function"],"name":"existingFn","description":"A function that already exists in the pipeline."},{"type":"param","types":["Function"],"name":"newFn","description":"The new function to add to the pipeline."}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"existingFn","description":"A function that already exists in the pipeline."},{"type":"param","types":["Function"],"name":"newFn","description":"The new function to add to the pipeline."},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"16-1439115310824","name":"before","signiture":"lunr.Pipeline.prototype.before()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"before","string":"lunr.Pipeline.prototype.before()"},"description":{"full":"<p>Adds a single function before a function that already exists in the<br />pipeline.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","summary":"<p>Adds a single function before a function that already exists in the<br />pipeline.</p>","body":"<p>Logs a warning if the function has not been registered.</p>"},"full_description":"<p>Adds a single function before a function that already exists in the pipeline.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","code":"lunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}","params":[{"type":"param","types":["Function"],"name":"existingFn","description":"A function that already exists in the pipeline."},{"type":"param","types":["Function"],"name":"newFn","description":"The new function to add to the pipeline."}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"existingFn","description":"A function that already exists in the pipeline."},{"type":"param","types":["Function"],"name":"newFn","description":"The new function to add to the pipeline."},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"17-1439115310825","name":"remove","signiture":"lunr.Pipeline.prototype.remove()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"remove","string":"lunr.Pipeline.prototype.remove()"},"description":{"full":"<p>Removes a function from the pipeline.</p>","summary":"<p>Removes a function from the pipeline.</p>","body":""},"full_description":"<p>Removes a function from the pipeline.</p>","code":"lunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}","params":[{"type":"param","types":["Function"],"name":"fn","description":"The function to remove from the pipeline."}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"fn","description":"The function to remove from the pipeline."},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"18-1439115310825","name":"run","signiture":"lunr.Pipeline.prototype.run()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"run","string":"lunr.Pipeline.prototype.run()"},"description":{"full":"<p>Runs the current list of functions that make up the pipeline against the<br />passed tokens.</p>","summary":"<p>Runs the current list of functions that make up the pipeline against the<br />passed tokens.</p>","body":""},"full_description":"<p>Runs the current list of functions that make up the pipeline against the passed tokens.</p>","code":"lunr.Pipeline.prototype.run = function (tokens) {\n var out = [],\n tokenLength = tokens.length,\n stackLength = this._stack.length\n\n for (var i = 0; i < tokenLength; i++) {\n var token = tokens[i]\n\n for (var j = 0; j < stackLength; j++) {\n token = this._stack[j](token, i, tokens)\n if (token === void 0) break\n };\n\n if (token !== void 0) out.push(token)\n };\n\n return out\n}","params":[{"type":"param","types":["Array"],"name":"tokens","description":"The tokens to run through the pipeline."}],"has_params":true,"tags":[{"type":"param","types":["Array"],"name":"tokens","description":"The tokens to run through the pipeline."},{"type":"returns","string":"{Array}"},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"19-1439115310825","name":"reset","signiture":"lunr.Pipeline.prototype.reset()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"reset","string":"lunr.Pipeline.prototype.reset()"},"description":{"full":"<p>Resets the pipeline by removing any existing processors.</p>","summary":"<p>Resets the pipeline by removing any existing processors.</p>","body":""},"full_description":"<p>Resets the pipeline by removing any existing processors.</p>","code":"lunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}","params":[],"has_params":false,"tags":[{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true},{"id":"20-1439115310825","name":"toJSON","signiture":"lunr.Pipeline.prototype.toJSON()","type":"method","ctx":{"type":"method","receiver":"lunr.Pipeline.prototype","name":"toJSON","string":"lunr.Pipeline.prototype.toJSON()"},"description":{"full":"<p>Returns a representation of the pipeline ready for serialisation.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","summary":"<p>Returns a representation of the pipeline ready for serialisation.</p>","body":"<p>Logs a warning if the function has not been registered.</p>"},"full_description":"<p>Returns a representation of the pipeline ready for serialisation.</p>\n\n<p>Logs a warning if the function has not been registered.</p>","code":"lunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}","params":[],"has_params":false,"tags":[{"type":"returns","string":"{Array}"},{"type":"memberOf","parent":"Pipeline"}],"module":false,"parent":"Pipeline","related":{"href":""},"has_related":true}]},{"id":"21-1439115310825","name":"Vector","signiture":"lunr.Vector()","type":"method","ctx":{"type":"method","receiver":"lunr","name":"Vector","string":"lunr.Vector()"},"description":{"full":"<p>lunr.Vectors implement vector related operations for<br />a series of elements.</p>","summary":"<p>lunr.Vectors implement vector related operations for<br />a series of elements.</p>","body":""},"full_description":"<p>lunr.Vectors implement vector related operations for a series of elements.</p>","code":"lunr.Vector = function () {\n this._magnitude = null\n this.list = undefined\n this.length = 0\n}","params":[],"has_params":false,"tags":[{"type":"constructor","string":""}],"module":true,"related":{"href":""},"has_related":true,"methods":[{"id":"22-1439115310825","name":"Node","signiture":"lunr.Vector.Node()","type":"method","ctx":{"type":"method","receiver":"lunr.Vector","name":"Node","string":"lunr.Vector.Node()"},"description":{"full":"<p>lunr.Vector.Node is a simple struct for each node<br />in a lunr.Vector.</p>","summary":"<p>lunr.Vector.Node is a simple struct for each node<br />in a lunr.Vector.</p>","body":""},"full_description":"<p>lunr.Vector.Node is a simple struct for each node in a lunr.Vector.</p>","code":"lunr.Vector.Node = function (idx, val, next) {\n this.idx = idx\n this.val = val\n this.next = next\n}","params":[{"type":"param","types":["Number"],"name":"The","description":"index of the node in the vector."},{"type":"param","types":["Object"],"name":"The","description":"data at this node in the vector."},{"type":"param","types":["lunr.Vector.Node"],"name":"The","description":"node directly after this node in the vector."}],"has_params":true,"tags":[{"type":"private","string":""},{"type":"param","types":["Number"],"name":"The","description":"index of the node in the vector."},{"type":"param","types":["Object"],"name":"The","description":"data at this node in the vector."},{"type":"param","types":["lunr.Vector.Node"],"name":"The","description":"node directly after this node in the vector."},{"type":"constructor","string":""},{"type":"memberOf","parent":"Vector"}],"module":true,"parent":"Vector","related":{"href":""},"has_related":true,"methods":[]},{"id":"24-1439115310825","name":"magnitude","signiture":"lunr.Vector.prototype.magnitude()","type":"method","ctx":{"type":"method","receiver":"lunr.Vector.prototype","name":"magnitude","string":"lunr.Vector.prototype.magnitude()"},"description":{"full":"<p>Calculates the magnitude of this vector.</p>","summary":"<p>Calculates the magnitude of this vector.</p>","body":""},"full_description":"<p>Calculates the magnitude of this vector.</p>","code":"lunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n var node = this.list,\n sumOfSquares = 0,\n val\n\n while (node) {\n val = node.val\n sumOfSquares += val * val\n node = node.next\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}","params":[],"has_params":false,"tags":[{"type":"returns","string":"{Number}"},{"type":"memberOf","parent":"Vector"}],"module":false,"parent":"Vector","related":{"href":""},"has_related":true},{"id":"25-1439115310825","name":"dot","signiture":"lunr.Vector.prototype.dot()","type":"method","ctx":{"type":"method","receiver":"lunr.Vector.prototype","name":"dot","string":"lunr.Vector.prototype.dot()"},"description":{"full":"<p>Calculates the dot product of this vector and another vector.</p>","summary":"<p>Calculates the dot product of this vector and another vector.</p>","body":""},"full_description":"<p>Calculates the dot product of this vector and another vector.</p>","code":"lunr.Vector.prototype.dot = function (otherVector) {\n var node = this.list,\n otherNode = otherVector.list,\n dotProduct = 0\n\n while (node && otherNode) {\n if (node.idx < otherNode.idx) {\n node = node.next\n } else if (node.idx > otherNode.idx) {\n otherNode = otherNode.next\n } else {\n dotProduct += node.val * otherNode.val\n node = node.next\n otherNode = otherNode.next\n }\n }\n\n return dotProduct\n}","params":[{"type":"param","types":["lunr.Vector"],"name":"otherVector","description":"The vector to compute the dot product with."}],"has_params":true,"tags":[{"type":"param","types":["lunr.Vector"],"name":"otherVector","description":"The vector to compute the dot product with."},{"type":"returns","string":"{Number}"},{"type":"memberOf","parent":"Vector"}],"module":false,"parent":"Vector","related":{"href":""},"has_related":true},{"id":"26-1439115310825","name":"similarity","signiture":"lunr.Vector.prototype.similarity()","type":"method","ctx":{"type":"method","receiver":"lunr.Vector.prototype","name":"similarity","string":"lunr.Vector.prototype.similarity()"},"description":{"full":"<p>Calculates the cosine similarity between this vector and another<br />vector.</p>","summary":"<p>Calculates the cosine similarity between this vector and another<br />vector.</p>","body":""},"full_description":"<p>Calculates the cosine similarity between this vector and another vector.</p>","code":"lunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude())\n}","params":[{"type":"param","types":["lunr.Vector"],"name":"otherVector","description":"The other vector to calculate the"}],"has_params":true,"tags":[{"type":"param","types":["lunr.Vector"],"name":"otherVector","description":"The other vector to calculate the"},{"type":"similarity","string":"with."},{"type":"returns","string":"{Number}"},{"type":"memberOf","parent":"Vector"}],"module":false,"parent":"Vector","related":{"href":""},"has_related":true}]},{"id":"22-1439115310825","name":"Node","signiture":"lunr.Vector.Node()","type":"method","ctx":{"type":"method","receiver":"lunr.Vector","name":"Node","string":"lunr.Vector.Node()"},"description":{"full":"<p>lunr.Vector.Node is a simple struct for each node<br />in a lunr.Vector.</p>","summary":"<p>lunr.Vector.Node is a simple struct for each node<br />in a lunr.Vector.</p>","body":""},"full_description":"<p>lunr.Vector.Node is a simple struct for each node in a lunr.Vector.</p>","code":"lunr.Vector.Node = function (idx, val, next) {\n this.idx = idx\n this.val = val\n this.next = next\n}","params":[{"type":"param","types":["Number"],"name":"The","description":"index of the node in the vector."},{"type":"param","types":["Object"],"name":"The","description":"data at this node in the vector."},{"type":"param","types":["lunr.Vector.Node"],"name":"The","description":"node directly after this node in the vector."}],"has_params":true,"tags":[{"type":"private","string":""},{"type":"param","types":["Number"],"name":"The","description":"index of the node in the vector."},{"type":"param","types":["Object"],"name":"The","description":"data at this node in the vector."},{"type":"param","types":["lunr.Vector.Node"],"name":"The","description":"node directly after this node in the vector."},{"type":"constructor","string":""},{"type":"memberOf","parent":"Vector"}],"module":true,"parent":"Vector","related":{"href":""},"has_related":true,"methods":[]},{"id":"27-1439115310825","name":"SortedSet","signiture":"lunr.SortedSet()","type":"method","ctx":{"type":"method","receiver":"lunr","name":"SortedSet","string":"lunr.SortedSet()"},"description":{"full":"<p>lunr.SortedSets are used to maintain an array of uniq values in a sorted<br />order.</p>","summary":"<p>lunr.SortedSets are used to maintain an array of uniq values in a sorted<br />order.</p>","body":""},"full_description":"<p>lunr.SortedSets are used to maintain an array of uniq values in a sorted order.</p>","code":"lunr.SortedSet = function () {\n this.length = 0\n this.elements = []\n}","params":[],"has_params":false,"tags":[{"type":"constructor","string":""}],"module":true,"related":{"href":""},"has_related":true,"methods":[{"id":"28-1439115310825","name":"load","signiture":"lunr.SortedSet.load()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet","name":"load","string":"lunr.SortedSet.load()"},"description":{"full":"<p>Loads a previously serialised sorted set.</p>","summary":"<p>Loads a previously serialised sorted set.</p>","body":""},"full_description":"<p>Loads a previously serialised sorted set.</p>","code":"lunr.SortedSet.load = function (serialisedData) {\n var set = new this\n\n set.elements = serialisedData\n set.length = serialisedData.length\n\n return set\n}","params":[{"type":"param","types":["Array"],"name":"serialisedData","description":"The serialised set to load."}],"has_params":true,"tags":[{"type":"param","types":["Array"],"name":"serialisedData","description":"The serialised set to load."},{"type":"returns","string":"{lunr.SortedSet}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"29-1439115310825","name":"add","signiture":"lunr.SortedSet.prototype.add()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"add","string":"lunr.SortedSet.prototype.add()"},"description":{"full":"<p>Inserts new items into the set in the correct position to maintain the<br />order.</p>","summary":"<p>Inserts new items into the set in the correct position to maintain the<br />order.</p>","body":""},"full_description":"<p>Inserts new items into the set in the correct position to maintain the order.</p>","code":"lunr.SortedSet.prototype.add = function () {\n var i, element\n\n for (i = 0; i < arguments.length; i++) {\n element = arguments[i]\n if (~this.indexOf(element)) continue\n this.elements.splice(this.locationFor(element), 0, element)\n }\n\n this.length = this.elements.length\n}","params":[{"type":"param","types":["Object"],"name":"The","description":"objects to add to this set."}],"has_params":true,"tags":[{"type":"param","types":["Object"],"name":"The","description":"objects to add to this set."},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"30-1439115310825","name":"toArray","signiture":"lunr.SortedSet.prototype.toArray()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"toArray","string":"lunr.SortedSet.prototype.toArray()"},"description":{"full":"<p>Converts this sorted set into an array.</p>","summary":"<p>Converts this sorted set into an array.</p>","body":""},"full_description":"<p>Converts this sorted set into an array.</p>","code":"lunr.SortedSet.prototype.toArray = function () {\n return this.elements.slice()\n}","params":[],"has_params":false,"tags":[{"type":"returns","string":"{Array}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"31-1439115310825","name":"map","signiture":"lunr.SortedSet.prototype.map()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"map","string":"lunr.SortedSet.prototype.map()"},"description":{"full":"<p>Creates a new array with the results of calling a provided function on every<br />element in this sorted set.</p>\n\n<p>Delegates to Array.prototype.map and has the same signature.</p>","summary":"<p>Creates a new array with the results of calling a provided function on every<br />element in this sorted set.</p>","body":"<p>Delegates to Array.prototype.map and has the same signature.</p>"},"full_description":"<p>Creates a new array with the results of calling a provided function on every element in this sorted set.</p>\n\n<p>Delegates to Array.prototype.map and has the same signature.</p>","code":"lunr.SortedSet.prototype.map = function (fn, ctx) {\n return this.elements.map(fn, ctx)\n}","params":[{"type":"param","types":["Function"],"name":"fn","description":"The function that is called on each element of the"},{"type":"param","types":["Object"],"name":"ctx","description":"An optional object that can be used as the context"}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"fn","description":"The function that is called on each element of the"},{"type":"set.","string":""},{"type":"param","types":["Object"],"name":"ctx","description":"An optional object that can be used as the context"},{"type":"for","string":"the function fn."},{"type":"returns","string":"{Array}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"32-1439115310825","name":"forEach","signiture":"lunr.SortedSet.prototype.forEach()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"forEach","string":"lunr.SortedSet.prototype.forEach()"},"description":{"full":"<p>Executes a provided function once per sorted set element.</p>\n\n<p>Delegates to Array.prototype.forEach and has the same signature.</p>","summary":"<p>Executes a provided function once per sorted set element.</p>","body":"<p>Delegates to Array.prototype.forEach and has the same signature.</p>"},"full_description":"<p>Executes a provided function once per sorted set element.</p>\n\n<p>Delegates to Array.prototype.forEach and has the same signature.</p>","code":"lunr.SortedSet.prototype.forEach = function (fn, ctx) {\n return this.elements.forEach(fn, ctx)\n}","params":[{"type":"param","types":["Function"],"name":"fn","description":"The function that is called on each element of the"},{"type":"param","types":["Object"],"name":"ctx","description":"An optional object that can be used as the context"}],"has_params":true,"tags":[{"type":"param","types":["Function"],"name":"fn","description":"The function that is called on each element of the"},{"type":"set.","string":""},{"type":"param","types":["Object"],"name":"ctx","description":"An optional object that can be used as the context"},{"type":"memberOf","parent":"SortedSet"},{"type":"for","string":"the function fn."}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"33-1439115310825","name":"indexOf","signiture":"lunr.SortedSet.prototype.indexOf()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"indexOf","string":"lunr.SortedSet.prototype.indexOf()"},"description":{"full":"<p>Returns the index at which a given element can be found in the<br />sorted set, or -1 if it is not present.</p>","summary":"<p>Returns the index at which a given element can be found in the<br />sorted set, or -1 if it is not present.</p>","body":""},"full_description":"<p>Returns the index at which a given element can be found in the sorted set, or -1 if it is not present.</p>","code":"lunr.SortedSet.prototype.indexOf = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem === elem) return pivot\n\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem === elem) return pivot\n\n return -1\n}","params":[{"type":"param","types":["Object"],"name":"elem","description":"The object to locate in the sorted set."}],"has_params":true,"tags":[{"type":"param","types":["Object"],"name":"elem","description":"The object to locate in the sorted set."},{"type":"returns","string":"{Number}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"34-1439115310825","name":"locationFor","signiture":"lunr.SortedSet.prototype.locationFor()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"locationFor","string":"lunr.SortedSet.prototype.locationFor()"},"description":{"full":"<p>Returns the position within the sorted set that an element should be<br />inserted at to maintain the current order of the set.</p>\n\n<p>This function assumes that the element to search for does not already exist<br />in the sorted set.</p>","summary":"<p>Returns the position within the sorted set that an element should be<br />inserted at to maintain the current order of the set.</p>","body":"<p>This function assumes that the element to search for does not already exist<br />in the sorted set.</p>"},"full_description":"<p>Returns the position within the sorted set that an element should be inserted at to maintain the current order of the set.</p>\n\n<p>This function assumes that the element to search for does not already exist in the sorted set.</p>","code":"lunr.SortedSet.prototype.locationFor = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem > elem) return pivot\n if (pivotElem < elem) return pivot + 1\n}","params":[{"type":"param","types":["Object"],"name":"elem","description":"The elem to find the position for in the set"}],"has_params":true,"tags":[{"type":"param","types":["Object"],"name":"elem","description":"The elem to find the position for in the set"},{"type":"returns","string":"{Number}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"35-1439115310825","name":"intersect","signiture":"lunr.SortedSet.prototype.intersect()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"intersect","string":"lunr.SortedSet.prototype.intersect()"},"description":{"full":"<p>Creates a new lunr.SortedSet that contains the elements in the intersection<br />of this set and the passed set.</p>","summary":"<p>Creates a new lunr.SortedSet that contains the elements in the intersection<br />of this set and the passed set.</p>","body":""},"full_description":"<p>Creates a new lunr.SortedSet that contains the elements in the intersection of this set and the passed set.</p>","code":"lunr.SortedSet.prototype.intersect = function (otherSet) {\n var intersectSet = new lunr.SortedSet,\n i = 0, j = 0,\n a_len = this.length, b_len = otherSet.length,\n a = this.elements, b = otherSet.elements\n\n while (true) {\n if (i > a_len - 1 || j > b_len - 1) break\n\n if (a[i] === b[j]) {\n intersectSet.add(a[i])\n i++, j++\n continue\n }\n\n if (a[i] < b[j]) {\n i++\n continue\n }\n\n if (a[i] > b[j]) {\n j++\n continue\n }\n };\n\n return intersectSet\n}","params":[{"type":"param","types":["lunr.SortedSet"],"name":"otherSet","description":"The set to intersect with this set."}],"has_params":true,"tags":[{"type":"param","types":["lunr.SortedSet"],"name":"otherSet","description":"The set to intersect with this set."},{"type":"returns","string":"{lunr.SortedSet}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"36-1439115310825","name":"clone","signiture":"lunr.SortedSet.prototype.clone()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"clone","string":"lunr.SortedSet.prototype.clone()"},"description":{"full":"<p>Makes a copy of this set</p>","summary":"<p>Makes a copy of this set</p>","body":""},"full_description":"<p>Makes a copy of this set</p>","code":"lunr.SortedSet.prototype.clone = function () {\n var clone = new lunr.SortedSet\n\n clone.elements = this.toArray()\n clone.length = clone.elements.length\n\n return clone\n}","params":[],"has_params":false,"tags":[{"type":"returns","string":"{lunr.SortedSet}"},{"type":"memberOf","parent":"SortedSet"}],"module":false,"parent":"SortedSet","related":{"href":""},"has_related":true},{"id":"37-1439115310825","name":"union","signiture":"lunr.SortedSet.prototype.union()","type":"method","ctx":{"type":"method","receiver":"lunr.SortedSet.prototype","name":"union","string":"lunr.SortedSet.prototype.union()"},"description":{"full":"<p>Creates a new lunr.SortedSet that contains the elements in the union<br />of this set and the passed set.</p>","summary":"<p>Creates a new lunr.SortedSet that contains the elements in the union<br />of this set and the passed set.</p>","body":""},"full_description":"<p>Creates a new lunr.SortedSet that contains the elements in the union of this set and the passed set.</p>","co