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

express-state

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-state - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.travis.yml

26

lib/exposed.js

@@ -59,3 +59,5 @@ 'use strict';

this.__namespaces__.forEach(function (namespace) {
var parts = [];
var parts = namespace.split('.'),
leafPart = parts.pop(),
nsPart = 'g';

@@ -65,16 +67,9 @@ // Renders the JavaScript to instantiate each namespace as needed, and

// namespace once.
if (!rendered[namespace]) {
namespace.split('.').forEach(function (part, i) {
var ns;
while (parts.length) {
nsPart += '.' + parts.shift();
parts.push(part);
ns = parts.join('.');
if (!rendered[ns]) {
rendered[ns] = true;
ns = 'g.' + ns;
namespaces.push(ns + ' || (' + ns + ' = {});');
}
});
if (!rendered[nsPart]) {
rendered[nsPart] = true;
namespaces.push(nsPart + ' || (' + nsPart + ' = {});');
}
}

@@ -85,3 +80,4 @@

// exposed via the `add()` method.
exposed.push('g.' + namespace + ' = ' + serialize(this[namespace]) + ';');
nsPart += '.' + leafPart;
exposed.push(nsPart + ' = ' + serialize(this[namespace]) + ';');
}, this);

@@ -88,0 +84,0 @@

@@ -37,7 +37,6 @@ 'use strict';

return str.replace(PLACE_HOLDER_REGEX, function (match, type, index) {
if (type === 'FUNCTION') {
switch (type) {
case 'FUNCTION':
return functions[index].toString();
}
if (type === 'REGEXP') {
case 'REGEXP':
return regexps[index].toString();

@@ -44,0 +43,0 @@ }

{
"name" : "express-state",
"description": "Expose an Express app's state via client-side JavaScript.",
"version" : "0.0.1",
"description": "Share server-side state with the client-side of an Express app via JavaScript.",
"version" : "0.0.2",
"homepage" : "https://github.com/yahoo/express-state",
"keywords": [
"express", "state", "client", "expose", "data", "config", "javascript"
"express", "state", "client", "expose", "data", "config", "javascript", "model", "json"
],

@@ -10,0 +10,0 @@

@@ -7,4 +7,7 @@ Express State

[![Build Status](https://travis-ci.org/yahoo/express-state.png?branch=master)][Build Status]
[Express]: https://github.com/visionmedia/express
[Build Status]: https://travis-ci.org/yahoo/express-state

@@ -19,3 +22,9 @@

Install using npm:
```shell
$ npm install express-state
```
Usage

@@ -22,0 +31,0 @@ -----

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