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 fastify = require('fastify')({ logger: true }) | |
var timer = {}; | |
function delay(callback, length){ | |
if(!timer.startTime){ | |
timer.startTime = new Date().getTime(); | |
timer.callback = callback; | |
timer.length = length; | |
} |
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
// use like this node tools/changelog-generator.js upstream/master upstream/develop | |
#! /usr/bin/env node | |
'use strict'; | |
const REVISION = setupArguments(process.argv); | |
const JIRA_BASE_URL = 'https://motainteam.atlassian.net/browse/:issueid'; | |
const GIT_LOG_CMD = `git log --merges --pretty="%b" ${REVISION}`; | |
require('child_process').exec(GIT_LOG_CMD, (error, stdout) => { | |
if (error) { | |
console.error(`git log error: ${error}`); |
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
// state container definition | |
const useState = initVal => { | |
let val = initVal; | |
const get = () => val; | |
const set = x => (val = x); | |
return Object.freeze({ get, set }); | |
}; |