<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ankit chaurasiya</title>
    <description>The latest articles on DEV Community by Ankit chaurasiya (@ankitchaurasiya84).</description>
    <link>https://dev.to/ankitchaurasiya84</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2067783%2F1f509c58-4681-4377-914e-658df2e5b7f5.jpg</url>
      <title>DEV Community: Ankit chaurasiya</title>
      <link>https://dev.to/ankitchaurasiya84</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ankitchaurasiya84"/>
    <language>en</language>
    <item>
      <title>🚢 From Google's Internal Tool to the Backbone of Cloud — The Kubernetes Story</title>
      <dc:creator>Ankit chaurasiya</dc:creator>
      <pubDate>Wed, 25 Mar 2026 18:17:42 +0000</pubDate>
      <link>https://dev.to/ankitchaurasiya84/from-googles-internal-tool-to-the-backbone-of-cloud-the-kubernetes-story-cb9</link>
      <guid>https://dev.to/ankitchaurasiya84/from-googles-internal-tool-to-the-backbone-of-cloud-the-kubernetes-story-cb9</guid>
      <description>&lt;p&gt;&lt;strong&gt;📜 A Little History First...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Back in the early 2000s, Google was running billions of containers per week internally. They built an internal system called Borg to manage all of it.&lt;/p&gt;

&lt;p&gt;For years, it was Google's best-kept infrastructure secret.&lt;/p&gt;

&lt;p&gt;Then in 2014, Google open-sourced a reimagined version of Borg to the world. They called it — Kubernetes (from the Greek word for "helmsman" or "pilot" 🧭).&lt;/p&gt;

&lt;p&gt;In 2016, Kubernetes was donated to the Cloud Native Computing Foundation (CNCF) — making it truly vendor-neutral and community-driven.&lt;/p&gt;

&lt;p&gt;Today? → Used by 96% of organizations running containers → Supported by Google, Microsoft, AWS, Red Hat &amp;amp; more → The de facto standard for container orchestration worldwide&lt;/p&gt;

&lt;p&gt;From Google's private infrastructure to powering the entire cloud industry in under a decade. 🔥&lt;/p&gt;

&lt;p&gt;⚙️** &lt;a href="https://www.linkedin.com/pulse/from-googles-internal-tool-backbone-cloud-kubernetes-chaurasiya--ahrdc/" rel="noopener noreferrer"&gt;So What IS Kubernetes?&lt;/a&gt;**&lt;/p&gt;

&lt;p&gt;Imagine you have 50 microservices running across hundreds of containers. Who starts them? Who restarts them when they crash? Who scales them when traffic spikes at 2 AM?&lt;/p&gt;

&lt;p&gt;That's Kubernetes.&lt;/p&gt;

&lt;p&gt;It's an open-source container orchestration platform that: &lt;/p&gt;

&lt;p&gt;✅ Automates deployment &amp;amp; scaling &lt;/p&gt;

&lt;p&gt;✅ Self-heals crashed containers &lt;/p&gt;

&lt;p&gt;✅ Manages load balancing &lt;/p&gt;

&lt;p&gt;✅ Handles rolling updates with zero downtime&lt;/p&gt;

&lt;p&gt;☁️ &lt;strong&gt;So What is AKS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AKS = Azure Kubernetes Service&lt;/p&gt;

&lt;p&gt;Running Kubernetes yourself is powerful — but complex. You need to manage the control plane, upgrades, networking, security patches...&lt;/p&gt;

&lt;p&gt;AKS takes that away. Microsoft manages the Kubernetes control plane for you — for free.&lt;/p&gt;

&lt;p&gt;You just focus on your workloads.&lt;/p&gt;

&lt;p&gt;AKS gives you: 🔵 Managed control plane (no ops overhead) 🔵 Native Azure AD integration 🔵 Built-in monitoring via Azure Monitor 🔵 Auto-scaling &amp;amp; auto-upgrade 🔵 Enterprise-grade security out of the box&lt;/p&gt;

