JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q57393F
  • License ISC

Package Exports

  • http-form-urlencoded
  • http-form-urlencoded/index

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (http-form-urlencoded) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

README

a x-www-form-urlencoded & URLSearchParams class
import LazyURLSearchParams from '../index';
import assert from 'assert';

let u = new LazyURLSearchParams({
    nickname: 'xxxxxxx',
    passwd: {k:'xxxxxxx'}
});

console.dir(u.toString());

assert.deepStrictEqual(u.toString(), 'nickname=xxxxxxx&passwd=%7B%22k%22%3A%22xxxxxxx%22%7D');

u = new LazyURLSearchParams();

u.push(...Object.entries({
    nickname: 'xxxxxxx',
    passwd: {k:'xxxxxxx'}
}));

console.dir(u.toString());

assert.deepStrictEqual(u.toString(), 'nickname=xxxxxxx&passwd=%7B%22k%22%3A%22xxxxxxx%22%7D');

u = new LazyURLSearchParams();

u.extend({
    nickname: 'xxxxxxx',
    passwd: {k:'xxxxxxx'}
});

console.dir(u.toString());

assert.deepStrictEqual(u.toString(), 'nickname=xxxxxxx&passwd=%7B%22k%22%3A%22xxxxxxx%22%7D');