<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shravan Vooragayala on Medium]]></title>
        <description><![CDATA[Stories by Shravan Vooragayala on Medium]]></description>
        <link>https://medium.com/@shravankumar73385?source=rss-e6a9f1101a9a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*31nu7qrLw4X4xcypYArlTA.jpeg</url>
            <title>Stories by Shravan Vooragayala on Medium</title>
            <link>https://medium.com/@shravankumar73385?source=rss-e6a9f1101a9a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:07:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shravankumar73385/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Wrestling with Dates in JavaScript — Meet @syntax-raise/date-time-utils]]></title>
            <link>https://medium.com/@shravankumar73385/stop-wrestling-with-dates-in-javascript-meet-syntax-raise-date-time-utils-b60a042756ac?source=rss-e6a9f1101a9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b60a042756ac</guid>
            <category><![CDATA[datetime]]></category>
            <category><![CDATA[time]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[date]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Shravan Vooragayala]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 08:54:19 GMT</pubDate>
            <atom:updated>2026-08-10T08:54:19.840Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever written JavaScript and muttered something unpleasant at a Date object, you&#39;re not alone. Working with dates in JS has historically been... let&#39;s call it <em>character-building</em>. But what if there was a lightweight, dependency-free utility library that just handled it all for you? Enter <strong>@syntax-raise/date-time-utils</strong> — a comprehensive toolkit that makes date and time operations a genuine pleasure.</p><h3>🤔 What Is It?</h3><p><a href="https://www.npmjs.com/package/@syntax-raise/date-time-utils">@syntax-raise/date-time-utils</a> is a <strong>lightweight, MIT-licensed</strong> utility library for JavaScript and TypeScript that covers virtually every date-related operation you&#39;ll ever need — from formatting and parsing to timezone conversions and relative time strings. At just <strong>86.1 kB unpacked</strong> and with <strong>no heavy dependencies</strong>, it&#39;s a lean alternative to bloated date libraries.</p><blockquote>Think of it as a Swiss Army knife for dates — compact, sharp, and always there when you need it.</blockquote><h3>🚀 Getting Started</h3><p>Installation is as simple as it gets:</p><pre>npm install @syntax-raise/date-time-utils</pre><p>Then import only what you need:</p><pre>import { formatDate, addDays, getRelativeTime } from &#39;@syntax-raise/date-time-utils&#39;;</pre><p>Tree-shaking friendly? You bet. ✅</p><h3>✨ Feature Highlights</h3><h3>1. 🕐 Date Formatting — Your Format, Your Rules</h3><p>Tired of manually constructing date strings? formatDate has you covered with a range of built-in formats <em>and</em> custom pattern support:</p><pre>const date = new Date(&#39;2024-01-15&#39;);</pre><pre>formatDate(date, &#39;ISO&#39;);            // &#39;2024-01-15T00:00:00.000Z&#39;<br>formatDate(date, &#39;US&#39;);             // &#39;01/15/2024&#39;<br>formatDate(date, &#39;EU&#39;);             // &#39;15/01/2024&#39;<br>formatDate(date, &#39;LONG&#39;);           // &#39;January 15, 2024&#39;<br>formatDate(date, &#39;SHORT&#39;);          // &#39;Jan 15, 2024&#39;<br>formatDate(date, &#39;DATETIME&#39;);       // &#39;2024-01-15 00:00:00&#39;<br>formatDate(date, &#39;CUSTOM&#39;, &#39;DD-MM-YYYY&#39;); // &#39;15-01-2024&#39;</pre><p>Whether you’re building for a US audience, a European one, or an API that demands ISO 8601 — you’re sorted.</p><h3>2. 📅 Date Parsing — Read Dates in Any Format</h3><p>Parsing is just as flexible. Feed it a string and a format hint, and get back a proper Date object:</p><pre>parseDate(&#39;2024-01-15&#39;);                        // ISO → Date<br>parseDate(&#39;01/15/2024&#39;, &#39;US&#39;);                  // US format → Date<br>parseDate(&#39;15/01/2024&#39;, &#39;EU&#39;);                  // EU format → Date<br>parseDate(&#39;15-01-2024&#39;, &#39;CUSTOM&#39;, &#39;DD-MM-YYYY&#39;); // Custom → Date</pre><p>No more new Date(&quot;15/01/2024&quot;) returning Invalid Date and ruining your afternoon. 😅</p><h3>3. ⚖️ Date Comparison — Precision at Your Fingertips</h3><p>Comparing dates is clean and expressive:</p><pre>const date1 = new Date(&#39;2024-01-15&#39;);<br>const date2 = new Date(&#39;2024-06-20&#39;);</pre><pre>isBefore(date1, date2);  // true<br>isAfter(date1, date2);   // false<br>isEqual(date1, date1);   // true<br>isBetween(new Date(&#39;2024-03-01&#39;), date1, date2); // true<br>compareDates(date1, date2); // -1</pre><p>These boolean helpers make conditional logic in your code <strong>read like plain English</strong> — always a win for maintainability.</p><h3>4. ➕ Date Manipulation — Add, Subtract, Snap</h3><p>Need to calculate a deadline 10 days from now? Find the start of the current month? Done:</p><pre>const date = new Date(&#39;2024-01-15&#39;);</pre><pre>addDays(date, 10);       // 2024-01-25<br>subtractMonths(date, 1); // 2023-12-15<br>addYears(date, 1);       // 2025-01-15<br>addHours(date, 5);       // 2024-01-15T05:00:00<br>addMinutes(date, 30);    // 2024-01-15T00:30:00</pre><pre>startOfDay(date);        // 2024-01-15T00:00:00.000Z<br>endOfMonth(date);        // 2024-01-31T23:59:59.999Z<br>startOfYear(date);       // 2024-01-01T00:00:00.000Z</pre><p>These are the kinds of helpers that save you from writing the same utility function for the 47th time across different projects.</p><h3>5. 🌍 Timezone Support — Go Global</h3><p>Working with international users? The library includes solid timezone utilities:</p><pre>convertToTimezone(date, &#39;America/New_York&#39;);<br>getTimezoneOffset(&#39;America/New_York&#39;);          // -300 (minutes)<br>formatInTimezone(date, &#39;America/New_York&#39;, &#39;ISO&#39;);</pre><p>No more timezone-related bugs sneaking into your production logs at 3 AM. 🌙</p><h3>6. 📊 Date Ranges — Intervals Made Easy</h3><p>Working with booking systems, calendars, or reporting dashboards? Date ranges are a first-class citizen here:</p><pre>const range = createDateRange(date1, date2);</pre><pre>isInRange(new Date(&#39;2024-03-01&#39;), range);  // true<br>getRangeDuration(range);<br>// { days: 157, hours: 3768, minutes: 226080, seconds: 13564800 }</pre><pre>getDatesInRange(range); // Array of every Date in the range</pre><h3>7. ✅ Validation — Trust, But Verify</h3><p>Before you process user input, validate it:</p><pre>isValidDate(new Date(&#39;2024-01-15&#39;));  // true<br>isValidDate(new Date(&#39;invalid&#39;));     // false<br>isValidDateString(&#39;2024-01-15&#39;);      // true<br>isLeapYear(2024);                     // true<br>isLeapYear(2023);                     // false</pre><p>Great for form validation, API input sanitization, or just keeping your data clean.</p><h3>8. 🔄 Relative Time — Human-Friendly Timestamps</h3><p>This one’s a crowd favorite for UI development:</p><pre>getRelativeTime(new Date(Date.now() - 3600000)); // &#39;1 hour ago&#39;<br>getRelativeTime(new Date(&#39;2024-01-14&#39;));          // &#39;yesterday&#39;<br>getRelativeTime(new Date(Date.now() + 86400000)); // &#39;tomorrow&#39;</pre><p>Perfect for notification feeds, comment timestamps, and activity logs — anywhere you want your app to feel <em>human</em>.</p><h3>9. 🛠️ Utility Functions — The Handy Extras</h3><p>A grab-bag of genuinely useful helpers:</p><pre>getDayOfWeek(date);              // &#39;Monday&#39;<br>getMonthName(date);              // &#39;January&#39;<br>getDaysInMonth(date);            // 31<br>getWeekNumber(date);             // 3<br>getQuarter(date);                // 1<br>getAge(new Date(&#39;1990-01-15&#39;));   // 34<br>getDifference(date1, date2, &#39;days&#39;); // 157</pre><p>getAge alone is worth the install for any app with user profiles. 🎂</p><h3>🏁 Final Thoughts</h3><p>@syntax-raise/date-time-utils is a thoughtfully designed library that covers the full spectrum of date and time operations without the bloat. Whether you&#39;re building a scheduling app, a reporting dashboard, an e-commerce platform with international users, or just need to stop copy-pasting date utility functions between projects — this library deserves a spot in your toolkit.</p><p>It’s clean, it’s typed, it’s MIT-licensed, and it just <em>works</em>.</p><p><strong>Give it a try today:</strong></p><pre>npm install @syntax-raise/date-time-utils</pre><p>And may your dates always be valid and your timezones never be wrong. 🕐✨</p><p><em>📌 Found on </em><a href="https://www.npmjs.com/package/@syntax-raise/date-time-utils"><em>npmjs.com</em></a><em> | Source available on </em><a href="https://github.com/syntax-raise/date-time-utils"><em>GitHub</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b60a042756ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between apply(), call() and bind() in Javascript]]></title>
            <link>https://medium.com/@shravankumar73385/difference-between-apply-call-and-bind-in-javascript-812c7a597c3f?source=rss-e6a9f1101a9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/812c7a597c3f</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Shravan Vooragayala]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 08:58:39 GMT</pubDate>
            <atom:updated>2026-08-04T08:59:46.056Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>If you’ve spent any time diving deeper into JavaScript, you’ve likely stumbled upon three mysterious methods that sit on every function: <strong>call()</strong>, <strong>apply()</strong>, and <strong>bind()</strong>. They look similar, they all deal with this, and yet they behave quite differently.</p><p>Understanding these three methods is a <strong>rite of passage</strong> for every JavaScript developer. They unlock powerful patterns like function borrowing, partial application, and explicit context binding — skills that separate good developers from great ones.</p><p>Let’s break them all down — clearly, thoroughly, and with plenty of examples! 🎯</p><h3>The Core Concept: What Is this?</h3><p>Before we dive in, let’s quickly recap this in JavaScript.</p><p>In JavaScript, this refers to the <strong>object that is currently executing the function</strong>. The problem? this can change depending on <em>how</em> a function is called.</p><pre>const person = {<br>  name: &quot;Alice&quot;,<br>  greet() {<br>    console.log(`Hello, I&#39;m ${this.name}`);<br>  }<br>};</pre><pre>person.greet(); // ✅ &quot;Hello, I&#39;m Alice&quot;</pre><pre>const greetFn = person.greet;<br>greetFn(); // ❌ &quot;Hello, I&#39;m undefined&quot; — `this` is lost!</pre><p>This is exactly the problem that call(), apply(), and bind() solve — they let you <strong>explicitly control what </strong><strong>this refers to</strong>.</p><h3>1. call() — Invoke Immediately with Arguments One by One</h3><h3>What Is It?</h3><p>call() is a method available on every JavaScript function. It <strong>immediately invokes</strong> the function with a specified this value and arguments passed <strong>individually (comma-separated)</strong>.</p><h3>Syntax</h3><pre>functionName.call(thisArg, arg1, arg2, arg3, ...);</pre><h3>Basic Example</h3><pre>function greet(greeting, punctuation) {<br>  console.log(`${greeting}, I&#39;m ${this.name}${punctuation}`);<br>}</pre><pre>const user = { name: &quot;Alice&quot; };</pre><pre>greet.call(user, &quot;Hello&quot;, &quot;!&quot;); <br>// Output: &quot;Hello, I&#39;m Alice!&quot;</pre><h3>Real-World Example — Function Borrowing</h3><p>One of the most powerful use cases of call() is <strong>borrowing methods</strong> from one object to use on another.</p><pre>const developer = {<br>  name: &quot;Bob&quot;,<br>  skills: [&quot;JavaScript&quot;, &quot;React&quot;],<br>  introduce() {<br>    console.log(`Hi, I&#39;m ${this.name} and I know ${this.skills.join(&quot;, &quot;)}`);<br>  }<br>};</pre><pre>const designer = {<br>  name: &quot;Carol&quot;,<br>  skills: [&quot;Figma&quot;, &quot;CSS&quot;, &quot;Illustrator&quot;]<br>};</pre><pre>// Carol borrows Bob&#39;s introduce method!<br>developer.introduce.call(designer);<br>// Output: &quot;Hi, I&#39;m Carol and I know Figma, CSS, Illustrator&quot;</pre><h3>Another Classic Example — Using Array methods on Array-like Objects</h3><pre>function showArguments() {<br>  // `arguments` is array-like but not a real array<br>  const args = Array.prototype.slice.call(arguments);<br>  console.log(args);<br>}</pre><pre>showArguments(1, 2, 3); <br>// Output: [1, 2, 3]</pre><h3>✅ When to Use call()</h3><ul><li>When you want to <strong>invoke a function immediately</strong></li><li>When you know the <strong>exact number of arguments</strong> upfront</li><li>When <strong>borrowing methods</strong> from other objects</li></ul><h3>2. apply() — Invoke Immediately with Arguments as an Array</h3><h3>What Is It?</h3><p>apply() works <strong>exactly like </strong><strong>call()</strong> — it immediately invokes the function with a specified this value. The <strong>only difference</strong> is that arguments are passed as an <strong>array</strong> (or array-like object) instead of individually.</p><h3>Syntax</h3><pre>functionName.apply(thisArg, [arg1, arg2, arg3, ...]);</pre><blockquote><em>💡 </em><strong><em>Memory Trick:</em></strong><em> Think </em><strong><em>A</em></strong><em> for </em><strong><em>A</em></strong><em>pply = </em><strong><em>A</em></strong><em>rray!</em></blockquote><h3>Basic Example</h3><pre>function greet(greeting, punctuation) {<br>  console.log(`${greeting}, I&#39;m ${this.name}${punctuation}`);<br>}</pre><pre>const user = { name: &quot;Alice&quot; };</pre><pre>greet.apply(user, [&quot;Hello&quot;, &quot;!&quot;]);<br>// Output: &quot;Hello, I&#39;m Alice!&quot;</pre><h3>Real-World Example — Spreading Math Operations</h3><pre>const numbers = [5, 2, 9, 1, 7, 3];</pre><pre>// Math.max doesn&#39;t accept arrays — apply to the rescue!<br>const max = Math.max.apply(null, numbers);<br>const min = Math.min.apply(null, numbers);</pre><pre>console.log(`Max: ${max}`); // Max: 9<br>console.log(`Min: ${min}`); // Min: 1</pre><blockquote><em>📝 </em><strong><em>Note:</em></strong><em> In modern JavaScript, you can use the </em><strong><em>spread operator</em></strong><em> for this:</em></blockquote><pre>const max = Math.max(...numbers); // Same result!</pre><h3>Real-World Example — Merging Arrays</h3><pre>const fruits = [&quot;apple&quot;, &quot;banana&quot;];<br>const vegetables = [&quot;carrot&quot;, &quot;spinach&quot;];</pre><pre>// Push all vegetables into fruits array<br>Array.prototype.push.apply(fruits, vegetables);</pre><pre>console.log(fruits);<br>// Output: [&quot;apple&quot;, &quot;banana&quot;, &quot;carrot&quot;, &quot;spinach&quot;]</pre><h3>✅ When to Use apply()</h3><ul><li>When you want to <strong>invoke a function immediately</strong></li><li>When your arguments are <strong>already in an array</strong></li><li>When working with <strong>dynamic argument lists</strong></li><li>When using functions like Math.max, Math.min with arrays</li></ul><h3>3. bind() — Returns a New Function (Doesn&#39;t Invoke Immediately)</h3><h3>What Is It?</h3><p>bind() is the <strong>most different</strong> of the three. Instead of calling the function immediately, it <strong>returns a brand new function</strong> with this permanently bound to the specified value. You can call that new function later — whenever you want.</p><h3>Syntax</h3><pre>const newFunction = functionName.bind(thisArg, arg1, arg2, ...);</pre><h3>Basic Example</h3><pre>function greet(greeting, punctuation) {<br>  console.log(`${greeting}, I&#39;m ${this.name}${punctuation}`);<br>}</pre><pre>const user = { name: &quot;Alice&quot; };</pre><pre>const greetAlice = greet.bind(user, &quot;Hello&quot;, &quot;!&quot;);</pre><pre>// Function is NOT called yet!<br>// Call it whenever you need:<br>greetAlice(); <br>// Output: &quot;Hello, I&#39;m Alice!&quot;</pre><h3>Real-World Example — Fixing this in Event Listeners</h3><p>This is arguably the <strong>most common real-world use case</strong> for bind().</p><pre>class Timer {<br>  constructor() {<br>    this.seconds = 0;<br>  }</pre><pre>  start() {<br>    // Without bind, `this` inside tick() would be undefined or window<br>    setInterval(this.tick.bind(this), 1000);<br>  }</pre><pre>  tick() {<br>    this.seconds++;<br>    console.log(`Elapsed: ${this.seconds}s`);<br>  }<br>}</pre><pre>const timer = new Timer();<br>timer.start();<br>// Output every second:<br>// Elapsed: 1s<br>// Elapsed: 2s<br>// Elapsed: 3s ...</pre><h3>Real-World Example — Partial Application</h3><p>bind() also supports <strong>partial application</strong> — pre-filling some arguments while leaving others for later.</p><pre>function multiply(a, b) {<br>  return a * b;<br>}</pre><pre>// Pre-fill `a` as 2 — creating a &quot;double&quot; function<br>const double = multiply.bind(null, 2);<br>const triple = multiply.bind(null, 3);</pre><pre>console.log(double(5));  // 10<br>console.log(double(8));  // 16<br>console.log(triple(5));  // 15<br>console.log(triple(8));  // 24</pre><h3>Real-World Example — React Class Components (Classic Pattern)</h3><pre>class Button extends React.Component {<br>  constructor(props) {<br>    super(props);<br>    // Binding in constructor to preserve `this`<br>    this.handleClick = this.handleClick.bind(this);<br>  }</pre><pre>  handleClick() {<br>    console.log(`Button clicked by ${this.props.user}`);<br>  }</pre><pre>  render() {<br>    return &lt;button onClick={this.handleClick}&gt;Click Me&lt;/button&gt;;<br>  }<br>}</pre><h3>✅ When to Use bind()</h3><ul><li>When you want to <strong>save a function for later use</strong></li><li>When fixing this inside <strong>callbacks, event listeners, or timers</strong></li><li>When doing <strong>partial application</strong> of function arguments</li><li>When working with <strong>class methods</strong> in React or OOP patterns</li></ul><h3>🔍 All Three — Side by Side</h3><p>Let’s see all three doing the <strong>exact same thing</strong> so the difference is crystal clear:</p><pre>function introduce(role, company) {<br>  console.log(`Hi! I&#39;m ${this.name}, a ${role} at ${company}.`);<br>}</pre><pre>const person = { name: &quot;Diana&quot; };</pre><pre>// call() — immediate, args comma-separated<br>introduce.call(person, &quot;Engineer&quot;, &quot;Siemens&quot;);</pre><pre>// apply() — immediate, args as array<br>introduce.apply(person, [&quot;Engineer&quot;, &quot;Siemens&quot;]);</pre><pre>// bind() — returns new function, call it later<br>const introduceDiana = introduce.bind(person, &quot;Engineer&quot;, &quot;Siemens&quot;);<br>introduceDiana();</pre><pre>// All three output:<br>// &quot;Hi! I&#39;m Diana, a Engineer at Siemens.&quot;</pre><h3>⚠️ Common Gotchas</h3><h3>1. Arrow Functions Ignore call, apply, and bind</h3><p>Arrow functions <strong>do not have their own </strong><strong>this</strong> — they inherit it from their surrounding scope. So call(), apply(), and bind() cannot change their this.</p><pre>const arrowFn = () =&gt; {<br>  console.log(this.name);<br>};</pre><pre>const obj = { name: &quot;Alice&quot; };</pre><pre>arrowFn.call(obj);  // ❌ Won&#39;t work — outputs undefined (or global this)<br>arrowFn.apply(obj); // ❌ Same issue<br>arrowFn.bind(obj)(); // ❌ Same issue</pre><h3>2. null or undefined as thisArg</h3><p>If you pass null or undefined as the first argument, this defaults to the <strong>global object</strong> (window in browsers, global in Node.js) in non-strict mode.</p><pre>function showThis() {<br>  console.log(this);<br>}</pre><pre>showThis.call(null);   // global object (or undefined in strict mode)<br>showThis.apply(null);  // global object (or undefined in strict mode)</pre><h3>3. bind() Can Only Be Bound Once</h3><p>Once a function is bound, you <strong>cannot re-bind</strong> it.</p><pre>function greet() {<br>  console.log(this.name);<br>}</pre><pre>const alice = { name: &quot;Alice&quot; };<br>const bob   = { name: &quot;Bob&quot; };</pre><pre>const greetAlice = greet.bind(alice);<br>const greetBob   = greetAlice.bind(bob); // ❌ Re-binding won&#39;t work!</pre><pre>greetBob(); // Still outputs: &quot;Alice&quot;</pre><h3>🧠 Quick Memory Trick</h3><ul><li><strong>call()</strong> → <strong>C</strong>omma-separated, <strong>C</strong>alls immediately</li><li><strong>apply()</strong> → <strong>A</strong>rray of args, <strong>A</strong>cts immediately</li><li><strong>bind()</strong> → <strong>B</strong>inds and gives <strong>B</strong>ack a new function</li></ul><h3>🏁 Final Thoughts</h3><p>Method One-liner Summary call() <em>&quot;Call this function now, here are the args one by one.&quot;</em> apply() <em>&quot;Call this function now, here are the args in an array.&quot;</em> bind() <em>&quot;Give me a new function with </em><em>this locked in — I&#39;ll call it later.&quot;</em></p><p>These three methods are fundamental to mastering JavaScript’s function model. Once you truly understand them, concepts like <strong>function composition</strong>, <strong>method borrowing</strong>, <strong>event handling</strong>, and <strong>partial application</strong> all start to click into place.</p><p>So go ahead — open your browser console and experiment! The best way to learn is to <strong>break things and fix them</strong>. 😄</p><p><em>Found this helpful? Share it with a fellow developer who’s still puzzled by </em><em>this!</em> 🙌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=812c7a597c3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[npm vs pnpm vs Yarn vs Bun: The Ultimate Package Manager Showdown]]></title>
            <link>https://medium.com/@shravankumar73385/npm-vs-pnpm-vs-yarn-vs-bun-the-ultimate-package-manager-showdown-2f1760ab9974?source=rss-e6a9f1101a9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f1760ab9974</guid>
            <category><![CDATA[package-management]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[package]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Shravan Vooragayala]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 08:54:59 GMT</pubDate>
            <atom:updated>2026-08-04T08:54:59.254Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>If you’ve ever started a JavaScript or Node.js project, you’ve inevitably faced the age-old question: <em>“Which package manager should I use?”</em> It might seem like a trivial decision, but your choice can significantly impact your <strong>development speed</strong>, <strong>disk usage</strong>, <strong>CI/CD performance</strong>, and overall <strong>developer experience</strong>.</p><p>In this blog, we’ll break down the four major contenders:</p><ul><li>📦 <strong>npm</strong> — The veteran</li><li>⚡ <strong>pnpm</strong> — The efficient one</li><li>🧶 <strong>Yarn</strong> — The reliable classic</li><li>🍞 <strong>Bun</strong> — The blazing newcomer</li></ul><p>Let’s dive in!</p><h3>1. npm — The OG Package Manager</h3><h3>What Is It?</h3><p><strong>npm</strong> (Node Package Manager) comes bundled with Node.js and has been the default package manager for JavaScript since <strong>2010</strong>. It’s the most widely used and has the largest registry in the world — hosting over <strong>2 million packages</strong>.</p><h3>How It Works</h3><p>npm installs packages into a node_modules folder and uses a package-lock.json file to lock dependency versions.</p><pre># Initialize a project<br>npm init</pre><pre># Install a package<br>npm install express</pre><pre># Install dev dependency<br>npm install --save-dev typescript</pre><pre># Run a script<br>npm run build</pre><h3>✅ Pros</h3><ul><li><strong>Pre-installed</strong> with Node.js — zero setup</li><li><strong>Massive community</strong> and ecosystem support</li><li><strong>Workspaces support</strong> (since v7)</li><li>Most tutorials and documentation reference npm</li></ul><h3>❌ Cons</h3><ul><li><strong>Slower</strong> compared to pnpm and Bun</li><li><strong>Flat </strong><strong>node_modules</strong> structure can cause phantom dependency issues</li><li>Higher <strong>disk space</strong> consumption due to duplicated packages</li><li>Historically had security vulnerabilities (much improved now)</li></ul><h3>2. pnpm — The Space-Saving Speedster</h3><h3>What Is It?</h3><p><strong>pnpm</strong> (Performant npm) was created in <strong>2017</strong> to solve npm’s inefficiency problems. Its killer feature? A <strong>content-addressable store</strong> that stores packages globally and uses <strong>hard links</strong> instead of copying files.</p><h3>How It Works</h3><p>Instead of duplicating packages across projects, pnpm stores them <strong>once on disk</strong> and links them. This means if 10 projects use lodash, it&#39;s only stored once!</p><pre># Install pnpm<br>npm install -g pnpm</pre><pre># Initialize a project<br>pnpm init</pre><pre># Install a package<br>pnpm add express</pre><pre># Install dev dependency<br>pnpm add -D typescript</pre><pre># Run a script<br>pnpm run build</pre><h3>✅ Pros</h3><ul><li><strong>Massive disk space savings</strong> (up to 60% less than npm)</li><li><strong>Faster installs</strong> due to hard linking</li><li><strong>Strict dependency resolution</strong> — prevents phantom dependencies</li><li>Excellent <strong>monorepo/workspace</strong> support</li><li>Drop-in replacement for npm</li></ul><h3>❌ Cons</h3><ul><li>Slightly steeper <strong>learning curve</strong> for teams new to it</li><li>Some older packages may have compatibility issues with its strict module resolution</li><li>Smaller community compared to npm/Yarn</li></ul><h3>3. Yarn — The Battle-Tested Reliable</h3><h3>What Is It?</h3><p><strong>Yarn</strong> was introduced by Facebook in <strong>2016</strong> as a faster, more reliable alternative to npm. It pioneered many features that npm later adopted, like lockfiles and offline caching.</p><blockquote><em>⚠️ </em><strong><em>Note:</em></strong><em> There are two major versions — </em><strong><em>Yarn Classic (v1)</em></strong><em> and </em><strong><em>Yarn Berry (v2+)</em></strong><em>. They behave quite differently!</em></blockquote><h3>How It Works</h3><h4>Yarn Classic (v1)</h4><p>Similar to npm but faster, with a yarn.lock file.</p><pre># Install Yarn Classic<br>npm install -g yarn</pre><pre># Initialize a project<br>yarn init</pre><pre># Install a package<br>yarn add express</pre><pre># Install dev dependency<br>yarn add --dev typescript</pre><pre># Run a script<br>yarn build</pre><h4>Yarn Berry (v2+) — Plug’n’Play (PnP)</h4><p>Yarn Berry introduced <strong>Plug’n’Play (PnP)</strong>, which eliminates node_modules entirely! Packages are stored as zip files and resolved via a .pnp.cjs file.</p><pre># Enable Yarn Berry in a project<br>yarn set version stable</pre><pre># Install packages (no node_modules!)<br>yarn install</pre><pre># Add a package<br>yarn add express</pre><h3>✅ Pros</h3><ul><li><strong>Offline mode</strong> — install packages without internet if cached</li><li><strong>Workspaces</strong> support (pioneered it!)</li><li>Yarn Berry’s <strong>PnP</strong> is incredibly fast and efficient</li><li><strong>Deterministic installs</strong> via lockfile</li><li>Strong <strong>enterprise adoption</strong></li></ul><h3>❌ Cons</h3><ul><li>Yarn Berry’s PnP has <strong>compatibility issues</strong> with some tools (e.g., certain IDEs, older packages)</li><li>Two very different versions causes <strong>community confusion</strong></li><li>Yarn Classic is largely in maintenance mode</li><li>Slightly more complex configuration for Berry</li></ul><h3>4. Bun — The New Kid on the Block 🔥</h3><h3>What Is It?</h3><p><strong>Bun</strong> is not just a package manager — it’s an <strong>all-in-one JavaScript runtime, bundler, transpiler, and package manager</strong> built from scratch using <strong>Zig</strong> and <strong>JavaScriptCore</strong> (the engine behind Safari). Released in <strong>2023</strong>, it’s designed to be <em>ridiculously fast</em>.</p><h3>How It Works</h3><p>Bun uses a binary lockfile (bun.lockb) and installs packages at lightning speed by leveraging native system calls.</p><pre># Install Bun<br>curl -fsSL https://bun.sh/install | bash</pre><pre># Initialize a project<br>bun init</pre><pre># Install a package<br>bun add express</pre><pre># Install dev dependency<br>bun add -d typescript</pre><pre># Run a script<br>bun run build</pre><pre># Run a file directly (no Node.js needed!)<br>bun run index.ts</pre><h3>✅ Pros</h3><ul><li><strong>Blazing fast</strong> — often 10–30x faster installs than npm</li><li><strong>All-in-one tool</strong> — runtime + bundler + test runner + package manager</li><li><strong>TypeScript support out of the box</strong> — no ts-node needed</li><li>Compatible with npm registry and most Node.js APIs</li><li>Binary lockfile is more efficient</li></ul><h3>❌ Cons</h3><ul><li><strong>Relatively new</strong> — still maturing, some edge cases and bugs</li><li><strong>Not 100% Node.js compatible</strong> yet (some APIs missing)</li><li><strong>Smaller ecosystem</strong> of Bun-specific tooling</li><li>Binary lockfile (.lockb) is not human-readable</li><li>Primarily <strong>macOS/Linux</strong> focused (Windows support is improving)</li></ul><h3>🤔 Which One Should You Choose?</h3><p>Here’s a quick decision guide:</p><h3>👉 Choose npm if:</h3><ul><li>You’re a <strong>beginner</strong> or onboarding a new team</li><li>You want <strong>zero configuration</strong> out of the box</li><li>Your project needs maximum <strong>compatibility</strong></li></ul><h3>👉 Choose pnpm if:</h3><ul><li>You’re working on a <strong>monorepo</strong> or large-scale project</li><li><strong>Disk space and speed</strong> are priorities</li><li>You want <strong>strict dependency management</strong></li></ul><h3>👉 Choose Yarn if:</h3><ul><li>You’re in an <strong>enterprise environment</strong> that already uses it</li><li>You need <strong>offline installs</strong> frequently</li><li>You’re comfortable with Yarn Berry’s PnP approach</li></ul><h3>👉 Choose Bun if:</h3><ul><li>You want <strong>maximum speed</strong> and love cutting-edge tools</li><li>You’re starting a <strong>greenfield project</strong></li><li>You want an <strong>all-in-one</strong> runtime + package manager experience</li><li>You primarily develop on <strong>macOS or Linux</strong></li></ul><h3>🏁 Final Thoughts</h3><p>There’s no single “best” package manager — it all depends on your <strong>project needs</strong>, <strong>team size</strong>, and <strong>workflow preferences</strong>. Here’s the TL;DR:</p><ul><li><strong>npm</strong> = Safe, universal, reliable</li><li><strong>pnpm</strong> = Efficient, fast, great for monorepos</li><li><strong>Yarn</strong> = Battle-tested, feature-rich, enterprise-friendly</li><li><strong>Bun</strong> = Blazing fast, all-in-one, future-forward</li></ul><p>The JavaScript ecosystem is evolving rapidly, and all four tools are actively maintained and improving. The best advice? <strong>Try them out</strong> on a small project and see which one clicks best with your workflow.</p><p>Happy coding! 💻✨</p><p><em>Have a favorite package manager? Drop your thoughts in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f1760ab9974" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create GitHub project from scratch]]></title>
            <link>https://medium.com/@shravankumar73385/how-to-create-github-project-from-scratch-5dbf677a8668?source=rss-e6a9f1101a9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dbf677a8668</guid>
            <category><![CDATA[git-cli]]></category>
            <category><![CDATA[git-tool]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git-commands]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Shravan Vooragayala]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 17:10:39 GMT</pubDate>
            <atom:updated>2023-02-24T17:10:39.913Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is GitHub?</h3><p>GitHub is a cloud-based web application service that helps developers to store and manage their code, as well as track and control changes to their code. It is also called as version control system.</p><p>If you want to create new GitHub project from scratch follow the below steps:</p><pre>git init &lt;ProjectName&gt;</pre><p>Above command is going to create a brand new folder with project name.</p><p>If you have a repository already created and it present in GitHub then you can use the command to clone the repository to you local machine</p><pre>git clone &lt;REPOSITORY URL&gt;</pre><p>Add few files to you project folder or any changes in the existing file and check the status of the files by hitting the command</p><pre>git status</pre><p>this command show the files changes inside the project folder with the red colour highlights</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*r7DQl5VTo279_O1ZDlnHUQ.png" /></figure><p>Now we are going to add the files to git by using the command</p><pre>git add &lt;file name&gt;</pre><p>Then check <strong>git status</strong> inside the project folder you will be able to see file changes would be shown in green colour</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*QCJiFWF9er3O5sZtKflv3Q.png" /></figure><p>Now we are going to commit the changes by using the command</p><pre>git commit -m &quot;&lt;MESSAGE&gt;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*Fftyu9tMHwWpxLZQKy2Lfg.png" /></figure><p>Then check <strong>git status</strong> inside the project folder you will be able to see the message <strong>nothing to commit, working tree clean</strong></p><p>Next step we need to push our changes to GitHub best practice is pull the changes from GitHub before you push anything from the working repository because there may be a chance of code changes from any of you colleagues so pull the changes then push the changes.</p><p>Some times you will be facing merge conflicts while pulling the changes from repository. This occurs when two people work on the same file and changes is present in same lines git will ask to solve the conflicts</p><pre>git pull</pre><p>It pull the changes from GitHub repository to you local machine</p><pre>git push</pre><p>It push the changes which are present in local machine to GitHub repository.</p><h3><strong>How to switch from one branch to another branch through commands?</strong></h3><pre>git checkout &lt;BRANCH NAME&gt;</pre><h3><strong>How to create new git branch ?</strong></h3><p>To create git branch using commands first of all we need to checkout to the base branch from where you need to create the new branch.</p><pre>git checkout -b &lt;NEW BRANCH&gt;</pre><h3><strong>How to check the commits ?</strong></h3><pre>git log</pre><h3><strong>How to reset all the local commit?</strong></h3><pre>git reset --hard</pre><h3><strong>How to role back the changes to particular commit?</strong></h3><pre>git reset --hard &lt;COMMIT ID&gt;</pre><h3>Git GUI Clients</h3><ul><li><a href="https://desktop.github.com/">Github Desktop</a></li><li><a href="https://www.syntevo.com/smartgit/">SmartGit</a></li><li><a href="https://github.com/gdevic/GitForce">GitForce</a></li><li><a href="https://www.gitkraken.com/">GitKraken</a></li><li><a href="https://git-cola.github.io/">Git Cola</a></li><li><a href="https://www.sourcetreeapp.com/">Sourcetree</a></li><li><a href="https://tortoisegit.org/">Tortoise Git</a></li><li><a href="https://aurees.com/">Aurees</a></li><li><a href="https://magit.vc/">Magit</a></li><li><a href="https://git-fork.com/">Fork</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dbf677a8668" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>