Sha256: 8c47f7f0744161b73ce0b2266c5a208c311c2fb77fc569802db3a6e2ac65ac33
Contents?: true
Size: 800 Bytes
Versions: 26
Compression:
Stored size: 800 Bytes
Contents
/*! * Chai - getOwnEnumerablePropertySymbols utility * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .getOwnEnumerablePropertySymbols(object) * * This allows the retrieval of directly-owned enumerable property symbols of an * object. This function is necessary because Object.getOwnPropertySymbols * returns both enumerable and non-enumerable property symbols. * * @param {object} obj * @returns {Array} * @namespace Utils * @name getOwnEnumerablePropertySymbols * @public */ export function getOwnEnumerablePropertySymbols(obj) { if (typeof Object.getOwnPropertySymbols !== 'function') return []; return Object.getOwnPropertySymbols(obj).filter(function (sym) { return Object.getOwnPropertyDescriptor(obj, sym).enumerable; }); }
Version data entries
26 entries across 26 versions & 1 rubygems