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
<script setup> | |
import { ref, computed } from "vue"; | |
import ProductCard from "./components/ProductCard.vue"; | |
import { useFetch } from "./composables/useFetch"; | |
// loading products | |
const { data, loading } = useFetch( | |
"https://dummyjson.com/products?limit=10000" | |
); | |
const products = computed(() => data.value?.products || []); |
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
{ | |
"tables": [ | |
{ | |
"id": "62757cc0e3b8400009599e54", | |
"name": "Boards", | |
"displayName": "boards", | |
"isSystem": false, | |
"fields": [ | |
{ | |
"id": "62757cc0e3b8400009599e5e", |
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
dynamic-link-screenshare |
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
amiralizadeh9480.laravel-extra-intellisense | |
antfu.iconify | |
apollographql.vscode-apollo | |
atlassian.atlascode | |
be5invis.toml | |
bierner.markdown-preview-github-styles | |
bradlc.vscode-tailwindcss | |
buenon.scratchpads | |
csstools.postcss | |
dbaeumer.vscode-eslint |
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
{ | |
"Vue defineEmits":{ | |
"prefix": "defineEmits", | |
"body" : [ | |
"defineEmits<{", | |
" (e: \"${1:event}\", ${2:payload}: { $3 }): void;", | |
"}>();", | |
], | |
"description": "defineEmits type declaration for Vue.js components" | |
}, |
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
{ | |
"Pinia Store Boilerplate": { | |
"prefix": "pinia", | |
"body": [ | |
"import { defineStore, acceptHMRUpdate } from \"pinia\";", | |
"", | |
"export const use$TM_FILENAME_BASE = defineStore(\"$TM_FILENAME_BASE\", {", | |
" state: () => {", | |
" return {", | |
" $0", |
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
{ | |
"css.validate": false, | |
"tailwindCSS.emmetCompletions": true, | |
"workbench.colorTheme": "Material Theme Darker High Contrast", | |
"git.autofetch": true, | |
"editor.fontSize": 14, | |
"editor.fontFamily": "JetBrains Mono", | |
"editor.fontLigatures": true, | |
// "eslint.format.enable": true, | |
// "editor.formatOnSaveMode": "modifications", |
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 Cache from '~/helper/Cache' | |
describe('Cache class', ()=>{ | |
test('get method retrieves items from the cache', ()=>{ | |
const cache = new Cache() | |
cache.put('hello', 'world') | |
expect(cache.get('hello')).toBe('world') | |
}) | |
test('put method adds items to the cache', ()=>{ | |
(new Cache).put('hello', 'world') |
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
/** | |
* docs: /docs/cache.md | |
*/ | |
import LZUTF8 from 'lzutf8' | |
window.LZUTF8 = LZUTF8 | |
let cache = { 'default': {} } | |
try{ | |
cache = JSON.parse( LZUTF8.decompress(localStorage.getItem('app_cache'), {inputEncoding: 'StorageBinaryString'}) ) | |
Object.keys(cache).forEach(groupName =>{ |
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 {ucFirst, snakeCase, camelCase, sentenceCase, ucWords, titleCase, nestedFromDot} from '~/helper/string' | |
describe('string helper functions', ()=>{ | |
test('ucFirst capitalizes the first letter in a string', ()=>{ | |
expect(ucFirst('hello world')).toBe('Hello world') | |
}) | |
test('ucWords capitalizes the first letter in each word of a string', ()=>{ | |
expect(ucWords('hello world')).toBe('Hello World') | |
}) |