&lt;p&gt;🌍 &lt;strong&gt;Why is This Needed in the Real World?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because modern applications are: → Distributed → Cloud-native → Expected to be always-on&lt;/p&gt;

&lt;p&gt;Without Kubernetes, you're manually managing servers. Without AKS, you're manually managing Kubernetes.&lt;/p&gt;

&lt;p&gt;AKS lets your team ship faster, scale smarter, and sleep better.&lt;/p&gt;

&lt;p&gt;💡 Whether you're a developer, DevOps engineer, or architect — understanding Kubernetes and AKS is no longer optional in 2025. It's table stakes.&lt;/p&gt;

&lt;p&gt;What's your experience with AKS or Kubernetes? Drop it in the comments 👇&lt;/p&gt;

&lt;h1&gt;
  
  
  Kubernetes #AKS #Azure #DevOps #CloudComputing #Containers #Microservices #CloudNative #CNCF #Google
&lt;/h1&gt;

</description>
      <category>cloud</category>
      <category>google</category>
      <category>kubernetes</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🔐 Understanding JWT (JSON Web Tokens)</title>
      <dc:creator>Ankit chaurasiya</dc:creator>
      <pubDate>Fri, 01 Aug 2025 19:09:24 +0000</pubDate>
      <link>https://dev.to/ankitchaurasiya84/understanding-jwt-json-web-tokens-33b2</link>
      <guid>https://dev.to/ankitchaurasiya84/understanding-jwt-json-web-tokens-33b2</guid>
      <description>&lt;p&gt;&lt;strong&gt;A Developer's Essential Guide What is JWT?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JSON Web Token (JWT) is a compact, URL-safe token format used for securely transmitting information between parties.&lt;/p&gt;

&lt;p&gt;Think of it as a digital passport that carries user credentials and claims in a standardised, verifiable format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔄 JWT Workflow:&lt;/strong&gt;&lt;br&gt;
1️⃣ Login Request → User provides credentials&lt;/p&gt;

&lt;p&gt;2️⃣ JWT Issued → Server validates and responds with a token&lt;/p&gt;

&lt;p&gt;3️⃣ Client Stores JWT → Usually in localStorage or sessionStorage&lt;/p&gt;

&lt;p&gt;4️⃣ Authenticated Requests → JWT is sent in Authorisation: Bearer  &lt;/p&gt;

&lt;p&gt;5️⃣ Server Verifies &amp;amp; Responds&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is JWT Created?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A JWT consists of three parts separated by dots (.):&lt;/p&gt;

&lt;p&gt;🔹 Header: Contains token type (JWT) and signing algorithm (e.g., HS256, RS256)&lt;/p&gt;

&lt;p&gt;🔹 Payload: Contains claims (user data, permissions, expiration)&lt;/p&gt;

&lt;p&gt;🔹 Signature: Ensures token integrity using a secret key or certificate&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure: header.payload.signature&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFua2l0IiwiaWF0IjoxNjg4MDA2NDc1fQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🔍 JWT Payload Breakdown (Middle Part)&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;This is a Base64-encoded JSON and may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ 
"sub": "1234567890", // Subject (user ID) 
"name": "Ankit", // User name 
"iat": 1688006475, // Issued At (timestamp)
"exp": 1688010075, // Expiration time (optional) 
"role": "admin" // Custom claim 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Payload Information:&lt;/strong&gt;&lt;br&gt;
The payload contains "claims" - statements about the user and &lt;br&gt;
additional data:&lt;br&gt;
• Registered Claims: Standard fields like iss (issuer), exp (expiration), sub (subject)&lt;/p&gt;

&lt;p&gt;• Public Claims: Custom fields defined in JWT registry&lt;/p&gt;

&lt;p&gt;• Private Claims: Application-specific data like user roles, permissions&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ Stateless: No server-side session storage needed&lt;/p&gt;

&lt;p&gt;✅ Scalable: Perfect for micro services and distributed systems&lt;/p&gt;

