Hello! This is a short usage explanation for my histogram tool. Since I don't know how to write a documentation, I'll provide some examples instead.
Make histograms Here!
Query | Effect | Notes |
---|---|---|
entry.at(0) == "A" | Generate a histogram based on whether the response starts with the character "A". | |
entry.at(-1) == "!" | Generate a histogram based on whether the response ends with an exclamation mark. | |
get_words(entry).includes("WORD") | Generate a histogram based on whether the response contains the word "WORD". | You should type the target word in all caps for the query to work. |
get_words(entry).at(0) == "WORD" | Generate a histogram based on whether the response starts with the word "WORD". | You should type the target word in all caps for the query to work. |
get_words(entry).at(-1) == "WORD" | Generate a histogram based on whether the response ends with the word "WORD". | You should type the target word in all caps for the query to work. |
get_words_count(entry) == 11 | Generate a histogram based on whether the response contains exactly 11 words. | Note that this tools count words differently from the official method, so there may be some discrepancy in results. Also because of the way javasctipt's split() works, zero-worders are counted as having one word. |
get_words_count(entry) > 11 | Generate a histogram based on whether the response contains more than 11 words. | See above. |
uppercase.includes(entry.at(0)) | Generate a histogram based on whether the response starts with an uppercase letter. | I defined the string "uppercase" to be "QWERTYUIOPASDFGHJKLZXCVBNM". I also defined lowercase, digits, letters and alnum, so you can use them too. |
entry.toUpperCase().includes("TARGET PHRASE") | Generate a histogram based on whether the response contains "TARGET PHRASE" as its substring, case insensitive. | Equivalent to the method Cary used for "responses containing WORD" in his video. |
get_acronym(entry) == "WORD" | Generate a histogram based on whether the response acronymizes to "WORD". | This tool counts alphanumeric characters differently from the official method, so there may be some discrepancy in results. |
/REGEX_PATTERN/.test(entry) | Generate a histogram based on whether the response contains a match to the regex pattern REGEX_PATTERN. | For example, /\..*,.*!/.test(entry) will generate a histogram based on whether the response is minitwow-formatted (. , ! ). |
entry.length | Generate a histogram based on the number of characters in the response. | Since this expression returns a number, you have to fill out the "start", "step" and "end" below the input box for the query to work. |
get_words_count(entry) | Generate a histogram based on the number of words in the response. | See above for explanations for get_words_count() and querying with expression returning a number. |
entry.at(0) | Generate a histogram based on the first character in the response. | The result may be a little messy... |
Also: When writing code in javascript console (for example, you want the tool to print out the responses you queried), DO NOT USE "i" AS LOOPING VARIABLE! It'll clash with the internal loop variable in the tool and result in an infinite loop.