/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const ARRAY="array";const OBJECT="object";module.exports=function(obj,type){return _checkPropType(obj,type)};function _checkPropType(obj,type,props,ar,soFar){var test,props,prop,propName,propType,soFar;test=type==="o"?OBJECT:type==="a"?ARRAY:null;props=props?props:obj;soFar=soFar?soFar:"";if(test&&props){for(propName in props){prop=props[propName];if(prop.type&&typeof prop.type==="string"){propType=prop.type.toLowerCase();if(type==="o"&&propType===OBJECT||type==="a"&&propType.includes(ARRAY)){ar=ar?ar:[];ar.push(soFar+propName)}if(prop.properties){ar=_checkPropType(obj,type,prop.properties,ar,soFar+propName+".")}}}}return ar};