From 43419c27cfc9b517266ee48076744d97f2aed5e1 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Thu, 7 Jan 2016 13:44:39 -0500 Subject: [PATCH] Refactor API surface. --- src/hackmyapi.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/hackmyapi.js b/src/hackmyapi.js index 8bd53d1..574f792 100644 --- a/src/hackmyapi.js +++ b/src/hackmyapi.js @@ -1,24 +1,29 @@ /** External API surface for HackMyResume. -@license MIT. Copyright (c) 2015 James M. Devlin / FluentDesk. +@license MIT. See LICENSE.md for details. @module hackmyapi.js */ + + (function() { - var v = { - build: require('./verbs/build'), - analyze: require('./verbs/analyze'), - validate: require('./verbs/validate'), - convert: require('./verbs/convert'), - new: require('./verbs/create') - }; + + /** + The formal HackMyResume API. + */ var HackMyAPI = module.exports = { - verbs: v, + verbs: { + build: require('./verbs/build'), + analyze: require('./verbs/analyze'), + validate: require('./verbs/validate'), + convert: require('./verbs/convert'), + new: require('./verbs/create') + }, alias: { - generate: v.build, - create: v.new + generate: require('./verbs/build'), + create: require('./verbs/create') }, options: require('./core/default-options'), formats: require('./core/default-formats'), @@ -40,4 +45,6 @@ External API surface for HackMyResume. HtmlPngGenerator: require('./gen/html-png-generator') }; + + }());