[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

(no description)

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

Defines 4 functions

  isAppleOS()
  capitaliseFirstCharacter()
  mapValues()
  getEventModifiers()

Functions
Functions that are not part of a class:

isAppleOS(_window = null)   X-Ref
Return true if platform is MacOS.

return: {boolean} True if MacOS; false otherwise.
param: {Window?} _window window object by default; used for DI testing.

capitaliseFirstCharacter(string)   X-Ref
Capitalise the first character of a string.

return: {string} Capitalised string.
param: {string} string String to capitalise.

mapValues(object, mapFn)   X-Ref
Map the values of an object with a specified callback and return the result object.

return: {any} Active modifier constants.
param: {T}                     object Object to map values of.
param: {( value: any ) => any} mapFn  Mapping function

getEventModifiers(event)   X-Ref
From a given KeyboardEvent, returns an array of active modifier constants for
the event.

return: {Array<WPModifierPart>} Active modifier constants.
param: {import('react').KeyboardEvent<HTMLElement> | KeyboardEvent} event Keyboard event.



Generated : Sat Nov 23 08:20:01 2024 Cross-referenced by PHPXref