&lt;p&gt;✅ Secure: Cryptographically signed and optionally encrypted&lt;/p&gt;

&lt;p&gt;✅ Cross-platform: Works across different domains and applications&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important Considerations:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;⚠️ Size: JWTs can become large with extensive payload data&lt;/p&gt;

&lt;p&gt;⚠️ Security: Never store sensitive data in payload (it's Base64 encoded, not encrypted)&lt;/p&gt;

&lt;p&gt;⚠️ Expiration: Always set appropriate expiration times&lt;/p&gt;

&lt;p&gt;⚠️ Storage: Store securely (httpOnly cookies preferred over localStorage)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Use Cases:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🎯 Authentication and authorization&lt;/p&gt;

&lt;p&gt;🎯 Single Sign-On (SSO)&lt;/p&gt;

&lt;p&gt;🎯 API security&lt;/p&gt;

&lt;p&gt;🎯 Information exchange between services&lt;/p&gt;

&lt;p&gt;Pro Tips: 💡 Use short expiration times with refresh tokens 💡 Implement proper token revocation strategies 💡 Always validate tokens on the server side applications?&lt;/p&gt;

&lt;p&gt;Share your experiences below! 👇&lt;/p&gt;

&lt;h1&gt;
  
  
  JWT #WebDevelopment #Authentication #Security #API #WebTokens #Programming
&lt;/h1&gt;

</description>
      <category>jwt</category>
      <category>javascript</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>🧠 Beware the Leading Zero! Understanding Octal Numbers in JavaScript</title>
      <dc:creator>Ankit chaurasiya</dc:creator>
      <pubDate>Fri, 06 Jun 2025 16:13:06 +0000</pubDate>
      <link>https://dev.to/ankitchaurasiya84/beware-the-leading-zero-understanding-octal-numbers-in-javascript-48pf</link>
      <guid>https://dev.to/ankitchaurasiya84/beware-the-leading-zero-understanding-octal-numbers-in-javascript-48pf</guid>
      <description>&lt;p&gt;When you write let x = 0123; in JavaScript, you might think you're assigning the number 123.&lt;br&gt;
But JavaScript has a sneaky surprise in store… 😅&lt;/p&gt;

&lt;p&gt;In this article, we’ll decode what happens when you use leading zeros in JavaScript numbers — and how it can trip up even experienced developers.&lt;/p&gt;

&lt;p&gt;🔍 What Happens with let x = 0123;?&lt;br&gt;
In non-strict mode, numbers that start with a 0 (zero) might be treated as octal (base 8).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let x = 0123;
console.log(x); // Output: 83

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why? Because:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;0123 (octal) = 1×64 + 2×8 + 3×1 = 83&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;🤯 Yep, 0123 is NOT 123. It’s octal — which confuses the heck out of your logic if you didn’t mean it!&lt;/p&gt;

&lt;p&gt;⚠️ Strict Mode Throws an Error&lt;br&gt;
If you use "use strict", JavaScript disallows legacy octal literals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"use strict";
let x = 0123; // ❌ SyntaxError: Octal literals are not allowed in strict mode.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ The Modern and Safe Way: Use 0o Prefix&lt;br&gt;
To explicitly define octal numbers, use the ES6 octal literal syntax with a 0o prefix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let x = 0o123;
console.log(x); // 83
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✋ Common Mistakes to Watch Out For&lt;br&gt;
❌ Using invalid digits in octal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let y = 089; // SyntaxError in non-strict mode too
Octal only allows digits 0–7.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Always define numeric literals intentionally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let normal = 123;     // Decimal
let octal = 0o123;    // Octal (equals 83)
let hex = 0x1A;       // Hexadecimal (equals 26)
let binary = 0b1010;  // Binary (equals 10)
💡 Quick Quiz!
What’s the output of this code?

- let a = 010;
- console.log(a);
- A) 10
- B) 8
- C) SyntaxError
- D) 0o10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Drop your answer in the comments!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔚 Conclusion&lt;br&gt;
Always be cautious when using leading zeros in JavaScript numbers — they might not mean what you think. Avoid legacy octal literals and use the modern 0o syntax when you really want base-8 values.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Have you ever been bitten by this quirk in production code? 😬 Let me know below!&lt;/p&gt;

