Skip to content

Commit

Permalink
Re-export Core.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Scott committed Oct 22, 2020
1 parent fa350d4 commit d71eca2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 1 addition & 6 deletions lib/core.js
Expand Up @@ -20,17 +20,12 @@ import { promiseRetry, bind, uuid } from './util';
* {@link module:promise} module for compatiblity with Internet Explorer.
*/

// Exporting this way makes the Core class look static rather than exported, but
// then we don't get the ugly constructor name "exports.Core" instead of just
// "Core".
// export { Core };

/**
* Core library instance. Provides helpers and device identification.
* @class
* @param {CoreConfig} cfg
*/
function Core(cfg) {
export function Core(cfg) {
this.Promise = cfg.Promise || window.Promise;

// API connectivity. TODO Move to an API client?
Expand Down
4 changes: 1 addition & 3 deletions lib/track.js
@@ -1,8 +1,6 @@
import { uuid } from "./util";
import version from "./version";

export { Track };

/**
* @typedef {object} TrackConfig
* @prop {boolean} [init=true] Whether to hook into the browser.
Expand All @@ -14,7 +12,7 @@ export { Track };
* @param {Core} core
* @param {TrackConfig} [cfg]
*/
function Track(core, cfg) {
export function Track(core, cfg) {
this.core = core;

/** @prop {string} windowId An identifier which lasts until the next page refresh. */
Expand Down

0 comments on commit d71eca2

Please sign in to comment.