[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> wordcount.js (summary)

(no description)

File Size: 428 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  loadSettings()
  matchWords()
  matchCharacters()
  count()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

loadSettings(type, userSettings)   X-Ref
Private function to manage the settings.

param: {string} type         The type of count to be done.
param: {Object} userSettings Custom settings for the count.
return: {void|Object|*} The combined settings object to be used.

matchWords(text, regex, settings)   X-Ref
Match the regex for the type 'words'

param: {string} text     The text being processed
param: {string} regex    The regular expression pattern being matched
param: {Object} settings Settings object containing regular expressions for each strip function
return: {Array|{index: number, input: string}} The matched string.

matchCharacters(text, regex, settings)   X-Ref
Match the regex for either 'characters_excluding_spaces' or 'characters_including_spaces'

param: {string} text     The text being processed
param: {string} regex    The regular expression pattern being matched
param: {Object} settings Settings object containing regular expressions for each strip function
return: {Array|{index: number, input: string}} The matched string.

count(text, type, userSettings)   X-Ref
Count some words.

param: {string} text         The text being processed
param: {string} type         The type of count. Accepts ;words', 'characters_excluding_spaces', or 'characters_including_spaces'.
param: {Object} userSettings Custom settings object.
return: {number} The word or character count.



Generated: Wed Apr 8 01:00:03 2020 Cross-referenced by PHPXref 0.7.1