isPrimitive()

Determines if something is a primitive or not. If not a primitive it must be some form of object.

This function is valid in v2.1.0 to v2.24.3. This function has been downloaded 94 times.

Parameter

{*} arg
The argument which will be determined as being either a primitive (eg. boolean, number, string, etc.) or a non-primitive.

Returns

{boolean}
true will be returned if arg is simply a primitive, otherwise false will be returned.

Requiring Functions

This function is directly required by the following functions:

  • setAt()
    Tries to set a value at the given path under the given root object.
  • typeOf()
    Either gets the type of a value or adds a constructor registering its custom type name.