PHP2JS

.has('prop')

Has

Validate If a Property Exists.

The .has('prop') method allows you to check if a property exists within the object. The return value will be true or false depending on the case.

// Remember to replace PHP2JS with the Alias you have used.
// const existPost = PHP2JS.hasProperty('post'); // true // false
const existPost = PHP2JS.has('post'); // true // false