Save current BZZZ config-ui state before CHORUS branding update
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
install/config-ui/node_modules/es-abstract/2018/SetFunctionLength.js
generated
vendored
Normal file
28
install/config-ui/node_modules/es-abstract/2018/SetFunctionLength.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
var isInteger = require('math-intrinsics/isInteger');
|
||||
|
||||
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
|
||||
var HasOwnProperty = require('./HasOwnProperty');
|
||||
var IsExtensible = require('./IsExtensible');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-setfunctionlength
|
||||
|
||||
module.exports = function SetFunctionLength(F, length) {
|
||||
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
|
||||
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
|
||||
}
|
||||
if (typeof length !== 'number') {
|
||||
throw new $TypeError('Assertion failed: `length` must be a Number');
|
||||
}
|
||||
if (length < 0 || !isInteger(length)) {
|
||||
throw new $TypeError('Assertion failed: `length` must be an integer >= 0');
|
||||
}
|
||||
return DefinePropertyOrThrow(F, 'length', {
|
||||
'[[Configurable]]': true,
|
||||
'[[Enumerable]]': false,
|
||||
'[[Value]]': length,
|
||||
'[[Writable]]': false
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user