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
{"version":1,"resource":"file:///Users/takeshi.kano/git/coedo/src/modules/doctor-consulting/service/doctor-consulting-membership-usage.service.ts","entries":[{"id":"nb4m.ts","source":"Workspace Edit","timestamp":1736395193082},{"id":"oH3Z.ts","timestamp":1736395439625},{"id":"udVJ.ts","source":"Workspace Edit","timestamp":1736395451934}]} |
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
{"version":1,"resource":"file:///Users/takeshi.kano/git/coedo/src/modules/doctor-consulting/service/doctor-consulting-membership-usage.service.ts","entries":[{"id":"nb4m.ts","source":"Workspace Edit","timestamp":1736395193082},{"id":"oH3Z.ts","timestamp":1736395439625},{"id":"udVJ.ts","source":"Workspace Edit","timestamp":1736395451934}]} |
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
/** | |
* Math.clamp() | |
*/ | |
export const mathClamp = (x: number, lower: number, upper: number): number => { | |
return Math.min(Math.max(x, lower), upper) | |
} |
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 { validateDate } from "./validateDate"; | |
describe("有効な日付のテスト", () => { | |
it.each(["2021/01/01", "2021/12/31", "2021/02/01", "2000/02/29"])( | |
"%sは正しい日付である", | |
(date) => { | |
expect(validateDate(date, "YYYY/MM/DD")).toBe(true); | |
} | |
); |
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
describe("describe 1", () => { | |
beforeEach(() => { | |
console.log("before each 1"); | |
}); | |
describe("describe 2", () => { | |
beforeEach(() => { | |
console.log("before each 2"); | |
}); | |
it("test1", () => {}); |
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
const myArray = [ | |
{ name: 'ギータ', age: 32 }, | |
{ name: 'マッチ', age: 37 }, | |
{ name: 'ケイゾー', age: 37 }, | |
{ name: '高谷', age: 39 }, | |
]; | |
// myArrayから、ageが37の最後の要素を探し、名前を取得 | |
const targetName = myArray.findLast(member => { | |
return member.age === 37; |
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
// this sample can be run with: $ node myTest.mjs | |
console.log("こんにちは"); | |
await new Promise(resolve => { | |
setTimeout(() => { | |
console.log("2秒経ちました"); | |
resolve(); | |
}, 2000); | |
}); |
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
class MyClass { | |
// public field | |
foo = "public field: 寿司"; | |
// private field | |
#bar = "private field: ラーメン"; | |
// public static field | |
static qux = "public static field: うどん"; | |
// private static field | |
static #corge = "private static field: 麻婆豆腐"; |
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
const parseOgImage = (htmlString: string): string | null => { | |
return htmlString.match(/property="og:image" content="(?<ogimage>.*)"/iu) | |
?.groups.ogimage ?? null; | |
}; |
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
class Fukuoka { | |
get #ramen() { | |
return "ラーメン"; | |
} | |
#sayHello() { | |
console.log(`${this.#ramen}はえらい美味しかばい`); | |
} | |
constructor() { |
NewerOlder