carvia-utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Carvia Utils

This Package Specially designed to be used in Carvia Technologies.

Install it with NPM with following command:

npm install carvia-utils

1. Query Parser

import {QueryParser} from "carvia-utils/lib/qp/QueryParser"

const qp = new QueryParser("?p=value");
const paramValue =  qp.getParam("p");
console.log(`param value: ${paramValue}`);
Method Name Description
constructor Takes query string as an input (eg. '?p=value')
getParam To get Value of a query parameter
addParam To add a new param to Query String
isEmpty To check if there is any param exists in query string
removeParam To remove a param from query string
hasParam To check if any particular param exists in query string
getParsedQuery Returns a object of parsed params from query string in key value (object) format
getQueryString Returns a string of params. params formatted in query string format (eg. '?p=value')

Readme

Keywords

none

Package Sidebar

Install

npm i carvia-utils

Weekly Downloads

5

Version

1.0.4

License

none

Unpacked Size

30.7 kB

Total Files

35

Last publish

Collaborators

  • 888x