// from the flitter/di project - src/Container.js/** * @module flitter-di/src/Container */const MissingContainerDefinitionError = require('./MissingContainerDefinitionError')/** Manages service definitions, instances, and deferred injection. */class Container {  static TYPE_INJECTABLE = Symbol('injectable')  static TYPE_SINGLETON = Symbol('singleton')  /**   * Instantiates the container.   * @param {object} definitions - mapping of service name to static service CLASS definition   */  constructor(definitions = {}) {    const def_map = {}    for ( const def_name in definitions ) {      if ( !definitions.hasOwnProperty(def_name) ) continue      def_map[def_name] = {        type: this.constructor.TYPE_INJECTABLE,        ref: definitions[def_name]      }    }    /**     * Static IoC item definitions from which instances are created or     * singleton values are returned when the items are requested.     * Should be mapping of item_name -> {type: Symbol, ref: *}.     * definition pairs.     * @type {object}     */    this.definitions = def_map    /**     * Instantiated services. If a service has already been requested, it is     * stored here so that the single instance can be reused.     * @type {object}     */    this.instances = {}    /**     * Already injected static service definitions. These are used to resolve     * circular dependencies.     * @type {object}     */    this.statics = {}    /**     * Instance of the dependency injector this container is associated with.     * If this is specified, services will be injected with other services when     * they are instantiated.     * @type {boolean|module:flitter-di/src/DependencyInjector~DependencyInjector}     */    this.di = false    /**     * Array of static class definitions with deferred services. These static     * definitions are waiting for a service to be registered with this container// from the flitter/di project - src/Container.js/** * @module flitter-di/src/Container */const MissingContainerDefinitionError = require('./MissingContainerDefinitionError')/** Manages service definitions, instances, and deferred injection. */class Container {  static TYPE_INJECTABLE = Symbol('injectable')  static TYPE_SINGLETON = Symbol('singleton')  /**   * Instantiates the container.   * @param {object} definitions - mapping of service name to static service CLASS definition   */  constructor(definitions = {}) {    const def_map = {}    for ( const def_name in definitions ) {      if ( !definitions.hasOwnProperty(def_name) ) continue      def_map[def_name] = {        type: this.constructor.TYPE_INJECTABLE,        ref: definitions[def_name]      }    }    /**     * Static IoC item definitions from which instances are created or     * singleton values are returned when the items are requested.     * Should be mapping of item_name -> {type: Symbol, ref: *}.     * definition pairs.     * @type {object}     */    this.definitions = def_map    /**     * Instantiated services. If a service has already been requested, it is     * stored here so that the single instance can be reused.     * @type {object}     */    this.instances = {}    /**     * Already injected static service definitions. These are used to resolve     * circular dependencies.     * @type {object}     */    this.statics = {}    /**     * Instance of the dependency injector this container is associated with.     * If this is specified, services will be injected with other services when     * they are instantiated.     * @type {boolean|module:flitter-di/src/DependencyInjector~DependencyInjector}     */    this.di = false    /**     * Array of static class definitions with deferred services. These static     * definitions are waiting for a service to be registered with this container// from the flitter/di project - src/Container.js/** * @module flitter-di/src/Container */const MissingContainerDefinitionError = require('./MissingContainerDefinitionError')/** Manages service definitions, instances, and deferred injection. */class Container {  static TYPE_INJECTABLE = Symbol('injectable')  static TYPE_SINGLETON = Symbol('singleton')  /**   * Instantiates the container.   * @param {object} definitions - mapping of service name to static service CLASS definition   */  constructor(definitions = {}) {    const def_map = {}    for ( const def_name in definitions ) {      if ( !definitions.hasOwnProperty(def_name) ) continue      def_map[def_name] = {        type: this.constructor.TYPE_INJECTABLE,        ref: definitions[def_name]      }    }    /**     * Static IoC item definitions from which instances are created or     * singleton values are returned when the items are requested.     * Should be mapping of item_name -> {type: Symbol, ref: *}.     * definition pairs.     * @type {object}     */    this.definitions = def_map    /**     * Instantiated services. If a service has already been requested, it is     * stored here so that the single instance can be reused.     * @type {object}     */    this.instances = {}    /**     * Already injected static service definitions. These are used to resolve     * circular dependencies.     * @type {object}     */    this.statics = {}    /**     * Instance of the dependency injector this container is associated with.     * If this is specified, services will be injected with other services when     * they are instantiated.     * @type {boolean|module:flitter-di/src/DependencyInjector~DependencyInjector}     */    this.di = false    /**     * Array of static class definitions with deferred services. These static     * definitions are waiting for a service to be registered with this container