&lt;p&gt;🔗 Follow me for more JavaScript tips, frontend deep dives, and developer tools!&lt;/p&gt;

&lt;h1&gt;
  
  
  JavaScript #WebDevelopment #DevTips #Frontend #ES6 #CodingTips #JSQuirks #Octal #Devto
&lt;/h1&gt;

</description>
      <category>javascript</category>
      <category>output</category>
      <category>programming</category>
      <category>discuss</category>
    </item>
    <item>
      <title>🔍 Building Powerful Search Functionality in JavaScript (With Real-Life Use Cases)</title>
      <dc:creator>Ankit chaurasiya</dc:creator>
      <pubDate>Mon, 02 Jun 2025 18:56:43 +0000</pubDate>
      <link>https://dev.to/ankitchaurasiya84/building-powerful-search-functionality-in-javascript-with-real-life-use-cases-28l0</link>
      <guid>https://dev.to/ankitchaurasiya84/building-powerful-search-functionality-in-javascript-with-real-life-use-cases-28l0</guid>
      <description>&lt;p&gt;Searching is one of the most common features users expect in any application — whether it’s a product search on an e-commerce site, filtering contacts, or real-time search suggestions. In this article, we’ll explore how to build search functionality in JavaScript and look at real-life examples to make it practical and relevant.&lt;/p&gt;

&lt;p&gt;✅ What You'll Learn&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- The basics of implementing search in JavaScript&lt;/li&gt;
&lt;li&gt;- Case-insensitive and fuzzy matching&lt;/li&gt;
&lt;li&gt;- Real-world examples: e-commerce, contact apps, todo lists&lt;/li&gt;
&lt;li&gt;- Performance tips for large datasets&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Understanding the Basics&lt;/p&gt;

&lt;p&gt;Search functionality typically involves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A data source (array of objects)&lt;/li&gt;
&lt;li&gt;A search input field&lt;/li&gt;
&lt;li&gt;A filter or search algorithm&lt;/li&gt;
&lt;li&gt;Rendering the filtered results&lt;/li&gt;
&lt;li&gt;Let’s see it in action &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Real-Life Use Case #1: E-commerce Product Search
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Imagine you have a JSON list of products, and you want users to find matches by title, category, or brand.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
const products = [
  { title: "Nike Running Shoes", category: "Footwear", brand: "Nike" },
  { title: "Apple iPhone 14", category: "Electronics", brand: "Apple" },
  { title: "Leather Wallet", category: "Accessories", brand: "Fossil" },
];

