orxapi.tools.url
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

npm version

orxapi.tools.url

The URL tools library for orxapi.

Getting Started

If you haven't used NodeJs before, be sure to have install the LTS version on your desktop ! Check your version with this command:

node -v
v6.9.2

Installation

npm install orxapi.tools.url --save-dev

This library is written in TypeScript, but you can use JavaScript.

Usage

TypeScript code

import { getParameterString } from "orxapi.tools.url";
 
// Get parameter as string
const param = getParameterString();

Methods

  • getUrlVar Get the URL parameters
  • getUrlHashVar Get the URL hash parameters
  • getQueryString TGet the URL query string
  • getParameterString Get parameter as string
  • getAbsoluteUrl Get the absolute url from a relative one
  • addUrlParameter Add a new value on the query
  • addUrlQuery Add all query to an existing query
  • buildParameters Converts urlVarsParameters to string
  • removeParameters Build Url with URL and parameters

See docs for more informations

This library was designed to work with ES 5+

TODO

  • Add unit tests
  • Improve the documentation
  • V2 add class with methods

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i orxapi.tools.url

    Weekly Downloads

    69

    Version

    1.0.2

    License

    ISC

    Last publish

    Collaborators

    • emmanuel.s