NaNLinter.js 292 B

1234567
  1. import { lintWarning } from "./utils";
  2. var linter = function linter(key, value, info) {
  3. if (typeof value === 'string' && /NaN/g.test(value) || Number.isNaN(value)) {
  4. lintWarning("Unexpected 'NaN' in property '".concat(key, ": ").concat(value, "'."), info);
  5. }
  6. };
  7. export default linter;