Skip to content

Tag: javascript

split multiple active class every 5 second and loop

How to split all code working together at the same time, with unlimited different classes and loop in animated class. Code is like this but i want to make it run at the same time, and put it with unlimited of animated class. Answer There are number of ways for doing this but basically you need to handle each …

Type json in React components

I have a dynamic json, for example: And I created interface for this: I have two components: But this return me error: Type “IResult” is not assignable to type ‘string’. in line: <SecondComponent result={result}> What I’m doing wrong? Answer When you pass arguments to a com…

Add Line Bookmarks to Monaco-Editor

Is there any way to bookmark a line in Monaco-editor, similar to VSCode bookmarks? It seems there is no such built-in feature. If so, how can I show a marker in front of a line? Something like a breakpoint will also be acceptable. Answer I found a solution below for anyone who later needs this functionality. …

Search for regex terms independent of symbol

So I have this string right here, it’s a registration number: 12.325.767/0001-90 And I want to create a regex when I type “23”, return for me the “2.3” or if I type “700”, return for me “7/00” or if I type “19”, return “1-9”. So, I …