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
import babel from 'rollup-plugin-babel'; | |
export default { | |
input: './src/index.js', | |
output: { | |
file: './dist/bundle.rollup.js', | |
format: 'cjs' | |
}, | |
plugins: [ | |
babel({ |
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 container = document.querySelector('.listings-container'); | |
const items = container.querySelectorAll('.listing-card-container'); | |
items.forEach(item => { | |
const isSold = item.querySelector('.is-sold'); | |
const isLeased = item.querySelector('.is-leased'); | |
if (isSold || isLeased) { | |
item.querySelector('.listing-result__shortlist').click(); | |
} |
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
dl { | |
display: flex; | |
flex-flow: row wrap; | |
justify-content: space-between; | |
align-items: flex-start; | |
} | |
dt { | |
width: 30%; | |
} |
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
<dl> | |
<dt> | |
Term 1 | |
</dt> | |
<dd> | |
A longer definiton. A definition usually expands on the term.🌚 | |
</dd> | |
<span></span> | |
<dt> | |
Term 2 |
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
<dl> | |
<dt> | |
Term 1 | |
</dt> | |
<dd> | |
A longer definiton. A definition usually expands on the term.🌚 | |
</dd> | |
<dt> | |
Term 2 | |
</dt> |
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
import generateErrorMessage from 'generate-error-message'; | |
const fields = { | |
firstName: { | |
isFieldValid: function() { | |
const firstName = document.getElementsByName("First_Name")[0].value; | |
return firstName !== ''; | |
}, | |
userFeedbackElement: document.getElementById("FnameValidation"), | |
errorMessage: 'Cannot be empty' |
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 strict'; | |
const Git = require("nodegit"); | |
const shell = require('shelljs'); | |
const colors = require('colors'); | |
const pathToRepo = require("path").resolve("./.git"); | |
// This will be set to the name of our feature branch | |
let featureBranch; | |
/** |
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 calculateRepayments(debt, repay, interest, month, interestPaid) { | |
if (debt > 0) { | |
const monthlyInterest = (debt * interest) / 12; | |
const newDebt = ((debt + monthlyInterest) - repay); | |
calculateRepayments(newDebt, repay, interest, month + 1, interestPaid + monthlyInterest); | |
} else { | |
console.log(`Debt will take ${month} months to pay off`); | |
console.log(`You will pay a total of $${parseInt(interestPaid/100)} in interest.`); | |
} | |
} |
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
/** | |
* @param {Array.<Object>} input | |
* @param {Number} depth | |
* @param {Array.<Number>} numbers | |
* @returns {string} | |
*/ | |
function filterInputByLineNumber(input, depth, numbers) { | |
if (depth === numbers.length - 1 || input[numbers[depth]].children.length === 0) { | |
return input[numbers[depth]].text; | |
} else { |
NewerOlder