const allEndpoints = document.querySelectorAll('.nostyle span')
let endpoints = {}
allEndpoints.forEach(endpoint => {
if (endpoint.textContent.startsWith('/')) {
const endpointName = endpoint.textContent.substring(1)
const params = endpointName.split('/')
const parent = params[0]
const restOfName = endpointName.replace(parent, '')
This file contains hidden or 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
{ | |
"Console.log with eslint-disable-line": { | |
"prefix": "cl", | |
"body": [ | |
"console.log(``, something) // eslint-disable-line no-console" | |
] | |
} | |
} |
This file contains hidden or 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 _ from 'lodash' | |
const transform = { | |
toCamelCase (obj) { | |
const camelCasedObj = {} | |
Object.keys(obj).forEach((key) => { | |
if (_.isPlainObject(obj[key])) camelCasedObj[_.camelCase(key)] = this.toCamelCase(obj[key]) | |
else camelCasedObj[_.camelCase(key)] = obj[key] | |
}) | |
return camelCasedObj |
import Vue from 'vue'
import upperFirst from 'lodash/upperFirst' // could be vue.filter
import camelCase from 'lodash/camelCase' // could be vue.filter
// Require in a **base** component context
// nb: you can use any prefix you want instead of 'base' below
const requireComponent = require.context('.', false, /base-[\w-]+\vue$/)
NewerOlder