IsNoTearConfiguration.js 467 B

12345678910111213141516
  1. 'use strict';
  2. var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
  3. var IsBigIntElementType = require('./IsBigIntElementType');
  4. // https://262.ecma-international.org/11.0/#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. };