Skip to content

Instantly share code, notes, and snippets.

@xthecapx
Created October 11, 2018 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xthecapx/c5a7146183ab9cb6db47eebaf0f58739 to your computer and use it in GitHub Desktop.
Save xthecapx/c5a7146183ab9cb6db47eebaf0f58739 to your computer and use it in GitHub Desktop.
import Perfume from 'perfume.js';
export const perfume = (function () {
let perfume = null;
function createInstance() {
var object = new Perfume({
logPrefix: "🍻 xthecapx Hacks",
timeToInteractive: true
});
return object;
}
return {
getInstance: function () {
if (!perfume) {
perfume = createInstance();
}
return perfume;
}
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment