FCF 2.0 development in progress...
> > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

fcf.isNumbered() function

boolean fcf.isNumbered(mixed a_value)

Package: fcf-framework-core

File: fcf-framework-core:fcf.js

Available from version: 2.0.2

Checks if the passed argument is an enumerable object. But string data is not treated as enumerated objects.

Arguments

mixed a_value
- Checked value
Result
boolean
- Returns true if the argument is an enumerated object and not a string

Example: Function application

console.log(`[]: `, fcf.isNumbered([])); console.log(`NodeList: `, fcf.isNumbered(document.querySelectorAll("body"))); console.log(`Map: `, fcf.isNumbered(new Map())); console.log(`{}: `, fcf.isNumbered({})); console.log(`"str": `, fcf.isNumbered("str")); console.log(`1: `, fcf.isNumbered(1)); console.log(`null: `, fcf.isNumbered(null));

Output:

[]: true NodeList: true Map: false {}: false "str": false 1: false null: false