Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
graphql_headers: async () => ({
"x-correlation-id": uid() // experiment with X-AMZN-Trace-Id
})
}
_nextSend () {
if (!this._sendingQueue.length || this._sending) return Promise.resolve()
this._sending = true
const
messages = this._sendingQueue.shift(),
currentMessage = messages[0],
eventListenerKey = `${currentMessage.event}.${uid()}`,
eventResponseKey = eventListenerKey + '.result'
return new Promise((resolve, reject) => {
let allChunks = []
const fn = (r) => {
// If this is a split message then keep listening for the chunks and build a list to resolve
if (r !== void 0 && r._chunkSplit) {
const chunkData = r._chunkSplit
allChunks = [...allChunks, ...r.data]
// Last chunk received so resolve the promise.
if (chunkData.lastChunk) {
this.off(eventResponseKey, fn)
resolve(allChunks)
}
addItem ({state, getters, rootState, rootGetters, commit, dispatch}, item) {
const currentPrice = (item.prices[this.get('settings/currency')])
const price = (!currentPrice)
? 0
: currentPrice
item.price = price
if (!item.id) {
item.id = uid()
item.nonListed = true
}
commit('addItem', item)
state.valueFiatAnimation.update(getters.valueFiat)
},
deleteItem ({state, getters, rootState, rootGetters, commit, dispatch}, item) {
function getRandomSecondLabel () {
if (Math.floor(Math.random() * 50) % 4 === 0) {
return `UID: ${uid().substring(0, 8)}`
}
}
function parseCountries () {
els.forEach((_el, index) => {
const shadow = (index === 1)
const id = uid()
if (!state.fly[id]) {
const animation = anime({
targets: _el,
translateX: (shadow) ? Xend - shadowOffsetX : Xend,
translateY: (shadow) ? Yend : Yend,
scale: (shadow)
? [1, 1.1, 1.1, 0.8, 0.4]
: [1, 1.1, 1.1, 0.8, 0.4],
duration: animationDuration,
easing: 'easeOutQuad',
elasticity: 0,
autoplay: false
})
setAnimation({type: 'fly', id, animation})
}
resetAnimation({type: 'fly', id})
function getRandomSecondLabel () {
if (Math.floor(Math.random() * 50) % 4 === 0) {
return `UID: ${uid().substring(0, 8)}`
}
}
function parseCountries () {
static transformCallback (callback) {
const identifier = uid()
window[identifier] = (result) => {
delete window[identifier]
callback(result)
}
return identifier
}
data () {
return {
id: uid(),
emojiInt: 0,
standardEmojis: ['📦', '🎈', '⭐️', '👍', '🏀']
}
},
computed:
addTabbedCard () {
this.$router.push({ path: '/designer/' + uid(), query: { type: 'tabs', objects: this.currentObjects.join(','), locations: this.currentLocations.join(',') } })
}
},