Using URLSearchParams in JavaScript

What is URLSearchParams? URLSearchParams is a built-in JavaScript interface that makes it easy to work with the query string of a URL. A query string is the part of a URL that comes after the “?” and contains key-value pairs. Example URL: https://example.com/page?customerId=123&status=active Query string: customerId=123&status=active Why Use URLSearchParams? It helps you: Read values from… Continue reading Using URLSearchParams in JavaScript

ECMAScript 2025: The new features in JavaScript

The latest JavaScript specification standardizes a well-balanced and thoughtful set of features, including the built-in global Iterator, new Set methods, improvements to regular expressions, and more. This year’s update to the JavaScript specification covers a lot of ground. The headline addition is the new built-in Iterator object and its functional operators. Other updates include new Set methods, a direct JSON module… Continue reading ECMAScript 2025: The new features in JavaScript

Applying Logic to a Button (Make Copy) in NetSuite

Overview In NetSuite, the “Make Copy” button allows users to duplicate existing transaction records—such as Sales Orders, Invoices, or Purchase Orders—while retaining most of the original data. However, there may be cases where you need to apply custom logic during this duplication process (for example, clearing certain fields, recalculating amounts, or setting new default values).… Continue reading Applying Logic to a Button (Make Copy) in NetSuite

How to Export Formatted Excel Reports Using ExcelJS in JavaScript

This example demonstrates how to generate a styled Excel report using ExcelJS in JavaScript. It includes custom headers, conditional formatting, column alignment, and dynamic column width adjustment. import ExcelJS from ‘exceljs’; import { saveAs } from ‘file-saver’; const downloadReport = async (reportData, options = {}) => {  try {   const {    centerAlignedCols = [‘Quantity’],    rightAlignedCols… Continue reading How to Export Formatted Excel Reports Using ExcelJS in JavaScript

How to persist Pinia variables in vue js

In command prompt enter the command npm i pinia-plugin-persistedstate Add the plugin to pinia import { createPinia } from ‘pinia’ import piniaPluginPersistedstate from ‘pinia-plugin-persistedstate’ const pinia = createPinia() pinia.use(piniaPluginPersistedstate) Add the persist option to the store you want to be persisted: import { defineStore } from ‘pinia’ export const useStore = defineStore(‘store’, { state: ()… Continue reading How to persist Pinia variables in vue js

Handling String Comparison Issues Caused by HTML Encodings and Line Breaks

Overview During implementation, we encountered an issue where string values were not matching correctly due to inconsistencies in how they were stored and compared. Specifically: Some values contained HTML entities like &lt; and &gt; instead of < and >. Some values included HTML line breaks (<br>), carriage returns, or multiple spaces. As a result, direct… Continue reading Handling String Comparison Issues Caused by HTML Encodings and Line Breaks

Exploring GraphQL Queries in React

Why GraphQL with React? GraphQL allows you to request exactly the data you need, reducing over-fetching and under-fetching issues common in REST. React’s component-based architecture pairs beautifully with GraphQL’s declarative data-fetching approach, making it easier to manage state and render UI based on server responses. Install Apollo Client npm install @apollo/client graphql  Configure Apollo Client… Continue reading Exploring GraphQL Queries in React

Forking Repo in github

Forking a repository on GitHub creates a personal copy of someone else’s repository under your own GitHub account. This allows you to experiment with changes or contribute to the original project without affecting it directly. Here’s a concise guide to forking a repository on GitHub: Steps to Fork a Repository on GitHub: Navigate to the… Continue reading Forking Repo in github

Styling Console Logs

Provided is a sample code used to style the console logs console.log(‘%cStyled Log’, ‘color: blue; font-size: 20px;’);