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

jquery-deserialize

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

jquery-deserialize

Decodes serialized form data and populates the form with that data.

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
increased by43.67%
Maintainers
1
Weekly downloads
 
Created
Source

jQuery.deserialize

$("form").deserialize(data[, options]);

Decodes serialized form data and populates the form with that data. This method works upon text strings in standard URL-encoded notation, arrays containing objects of name/value pairs or objects containing name/value pairs. Thus, the plugin is compatibile with the data collected using the following methods:

  • jQuery.serialize()
  • jQuery.serializeArray()
  • jQuery.serializeObject() (unofficial)

Install

Download as NPM module:

npm install jquery-deserialize

Download as Bower component:

bower install jquery-deserialize

Example

Populate a form on page load using query string parameters:

jQuery(function( $ ) {
    $( 'form' ).deserialize( location.search.substr( 1 ) );
});

Arguments

The plugin accepts two arguments: data and options, the latter being optional. Passing the complete() function as the second argument to this plugin is also supported.

  • data String, Array, Object A serialized (and/or encoded) String, an Array of objects containing name/value pairs, or an object of name/value pairs.
  • options Object An object of key/value pairs that configure the plugin.
    • change Function Called for every changed input value.
    • complete Function Called when all of the inputs have been updated.
    • filter String|Function|Element|jQuery A custom filter to identify inputs to deserialize. By default, all inputs that are not disabled will be deserialized (this matches the behavior of serialization).

Requirements

jQuery.deserialize requires:

License

Copyright (c) Kyle Florence
jQuery.deserialize is dual licensed under MIT and GPLv2 licenses.

Keywords

FAQs

Package last updated on 25 Aug 2021

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