This file contains hidden or 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
import R from 'ramda'; | |
import Promise from 'bluebird'; | |
const ReportRepository = { | |
incrementCounters: () => Promise.resolve('Counters incremented') | |
}; | |
const supportedEventTypes = ['email.delivered', 'email.reported', 'email.bounced']; | |
const eventTypeSupported = R.pipe( | |
R.prop('type'), |
This file contains hidden or 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
const makeRequest = () => { | |
return getJSON() | |
.then(data => handleResult(data)) | |
} | |
const handleResult = (data) => { | |
return data.needsAnotherRequest | |
? handleIncompleteResult(data) | |
: handleCompleteResult(data); | |
} |
This file contains hidden or 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
_sls() | |
{ | |
local cur prev words cword | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
words="${COMP_WORDS}" | |
local COMMANDS=( | |
"project" |