Javascript String getSubdomain()

Description

Javascript String getSubdomain()


String.prototype.getSubdomain = function () {
  return this.valueOf().slice(0, this.valueOf().indexOf('.'));
};



PreviousNext

Related