Skip to content

Instantly share code, notes, and snippets.

View anoopsinghbayes's full-sized avatar

Anoopsingh Bayes anoopsinghbayes

  • mumbai
View GitHub Profile
@anoopsinghbayes
anoopsinghbayes / index.mjs
Last active August 14, 2024 17:44
add Rgb Tokens to Style Dictionary
import StyleDictionary from "style-dictionary";
//using StyleDictionary Version 4.x.x
// Preprocessor function to add `-rgb` tokens with references
function addRgbTokens(dictionary, options) {
const tokens = JSON.parse(JSON.stringify(dictionary)); // Clone the original dictionary
function processTokens(obj, path = []) {
/**
*
* @param {string} hex
@anoopsinghbayes
anoopsinghbayes / cloudSettings
Last active March 15, 2022 17:40
vscode setting
{"lastUpload":"2022-03-15T17:40:48.111Z","extensionVersion":"v3.4.3"}
@anoopsinghbayes
anoopsinghbayes / mt.js
Created July 9, 2018 21:29 — forked from yoadsn/mt.js
GQL - Multi Tenant Idea
const tenantsConfig = [
{ name: 't1', connStr: 'mongodb://...' },
{ name: 't2', connStr: 'mongodb://...' }
];
let tenantConns = tenantsConfig.map(tenant => ({
...tenant,
conn: mongoose.createConnection(tenant.connStr))
});