This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | |
import React from 'react' | |
import type { Meta, StoryObj } from '@storybook/react' | |
import { Example } from './Example' | |
const meta: Meta<typeof Example> = { | |
title: 'Example', | |
component: Example, | |
tags: ['autodocs'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.append = function( ) { | |
var element = this.get(0); | |
var appending = arguments[0]; | |
if( appending.charAt(0) === "<" ){ | |
throw Error("This appears to be a dom element represented as a string. Please create the element then append"); | |
} else{ | |
// Wonder if there is a better way to do this | |
element.innerHTML = element.innerHTML + appending; | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(root){ | |
'use strict'; | |
/** | |
* Determine if an object is viable according to specifications given or the defaults provided | |
* @param value The object to evaluate for viability | |
* @param options (optional) The options for changing the viability criteria. If an array is provided then it is assumed to be the property "nonViables" Possible options: | |
* nonViables An array of properties and functions that describe the value as being nonviable. These will be added to the default nonviables | |
* defaultNonViables An array of the default nonviables. These will override the functions default nonviables. | |
* originally developed at: http://jsfiddle.net/johntimothybailey/6UUD5/ | |
* @contribution: RJ Regenold (https://gist.github.com/4927b3ba864d86209f7e). "The reduce idea and implementation is super clean" - John of the Bailey's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.mixin({ | |
/** | |
* Convenience for simplifying scoping methods workaround in javascript for a given context | |
* @param context The context where the methods are found | |
* @param exclude An array of method names (strings) to exclude in the binding | |
*/ | |
bindMethods: function(context,exclude){ | |
exclude = exclude || []; | |
_.bindAll.apply(context, [context].concat(_.difference(_.methods(context),exclude))); | |
return context; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.mixin({ | |
/** | |
* Logs method invocation of a provided instance | |
* | |
* @param target Currently must be an instance | |
* @param options Possible options are as follows | |
* prefix - A prefix String for the logging (e.g. "Person instance") | |
* logMethod - The function to use for doing the logging (default: console.log) | |
*/ | |
logMethodInvocation : function(target,options) { |