You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
JavaScriptでは任意の値を例外としてthrowすることができますが、実際にはErrorのインスタンスをthrowするのが慣例です。 エラーの原因をより正確に説明したいときはErrorを継承するのが望ましいですが、単に継承するのではなく以下のように書くのがオススメです。 class MyError extends Error { static { this.prototype.name = "MyError"; } }その背景について以下で説明します。テーマは以下の3つです。 nameプロパティcaptureStackTracecauseプロパティnameを正しくセットするNode.jsでエラーを表示させると、クラス名が正しく表示されます。 > throw new (class C extends Error {})() Uncaught C [Error]ここで出力されている "C
株式会社High LinkのCTOをやっている nogaken (@nogaken1107)です。 最近はChatGPTなどのLLM系のアプリケーションを触って楽しんでいます。 ハイリンクでは「カラリア 香りの定期便」などのサービスを開発しています。 「カラリア 香りの定期便」は2021年まで、フレームワークとしてはRuby on Rails (以下Rails)単体で書かれていましたが、デザインリニューアルと合わせて2021年前半から1年間強の時間をかけてフロントエンドをNext.jsにリプレースしました。 結果として開発体験が向上し、気軽に実装できるデザインの幅が広がり、エンジニアの採用面でもメリットが得られました。 この記事では、カラリアのフロントエンドリプレースの背景、技術選定、リプレースのフロー、課題と、リプレース全体の振り返りについて紹介します。 現在、RailsでWebアプリケ
import { serialize } from 'seroval'; const object = { number: [Math.random(), -0, NaN, Infinity, -Infinity], string: ['hello world', '<script>Hello World</script>'], boolean: [true, false], null: null, undefined: undefined, bigint: 9007199254740991n, array: [,,,], // holes regexp: /[a-z0-9]+/i, date: new Date(), map: new Map([['hello', 'world']]), set: new Set(['hello', 'world']), }; // self cycli
ES modules are a modern way to include and reuse JavaScript code in web applications. They are supported by modern browsers and provide several benefits over older, non-modular approaches to JavaScript development. A modern way to use ES modules is with the <script type="importmap"> tag. This tag allows you to define a mapping of external module names to their corresponding URLs, which makes it ea
JSON support, import sorting via CLI, better configuration, new lint rules and more. The Rome team is happy to announce Rome version 12. This new version brings JSON support, new lint rules, import sorting and more! You can upgrade Rome by running the following command: npm install --save-dev --save-exact rome@12.0.0 pnpm update --save-exact rome@12.0.0 yarn upgrade --exact rome@12.0.0Or install t
Browser support The origin private file system is supported by modern browsers and is standardized by the Web Hypertext Application Technology Working Group (WHATWG) in the File System Living Standard. Motivation When you think of files on your computer, you probably think about a file hierarchy: files organized in folders that you can explore with your operating system's file explorer. For exampl
無限に広がる青い空!セキュアスカイ!CTOはせがわです! 最近ようやくオンサイトでの登壇も増えてきたのですが、この数年すっかりオンライン慣れしすぎてしまって、いざオンサイトで登壇となると色々勘所が鈍ってしまったと感じることも少なくありません。特に、Zoom等を使う場合には常に目の前に投影する画面があるのが当たり前すぎて、オンサイトの講演でデモを実演しようという段階になって演台からスクリーンが見えにくい配置なのでうまく操作ができないということに気づき、焦ってしどろもどろになってしまうという失態もありました*1。 そこで、オンサイトでの登壇で少しでもそのような状況を改善するためのツールを作ってみました! 任意のアプリケーションのウィンドウを複製表示、拡大表示するツール 作ったツールは、「任意のアプリケーションウィンドウ(またはデスクトップ全体)を複製表示し、その表示サイズを自由に変えられる」と
V8 Torque is a language that allows developers contributing to the V8 project to express changes in the VM by focusing on the intent of their changes to the VM, rather than preoccupying themselves with unrelated implementation details. The language was designed to be simple enough to make it easy to directly translate the ECMAScript specification into an implementation in V8, but powerful enough t
ページ数: 350ページ 電子版フォーマット: PDF 製本版: B5変形・モノクロ 発売日: 2023年3月24日 テスト未経験から中上級者へのガイドライン この本の序文を読む Jest はオールインワンのテストフレームワークです。JavaScript では、以前はテスト環境をセットアップするために、テストランナー、アサーションライブラリ、モックライブラリといくつかのライブラリを組み合わせる必要がありました。しかし、Jest は最初から単体テストを実行するために必要な機能がすべて含まれているため、Jest をインストールするだけでテストを書き始めることができます。 最近では、Node.js にもv18 からテストランナーやアサーションがビルトインの機能として追加されたり、Vitest という新しいテストフレームワークも誕生していたりします。しかし、Jest は既に機能が安定しており、情報
A full-stack toolkit for Cloudflare Workers. The best parts of D1, R2, Queues, and more—all in one place.
The Shawshank Redemption is a true masterpiece of cinema, a movie that deserves every bit of its status as one of the greatest films ever made. From its stellar performances to its unforgettable storytelling, everything about this film is a testament to the power of great filmmaking. Hugging Face is a technology company that was founded in 2016 by Clément Delangue, Julien Chaumond, and Thomas Wolf
MiniSearch is a tiny but powerful in-memory fulltext search engine written in JavaScript. It is respectful of resources, and it can comfortably run both in Node and in the browser. Try out the demo application. Find the complete documentation and API reference here, and more background about MiniSearch, including a comparison with other similar libraries, in this blog post. MiniSearch follows sema
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く