UNPKG

code-snipper

Version:
447 lines (102 loc) 4.62 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Global - Documentation</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/prettify.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#checkFileExtension">checkFileExtension</a></li><li><a href="global.html#codeSnipper">codeSnipper</a></li><li><a href="global.html#prettify">prettify</a></li></ul> </nav> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2> </h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="checkFileExtension"><span class="type-signature"></span>checkFileExtension<span class="signature">(fileName:)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="code-snipper.js.html">code-snipper.js</a>, <a href="code-snipper.js.html#line37">line 37</a> </li></ul></dd> </dl> <div class="description"> Function to check whether file is JS or JSX. This is used to define the parser to prettify code. Currently only JS is supported. More formats are in development. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fileName:</code></td> <td class="type"> </td> <td class="description last">Name of the file.</td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> string: '.js' or '.jsx' </div> <h4 class="name" id="codeSnipper"><span class="type-signature"></span>codeSnipper<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="code-snipper.js.html">code-snipper.js</a>, <a href="code-snipper.js.html#line163">line 163</a> </li></ul></dd> </dl> <div class="description"> Main function. Set default arguments, if options are not passed </div> <h4 class="name" id="prettify"><span class="type-signature"></span>prettify<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="code-snipper.js.html">code-snipper.js</a>, <a href="code-snipper.js.html#line54">line 54</a> </li></ul></dd> </dl> <div class="description"> Prettify code based on the extension of the file. </div> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Sun Jul 02 2017 11:20:28 GMT+0530 (IST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>