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
/** | |
* Deal with the localStorage avoiding odd issues due to paranoids that have disabled it by default | |
*/ | |
const ls = window.localStorage | |
/** | |
* Call any method on the localStorage avoiding to throw errors | |
* @param {string} method - method we want to call | |
* @param {array} args - serialized params that will be proxied to the method we are going to call | |
* @returns {null|string} whatever the method call will return |
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-tag> | |
<h1>I got the power!</h1> | |
<h2>The answer is { answer }</h2> | |
<script> | |
import something from './something' | |
this.answer = something.answer | |
</script> | |
</main-tag> |
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
{ | |
"secret-message": "hello" | |
} |
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 b = require('./b') | |
b.b = 'c' | |
module.exports = { | |
a: 'a' | |
} |
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
//** Dependencies **// | |
const path = require('path'); | |
const webpack = require('webpack'); | |
//** Options **// | |
const paths = require('./paths.js').paths; | |
const envUtil = require('../util/env'); | |
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
<cool> | |
<p>Hi { message() }</p> | |
<script> | |
message() { | |
return 'there' | |
} | |
</script> | |
<style type="postcss" scoped> |
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
<bar> | |
<p>bar</p> | |
</bar> |
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
Object.defineProperty(Object.prototype, 'promise', { | |
get: function() { | |
return new Proxy({}, { | |
get: (target, name) => { | |
return new Promise((resolve) => { | |
this[name] = resolve | |
}) | |
} | |
}) | |
}, |