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

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 614 bytes
RevLine 
[9af201e]1'use strict';
2
3var $TypeError = require('es-errors/type');
4
5// var OrdinaryObjectCreate = require('es-abstract/2025/OrdinaryObjectCreate');
6var isObject = require('es-abstract/helpers/isObject');
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 (isObject(options)) { // 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.