UNPKG

@wider/utils_where-am-i

Version:

Determine where your code is running

240 lines (110 loc) 4.69 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Module: @ydr/utils_where-am-i | YDR</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/tui-doc.css"> </head> <body> <nav class="lnb" id="lnb"> <div class="logo" style="width: 50px"> <a href="https://y-d-r.co.uk" rel="noopener noreferrer" target="_blank"> <img src="https://y-d-r.co.uk/favicon.ico" width="100%" height="100%"> </a> </div> <div class="title"> <h1><a href="index.html" class="link">YDR</a></h1> <span class="version">v1.0.2</span> </div> <div class="search-container" id="search-container"> <input type="text" placeholder="Search"> <ul></ul> </div> <ol class="lnb-tab"> <li id="api-tab"> <a href="#"> <h4>API</h4> </a> </li> <li id="examples-tab"> <a href="#"> <h4>Examples</h4> </a> </li> </ol> <div class="lnb-examples hidden"> <h3>Examples</h3> <ul> <li><a href="tutorial-Examples.html">Examples</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button> <div class="hidden" id="Examples_sub"></div> </li> </ul> </div> <div class="lnb-api hidden"> <h3>Modules</h3> <ul> <li><a href="module-@ydr_utils_where-am-i.html">@ydr/utils_where-am-i</a><button type="button" class="hidden toggle-subnav btn btn-link"> <span class="glyphicon glyphicon-plus"></span></button> <div class="hidden" id="module:@ydr/utils_where-am-i_sub"></div> </li> </ul> </div> </nav> <div id="resizer"></div> <div class="main" id="main"> <section> <header> <h2>@ydr/utils_where-am-i</h2> </header> <article> <div class="container-overview"> <div class="description"> <p>Provides a synchronous equivalent of nodeJS<code>require()</code> so that ES5+ Modules can still use require rather than have to be recorded to use dynamic <code>import().then()</code></p> <p>Presently only supports nodeJS environment but later will include usable at client</p> <p>Deliberately written in an archaic version of javascript to run in odd places like Wscript and classicASP as well as node and at browser</p> <p>See Examples for the JSON objects returned.</p> </div> <dt> </dt> <dd> <dl class="details"> </dl> </dd> </div> </article> </section> </div> <footer> <img class="logo" src="https://y-d-r.co.uk/favicon.ico" style="width: 50px"> <div class="footer-text">Copyright Dr. Martin W. Baker 1985 onwards - MIT License</div> </footer> <script> prettyPrint(); </script> <script src="scripts/jquery.min.js"></script> <script src="scripts/tui-doc.js"></script> <script src="scripts/linenumber.js"></script> <script> var id = 'module:@ydr/utils_where-am-i_sub'.replace(/"/g, '_'); var selectedApi = document.getElementById(id); // do not use jquery selector var $selectedApi = $(selectedApi); $selectedApi.removeClass('hidden'); $selectedApi.parent().find('.glyphicon').removeClass('glyphicon-plus').addClass('glyphicon-minus'); showLnbApi(); </script> </body> </html>