isISRC.js 546 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isISRC;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. // see http://isrc.ifpi.org/en/isrc-standard/code-syntax
  9. var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;
  10. function isISRC(str) {
  11. (0, _assertString.default)(str);
  12. return isrc.test(str);
  13. }
  14. module.exports = exports.default;
  15. module.exports.default = exports.default;