source: imaps-frontend/node_modules/es-iterator-helpers/aos/GetOptionsObject.js

main
Last change on this file was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 612 bytes
Line 
1'use strict';
2
3var $TypeError = require('es-errors/type');
4
5// var OrdinaryObjectCreate = require('es-abstract/2024/OrdinaryObjectCreate');
6var Type = require('es-abstract/2024/Type');
7
8// https://tc39.es/proposal-joint-iteration/#sec-getoptionsobject
9
10module.exports = function GetOptionsObject(options) {
11 if (typeof options === 'undefined') { // step 1
12 // return OrdinaryObjectCreate(null); // step 1.a
13 return { __proto__: null }; // step 1.a
14 }
15 if (Type(options) === 'Object') { // step 2
16 return options; // step 2.a
17 }
18
19 throw new $TypeError('`options` must be an Object or undefined'); // step 3
20};
Note: See TracBrowser for help on using the repository browser.