Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DANser-freelancer/code_bits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

21 Commits

Repository files navigation

About

This is a repo of all the JavaScript things that I come up with.
Javascript might seem like a simpler or "lesser" language to some people, but I know it's rich in features, can be performant, and has many metaprogramming options.
This code is meant to do funny, complicated, silly, or cool things.
Consider this a free RnD project of one guy who wrote vanilla JavaScript for 6 years.

Upgrades are welcome too. Every branch has a copy of the permissive free licence.

Q&A

Why does this work?
A short explanation for most code bits would be:

  • almost everything in javascript is an object, one way or another.
  • .prototype chains are useful to globally alter behavior of objects (including primitives as they are boxed).
  • constructor.name, instanceof, name, and typeof can all be used in different scenarios to precisely determine what object you are dealing with.
  • JavaScript's heavy lean into flexibility allows me to do some metaprogramming using granular property control, some "magic methods", monkeypatching, code-as-data, and reflection.

AltStyle によって変換されたページ (->オリジナル) /