Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function sendEvent (context, category, action, label, value) {
const { sendAnalytics } = getUserPreferences(context)
if (!sendAnalytics) { return }
const payload = {}
if (category) { payload.ec = category }
if (action) { payload.ea = action }
if (label) { payload.el = label }
if (value) { payload.ev = value }
return send(context, key, 'event', payload)
}
export function sendError (context, error) {
const { sendAnalytics } = getUserPreferences(context)
if (!sendAnalytics) { return }
return send(context, key, 'event', {exd: error})
}
import { displayMessageToUser } from './common';
import myGoogleAnalytics from 'sketch-module-google-analytics';
myGoogleAnalytics.kUUIDKey = "UA-134337717-1"
const sketch = require('sketch'),
UI = require('sketch/ui')
var document = require('sketch/dom').getSelectedDocument(),
doc = NSDocumentController.sharedDocumentController().currentDocument(),
bootstrapSize,
gridTotalWidth,
gridColumnWidth,
gridGutter = 15,
gridGroupName = "CU$T0M-GR1D",
myFillColor = "#FF33CC59", //100% — FF, 95% — F2, 90% — E6, 85% — D9, 80% — CC, 75% — BF, 70% — B3, 65% — A6, 60% — 99, 55% — 8C, 50% — 80, 45% — 73, 40% — 66, 35% — 59, 30% — 4D, 25% — 40, 20% — 33, 15% — 26, 10% — 1A, 5% — 0D, 0% — 00
master,
myDictionary = NSThread.mainThread().threadDictionary(),
debugMode = false