UNPKG

lowkie

Version:

My Custom lowkie / Express Applcation

75 lines (55 loc) 1.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: object_id.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: object_id.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>'use strict'; const crypto = require('crypto'); /** * helper class for generating Ids * * @class ObjectId */ class ObjectId{ /** * generates a unique ID * * @static * * @memberOf ObjectId */ static createId() { let _id = crypto.createHash('md5').update(`${new Date().valueOf}${Math.random()}`).digest('hex'); return _id; } constructor() { } } module.exports = ObjectId;</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="lowkie.html">lowkie</a></li><li><a href="lowkie.lowkie.html">lowkie</a></li><li><a href="lowkieSchema.html">lowkieSchema</a></li><li><a href="ObjectId.html">ObjectId</a></li></ul><h3>Global</h3><ul><li><a href="global.html#connect">connect</a></li><li><a href="global.html#handler">handler</a></li><li><a href="global.html#model">model</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Mar 27 2017 21:39:17 GMT-0400 (EDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>