Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
<script> | |
export default { | |
props: ['value', 'city'], | |
template: '<input type="text" \ | |
id="address-autocomplete"\ | |
ref="input" \ | |
v-bind:value="value" \ | |
v-on:input="$emit(\'input\', $event.target.value)"/>', | |
mounted: function () { |
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
This gist is about:
Mainly:
function
cannot (should not) be used when side-effects occur<?php | |
$lines = explode( "\n", file_get_contents( 'input.csv' ) ); | |
$headers = str_getcsv( array_shift( $lines ) ); | |
$data = array(); | |
foreach ( $lines as $line ) { | |
$row = array(); | |
foreach ( str_getcsv( $line ) as $key => $field ) |