function searchProducts(query) {
  query = query.toLowerCase();
  return products.filter(product =&amp;gt;
    product.title.toLowerCase().includes(query) ||
    product.category.toLowerCase().includes(query) ||
    product.brand.toLowerCase().includes(query)
  );
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real-Life Use Case #2: Searching Contacts in a Web App
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const contacts = [
  { name: "Ankit Chaurasiya", email: "ankit@example.com" },
  { name: "John Doe", email: "john@example.com" },
];

function searchContacts(query) {
  return contacts.filter(
    c =&amp;gt;
      c.name.toLowerCase().includes(query.toLowerCase()) ||
      c.email.toLowerCase().includes(query.toLowerCase())
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📝 Real-Life Use Case #3: Searching Tasks in a Todo App
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const todos = [
  { task: "Buy groceries", completed: false },
  { task: "Finish project report", completed: true },
  { task: "Schedule team meeting", completed: false },
];

function searchTodos(query) {
  return todos.filter(todo =&amp;gt;
    todo.task.toLowerCase().includes(query.toLowerCase())
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.linkedin.com/posts/ankitchaurasiya84_javascript-codetips-frontenddeveloper-activity-7335162694095839232-oIqI?utm_source=social_share_send&amp;amp;utm_medium=member_desktop_web&amp;amp;rcm=ACoAACbLPmwBuLSQvCn4dGZfi1yPRxGsOm4xs9c" rel="noopener noreferrer"&gt;Read more on Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Introducing sast-scan: A Lightweight SAST npm Package for JavaScript Security</title>
      <dc:creator>Ankit chaurasiya</dc:creator>
      <pubDate>Sat, 19 Oct 2024 17:51:07 +0000</pubDate>
      <link>https://dev.to/ankitchaurasiya84/introducing-sast-scan-a-lightweight-sast-tool-for-javascript-security-9km</link>
      <guid>https://dev.to/ankitchaurasiya84/introducing-sast-scan-a-lightweight-sast-tool-for-javascript-security-9km</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjlxxrr8na71t7a2shtej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjlxxrr8na71t7a2shtej.png" alt="sast-scan" width="800" height="644"&gt;&lt;/a&gt;&lt;strong&gt;🛡️ Secure Your JavaScript Code with Ease.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Security is a critical aspect of software development, and as developers, we should all strive to ensure our applications are free of vulnerabilities. Introducing sast-scan, a simple yet powerful static application security testing (SAST) tool designed to scan JavaScript codebases for vulnerabilities.&lt;/p&gt;

&lt;p&gt;In this post, I will walk you through what sast-scan is, how it works, and how it can help you maintain more secure code!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is sast-scan?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;SAST-scan is a lightweight static analysis tool that scans JavaScript files to help identify security vulnerabilities during the development process. It is built to be fast, easy to use, and ideal for developers looking to add a security layer to their codebase without complex configurations.&lt;/p&gt;

&lt;p&gt;The tool scans your JavaScript files and provides feedback on potential vulnerabilities, allowing you to mitigate them before they reach production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features of sast-scan:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;- Lightweight and Fast: No unnecessary complexity or overhead.&lt;/li&gt;
&lt;li&gt;- Simple Integration: Add sast-scan to your projects with just a few commands.&lt;/li&gt;
&lt;li&gt;- JavaScript Focused: Built with JavaScript security in mind.&lt;/li&gt;
&lt;li&gt;- Open-Source: You can explore the code, contribute, or raise issues on GitHub.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How to Install and Use sast-scan:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the package:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To install sast-scan, use npm:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install sast-scan&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Basic Usage:
save file filename.js
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import scanCode from 'sast-scan';
console.log(scanCode('const password = "12345";'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node filename.js

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Integrate the scanner into your project:&lt;/p&gt;

&lt;p&gt;Here’s an example of how to integrate sast-scan into a React application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react';
import scanCode from 'sast-scan'; // Import your npm package

const CodeScanner = () =&amp;gt; {
    const [code, setCode] = useState('');
    const [results, setResults] = useState([]);

    const handleScan = () =&amp;gt; {
        let vulnerabilities = [];
        try {
            vulnerabilities = scanCode(code); // Scan the code
        } catch (error) {
            console.error(`Error scanning code: ${error.message}`);
        }
        setResults(vulnerabilities);
    };

    return (
        &amp;lt;div&amp;gt;
            &amp;lt;h1&amp;gt;Code Scanner&amp;lt;/h1&amp;gt;
            &amp;lt;textarea
                value={code}
                onChange={(e) =&amp;gt; setCode(e.target.value)}
                placeholder="Enter code to scan"
            /&amp;gt;
            &amp;lt;button onClick={handleScan}&amp;gt;Scan Code&amp;lt;/button&amp;gt;
            &amp;lt;div&amp;gt;
                {results.map((result, index) =&amp;gt; (
                    &amp;lt;div key={index}&amp;gt;
                        &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Vulnerability:&amp;lt;/strong&amp;gt; {result.message}&amp;lt;/p&amp;gt;
                        &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Fix:&amp;lt;/strong&amp;gt; {result.fix}&amp;lt;/p&amp;gt;
                        &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Line Number:&amp;lt;/strong&amp;gt; {result.lineNumber}&amp;lt;/p&amp;gt;
                    &amp;lt;/div&amp;gt;
                ))}
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    );
};

export default CodeScanner;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;• Vulnerability: The vulnerability description&lt;br&gt;
• Fix: Suggested fix&lt;br&gt;
• Line Number: Line number of the issue&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;try now &lt;a href="https://www.npmjs.com/package/sast-scan" rel="noopener noreferrer"&gt;sast-scan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🤝 Contributing &amp;amp; Collaboration&lt;/p&gt;

&lt;p&gt;We’d love to have your contributions to improve sast-scan! Whether it’s reporting bugs, suggesting new features, or submitting pull requests, your feedback and help are greatly appreciated.&lt;/p&gt;

&lt;p&gt;How to Contribute:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  Fork the Repository: GitHub Repo
2.  Clone the Repo:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/ankitchaurasiya84/sast-scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3.  Create a New Branch:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b feature-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Make your changes, then commit and push:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "Brief description of changes"
git push origin feature-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Submit a Pull Request:&lt;/strong&gt; &lt;br&gt;
We will review and provide feedback.&lt;br&gt;
If you’re passionate about code security and improving JavaScript tooling, let’s collaborate! Feel free to reach out via &lt;a href="https://github.com/ankitchaurasiya84/sast-scan/issues" rel="noopener noreferrer"&gt;GitHub Issues &lt;/a&gt;to discuss ideas or improvements you’d like to see.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ankitchaurasiya84/sast-scan/" rel="noopener noreferrer"&gt;GITHUB&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/sast-scan" rel="noopener noreferrer"&gt;NPM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;or Try my SAST Scanner &lt;a href="https://github.com/ankitchaurasiya84/sast-scanner" rel="noopener noreferrer"&gt;React Project&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92v8fyamxwzvo5d7sf8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92v8fyamxwzvo5d7sf8f.png" alt="sast-scan ReactJS Project" width="800" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post provides an overview of sast-scan, its installation process, and a quick example of how to use it in a React app. It’s designed to attract attention from developers who need a lightweight SAST tool for JavaScript security.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>npm</category>
      <category>code</category>
    </item>
    <item>
      <title>🚀 Asynchronous JavaScript : Micro tasks vs. Macro tasks 🚀</title>
      <dc:creator>Ankit chaurasiya</dc:creator>
      <pubDate>Fri, 13 Sep 2024 10:53:47 +0000</pubDate>
      <link>https://dev.to/ankitchaurasiya84/asynchronous-javascript-micro-tasks-vs-macro-tasks-30dd</link>
      <guid>https://dev.to/ankitchaurasiya84/asynchronous-javascript-micro-tasks-vs-macro-tasks-30dd</guid>
      <description>&lt;p&gt;In JavaScript, managing asynchronous tasks is essential for smooth applications. Here’s a quick breakdown:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvaxh7e5q1q8pj09smh6s.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvaxh7e5q1q8pj09smh6s.gif" alt=" " width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔍 Microtasks&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Examples: Promise callbacks, &lt;code&gt;MutationObserver&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Priority: Higher than macrotasks.&lt;/li&gt;
&lt;li&gt;Execution: Runs after the current task and before the next event loop iteration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⏳ Macrotasks&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Examples: &lt;code&gt;setTimeout&lt;/code&gt;, &lt;code&gt;setInterval&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Priority: Lower than microtasks.&lt;/li&gt;
&lt;li&gt;Execution: Runs after the microtask queue is empty, starting a new event loop iteration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🛠️ Why It Matters&lt;br&gt;
Understanding these concepts helps optimize performance and manage asynchronous operations effectively. Remember, promises resolve before any macrotasks execute!&lt;/p&gt;

&lt;p&gt;What’s your experience with async programming in JavaScript? Share below! 💬👇&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
