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> | |
<!-- User form --> | |
</div> | |
</template> | |
<script> | |
import User from 'src/decorators/UserDecorator' | |
export default { |
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
/** | |
* @see {@url https://stackoverflow.com/questions/30452263/is-there-a-mechanism-to-loop-x-times-in-es6-ecmascript-6-without-mutable-varia#answer-30452949} | |
*/ | |
const times = x => f => { | |
if (x > 0) { | |
f() | |
times (x - 1) (f) | |
} | |
} |
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 a = () => { | |
return new Promise(resolve => { | |
console.log('a') | |
resolve(1) | |
}) | |
} | |
const b = () => { | |
return new Promise(resolve => { | |
console.log('b') |
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 Vue from 'vue' | |
import 'babel-polyfill' | |
import Component from '~/components/Component' | |
import { | |
mount | |
} from 'vue-test-utils' | |
import sinon from 'sinon' | |
import { | |
assert | |
} from 'chai' |
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
// main.js is your Webpack entry point. "bootstrap.desktop" and "bootstrap.mobile" load dependencies based on the browser width | |
/** | |
* @see {@link https://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code#1038781} | |
*/ | |
const browserWidth = Math.max( | |
document.body.scrollWidth, | |
document.documentElement.scrollWidth, | |
document.body.offsetWidth, | |
document.documentElement.offsetWidth, |
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
// api/controllers/SomeController.js | |
module.exports = { | |
/** | |
* @param req | |
* @param res | |
*/ | |
create: (req, res) => { | |
let love = sails.services.SomeService.getLove() |
NewerOlder