All Projects β†’ jonschlinkert β†’ is-extendable

jonschlinkert / is-extendable

Licence: MIT license
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.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to is-extendable

obj-filter
JavaScript Object Filter. Deep filtering key/content recursively. Support wildcard, nested, and filter function in template.
Stars: ✭ 13 (-31.58%)
Mutual labels:  object, function
utils.js
πŸ‘· πŸ”§ zero dependencies vanilla JavaScript utils.
Stars: ✭ 14 (-26.32%)
Mutual labels:  object, function
prototyped.js
Some common Typescript prototypes
Stars: ✭ 22 (+15.79%)
Mutual labels:  object, function
DataTypes
Built-in data types
Stars: ✭ 34 (+78.95%)
Mutual labels:  object, function
Temps
Ξ» A selfhostable serverless function runtime. Inspired by zeit now.
Stars: ✭ 15 (-21.05%)
Mutual labels:  function
etran
Erlang Parse Transforms Including Fold (MapReduce) comprehension, Elixir-like Pipeline, and default function arguments
Stars: ✭ 19 (+0%)
Mutual labels:  function
obfc.js
Object Based Flow Charts(obfc): Draws SVG-based flow charts by creating objects in your web pages.
Stars: ✭ 19 (+0%)
Mutual labels:  object
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: ✭ 54 (+184.21%)
Mutual labels:  object
parallelizer
Simplifies the parallelization of function calls.
Stars: ✭ 62 (+226.32%)
Mutual labels:  function
PartialFunctions.jl
A small package to simplify partial function application
Stars: ✭ 34 (+78.95%)
Mutual labels:  function
blender-xray
STALKER (aka xray-engine) import/export plugin for Blender 3D
Stars: ✭ 132 (+594.74%)
Mutual labels:  object
php-helpers
An extensive set of PHP helper functions and classes.
Stars: ✭ 27 (+42.11%)
Mutual labels:  object
SmartReplace
Unity plug-in for replacing scene objects while keeping their references.
Stars: ✭ 50 (+163.16%)
Mutual labels:  object
js-explorer
Find the method you need without digging through the docs, directly on the command line!
Stars: ✭ 287 (+1410.53%)
Mutual labels:  object
timeline
Timeline - A photo organizer
Stars: ✭ 39 (+105.26%)
Mutual labels:  object
obman
[cvpr19] Hands+Objects synthetic dataset, instructions to download and code to load the dataset
Stars: ✭ 120 (+531.58%)
Mutual labels:  object
object.omit
Return a copy of an object without the given keys.
Stars: ✭ 79 (+315.79%)
Mutual labels:  object
qrcode
QR Code generator function for the FaaS Platform in #golang
Stars: ✭ 17 (-10.53%)
Mutual labels:  function
lazy-cache
Cache requires to be lazy-loaded when needed. Uses node's own require system with tried and true, plain-vanilla JavaScript getters.
Stars: ✭ 51 (+168.42%)
Mutual labels:  object
fdat.cljc
Function serialization between Clojure processes and dialects
Stars: ✭ 49 (+157.89%)
Mutual labels:  function

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

Install with npm:

$ npm install --save is-extendable

Usage

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

Returns true if the value is any of the following:

  • array
  • plain object
  • function

Notes

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

About

Related projects

Contributing

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

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md 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

Author

Jon Schlinkert

License

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


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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].