I hereby claim:
- I am beefchimi on github.
- I am beefchimi (https://keybase.io/beefchimi) on keybase.
- I have a public key ASD-9ql1dWCrJ0VJC2QuGL3siIhw0LpAhjCvyQA01wsccwo
To claim this, I am signing this object:
/// | |
/// Helper function simply for sorting alphabetically | |
function sortObjectAlphabetically(obj) { | |
const keys = Object.keys(obj); | |
const sorted = keys.sort((a, b) => { | |
if (a < b) return -1; | |
if (a > b) return 1; | |
return 0; |
import type { TransformProperties } from 'framer-motion/types/motion/types'; | |
// These functions would not be necessary if `framer-motion` | |
// resets `transform` back to `none` when a `translate` value === `0`. | |
function hasScale(scale: TransformProperties['scale']) { | |
return scale !== 1 && scale !== undefined; | |
} | |
function hasTranslateX(translateX: TransformProperties['scale']) { |
devices: ({ | |
name: "Wireless Mouse MX Master 2S"; | |
smartshift: { | |
on: true; | |
threshold: 50; | |
}; | |
hiresscroll: { | |
hires: true; | |
invert: false; |
I hereby claim:
To claim this, I am signing this object:
const items = [1, 2, 3, 4, 5]; | |
/* Example when we return only a string value. */ | |
const concatString = items.reduce((string, item) => `${string}${item},`, ""); | |
/* Example when we return the first odd number. */ | |
const firstOddValue = items.reduce((value, item) => { | |
if (value == null && item % 2 === 0) { | |
return item; | |
} |
export const regExpCommonCharacters = new RegExp(/[^\w]/gim); | |
const INDEX_DELIMITER = '-'; | |
const MAX_CHARACTER_LENGTH = 100; | |
export function formatReactKey(key: string, index: number | null = null) { | |
const hasIndex = index || index === 0; | |
const transformedKey = [ | |
...key |
import SoundFx from '../../SoundFx'; | |
export default function ExtensibleFeature() { | |
const target = document.getElementById('ExtensibleFeature'); | |
target.addEventListener('mouseenter', () => { | |
SoundFx.Extensible.play(); | |
}); | |
target.addEventListener('mouseleave', () => { |
speed(speed = 1) { | |
// Ramp up faster when increasing speed, slower if decreasing | |
const duration = (speed > 1) ? durationRamp.up : durationRamp.down; | |
for (let i = 0; i < this.trackCount; i++) { | |
this.sources[`source${i}`].playbackRate.exponentialRampToValueAtTime( | |
speed, | |
this.context.currentTime + duration | |
); | |
} |
import SoundFx from '../../SoundFx'; | |
export default function AccessibleFeature() { | |
const target = document.getElementById('AccessibleFeature'); | |
target.addEventListener('mouseenter', () => { | |
SoundFx.Accessible.play(); | |
}); | |
target.addEventListener('mouseleave', () => { |
import fetchAudioBuffer from './helpers/fetch-audio-buffer'; | |
const zeroGain = 0.001; | |
const maxGain = 0.6; | |
const durationRamp = { | |
up: 0.2, | |
down: 0.3, | |
}; |