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

react-outlet

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-outlet - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

.ctags

5

CHANGELOG.txt

@@ -0,1 +1,6 @@

2016-09-19 Version 1.0.5
* Added Outlet.reset() for easier server-side usage
* Contributed by adamastern
2016-03-12 Version 1.0.4

@@ -2,0 +7,0 @@

2

package.json
{
"name": "react-outlet",
"version": "1.0.4",
"version": "1.0.5",
"description": "Transclusion helpers for React.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -31,3 +31,3 @@ # React Outlet [![Travis][travis-badge]][travis] [![npm package][npm-badge]][npm]

```
```jsx
var Outlet = require("react-outlet").Outlet;

@@ -72,3 +72,3 @@ var Plug = require("react-outlet").Plug;

```
```html
Static Methods:

@@ -79,2 +79,5 @@

components as the outletId prop.
Outlet.reset()
Reset the Outlet's registry. This was added for server-side React usage.

@@ -81,0 +84,0 @@ Components:

@@ -270,2 +270,19 @@ jest.autoMockOff();

});
it("supports clearing all outlets from the registry", function() {
var id = Outlet.new_outlet_id();
TestUtils.renderIntoDocument(
<TestDiv>
<Outlet outletId={ id } className="outlet-content" />
</TestDiv>
);
expect(outlet_registry.outlets.hasOwnProperty(id)).toBeTruthy();
Outlet.reset();
expect(outlet_registry.outlets != null
&& typeof outlet_registry.outlets === "object"
&& !Array.isArray(outlet_registry.outlets)
).toBeTruthy();
expect(Object.keys(outlet_registry.outlets).length).toEqual(0);
});
});

@@ -272,0 +289,0 @@

@@ -62,2 +62,6 @@ function OutletRegistry() {

OutletRegistry.prototype.reset = function(){
this.outlets = {};
};
module.exports = new OutletRegistry();

@@ -6,3 +6,4 @@ var React = require("react");

statics: {
new_outlet_id: registry.generate_id.bind(registry)
new_outlet_id: registry.generate_id.bind(registry),
reset: registry.reset.bind(registry)
},

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

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