Skip to content

Instantly share code, notes, and snippets.

View ibratoev's full-sized avatar

Ivaylo Bratoev ibratoev

View GitHub Profile
/**
 * This is an example namespace description.
 * @namespace
 */
var MyNamespace = {
  /**
  * This is an example namespace member.
  */
  foo: ‘foo’
};
@ibratoev
ibratoev / gist:3723891d81b98b94f7dec04b979164ff
Created April 19, 2018 13:53
Async-await vs then with not well behaving functions
const shouldReturnPromise = () => { throw "test"; }
const withAsyncAwait = async () => {
try {
await shouldReturnPromise()
} catch (e) {
console.log('Handled: ' + e)
}
}
function FindProxyForURL(url, host) {
PROXY = "PROXY 192.168.6.35:808"
if (shExpMatch(host,"*.demandware.net")) {
return PROXY;
}
if (shExpMatch(host,"*.demandware.com")) {
return PROXY;
}