Skip to content

Instantly share code, notes, and snippets.

View intoxopox's full-sized avatar

David Hamiter intoxopox

  • Columbia, SC - USA
View GitHub Profile
@intoxopox
intoxopox / GrammarUtil.ts
Last active October 16, 2018 02:12
Handy Grammar functions
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
'use strict';
/**
* @author David Hamiter
* Static class for grammar checking
*/
abstract class GrammarUtil {
@intoxopox
intoxopox / ObjectUtil.ts
Last active May 11, 2021 22:31
ObjectUtil - Handy Object functions
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
'use strict';
/**
* @author David Hamiter
* Static class for advanced Object manipulation, searching, comparison, etc.
*/
@intoxopox
intoxopox / DateUtil.ts
Last active October 12, 2018 17:14
DateUtil - Handy Date functions
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
'use strict';
abstract class DateUtil {
//----------------------------------------------------------------------
//
// Properties
//
@intoxopox
intoxopox / BaseController.ts
Last active October 12, 2018 17:14
BaseController - Controller base class that uses DeepProxy for data binding and callbacks.
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
'use strict';
import DeepProxy, { DeepProxyCallback } from "./DeepProxy";
export default abstract class BaseController<TModel extends object>
{
//----------------------------------------------------------------------
@intoxopox
intoxopox / ValueObj.ts
Last active October 12, 2018 17:14
ValueObj - Simple class for storing data values of any type
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
export default class ValueObj<T = any>
{
//----------------------------------------------------------------------
//
// Properties
//
@intoxopox
intoxopox / MathUtil.ts
Last active October 16, 2018 02:08
MathUtil - Handy math functions
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
'use strict';
/**
* @author David Hamiter
* Static class for math beyond built-in Math class or replacing existing Math class methods with faster implementations.
*/
export default abstract class MathUtil {
@intoxopox
intoxopox / DeepProxy.ts
Last active October 12, 2018 17:15
DeepProxy - Proxy wrapper with settable callbacks capable of safely wrapping deep-nested structures without re-wrapping already proxied objects.
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
////////////////////////////////////////////////////////////////////////////////
export type DeepProxyCallback = (prop?:PropertyKey | string[], newVal?:any) => any;
export default class DeepProxy<T extends object>
{
//----------------------------------------------------------------------
//
@intoxopox
intoxopox / FiStMa.ts
Last active October 13, 2022 19:56
FiStMa - Finite State Machine with settable callback stacks for onEnter, onExit, and onInvalidTransition.
////////////////////////////////////////////////////////////////////////////////
// Copyright(C) 2018 David Hamiter
// Updated 10/13/2022
////////////////////////////////////////////////////////////////////////////////
'use strict';
export default class FiStMa<T>
{
//----------------------------------------------------------------------