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

urlcode-json

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlcode-json

This is a tool for converting JSON object to an urlencode string like python's urllib.urlencode() method or decode an url to a JSON object.

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
181
increased by88.54%
Maintainers
1
Weekly downloads
 
Created
Source

urlcode-json

This is a tool for converting JSON object to an urlencode string like python's urllib.urlencode() method or decode an url to a JSON object.

USAGE&Example

var str_1 = urlcodeJson.encode( { "name" : "cashlee" , "language" : "中文" } , true );
var str_2 = urlcodeJson.encode( { "name" : "cashlee" , "language" : "中文" } , false );
console.log( str_1 );//"name=cashlee&language=%E4%B8%AD%E6%96%87"
console.log( str_2 );//"name=cashlee&language=中文"

var str_3 = urlcodeJson.decode( "name=cashlee&language=cantonese" );
console.log( str_3 );//{ "name" : cashlee" , "language" : "cantonese" } 

Command-line interface

$ node urlcode-json {"name":"cash","language":"en"}

> name=cash&language=en

$ node urlcode-json name=cash\&language=en

> {name:'cash',language:'en'}

(P.S : Remember,in command-line you should add '\' before each '&')

Keywords

FAQs

Package last updated on 02 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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