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
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; | |
} |
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
const shouldReturnPromise = () => { throw "test"; } | |
const withAsyncAwait = async () => { | |
try { | |
await shouldReturnPromise() | |
} catch (e) { | |
console.log('Handled: ' + e) | |
} | |
} |
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
/** | |
* This is an example namespace description. | |
* @namespace | |
*/ | |
var MyNamespace = { | |
/** | |
* This is an example namespace member. | |
*/ | |
foo: ‘foo’ | |
}; |
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
/** | |
* This is an ES6 class. | |
*/ | |
class ES6Class { | |
} |
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
/** | |
* This is a global function | |
* with description on two lines. | |
* @param {number} foo - Function's first parameter called 'foo'. | |
* @param bar Second parameter. Note that the dash before the description is optional. Type is optional as well. | |
* @returns {boolean} Description of the return value. | |
*/ | |
var globalFunc = function (foo, bar) { | |
return true; | |
} |
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
/** | |
* This is a global const. | |
* @constant | |
* @default | |
*/ | |
var GLOBAL_CONST = 42; |
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
/** | |
* @name virtualGlobalVar | |
* @description This a virtual global variable. | |
* @global | |
* @type {string} | |
*/ |
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
/** | |
* This is a global variable description. | |
* @type {number} | |
*/ | |
var globalVar = 3; |
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
/** | |
* Checks if a book is read. | |
* @param {string} book - The title of the book. | |
* @returns {boolean} True if the book is read; false otherwise. | |
*/ | |
function isRead(book) { | |
return true; | |
} |
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 node | |
// Script to update typings to their latest versions. | |
// Note that it should be executed in the folder where typings.json is. | |
const { exec, execSync } = require('child_process'); | |
const path = require('path'); | |
const typings = require(path.join(process.cwd(), 'typings.json')); | |
exec('typings ls', (error, _, stderr) => { | |
if (error) { |
NewerOlder