Hi, there.

My name is Garrett.

I'm a speaker, developer, and designer.

Hi, there.

My name is Garrett.

I'm a speaker, developer, and designer.

about me

Hi! My name is Garrett. Welcome to my little corner of the internet. I'm a self-taught developer and tech-nerd. I create software that I hope makes people's lives better. I created the Flitter web framework, and a couple other fun projects. I love to communicate my work, and help others pursue their projects, which is why I've got a long history of sharing about my passion. I write blog posts, create video tutorials, hold talks, and publish code from my projects in the hope that others will find it useful.

A bit more background: I grew up in the rural mid-west, so I taught myself everything I know. I'm a big fan of learning to code this way. I'm currently studying computer science at the University of Kansas.

about me

Hi! My name is Garrett. Welcome to my little corner of the internet. I'm a self-taught developer and tech-nerd. I create software that I hope makes people's lives better. I created the Flitter web framework, and a couple other fun projects. I love to communicate my work, and help others pursue their projects, which is why I've got a long history of sharing about my passion. I write blog posts, create video tutorials, hold talks, and publish code from my projects in the hope that others will find it useful.

A bit more background: I grew up in the rural mid-west, so I taught myself everything I know. I'm a big fan of learning to code this way. I'm currently studying computer science at the University of Kansas.

get in touch

I'd love to hear from you if you have questions or inquiries related to me or my projects. You can get in touch by text, e-mail, or using this form. I also tweet sometimes, and share thoughts on my blog.

E-Mail: shout@garrettmills.dev
Phone: (913) 730-7124

I'd love to hear from you if you have questions or inquiries related to me or my projects. You can get in touch by text, e-mail, or using this form. I also tweet sometimes, and share thoughts on my blog.

E-Mail: shout@garrettmills.dev
Phone: (913) 730-7124

what I've been up to

Blog Post

Blog Post

How to Code From Home Like a Boss

With the current need to work from home, I've put together a list of tricks and tools I use to do my work as a software developer remotely, and discuss the challenges. Here's what I use.

7/23/2020, 4:15:49 AM

Code Release

Code Release

Feed Page, RSS, & Atom - Minor Website Updates I recently made some tweaks to my website. I added a dedicated page as a historical archive for these updates.

I also added the ability to subscribe to this feed using RSS, Atom, and JSON thanks to a handy NPM package.

5/8/2020, 7:30:33 PM

Code Release

Code Release

VuES6 - ES6 Vue.js Components, in Plain JavaScript

I recently released a small utility library for defining Vue components as proper ES6 classes, but in vanilla JavaScript. I like to use this in small projects where I don't want to have to set up vue-cli and compile templates. More info here.

4/22/2020, 6:17:15 PM

Side Project

Side Project

Connect-4 Webtoy

I've built a simple Connect-4 webtoy as a project for EECS 368 at the University of Kansas. You can play with it here.

4/8/2020, 9:20:25 AM

Blog Post

Blog Post

Code Freedom with Gitea & Drone - Part I

In my never-ending quest to self-host all the things, I've deployed a combination of Gitea and Drone CI for a feature-for-feature, self-hosted alternative to GitHub. Here's how.

3/6/2020, 11:10:49 PM

HackKU 2020

HackKU 2020

Noded - Free-Form Notes & Databases

I recently attended the annual University of Kansas hackathon, where me and a couple friends built Noded.

Noded is a tree-based note taking app based on reusable page elements. It provides support for basic notes, uploaded files, a built-in code editor, customizable databases, static website exports, and sub-tree sharing. Check it out here.

2/24/2020, 7:28:06 PM

Garrett Mills
Copyright © 2020 Garrett Mills