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 dedupeReferences (existing, incoming) { | |
// Dedupe items | |
const idMap = {} | |
for (const item of existing) { | |
idMap[item.__ref] = true | |
} | |
const validated = [] | |
for (const item of incoming) { | |
if (!idMap[item.__ref]) { | |
validated.push(item) |
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
export function useEagerComputed() { | |
const properties = [] | |
function eagerComputed(definitions) { | |
const computedProps = {} | |
for (const key in definitions) { | |
const effect = definitions[key] | |
properties.push({ key, effect }) | |
computedProps[key] = function () { | |
return this.$data[key] |
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
<link rel="stylesheet" href="https://cdn.rawgit.com/luizbills/feather-icon-font/v4.7.0/dist/feather.css"> |
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 KEY_ESCAPE_REG = /[\s-.:|#@$£*%]/ | |
const MAX_SINGLE_LINE_ARRAY_LENGTH = 3 | |
export function formatObjectToSource (obj) { | |
return printLines(Array.isArray(obj) ? arrayToSourceLines(obj) : objectToSourceLines(obj)) | |
} | |
function objectToSourceLines (object, indentCount = 0) { | |
return createLines(indentCount, lines => { | |
lines.push('{') |
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
Option Explicit | |
WScript.Echo ChooseFile( ) | |
Function ChooseFile( ) | |
' Select File dialog based on a script by Mayayana | |
' Known issues: | |
' * Tree view always opens Desktop folder | |
' * In Win7/IE8 only the file NAME is returned correctly, the path returned will always be C:\fakepath\ |
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
<script> | |
import { ref } from '@vue/composition-api' | |
import { onScrollBottom } from '@/scroll' | |
export default { | |
setup () { | |
function loadMore () { | |
// ... | |
} | |
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
export default { | |
const parents = getNamedParents(this.$router.options.routes, this.$route.matched) | |
if (parents.length) { | |
return { | |
name: parents[parents.length - 1].name, | |
} | |
} | |
return { name: 'home' } | |
} |
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 id="app"> | |
<RouteController /> | |
<nav>...</nav> | |
<router-view/> | |
</div> | |
</template> |
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
<script> | |
import { isValidMultiName } from '@/util/folders' | |
import FOLDER_CURRENT from '@/graphql/folder/folderCurrent.gql' | |
import FOLDERS_FAVORITE from '@/graphql/folder/foldersFavorite.gql' | |
import FOLDER_OPEN from '@/graphql/folder/folderOpen.gql' | |
import FOLDER_OPEN_PARENT from '@/graphql/folder/folderOpenParent.gql' | |
import FOLDER_SET_FAVORITE from '@/graphql/folder/folderSetFavorite.gql' | |
import PROJECT_CWD_RESET from '@/graphql/project/projectCwdReset.gql' | |
import FOLDER_CREATE from '@/graphql/folder/folderCreate.gql' |