This file contains hidden or 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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"palette": { | |
"pink": "#f5c2e7", | |
"mauve": "#cba6f7", | |
"red": "#f38ba8", | |
"peach": "#fab387", | |
"maroon": "#eba0ac", | |
"green": "#a6e3a1", | |
"sapphire": "#74c7ec", |
This file contains hidden or 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
import fs from "node:fs/promises"; | |
/** | |
* read a csv file | |
* @param {string} filename - the name of the CSV file | |
* @param {string} delimiter - delimiter of the CSV file, defaults to ',' | |
* @returns Array<string[]> | |
* */ | |
export default async function parseCSV(filename, delimiter = ",") { | |
const result = await fs.readFile(filename, { encoding: "utf8" }); |
This file contains hidden or 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
// file tes vitest | |
import { it, expect, describe } from "vitest"; | |
import { tentukanDeretAritmetika } from "."; | |
describe("tentukanDeretAritmetika", () => { | |
it("barisan aritmetika harus terdiri dari dua angka atau lebih", () => { | |
expect(tentukanDeretAritmetika([1])).toBe(false); | |
}); | |
it("menentukan deret aritmetika dengan benar", () => { |