Skip to content

Instantly share code, notes, and snippets.

View HasanHuseyinDemir's full-sized avatar
👋
Hello There !

Hasan Demir HasanHuseyinDemir

👋
Hello There !
View GitHub Profile
@HasanHuseyinDemir
HasanHuseyinDemir / proxyReturner.js
Last active September 12, 2023 19:18
Proxy Returner
function createProxy(obj) {
return new Proxy(obj, {
get(target, key) {
//Callback
return target[key];
},
set(target, key, value) {
//Callback
target[key] = value;
return true
@HasanHuseyinDemir
HasanHuseyinDemir / RandomKeyGenerator.js
Last active September 9, 2023 20:36
Random Key Generator
const RandomKeyGenerator=()=>{
let arr="";
const chars="abcdefghijklmnoprstuxvyz_".split("");
for(var i=0;i<=9;i++){
arr=arr+chars[Math.floor(Math.random() * (24))]
}
return arr;
}
//Outputs:
//rzpdupkpmz
@HasanHuseyinDemir
HasanHuseyinDemir / namer.js
Last active September 9, 2023 20:37
JSX Element Namer for Template Literals , used it in frameworks I wrote
const namer=(item)=>{
let data = item;
let last="/>";
let first="<";
let count=data.split(last).length-1;
let counted =0;
while(count>counted){
let lastplac=data.search(last)-1;
let i=0;
let deval="";