This file defines mappings to improve English writing using [wordrow] by changing "very X" by a single word that means the same.
Very X | Improvement |
---|---|
very afraid | terrified |
very angry | furious |
very bad | atrocious |
#!/bin/bash | |
# --- Helpers --- | |
replace_perserving_capitalization() { | |
file="${1}" | |
from="${2}" | |
to="${3}" | |
fh="$(echo "${from}" | cut -c 1-1)" |
// SPDX-License-Identifier: MIT-0 | |
/// Converts a linearly stored m-by-m matrix A into a linear store of the q-by-q | |
/// submatrices of A. For example, given the 4-by-4 matrix: | |
/// | |
/// ```no-test | |
/// in = [ a b c d | |
/// e f g h | |
/// h i j k | |
/// l m n o ] |
/** | |
* # Maybe Run JS | |
* | |
* Run a tool if it is present on the PATH, otherwise output a warning. | |
* | |
* Retrieved from (and updates available at): | |
* https://gist.github.com/ericcornelissen/6253b63db8c6f6ec6a58cb4d36c8e989 | |
* | |
* ## Installation | |
* |
This file defines a mapping from British to American English for [wordrow]. You can use it to convert British to American English:
$ wordrow --map-file british-american.md input.txt
or to convert American to British English:
$ wordrow --invert --map-file british-american.md input.txt
/** | |
* Check equality across any number of variables. | |
* | |
* @example <caption>Simple usage</caption> | |
* var a = 1, b = 1, c = 1, d = 2; | |
* eql(a, b, c); // returns True | |
* eql(a, b, c, d); // returns False | |
* | |
* @example <caption>Wierd use cases</caption> | |
* eql("foobar"); // returns True |
/** | |
* Make a function partially invokable from left to right. | |
* | |
* @example | |
* let addThreeNumbers = partialLeft((a, b, c) => a + b + c); | |
* addThreeNumbers(1)(2)(3); // => 6 | |
* addThreeNumbers(1, 2)(3); // => 6 | |
* addThreeNumbers(1)(2, 3); // => 6 | |
* addThreeNumbers(1, 2, 3); // => 6 | |
* |
/** | |
* Make a function partially invokable, meaning that its | |
* arguments can be provided in any order. | |
* | |
* @example | |
* let addThreeNumbers = partial((a, b, c) => a + b + c); | |
* let plus4 = addThreeNumbers(1, _, 3); | |
* plus4(4); // => 8 | |
* | |
* @param {Function} fn The function to apply partial invokability to. |
/** | |
* Automatically align the text of one element with | |
* the text of another element. | |
* | |
* @param {Node} node The element to align. | |
* @param {Node} target The element to align with. | |
* @license The-Unlicense | |
*/ | |
function alignTextWith(node, target) { | |
const targetWidth = target.offsetWidth; |
/** | |
* Curry a function of any length. Note that a curried | |
* function accepts only one argument at the time. | |
* | |
* @example <caption>Simple usage</caption> | |
* let addTwoNumbers = curry((x, y) => x + y); | |
* addTwoNumbers(1); // => Function[y => 1 + y] | |
* addTwoNumbers(1)(3); // => 4 | |
* | |
* @example <caption>Incorrect usage</caption> |