249 "lookup",
250 function (error: Error | null, address: string, family: string, host: string) {
251 logDebugNetwork(
252 "Socket Lookup :: " +253 JSON.stringify({ address, family, host, error }, null, " ")254 );
255
256 if (error) {
18 const previousVersion = context.globalState.get<string>(extVersion) as string;
19
20 // get the value stored inside the global key: _value['extension.updateMsg']
21 const extUpdateMsg = extensionId + ".updateMsg";22 const previousMsg = context.globalState.get<string>(extUpdateMsg) as string;
23
24 // get the package.json version
14 const extensionId = context.extension.id;
15
16 // get the value stored inside the global state key: _value['extension.version']
17 const extVersion = extensionId + ".version";18 const previousVersion = context.globalState.get<string>(extVersion) as string;
19
20 // get the value stored inside the global key: _value['extension.updateMsg']
66 placeholders.__projectSlug__ = slug(placeholders.__projectName__);
67 placeholders.__authorSlug__ = slug(placeholders.__author__);
68 placeholders.__githubUser__ = getGithubUser();
69 placeholders.__email__ = placeholders.__author__ + "@email.com"; 70
71 return placeholders;
72}
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";