ASafaeirad
440 subscribers
193 photos
13 videos
2 files
267 links
My personal works, which I hope you like. contact @S_Kill
Download Telegram
This AI Code Detector is too good
Try it out and let me know if you could get a false positive result.

https://www.span.app/detector

#ai #code #tools
๐Ÿ”ฅ3โšก1
TIL
There's a Node.JS util to strip ANSI escape codes

import { stripVTControlCharacters } from 'node:util';

const text = '\u001B[4mUnderlined\u001B[0m';
console.log(stripVTControlCharacters(text)); // "Underlined"


#nodejs #til
๐Ÿ‘1
TIL: Boolean coercion are different
Note: Unlike other type conversions like string coercion or number coercion,
boolean coercion does not attempt to convert objects to primitives by calling user methods.
โ€”MDN: Boolean: Boolean coercion

Read more

#til #ecmascript
โšก3๐Ÿ‘1
How to use AbortController

Read the Article

#abort #js
๐Ÿ‘4๐Ÿ”ฅ1
Bases
We have a new core plugin in Obsidian that can act as a database

https://help.obsidian.md/bases

#obsidian #news
๐Ÿ”ฅ8๐ŸŽ‰3
Chromium team is working on "Vertical Tabs" ๐ŸŽ‰

https://chromium-review.googlesource.com/c/chromium/src/+/7018894

#chrome #news
๐Ÿ‘5๐Ÿ‘Ž3๐ŸŽ‰1
Build excellent documentation your way.

https://fumadocs.dev/

#doc #tools
๐Ÿ‘4โšก1
TIL:
You can listen for attribute changes on a DOM element using a MutationObserver.
In my case, I needed to inspect a DOM element during a transient state that changed too quickly to catch manually.
Using DOM breakpoints wasn't helpful since the element was updated too frequently.
The solution was to use a MutationObserver to trigger specifically when a certain attribute changed.


const observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (
mutation.type === "attributes" &&
mutation.attributeName === "my-attribute") {
debugger;
}
});
});

observer.observe(element, { attributes: true });


#til
โค7๐Ÿ‘3๐Ÿ”ฅ1๐Ÿคฏ1
โšก4๐Ÿ”ฅ1๐ŸŽ‰1