const ucFirst = (str: string) =>
str
.split("")
.map((v, i) => (i === 0 ? v.toUpperCase() : v))
.join("");
const lcFirst = (str: string) =>
str
.split("")
.map((v, i) => (i === 0 ? v.toLowerCase() : v))
This file contains 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
@Composable | |
fun TestPrefs() { | |
val (count, isLoading, setCount) = rememberIntPreferences("counter", 0) | |
Column { | |
Text("Current Count: ${if (isLoading) "loading" else count}") | |
Button(onClick = { setCount(count+1) }) { | |
Text("Increment by 1") | |
} | |
Button(onClick = { setCount(count-1) }) { |
import { Application, Router } from "https://deno.land/x/oak@v10.4.0/mod.ts";
const app = new Application();
const router = new Router();
// routes
router.get("/", ({ response }: { response: Response }) => {
const data = `<h3>Hello Deno</h3>`;
response.headers.set("content-type", "text/html");
const loadMode = (editor, filename: string) => {
if (!editor) return;
const CodeMirror = window.CodeMirror;
// @ts-ignore
window.CodeMirror.modeURL = scriptCfg.baseUrl + "mode/%N/%N.min.js";
var val = filename,
m: any[],
mode: string,
spec: string | CodeMirror.ModeSpec<CodeMirror.ModeSpecOptions>;
NewerOlder