Socket
Socket
Sign inDemoInstall

jquery-param

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-param - npm Package Compare versions

Comparing version 1.1.9 to 1.2.0

dist/esm/jquery-param.js

24

package.json
{
"name": "jquery-param",
"version": "1.1.9",
"version": "1.2.0",
"description": "equivalent function to jQuery.param",
"main": "jquery-param.js",
"module": "esm/jquery-param.es.js",
"main": "dist/umd/jquery-param.js",
"module": "dist/esm/jquery-param.mjs",
"scripts": {
"build": "rollup --config rollup.config.js",
"test": "node test/test-suite.js"
"build": "rollup -c",
"test": "npm run build && mocha test/test.mjs"
},

@@ -30,11 +30,9 @@ "repository": {

"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.26.0",
"expect.js": "^0.3.1",
"jquery": "^3.6.0",
"jsdom": "^19.0.0",
"mocha": "^7.2.0",
"mocha-phantomjs-core": "^2.1.2",
"phantomjs-prebuilt": "^2.1.16",
"rollup": "^2.50.6"
"@rollup/plugin-terser": "^0.2.1",
"chai": "^4.3.7",
"jquery": "^3.6.3",
"jsdom": "^20.0.3",
"mocha": "^10.2.0",
"rollup": "^3.9.1"
}
}

@@ -14,20 +14,12 @@ # jquery-param

Node.js:
via npm:
```shell
npm install jquery-param --save
npm i jquery-param
```
the browser:
```html
<script src="/path/to/jquery-param.min.js"></script>
```
## Usage
CommonJS:
```javascript
const param = require('jquery-param');
import param from 'jquery-param';

@@ -39,6 +31,6 @@ const obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };

TypeScript:
CommonJS:
```javascript
import param from 'jquery-param';
const param = require('jquery-param');

@@ -50,9 +42,7 @@ const obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };

*You will need to add `"esModuleInterop": true` to the `"compilerOptions"` field in `tsconfig.json`.*
ES Modules (Browser):
ES Modules:
```html
<script type="module">
import param from './esm/jquery-param.es.js';
import param from '/path/to/jquery-param.js';

@@ -65,8 +55,9 @@ const obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };

Older browser:
Traditional (Browser):
```html
<script src="/path/to/jquery-param.js">
<script>
var obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };
var str = window.param(obj); // global object
var str = window.param(obj);
// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"

@@ -73,0 +64,0 @@ </script>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc