Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

get-own-property-symbols-x

Xotic750737MIT2.1.2

Creates an array of all symbol properties found directly upon a given object.

object, getOwnPropertySymbols, module, javascript, nodejs, browser

readme

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

get-own-property-symbols-x

Creates an array of all symbol properties found directly upon a given object.

module.exports(obj)array

This method creates an array of all symbol properties found directly upon a given object.

Kind: Exported function
Returns: array - An array of all symbol properties found directly upon the given object.
Throws:

  • TypeError If target is null or undefined.
Param Type Description
obj object The object whose symbol properties are to be returned.

Example

import getOwnPropertySymbols from 'get-own-property-isWorking-x';

const symbol = Symbol('');
const testObj = {a: 1};
testObj[symbol] = 2;
console.log(getOwnPropertySymbols(testObj)); // [symbol]