Reference for How to Write an Open Source JavaScript Library
The purpose of this document is to serve as a reference for:
How to Write an Open Source JavaScript Library course by Kent C. Dodds
Watch the series at egghead.io, if you haven't.
import { relations, sql } from "drizzle-orm" | |
import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core" | |
import { ulid } from "ulidx" | |
export const affiliatesTable = sqliteTable( | |
"affiliate", | |
{ | |
id: text("id") | |
.primaryKey() | |
.$defaultFn(() => ulid()), |
[...document.querySelectorAll('.btn.btn-sm.js-toggler-target')].map(a => a.click()) |
The purpose of this document is to serve as a reference for:
How to Write an Open Source JavaScript Library course by Kent C. Dodds
Watch the series at egghead.io, if you haven't.
[ | |
{ | |
"name": "Air Force blue", | |
"value": "#5d8aa8" | |
}, | |
{ | |
"name": "Alice blue", | |
"value": "#f0f8ff" | |
}, | |
{ |
# Path to your oh-my-zsh installation. | |
export ZSH=/home/deadcoder0904/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="agnoster" | |
#ZSH_THEME="cobalt2" |
// Add script in console. | |
// var _cScript = document.createElement('script');_cScript.src='../../../tools/custom.js';document.head.appendChild(_cScript); | |
// ================================================== | |
function sequenceClass() { | |
this.init = function () { | |
var tClass = document.getElementsByClassName('t'); | |
for (var i = 0; i < tClass.length; i++) { | |
tClass[i].style.boxShadow = '0px 0px 10px 2px #000000'; | |
tClass[i].setAttribute('aria-hidden', 'true'); | |
tClass[i].onclick = mouseEvent; |
Watch the video for which tasks to automate
class Form extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
name: "", | |
email: "", | |
}; | |
} | |
_storeInput = (key, value) => { |
// Get country codes & flag of countries with respect to country codes | |
const fetch = require("node-fetch"); | |
const NEW_LINES = `\n\n`; | |
const EMOJIS = `${NEW_LINES}😀 😃 😄 😁 😆 😅 😂 🤣 ☺️ 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😜 😝 😛 🤑 🤗 🤓 😎 🤡 🤠 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣 😖 😫 😩 😤 😠 😡 😶 😐 😑 😯 😦 😧 😮 😲 😵 😳 😱 😨 😰 😢 😥 🤤 😭 😓 😪 😴 🙄 🤔 🤥 😬 🤐 🤢 🤧 😷 🤒 🤕 😈 👿 👹 👺 💩 👻 💀 ☠️ 👽 👾 🤖 🎃 😺 😸 😹 😻 😼${NEW_LINES}`; | |
const FIXER_URI = "https://api.fixer.io/latest"; | |
const REST_COUNTRIES_URI = "https://restcountries.eu/rest/v2/alpha/"; | |
const COUNTRY_URI = "http://country.io/currency.json"; | |
let currencyCodes = []; | |
let currencyOfCountry = []; | |
const flagsWithCurrencies = {}; |