Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parseqs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parseqs - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

index.js

@@ -9,3 +9,3 @@ /**

exports.qs = function (obj) {
exports.encode = function (obj) {
var str = '';

@@ -30,3 +30,3 @@

exports.qsParse = function(qs){
exports.decode = function(qs){
var qry = {};

@@ -33,0 +33,0 @@ var pairs = qs.split('&');

{
"name": "parseqs",
"version": "0.0.1",
"version": "0.0.2",
"description": "Provides methods for parsing a query string into an object, and vice versa.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -9,7 +9,7 @@ var assert = require('better-assert');

// Single assignment
var queryObj = util.qsParse("foo=bar");
var queryObj = util.decode("foo=bar");
expect(queryObj.foo).to.be("bar");
// Multiple assignments
queryObj = util.qsParse("france=paris&germany=berlin");
queryObj = util.decode("france=paris&germany=berlin");
expect(queryObj.france).to.be("paris");

@@ -19,3 +19,3 @@ expect(queryObj.germany).to.be("berlin");

// Assignments containing non-alphanumeric characters
queryObj = util.qsParse("india=new%20delhi");
queryObj = util.decode("india=new%20delhi");
expect(queryObj.india).to.be("new delhi");

@@ -25,6 +25,6 @@ });

it('should construct a query string from an object', function () {
expect(util.qs({ a: 'b' })).to.be('a=b');
expect(util.qs({ a: 'b', c: 'd' })).to.be('a=b&c=d');
expect(util.qs({ a: 'b', c: 'tobi rocks' })).to.be('a=b&c=tobi%20rocks');
expect(util.encode({ a: 'b' })).to.be('a=b');
expect(util.encode({ a: 'b', c: 'd' })).to.be('a=b&c=d');
expect(util.encode({ a: 'b', c: 'tobi rocks' })).to.be('a=b&c=tobi%20rocks');
});
});
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