'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isValidScopeName;

var _isString;

function _load_isString() {
  return _isString = _interopRequireDefault(require('./string/is-string'));
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// the '.' can be in the middle, not at the beginning and not at the end and only once.
var validationRegExp = /^[$\-_!a-z0-9]+[.]?[$\-_!a-z0-9]+$/;


function isValidScopeName(val) {
  if (!(0, (_isString || _load_isString()).default)(val)) return false;
  return validationRegExp.test(val);
}