index.js 291 B

12345678910
  1. /*!
  2. * is-posix-bracket <https://github.com/jonschlinkert/is-posix-bracket>
  3. *
  4. * Copyright (c) 2015-2016, Jon Schlinkert.
  5. * Licensed under the MIT License.
  6. */
  7. module.exports = function isPosixBracket(str) {
  8. return typeof str === 'string' && /\[([:.=+])(?:[^\[\]]|)+\1\]/.test(str);
  9. };