isOperator.js 191 B

1234567891011121314
  1. 'use strict';
  2. const specialKeys = new Set([
  3. '$ref',
  4. '$id',
  5. '$db'
  6. ]);
  7. module.exports = function isOperator(path) {
  8. return (
  9. path[0] === '$' &&
  10. !specialKeys.has(path)
  11. );
  12. };