Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-keys-x

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-keys-x

An ES6 Object.keys shim.

  • 3.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
increased by139.26%
Maintainers
1
Weekly downloads
 
Created
Source

Travis status Dependency status devDependency status npm version

object-keys-x

An ES6 Object.keys shim.

module.exportsArray

This method returns an array of a given object's own enumerable properties, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).

Kind: Exported member
Returns: Array - An array of strings that represent all the enumerable properties of the given object.

ParamTypeDescription
obj*The object of which the enumerable own properties are to be returned.

Example

import objectKeys from 'object-keys-x';

const obj = {
  arr: [],
  bool: true,
  null: null,
  num: 42,
  obj: {},
  str: 'boz',
  undefined: void 0,
};

console.log(objectKeys(obj)); // ['arr', 'bool', 'null', 'num', 'obj', 'str', 'undefined']

Keywords

FAQs

Package last updated on 18 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc