Decode a Base-64 string and interpret the result as a UTF-8 string.
Accepts both standard and URL-safe variants as input. Also accepts input with or without the =
/==
end padding.
Throws an error if the input cannot be decoded as a UTF-8 string.
The decoded string
Encode a string as UTF-8 then Base-64 encode the result.
The string to encode.
Whether to trim the =
/==
padding from the string. Default is no.
Whether to encode using the URL-safe variant, with -
and _
substituted for +
and /
. Default is no.
Build a query from params object
Build a URL from a base URL and additional query parameters
Decipher a JSON object that has been lightly obscured to prevent constants such as API keys appearing in plaintext in the source files.
This function will ROT13 decipher the text, apply Base64 decoding, and parse the result as JSON.
Localize an English string into the current user interface language, if possible. This will work for strings which match an existing string in PopClip's user interface.
The string to localize.
The localized string, or the original string if no localized version was avaiable.
Parse a query into params object
The constant
property is a container for pre-defined constants.
Key code for the Delete (⌫) key.
Key code for the Down Arrow key.
Key code for the Escape key.
Key code for the Left Arrow key.
Key code for the Return (↵) key.
Key code for the Right Arrow key.
Key code for the space bar.
Key code for the Tab (⇥) key.
Key code for the Up Arrow key.
Bit mask for the Command (⌘) key.
Bit mask for the Control (⌃) key.
Bit mask for the Option (⌥) key.
Bit mask for the Shift (⇧) key.
Generated using TypeDoc
A container for various utility functions and constants
util
object.