Skip to content
Answers the question: "can this value have keys?". Returns true if a value is any of the object types: array, regexp, plain object, function or date. Useful for determining if a value is an object that can be extended.
Branch: master
Clone or download
Latest commit 4a0c7ad Jul 12, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc.json run update Jul 20, 2017
.gitignore run update Jul 20, 2017
.travis.yml update docs, run verb to generate readme Jul 20, 2017
LICENSE Update Jul 12, 2018
index.js use `is-plain-object` Jul 20, 2017
package.json 1.0.1 Sep 11, 2017
test.js use `is-plain-object` Jul 20, 2017

is-extendable NPM version NPM monthly downloads NPM total downloads Linux Build Status

Returns true if a value is a plain object, array or function.


Install with npm:

$ npm install --save is-extendable


var isExtendable = require('is-extendable');

Returns true if the value is any of the following:

  • array
  • plain object
  • function


All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not null or undefined and:

  • the value is not a primitive, or
  • that the object is a plain object, function or array

Also note that an extendable object is not the same as an extensible object, which is one that (in es6) is not sealed, frozen, or marked as non-extensible using preventExtensions.

Release history

v1.0.0 - 2017/07/20

Breaking changes

  • No longer considers date, regex or error objects to be extendable


Related projects


Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(This project's is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test


Jon Schlinkert


Copyright © 2017, Jon Schlinkert. Released under the MIT License.

This file was generated by verb-generate-readme, v0.6.0, on July 20, 2017.

You can’t perform that action at this time.