IsNoTearConfiguration.js 456 B

1234567891011121314151617
  1. 'use strict';
  2. var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
  3. var IsBigIntElementType = require('./IsBigIntElementType');
  4. // https://tc39.es/ecma262/2020/#sec-isnotearconfiguration
  5. module.exports = function IsNoTearConfiguration(type, order) {
  6. if (IsUnclampedIntegerElementType(type)) {
  7. return true;
  8. }
  9. if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') {
  10. return true;
  11. }
  12. return false;
  13. };