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
#!/bin/bash | |
system=linux-x64 | |
directory=$HOME/.node-versions | |
# create directory | |
prepare() { | |
mkdir -p $directory | |
} | |
# install specified version |
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
{ | |
... | |
"scripts": { | |
"test": "nvm exec 10.16.3 npx jest", | |
... | |
}, | |
... | |
"devDependencies": { | |
... | |
"jest": "^24.9.0", |
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
describe('capitalise lambda', () => { | |
it('should capitalise the first letter of every word', () => { | |
const handler = require('capitalise.js').handler; | |
const result = handler({name: 'dan salias'}); | |
expect(result).toStrictEqual({name: 'Dan Salias'}); | |
}); | |
}); |
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 changeCase = require('change-case'); | |
exports.handler = async function(event) { | |
const result = { success: false, name: '' }; | |
if(event.name) { | |
result.name = changeCase.titleCase(event.name); | |
result.success = true; | |
} | |
return result; | |
} |
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
<template> | |
<div class="input-wrapper"> | |
<input :type="type" :class="{ 'has-content': value.length }" v-model="value"> | |
<div class="input-label">{{ label }}</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'Input', |
NewerOlder