diff --git a/www.es6/branch.js b/www.es6/branch.js index 7887db77..86de7988 100644 --- a/www.es6/branch.js +++ b/www.es6/branch.js @@ -85,6 +85,24 @@ Branch.prototype.setMixpanelToken = function(token) { }; +/** + * Set debug mode to simulate fresh installs. + * NOTE: This must be called before initSession + * + * @param (Boolean) isEnabled. Default = false + * + * @return (Promise) + */ +Branch.prototype.setDebug = function (isEnabled) { + + isEnabled = (typeof isEnabled !== 'boolean') ? false : isEnabled; + + this.debugMode = isEnabled; + + return execute('setDebug', [isEnabled]); + +}; + /** * Retrieves the install session parameters. *