Skip to content

Instantly share code, notes, and snippets.

@think49
think49 / ReadMe.md
Last active September 13, 2021 13:20
const-map.js: 定義済みの `key` の `set()` した時にエラーを発生させる `new Map` 互換オブジェクトを生成します

const-map.js

概要

定義済みの keyset() した時にエラーを発生させる new Map 互換オブジェクトを生成します。

@think49
think49 / demo-1.0.2.html
Last active October 11, 2020 13:55
fired-event.js - GitHub gist
<!DOCTYPE html>
<title>fired-event.jsのデモ</title>
<style>
pre {
color: black;
background-color: #e9e9ff;
border: solid 1px #99f;
padding: 0.5em;
margin: 1em;
line-height: 1.2em;
@think49
think49 / [JavaScript] 独力で一からJavaScriptコードを書くには.md
Last active July 12, 2020 10:54
[JavaScript] 独力で一からJavaScriptコードを書くには.md - GitHub Gist

独力で一からJavaScriptコードを書くには?

概要

Q&Aサイトの頻出質問に以下があります。

「他人のコードを改変することなら出来るのですが、自分で一からコードを書くことが出来ません。どうすれば自分ひとりの力で書けるようになりますか。」

その回答を体系的にまとめたのが本記事になります。

@think49
think49 / count-down-0.1.0.js
Last active June 25, 2020 13:38
count-down.js
/**
* count-down.js
*
*
* @version 0.1.0
* @author think49
* @url https://gist.github.com/think49/10d745ebf9aef92b40e698af695f5d2c
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License)
*/
'use strict';
@think49
think49 / [JavaScript] ECMAScript 2019の文法をコードで理解する.md
Last active June 7, 2020 07:14
ECMAScript 2019の文法をコードで理解する

ECMAScript 2019の文法をコードで理解する

ECMAScript

概要

JavaScriptはECMAScriptというWeb標準仕様を実装されています。 本文書では主に、ECMAScriptを元にした解説を行います。

※「ECMAScript」を略して「ES」と表記する事があり、次のように省略されます。

@think49
think49 / ReadMe.md
Last active May 30, 2020 12:21
hover-table-col.js

hover-table-col.js

概要

tableの列指定で :hover 擬似クラスを使用する場合、:nth-col() 擬似クラスを使用したいところですが、2020/05/30現在、Webブラウザの実装が整っていない為、JavaScriptで代替します。

既知の仕様/問題点

必要最低限の実装しかしていませんので、適宜改修が必要です。

@think49
think49 / [JavaScript] オブジェクトとは.md
Created November 4, 2019 13:57
[JavaScript] オブジェクトとは.md

オブジェクトとは

概要

JavaScriptにおける「オブジェクト」という用語が意図する対象をパターン別にまとめます。

表現一覧

「オブジェクト」という用語が使われる対象は次の3つです。

@think49
think49 / readme.md
Last active November 2, 2019 15:32
replace-by-index.js: 指定したインデックス範囲の文字列を置換

replace-by-index.js

概要

下記を引数として、置換処理を実行します。

  • 置換元の開始インデックス
  • 置換元の文字数
  • 置換先文字列
@think49
think49 / parse-number-by-radix-1.0.0.js
Last active August 10, 2019 00:29
parse-number-by-radix.js: 十進数をN進法でパースし、各要素にN桁目の十進数値を格納した配列を返します
/**
* parse-number-by-radix.js
*
*
* @version 1.0.0
* @author think49
* @url https://gist.github.com/think49/011dffc5ebca34fd804d3baae6666f5a
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License)
*/
@think49
think49 / readme.md
Last active February 9, 2023 17:15
InputEvent#isComposing とIME有効/無効の検出