wp/wp-includes/js/dist/html-entities.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
--- a/wp/wp-includes/js/dist/html-entities.js	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/js/dist/html-entities.js	Fri Sep 05 18:40:08 2025 +0200
@@ -1,45 +1,46 @@
-/******/ (function() { // webpackBootstrap
+/******/ (() => { // webpackBootstrap
 /******/ 	"use strict";
 /******/ 	// The require scope
 /******/ 	var __webpack_require__ = {};
 /******/ 	
 /************************************************************************/
 /******/ 	/* webpack/runtime/define property getters */
-/******/ 	!function() {
+/******/ 	(() => {
 /******/ 		// define getter functions for harmony exports
-/******/ 		__webpack_require__.d = function(exports, definition) {
+/******/ 		__webpack_require__.d = (exports, definition) => {
 /******/ 			for(var key in definition) {
 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
 /******/ 				}
 /******/ 			}
 /******/ 		};
-/******/ 	}();
+/******/ 	})();
 /******/ 	
 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
-/******/ 	!function() {
-/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
-/******/ 	}();
+/******/ 	(() => {
+/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ 	})();
 /******/ 	
 /******/ 	/* webpack/runtime/make namespace object */
-/******/ 	!function() {
+/******/ 	(() => {
 /******/ 		// define __esModule on exports
-/******/ 		__webpack_require__.r = function(exports) {
+/******/ 		__webpack_require__.r = (exports) => {
 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
 /******/ 			}
 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
 /******/ 		};
-/******/ 	}();
+/******/ 	})();
 /******/ 	
 /************************************************************************/
 var __webpack_exports__ = {};
 __webpack_require__.r(__webpack_exports__);
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */   "decodeEntities": function() { return /* binding */ decodeEntities; }
+/* harmony export */   decodeEntities: () => (/* binding */ decodeEntities)
 /* harmony export */ });
 /** @type {HTMLTextAreaElement} */
 let _decodeTextArea;
+
 /**
  * Decodes the HTML entities from a given string.
  *
@@ -47,21 +48,21 @@
  *
  * @example
  * ```js
+ * import { decodeEntities } from '@wordpress/html-entities';
+ *
  * const result = decodeEntities( 'á' );
  * console.log( result ); // result will be "รก"
  * ```
  *
  * @return {string} The decoded string.
  */
-
-
 function decodeEntities(html) {
   // Not a string, or no entities to decode.
   if ('string' !== typeof html || -1 === html.indexOf('&')) {
     return html;
-  } // Create a textarea for decoding entities, that we can reuse.
+  }
 
-
+  // Create a textarea for decoding entities, that we can reuse.
   if (undefined === _decodeTextArea) {
     if (document.implementation && document.implementation.createHTMLDocument) {
       _decodeTextArea = document.implementation.createHTMLDocument('').createElement('textarea');
@@ -69,10 +70,10 @@
       _decodeTextArea = document.createElement('textarea');
     }
   }
-
   _decodeTextArea.innerHTML = html;
   const decoded = _decodeTextArea.textContent;
   _decodeTextArea.innerHTML = '';
+
   /**
    * Cast to string, HTMLTextAreaElement should always have `string` textContent.
    *
@@ -90,11 +91,7 @@
    *
    * @see https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
    */
-
-  return (
-    /** @type {string} */
-    decoded
-  );
+  return /** @type {string} */decoded;
 }
 
 (window.wp = window.wp || {}).htmlEntities = __webpack_exports__;