Skip to content

Commit 6c97291

Browse files
committed
Tidy up category selector file
1 parent 37d1b5c commit 6c97291

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

packages/patterns/src/components/category-selector.js

+4-19
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,18 @@ import { store as coreStore } from '@wordpress/core-data';
99
import { useDebounce } from '@wordpress/compose';
1010
import { decodeEntities } from '@wordpress/html-entities';
1111

12-
export const unescapeString = ( arg ) => {
12+
const unescapeString = ( arg ) => {
1313
return decodeEntities( arg );
1414
};
15-
/**
16-
* Returns a term object with name unescaped.
17-
*
18-
* @param {Object} term The term object to unescape.
19-
*
20-
* @return {Object} Term object with name property unescaped.
21-
*/
22-
export const unescapeTerm = ( term ) => {
15+
16+
const unescapeTerm = ( term ) => {
2317
return {
2418
...term,
2519
name: unescapeString( term.name ),
2620
};
2721
};
28-
/**
29-
* Shared reference to an empty array for cases where it is important to avoid
30-
* returning a new array reference on every invocation.
31-
*
32-
* @type {Array<any>}
33-
*/
34-
const EMPTY_ARRAY = [];
3522

36-
/**
37-
* Module constants
38-
*/
23+
const EMPTY_ARRAY = [];
3924
const MAX_TERMS_SUGGESTIONS = 20;
4025
const DEFAULT_QUERY = {
4126
per_page: MAX_TERMS_SUGGESTIONS,

0 commit comments

Comments
 (0)