command | description |
---|---|
ctrl + a | Goto BEGINNING of command line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* promiseFilter - Returns a Promise which resolves with a new Array, containing only values which passed the test. | |
* @param {Array} array An Array from which to filter values into a new Array. | |
* @param {callback} test A callback function which must return a Promise, which must resolve with a Boolean. | |
* @callback test | |
* @param {any} value The current value from `array`. | |
* @param {Number} index The current index being used to access `array`. | |
* @param {Array} array The Array being iterated through, `array`. | |
* @returns {Promise} A Promise which resolves with a new Array containing values which passed the test. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -uo pipefail | |
IFS=$'\n\t' | |
# | |
# Improvements from dahjelle/pre-commit.sh: | |
# - does not lint deleted files, | |
# - lints all staged files before exiting with an error code, | |
# - handles spaces and other unusual chars in file names. | |
# |