# script
-
JavaScript _ 2026-01-05
Streaming JSON in just 200 lines of JavaScript
I was continueing my exploration of React server components when I stumbled upon on this article about progressive JSON. Dan Abramov describes a technique for streaming JSON from a server to a client in chunks, allowing the client to start rendering parts of the data before the entire payload has been received. This can significantly improve perceived performance, especially for large datasets. So, I started wondering how much of an effort it would be to implement something like that. It turned out a fun exercise, and I ended up with a small (200loc) library called Streamson. So, this post is about how I built it.
-
JavaScript _ 2025-08-29
React Server Components support without a framework
I was at ReactSummit this June and spoke with some folks from Vercel about Next.js and RSC support outside of the framework. I really wanted to try all the cool stuff but couldnβt afford to migrate my massive apps to Next.js. The conclusion was clear: itβs difficult to start using RSC without a framework.
βHold my πΊ,β I said to myself, and started exploring. Iβll admitβit wasnβt easy. But three months later, I have a solution: meet Forket. Itβs a tool that splits your code into client and server versions, so you can run React Server Components without a framework.
-
Inspiration _ 2025-06-05
Speaking at WebExpo #2
This is my second year at WebExpo. I thought that after the first one, it couldnβt get any better β but the awesome team behind the event proved me wrong. Two days of inspiring talks and one day of workshop for me. Everything was perfectly planned and executed for both speakers and attendees.
-
JavaScript _ 2024-06-02
Generate QR code on your machine using Node.js
I spoke at an event last week, and on the very last slide, I had a QR code that was supposed to lead people to my contacts page. Well, it didn't. I used a service for "free" QR code generation, and the link expired. So, I learned my lesson and came up with a line that generates whatever code I need right into my terminal.
-
JavaScript _ 2024-02-11
Reactive UI in 10 lines of code
Reactivity became de-factor a standard in the last couple of years. All the major frameworks have some reactivity model implemented. One of the biggest even has the name React. In this article, we'll see how to write a simple reactive UI with just a few lines of JavaScript.
-
JavaScript _ 2023-09-16
Write your own progress indicator with vanilla JavaScript
Many moons ago, I was writing a lot of Flash applications. One thing was typical, and that was a progress indication of something that we were downloading. The loaded bytes of the Flash file (.swf) itself and later of some other resource the application needs. Once I started writing everything in JavaScript, this feature disappeared. In this post, we'll see how to implement it with vanilla JavaScript.
-
JavaScript _ 2023-08-07
I've made an Express.js based source viewer
It's unsurprising that we all use Express.js when we need a web server. In this article, I'll show you how I built a source viewer. It's distributed as a npm package view-source and it could render the content of a directory in a nice tree-view style.
-
JavaScript _ 2023-07-03
q2m - a library for translating URL params to MongoDB query
I'm not open-sourcing very often anymore, but recently I finished developing a small tool called q2m that I believe is worth sharing. It's a library designed to convert URL parameters into MongoDB queries, which I needed for my latest project, a little SaaS called Lumina CMS.
-
JavaScript _ 2023-01-14
AI driven open source library for measuring your web page carbon footprint
Some people say that 2023 will be the year of AI. With tools like ChatGPT and DALLΒ·E the world is definitely changing. There are different opinions on how such instruments will affect the everyday tasks of the professionals. My two cents (for now) are that those are just tools to achieve what we want quicker and more efficiently. Who knows, someday I may call myself a "prompt engineer". For the time being, though, I'm still writing a lot of stuff alone and occasionally ask ChatGPT for help.
-
JavaScript _ 2022-11-15
Anchor links pointing to a fragment fires History API's "popstate" event
I hit an interesting "bug" while working on a SPA application. Clicking an anchor link that points to a fragment on the page fires the History API's
popstateevent. This triggers some logic on my end, which was not my intent. I fixed that with a bit of JavaScript, and I had to share the snippet. -
JavaScript _ 2022-10-30
Using web dev skills to test web dev skills
Last year or so, I worked on a platform where I would publish video courses. The first one is on web fundamentals (in Bulgarian), and it's almost ready. You can check it out here. But this article is not about that. It's about a platform feature I built - an in-house validator to exercise the gained HTML, CSS, and JavaScript knowledge. After each lesson, I give a task to the students, and they can work on it right in the browser. The small application became an inspiration for another project - iloveweb.dev. So, I decided to share how the validation works.
-
JavaScript _ 2022-04-04
Taking Wordle to the next level (case study)
I'm sure you know what Wordle is. The game got a lot of traction a couple of months ago when The New York Times bought it. I was playing it too, so I decided to create my version in my native language (Bulgarian). This is how duma.fun was born (in Bulgarian duma means word). And as usually happens with my "little" experiments, I didn't stop at just implementing the basics. I managed to translate the initial ~300 lines of code into a three months-long project. Here's why, what, and how.
-
JavaScript _ 2022-03-06
The tiniest presentation framework
I did roughly 50 talks over the years, and for almost all of them, I used Reveal.js. I like it because it's HTML-based. I have complete control of everything and can easily publish the slides online. However, one thing bugs me every single time - the size of my content. I want to use all the available space. This becomes very important when I'm showing code to people. That's why I wrote SimPre. It's a 10KB HTML presentation framework that properly scales and positions my content.
-
JavaScript _ 2021-03-08
Using JavaScript module system for state management
Hot topic last couple of years is state management. Especially in the front-end apps. There are lots of problems and lots of solutions. One thing thought is totally ignored in this context - the JavaScript module system. I'm very often reaching out to this approach and decided to share it here.
-
JavaScript _ 2021-01-14
Transpile to ES modules with Babel
While I was working on Navigo an issue popped out. It was about using the library in the context of Web Dev Server where we have everything in TypeScript. And something was not ok with Navigo. The npm package wasn't exported properly and we were keep getting a
does not provide an export named 'default'error. It turned out the problem is that Navigo is not exported properly as ES module (also known as ESM). -
JavaScript _ 2020-09-13
What the heck is Google Tag Manager and what it has to do with Google Analytics
Just recently I had to do changes in Google Tag Manager at work. It's interesting how I keep forgetting how everything works. So I finally decided to sit down and write an article about these things. If nothing else I will have a good memory snapshot to remind me what is what.
-
JavaScript _ 2020-09-12
You Really Don't Need All That JavaScript, I Promise by Stuart Langridge
JavaScript is your behavior layer; the way to add interactivity to your sites, to provide a slick and delightful user experience, to make everything fast and easy and clean. But at some point everything changed: the tail started to wag the dog instead and development became JavaScript-first.
-
JavaScript _ 2020-07-12
Recreating Facebook's Recoil library
This weekend I decided to play with the new kid on the block - Facebook's Recoil library for managing state. I did the trivial counter example to see how it works. It's pretty simple idea so I wondered how much it takes to replicate its features. I found the exact answer - 70 lines of code. Obviously, my implementation didn't cover everything but it was fun so I decided to share my findings.
(A side note: I did not look at the code of Recoil. I didn't want to be bias on how to write my version.)
-
JavaScript _ 2020-03-11
Pairify - how to match balanced string pairs
I'm now actively working on a VSCode extension. I started it as a theme but then decided to add some more features. Like for example a tin line on the left side of the editor marking the current function scope. In order to do that I had to analyze the current file's code and find the lines that are included in that scope. The obvious approach will be to translate the code to AST and then traverse the tree finding the information that I need. This however will require the usage of a language server which now I don't want to deal with. So I decided to explore a brute force approach. Looping over the string characters and finding balanced matches. I quickly wrapped it into a library. I called it Pairify. It consumes text and returns an array of pairs. This blog post will show you how it works.
-
JavaScript _ 2020-02-27
From 0 to 100 GitHub stars in a week
2020 for me started with the release of several OS projects. Two of them reached 100 stars in a week and I was thinking that would be nice sharing my workflow. Not like it is working every time, absolutely not, but leads to some good results.
-
JavaScript _ 2020-02-23
Webpack/TypeScript/React starter kit as of 2020
I just started using TypeScript. I did couple of React projects and noticed a pattern in the setup. I decided to export that to a starter kit π beginning. It is based on Webpack with Babel and TypeScript loader.
-
JavaScript _ 2020-01-17
VSCode go to definition/implementation fixed
I just spent ~2 hours on this and I had to blog about it. I bet I will come back to the same problem and it will be nice to have a quick solution at hand. And the problem that I'm talking about is the non working
Go to definitionorGo to implementationfeature of VSCode. Or in other words the JavaScript IntelliSense was not working for me. Of course it was annoying because I had to navigate to files manually via the folder tree on the left or typing the name of the file in the Cmd+Shift+P popup. -
Architecture _ 2020-01-14
Running Prettier for specific Git branch
I'm working on a project in my own git branch. At the end of my working day I want to do one thing - run Prettier so my code is nicely formatted before I submit the PR for code review. Of course I know about the VSCode Prettier extension but right now my editor is kinda broken and I don't want to mess with it. I'm still on my branch and I run Prettier from the terminal. All good but the amount of changes that happened is so big that my 50+ loc updates are like a needle in a haystack. It is like that because apparently there are already malformatted files in the project. It is definitely not possible to understand what I did because of so much noise. So ... I want to run Prettier but only on the files that I touched in that particular branch.
-
JavaScript _ 2020-01-13
AST fun. Remove a function call from your bundle
I'm working on a small library that has a logger. I'm bundling the app to a single file and I want to disable the logger for the production version. In this blog post we will see how I removed the
logger.logcalls from my bundle using AST (abstract syntax tree). -
JavaScript _ 2020-01-12
Hopa - zero config CLI that runs JavaScript and TypeScript
Yesterday was one of those days. I stumbled a task and wanted to find the right tool for it. That same task is on my way at least twice a week and I always refuse to optimize it. Because it was a weekend I decided to spend some time and research a proper tool for the job. Well, I find nothing that suites my need. I time-boxed a hour and said F.ck it!. I will code it myself. That's how Hopa was born - a zero config CLI that runs JavaScript and TypeScript. Transpiles, bundles, watches and executes code.
-
Riew _ 2020-01-06
Part 3: Riew - reactive view in patterns
-
Riew _ 2020-01-06
Part 2: Riew - reactive view basics
Riew is a library based on communicating sequential processes (CSP). It is made to help with communication and synchronization between your view and business logic. It's distributed as a npm package, it has 0 dependencies and adds ~8KBs (gzip) to your application on production.
-
Riew _ 2020-01-06
Part 1: We need channels! A gentle introduction to communicating sequential processes.
CSP is a formal language for describing patterns of interaction in concurrent systems. It's used in Go, Crystal, Clojure's core.async and a couple of other places. The idea in its core is nothing so complicated but it offers some interesting capabilities. Surprisingly enough it is not really popular in JavaScript. Recently I'm exploring this pattern and here are my findings.
-
Riew _ 2020-01-04
Reactive view - the concept
Something bugs me last couple of years. I'm using React for some time now and there is always this doubt if I'm placing the business logic on the right place. I'm trying to be pragmatic, to follow best practices and listen what the community is saying. However, I still feel that something is not ok. This blog post presents the idea of the reactive view. That is nothing new per se but I came up with this term because it fits well in my idea.
-
JavaScript _ 2019-11-01
Make your objects iterable
Just recently I became a fan of the iterable protocol. I knew about it for some time now but never actually integrated it on my own. I ended up using it to provide a nice API for one of my libraries and I thought that this approach worth sharing.
-
JavaScript _ 2019-05-23
From PHP to Node with Zeit's lambdas and Cypress.io
The first post in this blog was published on 25th of August 2008. This place was always living on a shared PHP/MySQL hosting. It was driven by a custom made PHP CMS for over 10 years. It is time to move forward and follow my actual language of choice - JavaScript. I spent some time recently migrating it to Zeit and this article is showing my process.
-
Must-see _ 2017-01-02
8 Years of blogging
The first article on this blog is published on 22th of August 2008. Itβs about a website which I saw at FWA. Eight years later Iβm still publishing stuff here and because it is the beginning of a new year I decided to give you some statistics.
-
JavaScript _ 2016-04-09
iframe, or not, that is the question
One of the things that I really like at work is the fact that we spend time in research tickets. We have unknowns and we make a research to find out more information on particular topic. We then base our decisions on the results. Recently we had to decide whether to use an
<iframe>for a third party widget development. I feel that the collected information may be handy to someone else so I decided to write it down here. -
JavaScript _ 2016-01-03
Deep dive into client-side routing
(This blog post is inspired by A modern JavaScript router in 100 lines and heavily related to Navigo router project)
If you build single page applications you probably know that one of the must-have parts is the router. The bit that knows how to tweak the content of the address bar and notifies the rest of the system for URL changes. In this article we will discuss the various aspects of the routing in the browser.
-
JavaScript _ 2015-12-23
Using Mocha with ES6 spec files
The new ES6 specification of JavaScript simply works better for me. It helps expressing my ideas in a shorter and cleaner way. So, I want to write ES6 everywhere. Even while Iβm testing my applications.
-
JavaScript _ 2015-11-29
Enforce standards while submitting a pull request
GitHubβs pull requests are an important part of my/our development process. Thatβs why I was thinking about creating a template that will enforce the standards.
-
Must-see _ 2014-07-15
Usersnap - the holy grail of bug reporting
The bug reporting is something very important for us. As developers, we produce code that should work everywhere. Not only on our machines. No matter how many times we test our application it often happens that it does not work properly for the client. We all know how helpful is an email with text βIt does not work. Fix it ASAP!β. Usersnap is amazing tool that removes the gap between you (the developer) and the non-techy guy from the other side.
-
Must-see _ 2014-06-22
Hungry for knowledge - Scotland JS 2014 talks
These are screencasts from the this year's Scotland JS conferences. It happened on 9th and 10th of May. If you are a JavaScript developer you will probably want to see the talks.
-
Must-see _ 2014-06-22
"Help, I'm stuck in an event-loop" by Philip Roberts
Us JavaScript programmers like to use words like, "event-loop", "non-blocking", "callback", "asynchronous", "single-threaded" and "concurrency". We say things like "don't block the event loop", "make sure your code runs at 60 frames-per-second", "well of course, it won't work, that function is an asynchronous callback!".
-
Must-see _ 2014-04-25
Codefront.io is around the corner
There are only two weeks left before the international front-end conference in Linz - Codefront.io. It's organized by the guys from WebBox and it's scheduled for 10th of May. You still have a chance to buy a ticket and listen interesting talks about our lovely Web.
-
Nodejs _ 2014-04-21
Book review: Getting Started with Grunt: The JavaScript Task Runner
I just finishing reading Getting Started with Grunt: The JavaScript Task Runner. The same book that we (I and Packt publishing) run a contest for. You could still joint it here and win a free copy.
-
JavaScript _ 2014-02-21
A modern JavaScript router in 100 lines
(The router here is now placed in its own project - Navigo. There is also another article Deep dive into client-side routing which you may find interesting)
Nowadays the popular single page applications are everywhere. Having such application means that you need a solid routing mechanism. Frameworks like Emberjs are truly build on top of a Router class. I'm still not sure that this is a concept which I like, but I'm absolutely sure that AbsurdJS should have a build-in Router. And, as with everything in this little library, it should be small, simple class. Let's see how such a module may look like.
-
JavaScript _ 2013-12-01
JavaScript template engine in just 20 lines
I'm still working on my JavaScript based preprocessor - AbsurdJS. It started as a CSS preprocessor, but later it was expanded to CSS/HTML preprocessor. Shortly, it allows JavaScript to CSS/HTML conversion. Of course, because it generates HTML it was normal to act as a template engine. I.e. somehow to fill the markup with data.
-
JavaScript _ 2013-11-11
AbsurdJS fundamentals
AbsurdJS became one of my favorite projects. I spent a good amount of time developing it and it's getting more and more interesting. I also received some positive feedback, so I think it is time to write a bit more about the module and explain how it actually works and what exactly is made for.
-
JavaScript _ 2013-08-22
Send message from web page to chrome extension\'s background script
I just answer on that question in StackOverflow. I think that this is a common quetion so it worths writing about it.
-
HTML5 _ 2013-06-25
Web Highlights #6
Everyday I'm reading or watching something which I find helpful. Normally I bookmark those things, but at the end I have dozen of folders and subfolders which I never check. So, I decided to make such blog post where I'll share valuable things in the net.
-
JavaScript _ 2013-06-14
Chrome Extension: run JavaScript in the context of the current page
I'm currently working on a Google Chrome extension and I need to run a JavaScript in the context of the current page. The obvious choice for such a logic is the content script. However it is not so easy, because the content script has an access only to the DOM of the current page. It can't run global functions or use global objects.
-
HTML5 _ 2013-05-30
Web Highlights #5
Everyday I'm reading or watching something which I find helpful. Normally I bookmark those things, but at the end I have dozen of folders and subfolders which I never check. So, I decided to make such blog post where I'll share valuable things in the net.
-
HTML5 _ 2013-03-31
Make the web faster
Slow JavaScript code on your pages? Chrome provides both a sampling, and a structural profiler to help you track down, isolate, and fix the underlying problem. Tune in to learn how to use both profilers, and how to improve your own workflow to build better, faster browser applications! We'll talk about chrome://tracing, the built-in JS profiler in DevTools, and much more.
-
JavaScript _ 2013-03-15
Tern - intelligent JavaScript editing
This is Tern. Tern is a stand-alone, editor-independant JavaScript analyzer that can be used to improve the JavaScript integration of existing editors.
-
HTML5 _ 2013-03-10
The Breakpoint
A bunch of useful things about our lovely browser - Chrome. Dev tools theming, console tips, editing of SASS directly inside the browser.
-
HTML5 _ 2013-02-09
Chrome Devevelopment Tools could be really helpful
"Your browser is one of the most and best instrumented development platforms -- you may just not realize it yet. In this episode we'll take a whirlwind tour of how to analyze network performance, rendering and layout pipeline, as well as detecting memory leaks in your Javascript code, and using audits and extensions to build faster and better apps!". A nice screencast by Ilya Grigorik. I strongly recommend the subscription to GoogleDevelopers channel.
-
JavaScript _ 2012-06-30
What is JavaScript prototype by Angus Croll
Maybe one of the best explanations of the prototype in the context of JavaScript language.http://javascriptweblog.wordpress.com/2010/06/07/understanding-javascript-prototypes/
-
JavaScript _ 2012-06-11
Google I/O 2011: Learning to Love JavaScript (by Alex Russell)
JavaScript remains one of the most popular and important programming languages in history. Web Developer and Chrome Engineer Alex Russell exposes the timeless strengths of the JavaScript language and why it is a vital part of the open web platform. Come hear what's next for the JavaScript standard and how to get the most out of the new features coming soon in V8 and Chrome.
-
JavaScript _ 2012-06-05
Javascript Development Workflow of 2013
A bunch of tools to speed up and improve your javascript development workflow by Paul Irish.
-
JavaScript _ 2012-04-26
Speed Up Your JavaScript
As an interpreted language, JavaScript is filled with hidden performance issues that conspire to slow down your code and ruin the user experience. Learn exactly what is fast, what is slow, and what you can do to squeeze that last bit of performance out of your JavaScript code.
-
Architecture _ 2012-04-09
Nicholas Zakas: Scalable JavaScript Application Architecture
Yahoo! home page engineer Nicholas Zakas, author of Professional JavaScript for Web Developers, discusses frontend architecture for complex, modular web applications with significant JavaScript elements.
-
JavaScript _ 2012-03-04
JavaScript object creation
In this article, Keith Peters discusses object creation in JavaScript using prototypal inheritance as an alternative to the new operator. Check out here.
-
JavaScript _ 2011-09-11
JSConf.eu 2011
The European JavaScript conference is really close. It's scheduled for 01 and 02 of October. I wish I could be there. I hope that the videos from the lectures will be shared online, as this happened for the last year. I strongly recommend to watch them. There are available here http://blip.tv/jsconfeu.
-
JavaScript _ 2011-05-18
A few things you don\'t know about JavaScript
A couple of days ago, I found very useful page about JavaScript called "JavaScript Garden". Check out here.JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes, subtle bugs, as well as performance issues and bad practices that non-expert JavaScript programmers may encounter on their endeavours into the depths of the language.
-
ActionScript _ 2011-03-29
FlashDevelop scripting: open file by name (part 2)
After a couple of days of using my script for file opening I decided to rewrite it and add more functionalities.
-
ActionScript _ 2011-03-20
FlashDevelop scripting: open file by text selection
FlashDevelop is one of the most preferred editors for the flash development. I've been also using it last few years. I found it helpful for writing JavaScript, HTML, CSS and PHP code as well. I just took a big project with over 1000 php files and it is a little bit difficult to open the right file, even by using the Project panel. That's why I decided to invest time in solving this task and found that I can write my own C# script and run it.
-
JavaScript _ 2010-12-06
Javascript: autocomplete country script
We are all filling registration forms. It's really nice when the page helps us to do that faster. The script, that I'm going to show you, is designed to be used for a country field.
-
ActionScript _ 2010-08-05
Javascript to Flash communication and vise versa
The communication between Flash and JavaScript is really important part of the web sites today. That's why I decided to share how to do it.
-
ActionScript _ 2010-07-17
Trace JSON object in AS3
I'm absolutely sure that all of you are working with JSON objects. It's pretty helpful to be able to print them and find out what exactly they contain. I wrote a simple function that makes this possible.
-
ActionScript _ 2010-02-26
Embed fonts in all the text fields of your flash document
Very helpful solution that will save you maybe several hours. I used JSFL language and very short script to parse all the items in the library. Then for every item just embed the characters that I wanted. Get the script from here http://www.outset.ws/files/jsfl/embedCharactersInTextField.jsfl. In flash: Commangs -> Run command (or simply Ctrl+R) and point the script file.You can download the jsfl documentation from here http://livedocs.adobe.com/flash/9.0/main/flash_cs3_extending.pdf.