{"id":19541014,"url":"https://github.com/ybouane/upperh","last_synced_at":"2025-02-26T05:17:50.013Z","repository":{"id":36749088,"uuid":"229998435","full_name":"ybouane/upperH","owner":"ybouane","description":"Collection of helper functions to make starting a nodeJS project faster.","archived":false,"fork":false,"pushed_at":"2023-03-04T16:08:33.000Z","size":1907,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T06:02:06.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ybouane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-24T20:06:14.000Z","updated_at":"2022-02-11T20:08:15.000Z","dependencies_parsed_at":"2024-09-25T06:28:57.382Z","dependency_job_id":"08a2c046-27f5-4cee-90e8-ac05015a7fce","html_url":"https://github.com/ybouane/upperH","commit_stats":{"total_commits":102,"total_committers":2,"mean_commits":51.0,"dds":"0.039215686274509776","last_synced_commit":"89901c7782949d02c7f6c3ff819b630914e3f738"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FupperH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FupperH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FupperH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FupperH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybouane","download_url":"https://codeload.github.com/ybouane/upperH/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240795005,"owners_count":19858725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:08:21.447Z","updated_at":"2025-02-26T05:17:49.969Z","avatar_url":"https://github.com/ybouane.png","language":"JavaScript","readme":"# upperH\r\n\r\nupperH is a collection of helper functions to make starting a nodeJS project faster.\r\n\r\n# Get started\r\n\r\n## Install\r\n```\r\nnpm install upperh --save\r\n```\r\n\r\n## How to use - Server\r\n\r\n```\r\nconst H = require('upperh');\r\n\r\n\r\n(async () =\u003e {\r\n\r\n\t// Your program here:\r\n\r\n\tvar name = await H.input('What is your name?');\r\n\tvar password = await H.input('Password: ', true); // input is muted (not displayed)\r\n\r\n\tawait H.delay(2000); // Wait 2 seconds\r\n\r\n\tvar fileContent = await H.readFile('myfile.txt');\r\n\r\n\tawait H.writeFile('myfile-copy.txt', fileContent);\r\n\r\n\r\n\r\n})();\r\n```\r\n\r\n## How to use - Browser\r\n\r\n```\r\nconst H = require('upperh');\r\n\r\n\r\nH(async () =\u003e { // Will execute when DOM is loaded\r\n\tH('span.classname').removeClass('classname').closest('div').attr('data-value', 'true');\r\n\tawait H.delay(1000); // Some helpers are shared between server/browser\r\n\r\n\t// Yes, you can use the same api for http requests whether it is client-side or server-side\r\n\tconsole.log((await H.httpGet('http://api.icndb.com/jokes/random', {}, undefined, undefined, 'form', 'json')).value.joke);\r\n\r\n});\r\n```\r\n\r\n\r\n## Classes\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#HObject\"\u003eHObject\u003c/a\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eCollection of DOM Nodes, extends Array\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n## Members\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#HBrowser\"\u003eHBrowser\u003c/a\u003e ⇒ \u003ccode\u003e\u003ca href=\"#HObject\"\u003eHObject\u003c/a\u003e\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eH helper functions available only for Browsers. Chainable and is similar to jQuery\u0026#39;s $ constructor.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003ca href=\"#H\"\u003eH\u003c/a\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eH helper functions available in both Servers and browsers\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003ca href=\"#HServer\"\u003eHServer\u003c/a\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eH helper functions available only for Servers\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n\u003ca name=\"HObject\"\u003e\u003c/a\u003e\n\n## HObject\nCollection of DOM Nodes, extends Array\n\n**Kind**: global class  \n\n* [HObject](#HObject)\n    * [.find(selector)](#HObject+find) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.closest(selector)](#HObject+closest) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.contains(selector)](#HObject+contains) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.parents(selector)](#HObject+parents) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.parent(selector)](#HObject+parent) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.children(selector)](#HObject+children) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.siblings(selector)](#HObject+siblings) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.first()](#HObject+first) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.last()](#HObject+last) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.prev(selector)](#HObject+prev) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.next(selector)](#HObject+next) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.prevAll(selector)](#HObject+prevAll) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.nextAll(selector)](#HObject+nextAll) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.attr(name)](#HObject+attr) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.attr(name, value)](#HObject+attr) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.removeAttr(name)](#HObject+removeAttr) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.show()](#HObject+show) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.hide()](#HObject+hide) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.prop(key)](#HObject+prop) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.prop(key, value)](#HObject+prop) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.css(name)](#HObject+css) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.css(name, value)](#HObject+css) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.css(properties)](#HObject+css) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.append(content)](#HObject+append) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.appendTo(target)](#HObject+appendTo) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.prepend(content)](#HObject+prepend) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.prependTo(target)](#HObject+prependTo) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.insertBefore(target)](#HObject+insertBefore) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.before(content)](#HObject+before) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.insertAfter(target)](#HObject+insertAfter) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.after(content)](#HObject+after) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.wrap(element)](#HObject+wrap) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.wrapInner(element)](#HObject+wrapInner) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.empty()](#HObject+empty) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.remove()](#HObject+remove) ⇒ \u003ccode\u003evoid\u003c/code\u003e\n    * [.eq(index)](#HObject+eq) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.index()](#HObject+index) ⇒ \u003ccode\u003eNumber\u003c/code\u003e\n    * [.html()](#HObject+html) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.html(content)](#HObject+html) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.text()](#HObject+text) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.text(content)](#HObject+text) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.val()](#HObject+val) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.val(value)](#HObject+val) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.each(function)](#HObject+each) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.get()](#HObject+get) ⇒ \u003ccode\u003eNode\u003c/code\u003e\n    * [.get(index)](#HObject+get) ⇒ \u003ccode\u003eNode\u003c/code\u003e\n    * [.addClass(className)](#HObject+addClass) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.removeClass(className)](#HObject+removeClass) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.toggleClass(className)](#HObject+toggleClass) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.hasClass(className)](#HObject+hasClass) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.filter(selector)](#HObject+filter) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.filter(fn)](#HObject+filter) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.is(selector)](#HObject+is) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.offset()](#HObject+offset) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.on(events, selector, callback, options)](#HObject+on) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.one(events, selector, callback, options)](#HObject+one) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.off(events, callback)](#HObject+off) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.trigger(event, extraParams, eventOptions)](#HObject+trigger) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\n    * [.triggerHandler(event, extraParams, eventOptions)](#HObject+triggerHandler) ⇒ \u003ccode\u003eMixed\u003c/code\u003e\n\n\u003ca name=\"HObject+find\"\u003e\u003c/a\u003e\n\n### h().find(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the descendants of each element in the current set of matched elements, filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+closest\"\u003e\u003c/a\u003e\n\n### h().closest(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nFor each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eElement\u003c/code\u003e | DOM selector or DOM element |\n\n\u003ca name=\"HObject+contains\"\u003e\u003c/a\u003e\n\n### h().contains(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nChecks if any of the elements in the set contains the selected element.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eElement\u003c/code\u003e | DOM selector or DOM element |\n\n\u003ca name=\"HObject+parents\"\u003e\u003c/a\u003e\n\n### h().parents(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the ancestors of each element in the current set of matched elements, optionally filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+parent\"\u003e\u003c/a\u003e\n\n### h().parent(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the parent of each element in the current set of matched elements, optionally filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+children\"\u003e\u003c/a\u003e\n\n### h().children(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the children of each element in the set of matched elements, optionally filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+siblings\"\u003e\u003c/a\u003e\n\n### h().siblings(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the siblings of each element in the set of matched elements, optionally filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+first\"\u003e\u003c/a\u003e\n\n### h().first() ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nReduce the set of matched elements to the first in the set.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+last\"\u003e\u003c/a\u003e\n\n### h().last() ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nReduce the set of matched elements to the last in the set.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+prev\"\u003e\u003c/a\u003e\n\n### h().prev(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the immediately preceding sibling of each element in the set of matched elements. If a selector is provided, it retrieves the previous sibling only if it matches that selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+next\"\u003e\u003c/a\u003e\n\n### h().next(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+prevAll\"\u003e\u003c/a\u003e\n\n### h().prevAll(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+nextAll\"\u003e\u003c/a\u003e\n\n### h().nextAll(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nGet all following siblings of each element in the set of matched elements, optionally filtered by a selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+attr\"\u003e\u003c/a\u003e\n\n### h().attr(name) ⇒ \u003ccode\u003eString\u003c/code\u003e\nGet the value of an attribute for the first element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | Attribute name |\n\n\u003ca name=\"HObject+attr\"\u003e\u003c/a\u003e\n\n### h().attr(name, value) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet an attribute for the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | Attribute name |\n| value | \u003ccode\u003eString\u003c/code\u003e | Attribute value |\n\n\u003ca name=\"HObject+removeAttr\"\u003e\u003c/a\u003e\n\n### h().removeAttr(name) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nRemove an attribute from each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | Attribute name |\n\n\u003ca name=\"HObject+show\"\u003e\u003c/a\u003e\n\n### h().show() ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nDisplay the matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+hide\"\u003e\u003c/a\u003e\n\n### h().hide() ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nHide the matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+prop\"\u003e\u003c/a\u003e\n\n### h().prop(key) ⇒ \u003ccode\u003eString\u003c/code\u003e\nGet the value of a property for the first element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003eString\u003c/code\u003e | Property name |\n\n\u003ca name=\"HObject+prop\"\u003e\u003c/a\u003e\n\n### h().prop(key, value) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet a property for the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003eString\u003c/code\u003e | Property name |\n| value | \u003ccode\u003eString\u003c/code\u003e | Property value |\n\n\u003ca name=\"HObject+css\"\u003e\u003c/a\u003e\n\n### h().css(name) ⇒ \u003ccode\u003eString\u003c/code\u003e\nGet the computed style properties for the first element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | Property name |\n\n\u003ca name=\"HObject+css\"\u003e\u003c/a\u003e\n\n### h().css(name, value) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet a CSS property for the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | Property name |\n| value | \u003ccode\u003eString\u003c/code\u003e | Property value |\n\n\u003ca name=\"HObject+css\"\u003e\u003c/a\u003e\n\n### h().css(properties) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet one or more CSS properties for the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| properties | \u003ccode\u003eObject\u003c/code\u003e | Key-value pair of properties to set. |\n\n\u003ca name=\"HObject+append\"\u003e\u003c/a\u003e\n\n### h().append(content) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert content, specified by the parameter, to the end of each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| content | \u003ccode\u003eMixed\u003c/code\u003e | Content to insert. (either a selector, HTML content or a DOM Node) |\n\n\u003ca name=\"HObject+appendTo\"\u003e\u003c/a\u003e\n\n### h().appendTo(target) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert every element in the set of matched elements to the end of the target(s).\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| target | \u003ccode\u003eMixed\u003c/code\u003e | Target of the content. (either a selector, HTML content or a DOM Node) |\n\n\u003ca name=\"HObject+prepend\"\u003e\u003c/a\u003e\n\n### h().prepend(content) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert content, specified by the parameter, to the beginning of each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| content | \u003ccode\u003eMixed\u003c/code\u003e | Content to insert. (either a selector, HTML content or a DOM Node) |\n\n\u003ca name=\"HObject+prependTo\"\u003e\u003c/a\u003e\n\n### h().prependTo(target) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert every element in the set of matched elements to the beginning of the target(s).\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| target | \u003ccode\u003eMixed\u003c/code\u003e | Target of the content. (either a selector, HTML content or a DOM Node) |\n\n\u003ca name=\"HObject+insertBefore\"\u003e\u003c/a\u003e\n\n### h().insertBefore(target) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert every element in the set of matched elements before the target.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| target | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+before\"\u003e\u003c/a\u003e\n\n### h().before(content) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert content, specified by the parameter, before each element in the set of matched elements\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| content | \u003ccode\u003eString\u003c/code\u003e | HTML code or DOM selector |\n\n\u003ca name=\"HObject+insertAfter\"\u003e\u003c/a\u003e\n\n### h().insertAfter(target) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert every element in the set of matched elements after the target.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| target | \u003ccode\u003eString\u003c/code\u003e | DOM selector |\n\n\u003ca name=\"HObject+after\"\u003e\u003c/a\u003e\n\n### h().after(content) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nInsert content, specified by the parameter, after each element in the set of matched elements\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| content | \u003ccode\u003eString\u003c/code\u003e | HTML code or DOM selector |\n\n\u003ca name=\"HObject+wrap\"\u003e\u003c/a\u003e\n\n### h().wrap(element) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nWrap an HTML structure around each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| element | \u003ccode\u003eString\u003c/code\u003e | Wrapping element. |\n\n\u003ca name=\"HObject+wrapInner\"\u003e\u003c/a\u003e\n\n### h().wrapInner(element) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nWrap an HTML structure around the content of each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| element | \u003ccode\u003eString\u003c/code\u003e | Wrapping element. |\n\n\u003ca name=\"HObject+empty\"\u003e\u003c/a\u003e\n\n### h().empty() ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nRemove all child nodes of the set of matched elements from the DOM.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+remove\"\u003e\u003c/a\u003e\n\n### h().remove() ⇒ \u003ccode\u003evoid\u003c/code\u003e\nRemove the set of matched elements from the DOM.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+eq\"\u003e\u003c/a\u003e\n\n### h().eq(index) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nReduce the set of matched elements to the one at the specified index.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| index | \u003ccode\u003eNumber\u003c/code\u003e | Index of the element |\n\n\u003ca name=\"HObject+index\"\u003e\u003c/a\u003e\n\n### h().index() ⇒ \u003ccode\u003eNumber\u003c/code\u003e\nSearch for a given element from among the matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+html\"\u003e\u003c/a\u003e\n\n### h().html() ⇒ \u003ccode\u003eString\u003c/code\u003e\nGet the HTML contents of the first element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+html\"\u003e\u003c/a\u003e\n\n### h().html(content) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet the HTML contents of each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| content | \u003ccode\u003eString\u003c/code\u003e | HTML content |\n\n\u003ca name=\"HObject+text\"\u003e\u003c/a\u003e\n\n### h().text() ⇒ \u003ccode\u003eString\u003c/code\u003e\nGet the combined text contents of each element in the set of matched elements, including their descendants.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+text\"\u003e\u003c/a\u003e\n\n### h().text(content) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet the content of each element in the set of matched elements to the specified text.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| content | \u003ccode\u003eString\u003c/code\u003e | Text content |\n\n\u003ca name=\"HObject+val\"\u003e\u003c/a\u003e\n\n### h().val() ⇒ \u003ccode\u003eString\u003c/code\u003e\nGet the current value of the first element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+val\"\u003e\u003c/a\u003e\n\n### h().val(value) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nSet the value of each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| value | \u003ccode\u003eString\u003c/code\u003e | Value |\n\n\u003ca name=\"HObject+each\"\u003e\u003c/a\u003e\n\n### h().each(function) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nIterate over a jQuery object, executing a function for each matched element.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| function | \u003ccode\u003efunction\u003c/code\u003e | Function to execute |\n\n\u003ca name=\"HObject+get\"\u003e\u003c/a\u003e\n\n### h().get() ⇒ \u003ccode\u003eNode\u003c/code\u003e\nRetrieve the elements matched as a vanilla Array.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\u003ca name=\"HObject+get\"\u003e\u003c/a\u003e\n\n### h().get(index) ⇒ \u003ccode\u003eNode\u003c/code\u003e\nRetrieve one of the elements matched.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| index | \u003ccode\u003eNumber\u003c/code\u003e | Index of the element to return |\n\n\u003ca name=\"HObject+addClass\"\u003e\u003c/a\u003e\n\n### h().addClass(className) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nAdds the specified class(es) to each element in the set of matched elements\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| className | \u003ccode\u003eString\u003c/code\u003e | Class name |\n\n\u003ca name=\"HObject+removeClass\"\u003e\u003c/a\u003e\n\n### h().removeClass(className) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nRemove a single class, multiple classes, or all classes from each element in the set of matched elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| className | \u003ccode\u003eString\u003c/code\u003e | Class name |\n\n\u003ca name=\"HObject+toggleClass\"\u003e\u003c/a\u003e\n\n### h().toggleClass(className) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nAdd or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| className | \u003ccode\u003eString\u003c/code\u003e | Class name |\n\n\u003ca name=\"HObject+hasClass\"\u003e\u003c/a\u003e\n\n### h().hasClass(className) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nDetermine whether any of the matched elements are assigned the given class.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| className | \u003ccode\u003eString\u003c/code\u003e | Class name |\n\n\u003ca name=\"HObject+filter\"\u003e\u003c/a\u003e\n\n### h().filter(selector) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nReduce the set of matched elements to those that match the selector.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM Selector |\n\n\u003ca name=\"HObject+filter\"\u003e\u003c/a\u003e\n\n### h().filter(fn) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nReduce the set of matched elements to those that match the function's test.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | \u003ccode\u003efunction\u003c/code\u003e | Function used as a test for each elkement in the set. |\n\n\u003ca name=\"HObject+is\"\u003e\u003c/a\u003e\n\n### h().is(selector) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nCheck the current matched set of elements against a selector and return true if at least one of these elements matches the given arguments.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| selector | \u003ccode\u003eString\u003c/code\u003e | DOM Selector |\n\n\u003ca name=\"HObject+offset\"\u003e\u003c/a\u003e\n\n### h().offset() ⇒ \u003ccode\u003eObject\u003c/code\u003e\nGet the current coordinates of the first element in the set of matched elements, relative to the document.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - \\{top, left\\}  \n\u003ca name=\"HObject+on\"\u003e\u003c/a\u003e\n\n### h().on(events, selector, callback, options) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nAttach an event handler function for one or more events to the selected elements.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| events | \u003ccode\u003eString\u003c/code\u003e | One or more space-separated event types and optional namespaces. |\n| selector | \u003ccode\u003eString\u003c/code\u003e | A selector string to filter the descendants of the selected elements that trigger the event. |\n| callback | \u003ccode\u003efunction\u003c/code\u003e | Event Handler |\n| options | \u003ccode\u003eObject\u003c/code\u003e | Additional options for .addEventListener |\n\n\u003ca name=\"HObject+one\"\u003e\u003c/a\u003e\n\n### h().one(events, selector, callback, options) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nAttach a handler to an event for the elements. The handler is executed at most once per element per event type.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| events | \u003ccode\u003eString\u003c/code\u003e | One or more space-separated event types and optional namespaces. |\n| selector | \u003ccode\u003eString\u003c/code\u003e | A selector string to filter the descendants of the selected elements that trigger the event. |\n| callback | \u003ccode\u003efunction\u003c/code\u003e | Event Handler |\n| options | \u003ccode\u003eObject\u003c/code\u003e | Additional options for .addEventListener |\n\n\u003ca name=\"HObject+off\"\u003e\u003c/a\u003e\n\n### h().off(events, callback) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nRemove an event handler.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| events | \u003ccode\u003eString\u003c/code\u003e | One or more space-separated event types and optional namespaces. |\n| callback | \u003ccode\u003efunction\u003c/code\u003e | Event Handler |\n\n\u003ca name=\"HObject+trigger\"\u003e\u003c/a\u003e\n\n### h().trigger(event, extraParams, eventOptions) ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nExecute all handlers and behaviors attached to the matched elements for the given event type.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | \u003ccode\u003eString\u003c/code\u003e | Event types and optional namespaces. |\n| extraParams | \u003ccode\u003eArray.\u0026lt;Mixed\u0026gt;\u003c/code\u003e | Additional parameters to pass along to the event handler. |\n| eventOptions | \u003ccode\u003eObject\u003c/code\u003e | Additional event options for CustomEvent (e.g. for controlling if event bubbles...) |\n\n\u003ca name=\"HObject+triggerHandler\"\u003e\u003c/a\u003e\n\n### h().triggerHandler(event, extraParams, eventOptions) ⇒ \u003ccode\u003eMixed\u003c/code\u003e\nExecute all handlers attached to an element for an event.\n\n**Kind**: instance method of [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | \u003ccode\u003eString\u003c/code\u003e | Event types and optional namespaces. |\n| extraParams | \u003ccode\u003eArray.\u0026lt;Mixed\u0026gt;\u003c/code\u003e | Additional parameters to pass along to the event handler. |\n| eventOptions | \u003ccode\u003eObject\u003c/code\u003e | Additional event options for CustomEvent (e.g. for controlling if event bubbles...) |\n\n\u003ca name=\"HBrowser\"\u003e\u003c/a\u003e\n\n## HBrowser ⇒ [\u003ccode\u003eHObject\u003c/code\u003e](#HObject)\nH helper functions available only for Browsers. Chainable and is similar to jQuery's $ constructor.\n\n**Kind**: global variable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| parameter | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003efunction\u003c/code\u003e | DOM selector, HTML code that will be used to create new elements, Function to run when document is ready. Similar to $(function(){ }) or $(document).ready(function(){ }) |\n\n\u003ca name=\"H\"\u003e\u003c/a\u003e\n\n## H\nH helper functions available in both Servers and browsers\n\n**Kind**: global variable  \n\n* [H](#H)\n    * [.isArray](#H.isArray) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.regexp](#H.regexp)\n    * [.Error](#H.Error)\n    * [.loadScript(url, [reload])](#H.loadScript) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.loadStylesheet(url, [reload])](#H.loadStylesheet) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.isObject(variable)](#H.isObject) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.delay(time)](#H.delay) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.timestampMs()](#H.timestampMs) ⇒ \u003ccode\u003eNumber\u003c/code\u003e\n    * [.timestamp()](#H.timestamp) ⇒ \u003ccode\u003eNumber\u003c/code\u003e\n    * [.relativeTime(timestamp)](#H.relativeTime) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.handlize(str)](#H.handlize) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.regexpEscape()](#H.regexpEscape)\n    * [.hasOwnProp(obj, key)](#H.hasOwnProp) ⇒ \u003ccode\u003eBool\u003c/code\u003e\n    * [.getVariable(obj, path)](#H.getVariable) ⇒ \u003ccode\u003eMixed\u003c/code\u003e\n    * [.setVariable(obj, path, value)](#H.setVariable)\n    * [.escape(str)](#H.escape) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.httpRequest(method, url, payload, headers, extras, [inFormat], [outFormat])](#H.httpRequest) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.httpGet(url, payload, headers, extras, [inFormat], [outFormat])](#H.httpGet) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.httpPost(url, payload, headers, extras, [inFormat], [outFormat])](#H.httpPost) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.httpPut(url, payload, headers, extras, [inFormat], [outFormat])](#H.httpPut) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.httpDelete(url, payload, headers, extras, [inFormat], [outFormat])](#H.httpDelete) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n\n\u003ca name=\"H.isArray\"\u003e\u003c/a\u003e\n\n### H.isArray ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nChecks if variable is an array (equivalent to Array.isArray)\n\n**Kind**: static property of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| variable | \u003ccode\u003eMixed\u003c/code\u003e | Variable to check |\n\n\u003ca name=\"H.regexp\"\u003e\u003c/a\u003e\n\n### H.regexp\nHelper regular expressions (RegExp)\rhandle : Valid handle (lowercase letters, numbers, underscores and dashes).\remail : Valid email address\n\n**Kind**: static property of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\u003ca name=\"H.Error\"\u003e\u003c/a\u003e\n\n### H.Error\nCustom Error constructor\n\n**Kind**: static property of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| message | \u003ccode\u003eString\u003c/code\u003e | Error message |\n| code | \u003ccode\u003eNumber\u003c/code\u003e | Error code. |\n\n\u003ca name=\"H.loadScript\"\u003e\u003c/a\u003e\n\n### H.loadScript(url, [reload]) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nLoads a JS script\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - Resolves when script is loaded  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | JS script url |\n| [reload] | \u003ccode\u003eBoolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | If set to true, the scrippt will be appended regardless if it was previously loaded or not |\n\n\u003ca name=\"H.loadStylesheet\"\u003e\u003c/a\u003e\n\n### H.loadStylesheet(url, [reload]) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nLoads a CSS stylesheet\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - Resolves when stylesheet is loaded  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | CSS stylesheet url |\n| [reload] | \u003ccode\u003eBoolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | If set to true, the stylesheet will be reloaded regardless if it was previously loaded or not |\n\n\u003ca name=\"H.isObject\"\u003e\u003c/a\u003e\n\n### H.isObject(variable) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nChecks if variable is an object and not an array\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| variable | \u003ccode\u003eMixed\u003c/code\u003e | Variable to check |\n\n\u003ca name=\"H.delay\"\u003e\u003c/a\u003e\n\n### H.delay(time) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nWait for a number of miliseconds\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| time | \u003ccode\u003eNumber\u003c/code\u003e | Time in miliseconds |\n\n\u003ca name=\"H.timestampMs\"\u003e\u003c/a\u003e\n\n### H.timestampMs() ⇒ \u003ccode\u003eNumber\u003c/code\u003e\nReturns current timestamp in miliseconds\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eNumber\u003c/code\u003e - timestamp in miliseconds  \n\u003ca name=\"H.timestamp\"\u003e\u003c/a\u003e\n\n### H.timestamp() ⇒ \u003ccode\u003eNumber\u003c/code\u003e\nReturns current timestamp in seconds\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eNumber\u003c/code\u003e - timestamp in seconds  \n\u003ca name=\"H.relativeTime\"\u003e\u003c/a\u003e\n\n### H.relativeTime(timestamp) ⇒ \u003ccode\u003eString\u003c/code\u003e\nConverts a timestamp into relative time. E.g. about 2 hours ago; less than a minute; in about 5 minutes\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - relative representation of timestamp  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| timestamp | \u003ccode\u003eNumber\u003c/code\u003e \\| \u003ccode\u003eDate\u003c/code\u003e | Time |\n\n\u003ca name=\"H.handlize\"\u003e\u003c/a\u003e\n\n### H.handlize(str) ⇒ \u003ccode\u003eString\u003c/code\u003e\nConverts a string into a handlized format (uppercase letters, numbers and dashes)\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - Handle  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e | String to handlize |\n\n\u003ca name=\"H.regexpEscape\"\u003e\u003c/a\u003e\n\n### H.regexpEscape()\nEscapes a regular expression string (RegExp)\rs : String to escape\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\u003ca name=\"H.hasOwnProp\"\u003e\u003c/a\u003e\n\n### H.hasOwnProp(obj, key) ⇒ \u003ccode\u003eBool\u003c/code\u003e\nDetermines if an object has a property. (uses Object.prototype for security)\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eBool\u003c/code\u003e - True if obj has the key property  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | \u003ccode\u003eObject\u003c/code\u003e | Object to check |\n| key | \u003ccode\u003eString\u003c/code\u003e | Property to check |\n\n\u003ca name=\"H.getVariable\"\u003e\u003c/a\u003e\n\n### H.getVariable(obj, path) ⇒ \u003ccode\u003eMixed\u003c/code\u003e\nGoes through an object and returns value of a specific path (using dot notation)\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eMixed\u003c/code\u003e - Value of the path element  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | \u003ccode\u003eObject\u003c/code\u003e | Input object |\n| path | \u003ccode\u003eString\u003c/code\u003e | Path to traverse (dot notation). e.g. parent.children.property |\n\n\u003ca name=\"H.setVariable\"\u003e\u003c/a\u003e\n\n### H.setVariable(obj, path, value)\nGoes through an object and sets the value of a specific path (using dot notation)\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | \u003ccode\u003eObject\u003c/code\u003e | Input object |\n| path | \u003ccode\u003eString\u003c/code\u003e | Path to traverse (dot notation). e.g. parent.children.property |\n| value | \u003ccode\u003eMixed\u003c/code\u003e | New value to inject |\n\n\u003ca name=\"H.escape\"\u003e\u003c/a\u003e\n\n### H.escape(str) ⇒ \u003ccode\u003eString\u003c/code\u003e\nEscapes a string for HTML injection\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - Cleaned output  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e | Input string |\n\n\u003ca name=\"H.httpRequest\"\u003e\u003c/a\u003e\n\n### H.httpRequest(method, url, payload, headers, extras, [inFormat], [outFormat]) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRequests an HTTP endpoint\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Response body  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| method | \u003ccode\u003eString\u003c/code\u003e |  | Method to use (GET|POST|PUT|DELETE|HEAD) |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | HTTP endpoint |\n| payload | \u003ccode\u003eObject\u003c/code\u003e |  | Payload to inject (will be converted to query string in case of GET request otherwise, the payload is sent as a JSON body) |\n| headers | \u003ccode\u003eObject\u003c/code\u003e |  | Headers to inject |\n| extras | \u003ccode\u003eObject\u003c/code\u003e |  | extra options for the request (same as fetch API options) |\n| [inFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the input request (json, form). |\n| [outFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the output response (json, text, buffer, stream). |\n\n\u003ca name=\"H.httpGet\"\u003e\u003c/a\u003e\n\n### H.httpGet(url, payload, headers, extras, [inFormat], [outFormat]) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRequests a GET HTTP endpoint\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Response body  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | HTTP endpoint |\n| payload | \u003ccode\u003eObject\u003c/code\u003e |  | Payload to inject will be converted to query string |\n| headers | \u003ccode\u003eObject\u003c/code\u003e |  | Headers to inject |\n| extras | \u003ccode\u003eObject\u003c/code\u003e |  | extra options for request (same as fetch API options) |\n| [inFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the input request (json, form). |\n| [outFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the output response (json, text, buffer, stream). |\n\n\u003ca name=\"H.httpPost\"\u003e\u003c/a\u003e\n\n### H.httpPost(url, payload, headers, extras, [inFormat], [outFormat]) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRequests a POST HTTP endpoint\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Response body  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | HTTP endpoint |\n| payload | \u003ccode\u003eObject\u003c/code\u003e |  | Payload to inject |\n| headers | \u003ccode\u003eObject\u003c/code\u003e |  | Headers to inject |\n| extras | \u003ccode\u003eObject\u003c/code\u003e |  | extra options for request (same as fetch API options) |\n| [inFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the input request (json, form). |\n| [outFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the output response (json, text, buffer, stream). |\n\n\u003ca name=\"H.httpPut\"\u003e\u003c/a\u003e\n\n### H.httpPut(url, payload, headers, extras, [inFormat], [outFormat]) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRequests a PUT HTTP endpoint\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Response body  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | HTTP endpoint |\n| payload | \u003ccode\u003eObject\u003c/code\u003e |  | Payload to inject |\n| headers | \u003ccode\u003eObject\u003c/code\u003e |  | Headers to inject |\n| extras | \u003ccode\u003eObject\u003c/code\u003e |  | extra options for request (same as fetch API options) |\n| [inFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the input request (json, form). |\n| [outFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the output response (json, text, buffer, stream). |\n\n\u003ca name=\"H.httpDelete\"\u003e\u003c/a\u003e\n\n### H.httpDelete(url, payload, headers, extras, [inFormat], [outFormat]) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRequests a DELETE HTTP endpoint\n\n**Kind**: static method of [\u003ccode\u003eH\u003c/code\u003e](#H)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Response body  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| url | \u003ccode\u003eString\u003c/code\u003e |  | HTTP endpoint |\n| payload | \u003ccode\u003eObject\u003c/code\u003e |  | Payload to inject |\n| headers | \u003ccode\u003eObject\u003c/code\u003e |  | Headers to inject |\n| extras | \u003ccode\u003eObject\u003c/code\u003e |  | extra options for request (same as fetch API options) |\n| [inFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the input request (json, form). |\n| [outFormat] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;json\u0026quot;\u003c/code\u003e | Format of the output response (json, text, buffer, stream). |\n\n\u003ca name=\"HServer\"\u003e\u003c/a\u003e\n\n## HServer\nH helper functions available only for Servers\n\n**Kind**: global variable  \n\n* [HServer](#HServer)\n    * [.readFileBuff](#HServer.readFileBuff) ⇒ \u003ccode\u003ePromise.\u0026lt;Buffer\u0026gt;\u003c/code\u003e\n    * [.readFile](#HServer.readFile) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.readDir](#HServer.readDir) ⇒ \u003ccode\u003ePromise.\u0026lt;Array\u0026gt;\u003c/code\u003e\n    * [.mkdir](#HServer.mkdir) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.writeFile](#HServer.writeFile) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.readFileSync](#HServer.readFileSync) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.writeFileSync](#HServer.writeFileSync)\n    * [.exec](#HServer.exec) ⇒ \u003ccode\u003ePromise.\u0026lt;stdout, stderr\u0026gt;\u003c/code\u003e\n    * [.uniqueToken](#HServer.uniqueToken) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.md5](#HServer.md5) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.sha1](#HServer.sha1) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.sha256](#HServer.sha256) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.encrypt](#HServer.encrypt) ⇒ \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e\n    * [.decrypt](#HServer.decrypt) ⇒ \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e\n    * [.render](#HServer.render) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.renderFile](#HServer.renderFile) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.input](#HServer.input) ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.waitForKey](#HServer.waitForKey) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.onKeypress](#HServer.onKeypress)\n    * [.httpServer](#HServer.httpServer)\n\n\u003ca name=\"HServer.readFileBuff\"\u003e\u003c/a\u003e\n\n### H.readFileBuff ⇒ \u003ccode\u003ePromise.\u0026lt;Buffer\u0026gt;\u003c/code\u003e\nReads a local file and returns a buffer\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;Buffer\u0026gt;\u003c/code\u003e - Content of the file as a buffer  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | File path |\n\n\u003ca name=\"HServer.readFile\"\u003e\u003c/a\u003e\n\n### H.readFile ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nReads a local file and returns it content as a string\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Content of the file's content as a string  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | File path |\n\n\u003ca name=\"HServer.readDir\"\u003e\u003c/a\u003e\n\n### H.readDir ⇒ \u003ccode\u003ePromise.\u0026lt;Array\u0026gt;\u003c/code\u003e\nReturns the list of files of a directory\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;Array\u0026gt;\u003c/code\u003e - Directory list  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | Path of the directory |\n\n\u003ca name=\"HServer.mkdir\"\u003e\u003c/a\u003e\n\n### H.mkdir ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCreates a directory\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | Path of the directory |\n\n\u003ca name=\"HServer.writeFile\"\u003e\u003c/a\u003e\n\n### H.writeFile ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nWrites a string into a file\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | File path |\n| content | \u003ccode\u003eString\u003c/code\u003e | New file content |\n\n\u003ca name=\"HServer.readFileSync\"\u003e\u003c/a\u003e\n\n### H.readFileSync ⇒ \u003ccode\u003eString\u003c/code\u003e\nReads a local file (synchronously) and returns it content as a string\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - Content of the file's content as a string  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | File path |\n\n\u003ca name=\"HServer.writeFileSync\"\u003e\u003c/a\u003e\n\n### H.writeFileSync\nWrites a string into a file (synchronously)\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| path | \u003ccode\u003eString\u003c/code\u003e | File path |\n| content | \u003ccode\u003eString\u003c/code\u003e | New file content |\n\n\u003ca name=\"HServer.exec\"\u003e\u003c/a\u003e\n\n### H.exec ⇒ \u003ccode\u003ePromise.\u0026lt;stdout, stderr\u0026gt;\u003c/code\u003e\nExecutes a child process\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;stdout, stderr\u0026gt;\u003c/code\u003e - Returns command output (stdout \u0026 stderr)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| command | \u003ccode\u003eString\u003c/code\u003e | Command to execute |\n| [options] | \u003ccode\u003eObject\u003c/code\u003e | Options (see child_process.exec) |\n\n\u003ca name=\"HServer.uniqueToken\"\u003e\u003c/a\u003e\n\n### H.uniqueToken ⇒ \u003ccode\u003eString\u003c/code\u003e\nReturns a random *unique* token\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - Hexadecimal representation of token  \n\u003ca name=\"HServer.md5\"\u003e\u003c/a\u003e\n\n### H.md5 ⇒ \u003ccode\u003eString\u003c/code\u003e\nReturns MD5 hash\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - MD5 hash of input (in HEX format)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e | Input to get hash of |\n\n\u003ca name=\"HServer.sha1\"\u003e\u003c/a\u003e\n\n### H.sha1 ⇒ \u003ccode\u003eString\u003c/code\u003e\nReturns SHA1 hash\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - SHA1 hash of input (in HEX format)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e | Input to get hash of |\n\n\u003ca name=\"HServer.sha256\"\u003e\u003c/a\u003e\n\n### H.sha256 ⇒ \u003ccode\u003eString\u003c/code\u003e\nReturns SHA256 hash\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - SHA256 hash of input (in HEX format)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e | Input to get hash of |\n\n\u003ca name=\"HServer.encrypt\"\u003e\u003c/a\u003e\n\n### H.encrypt ⇒ \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e\nEncrypts an input string with aes-256-cbc encryption algorithm\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e - Encrypted data  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| data | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e |  | Input data to encrypt |\n| key | \u003ccode\u003eString\u003c/code\u003e |  | Encryption key in HEX format. Must be a 32byte key for a 256bit algorithm. |\n| iv | \u003ccode\u003eString\u003c/code\u003e |  | IV to use for the encryption in HEX format. For AES, length must be 16 |\n| [algo] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;aes-256-cbc\u0026quot;\u003c/code\u003e | Encryption algorithm |\n| [format] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;hex\u0026quot;\u003c/code\u003e | Format of output |\n\n**Example**  \n```js\nconst key = crypto.scryptSync('Password here', 'salt', 32).toString('hex'); // 32 = 256/8\rconst iv = Buffer.from('d65a8b0dcbde0b76cc746faaf0b0beaa', 'hex'); // For AES, length is 16\rvar encryptedData = H.encrypt('My secret data', key, iv);\n```\n\u003ca name=\"HServer.decrypt\"\u003e\u003c/a\u003e\n\n### H.decrypt ⇒ \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e\nDecrypts an input string with aes-256-cbc encryption algorithm\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e - Encrypted data  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| data | \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eBuffer\u003c/code\u003e |  | Input data to decrypt |\n| key | \u003ccode\u003eString\u003c/code\u003e |  | Decryption key in HEX format. Must be a 32byte key for a 256bit algorithm. |\n| iv | \u003ccode\u003eString\u003c/code\u003e |  | IV to use for the decryption in HEX format. For AES, length must be 16 |\n| [algo] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;aes-256-cbc\u0026quot;\u003c/code\u003e | Decryption algorithm |\n| [format] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026quot;hex\u0026quot;\u003c/code\u003e | Format of output |\n\n**Example**  \n```js\nconst key = crypto.scryptSync('Password here', 'salt', 32).toString('hex'); // 32 = 256/8\rconst iv = Buffer.from('d65a8b0dcbde0b76cc746faaf0b0beaa', 'hex'); // For AES, length is 16\rvar originalData = H.encrypt(encryptedData, key, iv);\n```\n\u003ca name=\"HServer.render\"\u003e\u003c/a\u003e\n\n### H.render ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRenders a nunjucks/jinja template string asynchronously\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Rendered template  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e | Template string (jinja/nunjucks) |\n| data | \u003ccode\u003eObject\u003c/code\u003e | Data to inject in template |\n| filters | \u003ccode\u003eObject\u003c/code\u003e | Filters functions to allow in template |\n| includeCb | \u003ccode\u003efunction\u003c/code\u003e | Callback function that is called whenever the template calls the include instruction. |\n\n\u003ca name=\"HServer.renderFile\"\u003e\u003c/a\u003e\n\n### H.renderFile ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRenders a nunjucks/jinja template file asynchronously\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - Rendered template  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| str | \u003ccode\u003eString\u003c/code\u003e | Path of template file to render |\n| data | \u003ccode\u003eObject\u003c/code\u003e | Data to inject in template |\n| filters | \u003ccode\u003eObject\u003c/code\u003e | Filters functions to allow in template |\n| includeCb | \u003ccode\u003efunction\u003c/code\u003e | Callback function that is called whenever the template calls the include instruction. |\n\n\u003ca name=\"HServer.input\"\u003e\u003c/a\u003e\n\n### H.input ⇒ \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e\nRequests input from user in command line interface\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;String\u0026gt;\u003c/code\u003e - the value the user has entered  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| q | \u003ccode\u003eString\u003c/code\u003e |  | Question to ask to user during input |\n| [muted] | \u003ccode\u003eBoolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | Whether to mute the user input (for passwords) |\n\n\u003ca name=\"HServer.waitForKey\"\u003e\u003c/a\u003e\n\n### H.waitForKey ⇒ \u003ccode\u003eString\u003c/code\u003e\nShortcut for H.input but without the muted parameter set to true\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - the value the user has entered  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| q | \u003ccode\u003eString\u003c/code\u003e | Question to ask to user during input |\n\n\u003ca name=\"HServer.onKeypress\"\u003e\u003c/a\u003e\n\n### H.onKeypress\nListens to keypresses and calls callback when a key is pressed. Exists when Ctrl+C is typed\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cb | \u003ccode\u003efunction\u003c/code\u003e | Callback to function that will listen to key presses |\n\n\u003ca name=\"HServer.httpServer\"\u003e\u003c/a\u003e\n\n### H.httpServer\nStarts an HTTP server and calls specific handlers depending on request url\n\n**Kind**: static property of [\u003ccode\u003eHServer\u003c/code\u003e](#HServer)  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [post] | \u003ccode\u003eNumber\u003c/code\u003e | \u003ccode\u003e80\u003c/code\u003e | Post to listen to |\n| handlers | \u003ccode\u003efunction\u003c/code\u003e \\| \u003ccode\u003eObject\u003c/code\u003e |  | If function, it will run function and use returned Object to select handler. If Object, it will use it directly to select the handler. The handler is selected if it matches the request url. If the handler's key starts with ^, it will be considered as a REGEX. |\n| options | \u003ccode\u003eObject\u003c/code\u003e |  | Extra options. defaultHandler, onError, beforeHandler, pathFlags, afterHandler, autoEnd, maxPostRequestSize, |\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybouane%2Fupperh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybouane%2Fupperh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybouane%2Fupperh/lists"}