From e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Mon, 16 Nov 2020 00:10:28 +0100 Subject: api, login, auth --- node_modules/es-abstract/2016/IsDataDescriptor.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 node_modules/es-abstract/2016/IsDataDescriptor.js (limited to 'node_modules/es-abstract/2016/IsDataDescriptor.js') diff --git a/node_modules/es-abstract/2016/IsDataDescriptor.js b/node_modules/es-abstract/2016/IsDataDescriptor.js new file mode 100644 index 0000000..0ad3045 --- /dev/null +++ b/node_modules/es-abstract/2016/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var Type = require('./Type'); + +// https://www.ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; -- cgit v1.2.3