# packeta/2.1/src/PacketaWidget/stringifyOptions.js

Packeta, version 2.1. 17 lines.

- Page: https://pluginprobe.com/plugins/packeta/2.1/code/src/PacketaWidget/stringifyOptions.js
- Raw: https://pluginprobe.com/plugins/packeta/2.1/raw/src/PacketaWidget/stringifyOptions.js
- Modified: 2024-10-07T12:16:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/packeta/2.1/code/src/PacketaWidget/stringifyOptions.js#L10-L20`.

```javascript
export const stringifyOptions = function ( widgetOptions ) {
	let widgetOptionsArray = [];
	for ( const property in widgetOptions ) {
		if ( ! widgetOptions.hasOwnProperty( property ) ) {
			continue;
		}
		let propertyValue;
		if ( typeof widgetOptions[ property ] === 'object' ) {
			propertyValue = stringifyOptions( widgetOptions[ property ] );
		} else {
			propertyValue = widgetOptions[ property ];
		}
		widgetOptionsArray.push( property + ': ' + propertyValue );
	}
	return widgetOptionsArray.join( ', ' );
};

```
