source: imaps-frontend/node_modules/es-abstract/2017/IsConcatSpreadable.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 631 bytes
Line 
1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4
5var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
6
7var Get = require('./Get');
8var IsArray = require('./IsArray');
9var ToBoolean = require('./ToBoolean');
10
11var isObject = require('../helpers/isObject');
12
13// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
14
15module.exports = function IsConcatSpreadable(O) {
16 if (!isObject(O)) {
17 return false;
18 }
19 if ($isConcatSpreadable) {
20 var spreadable = Get(O, $isConcatSpreadable);
21 if (typeof spreadable !== 'undefined') {
22 return ToBoolean(spreadable);
23 }
24 }
25 return IsArray(O);
26};
Note: See TracBrowser for help on using the repository browser.