UNPKG

google-fonts-cli

Version:

a quick way to add a google font to your project

79 lines (58 loc) 1.95 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: parser.js</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-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: parser.js</h1> <section> <article> <pre class="prettyprint source"><code>var Fonter = require("./fonter"); module.exports = Parser; /** @constructor */ function Parser(document) { if (!document) { this.printUsage(); throw new Error("Could not parse document, or it was blank."); } this.document = document; } Parser.prototype = Object.create(Fonter.prototype); /** passes along data about an html document */ Parser.prototype.parse = function parse(next) { var hasHead = !!(this.document.querySelector("head")), hasLinkTag = !!(this.document.querySelector("link")), result = { hasHead: hasHead, hasLinkTag: hasLinkTag, document: this.document, }; if (next) { next(result); return this; } return result; };</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="FontCollection.html">FontCollection</a></li><li><a href="Parser.html">Parser</a></li></ul> </nav> <br clear="both"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Sun May 31 2015 02:27:49 GMT-0700 (PDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>