New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-sharedpref

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-sharedpref

Cordova Shared preference plugin

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

cordova-plugin-sharedpref

=========

A small library providing utility methods to save and get a string to the native Shared preference of android

Installation

npm install cordova-plugin-sharedpref --save

Usage

In the index.html include :

  <script type="text/javascript" src="SharedPref.js"></script>

/**
* to save a value to the shared preference
* @param {string} type save or get
* @param {string} key the key to be stored
* @param {string} value The value/text to be stored
*/
SharedPref.arkPref("save", "name", "yovan juggoo", function (prefObj) {
    alert(JSON.stringify(prefObj));
 });
 
/**
* to get a value from the shared preference
* @param {string} type save or get
* @param {string} key the key to be stored
* @param {string}  " " an empty string
*/
SharedPref.arkPref("get", "name", " ", function (prefObj) {
    alert(prefObj.name);// .name is the key of the object received by the callback
});

Release History

  • 0.0.3 Initial release

Keywords

FAQs

Package last updated on 26 Nov 2015

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