Scripting Helper Methods
Helper Methods for Scripting
The following helper methods are not part of the ES5 JavaScript standard, but they are very helpful for a lot of use cases.
Name | Description |
---|---|
| Converts a HTML string to plain text. |
| Converts a markdown string to plain text. |
| Formats a JavaScript date object using the specified pattern. |
| Same as |
| Counts the number of words in a text. Useful in combination with |
| Counts the number of characters in a text. Useful in combination with |
| Converts a text to camelCase. |
| Converts a text to PascalCase. |
| Calculate the SHA256 hash from a given string. Use this method for hashing passwords. |
| Calculate the MD5 hash from a given string. Use this method for hashing passwords, when backwards compatibility is important. |
| Calculates the slug of a text by removing all special characters and whitespaces to create a friendly term that can be used for SEO-friendly URLs. |
Last updated