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

clientconfig

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clientconfig - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

test/index.js

2

clientconfig.bundle.js

@@ -21,3 +21,3 @@ (function(e){if("function"==typeof bootstrap)bootstrap("clientconfig",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeClientconfig=e}else"undefined"!=typeof window?window.clientconfig=e():global.clientconfig=e()})(function(){var define,ses,bootstrap,module,exports;

var cookie = document.cookie,
setPos = cookie.indexOf(name + '='),
setPos = cookie.search(new RegExp('\\b' + name + '=')),
stopPos = cookie.indexOf(';', setPos),

@@ -24,0 +24,0 @@ res;

@@ -5,3 +5,3 @@ {

"description": "Simple way to pass config items from server to client",
"version": "1.0.0",
"version": "1.1.0",
"tags": [

@@ -16,9 +16,22 @@ "browser",

"dependencies": {
"cookie-getter": "0.0.2"
"cookie-getter": "^1.0.0"
},
"devDependencies": {
"precommit-hook": "0.3.4",
"browserify": "2.18.1"
"browserify": "2.18.1",
"jshint": "^2.9.0",
"precommit-hook": "latest",
"tap-spec": "^4.1.0",
"tape": "^4.2.0"
},
"main": "./clientconfig.js"
"main": "./clientconfig.js",
"scripts": {
"test": "node test/index.js | tap-spec",
"lint": "jshint .",
"validate": "npm ls"
},
"pre-commit": [
"lint",
"validate",
"test"
]
}

@@ -23,7 +23,7 @@ # clientconfig

Clientconfig simply looks for a cookie named `config` parses it at JSON and immediately wipes it out to avoid burdening subsequent requests with that extra overhead.
Clientconfig simply looks for a cookie named `config` parses it as JSON and immediately wipes it out to avoid burdening subsequent requests with that extra overhead.
## How do I use it?
On the serverside when serving up your reqeust set a cookie containing the values you'd like to pass to the client in JSON.
On the server-side when serving up your request set a cookie containing the values you'd like to pass to the client in JSON.

@@ -30,0 +30,0 @@ If you're using node.js, express and `getconfig` it'd work like this:

Sorry, the diff of this file is not supported yet

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