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 checkout = new AdyenCheckout({ | |
"locale": "en", | |
"originKey": "...", | |
"environment": "test", | |
"translations": { | |
"en": { | |
"creditCard.holderName.invalid": "Oops! Something Went Wrong", | |
"creditCard.numberField.title": "Card Number", | |
"creditCard.numberField.placeholder": "•••• •••• •••• ••••", | |
"creditCard.numberField.invalid": "Oops! Something Went Wrong", |
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
{ | |
"amount": { "currency": "USD", "value": 5160 }, | |
"channel": "Web", | |
"countryCode": "US", | |
"merchantAccount": "BusbudUSA", | |
"shopperLocale": "en-us", | |
"shopperReference": 1 | |
} |
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 { | |
createDefaultMapFromNodeModules, | |
createSystem, | |
createVirtualTypeScriptEnvironment, | |
} from "@typescript/vfs"; | |
import * as ts from "typescript"; | |
const fsMap = createDefaultMapFromNodeModules({ | |
target: ts.ScriptTarget.ES2015, | |
}); |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
"contributor";"path";"size" | |
"Benoit Zohar";"modules/checkout/";19690 | |
"Michael Vial";"modules/results/";13207 | |
"Victor Mus";"modules/search/";6587 | |
"Nicolas Carlo";"modules/route/";5485 | |
"Benoit Zohar";"modules/purchase/";5121 | |
"Nicole Ho";"modules/purchase-confirmation/";4936 | |
"Nicolas Carlo";"modules/partner/";4606 | |
"Nicole Ho";"modules/header/";4437 | |
"Benoit Zohar";"modules/help/";4319 |
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 ENTER_KEY_CODE = 13 | |
const MAX_INTERVAL_BETWEEN_EVENTS_IN_MS = 50 | |
const keyCode$ = Rx.Observable.fromEvent(document, "keypress") | |
.pluck('keyCode') | |
const keyCodesBuffer$ = keyCode$ | |
.buffer(keyCode$.debounce(MAX_INTERVAL_BETWEEN_EVENTS_IN_MS)) | |
.filter(isFromScan) |
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 ENTER_KEY_CODE = 13 | |
const MAX_INTERVAL_BETWEEN_EVENTS_IN_MS = 50 | |
const keyCode$ = Rx.Observable.fromEvent(document, "keypress") | |
.pluck('keyCode') | |
const keyCodesBuffer$ = keyCode$ | |
.buffer(keyCode$.debounce(MAX_INTERVAL_BETWEEN_EVENTS_IN_MS)) | |
.filter(isFromScan) |
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 MAX_INTERVAL_BETWEEN_EVENTS_IN_MS = 50 | |
const keyCode$ = Rx.Observable.fromEvent(document, "keypress") | |
.pluck('keyCode') | |
const keyCodesBuffer$ = keyCode$ | |
// --(43)-(64)----(32)-----(65)-(77)-(13)---> | |
.buffer(keyCode$.debounce(MAX_INTERVAL_BETWEEN_EVENTS_IN_MS)) | |
// --([43,64])----([32])-----([65,77,13])---> |
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 keyCode$ = Rx.Observable.fromEvent(document, "keypress") | |
// ---(ev)--(ev)--------(ev)---> | |
.pluck('keyCode') | |
// ---(43)--(51)--------(13)---> |
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 ENTER_KEY_CODE = 13 | |
const MAX_INTERVAL_BETWEEN_EVENTS_IN_MS = 50 | |
let keyCodesBuffer = [] | |
let cleanBufferTimeout | |
document.addEventListener("keypress", (event) => { | |
const keyCode = event.keyCode | |
stopCleanBufferTimeout() | |
if(keyCode === ENTER_KEY_CODE) { |
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 ENTER_KEY_CODE = 13 | |
const MAX_INTERVAL_BETWEEN_EVENTS_IN_MS = 50 | |
let keyCodesBuffer = [] | |
document.addEventListener("keypress", (event) => { | |
const keyCode = event.keyCode | |
if(keyCode === ENTER_KEY_CODE) { | |
fillInputWithKeyCodesBuffer() | |
cleanBuffer() |
NewerOlder