jquery-param

WebJar for jquery-param

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

jquery-param
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

jquery-param
WebJar for jquery-param
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/knowledgecode/jquery-param

Download jquery-param

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/jquery-param/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>jquery-param</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/jquery-param/
implementation 'org.webjars.npm:jquery-param:0.1.2'
// https://jarcasting.com/artifacts/org.webjars.npm/jquery-param/
implementation ("org.webjars.npm:jquery-param:0.1.2")
'org.webjars.npm:jquery-param:jar:0.1.2'
<dependency org="org.webjars.npm" name="jquery-param" rev="0.1.2">
  <artifact name="jquery-param" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='jquery-param', version='0.1.2')
)
libraryDependencies += "org.webjars.npm" % "jquery-param" % "0.1.2"
[org.webjars.npm/jquery-param "0.1.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

jquery-param

Circle CI

Features

  • Equivalent to jQuery.param (based on jQuery 3.x)
  • No dependencies
  • Universal (Isomorphic)
  • ES Modules Support

Installation

Node.js:

npm install jquery-param --save

the browser:

<script src="/path/to/jquery-param.min.js"></script>

Usage

CommonJS:

const param = require('jquery-param');

const obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };
const str = param(obj);
// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"

TypeScript:

import param from 'jquery-param';

const obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };
const str = param(obj);
// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"

You will need to add "esModuleInterop": true to the "compilerOptions" field in tsconfig.json.

ES Modules:

<script type="module">
import param from './esm/jquery-param.es.js';

const obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };
const str = param(obj);
// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"
</script>

Older browser:

<script>
var obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };
var str = window.param(obj);    // global object
// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"
</script>

Browser Support

Chrome, Firefox, Safari, Edge, and IE9+.

License

MIT

Versions

Version
0.1.2