One day I had an old flashlight that had burned light bulb on it. It was a small cheap model powered with two AA batteries. I could fix it with new light bulb, but going through the trouble of trying to find exactly suitable replacement light bulb felt like more than the value of the flashlight.
If I need to replace the bulb with new one, why not convert the lamp to use LED instead.The lamp runs on two AA batteries in series. They give out around 3V voltage. That’s about the same voltage drop many white LEDs have (typically 2.8-3.5V or so). I had earlier found out that some white LEDs can be directly powered with 3V battery without any current limiting electronics. You just need to find out suitable LED. Some small LED lamps are driving white LED with 3V lithium button cells without a resistor! There are LEDs out there with internal resistors. And there are some LED that just work.
The general advice is that DO NOT use LEDS without a current limiting resistor in series with the LED. The forward voltage rating is TYPICAL and can vary from part to part, so while some LEDs may work fine just connected to a battery of the proper voltage, others will be easily over-driven and be destroyed.
Driving an LED with or without a resistor article on the other hand says that if you are able to run your complete circuit with the same voltage as forward voltage of the LED, perfect. No resistor needed. If you try to run run a 3.2 /3.4 volt warm white of a 3 volt power supply, you will get light but not the maximum amount. But usually enough for small flashlight application anyways. I had even used this idea on my LED light ring for macro photography project, so I was pretty comfortable with this idea.
Now all I need was to find suitable LED from my electronics junk box. I could check the datasheet or do measurements to verify suitability of the LED. It seemed that quite many white LEDs can be run from 3V battery without limiting resistor. But it is best to verify with measurement that things work well. I took a random white LED and put it to Kemo M087 LED testing box. I tested the voltage drop of the LED and different currents from 5 mA to 20 mA (and very quicly with 50 mA). The LED seemed to take somewhat less than 3V at 5 mA and 10 mA. At 20 mA the voltage drop was around 3.2V. At 50 mA the voltage drop was around 3.4V. With this data I could expect that with two new AA batteries in series (gives around 1.6V each) the LED would take around 20 mA current and the current would drop from that when batteries wear out. With this data it seems that this LED would work here.
The next step was just building the LED bulb replacement. Here is a small DIY flashlight bulb LED replacement. It consists of the lamp base (small edison base from old broken bulb), 5mm white LED, solder tin and hot glue. The LED anode goes to the center of the light bulb base.

Here is picture of my LED bulb in the flashlight in use.

Now I have a nice working flashlight that is not very bright, but that has a very long battery life.
If this modification looks interesting, then you might wonder how to convert lamps with different number of batteries to LED lamps. With flashlights that use three batteries or mode, the standard method to use would a white LED + suitable current limiting electronics does job. A resistor will work nut switch mode current source is better. For 20 mA LED and 4.5V operation voltage a 75 ohms or 82 ohms resistor will do. For other operating voltages and LED currents, do your own LED resistor calculations.
If your flashlight uses just one 1.5V battery, you will need a switch mode power supply that boosts the battery voltage to over 3V and limits the current. Joule Thief is a nickname for a minimalist self-oscillating voltage booster that is small, low-cost, and easy-to-build. It can use nearly all of the energy in an electric battery, even far below the voltage where other circuits consider the battery fully discharged (or “dead”). The energy is converter to current and voltage suitable for driving white LED. Make a joule thief if you want to drive white LED from one 1.5V battery.