
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
React responsive navigation menu component. The simplest configuration, easy to use.
React responsive navigation menu. The simplest configuration, easy to use.
With a JSON config file, build an HTML navigation menu for use in any React based website. No more editing HTML or nested jsx code when your navigation menu items change. Instead, edit the intuitive JSON config.
[
{
"nav": [], // empty nav structure denotes root link nav item (rather than a dropdown)
"title": "Home",
"href": "/"
},
{
"nav": [ // nav list, denotes respective number of levels of dropdowns
"weather",
"nyc weather"
],
"title": "10 day forecast", // title is the name of the final link with associated href
"href": "https://weather.com" // can be any valid href value
},
{
"nav": [
"weather",
"nyc weather",
"storm watch"
],
"title": "nyc storms",
"href": "/post/storms.html"
},
{
"nav": [
"food",
"cookies"
],
"title": "chocolate chip cookies",
"href": "/post/cookies.html"
}
{
"nav": [],
"title": "Contact",
"href": "/contact"
},
]
Install flap-nav
with your favorite package manager.
npm i flap-nav
flap-nav
exports a React component by default for easy JSX composition:
ES6-style usage:
import {FlapNav} from 'flap-nav';
const data = require('../data/data.json');
// or declare your data in your jsx directly
const navData = [
{
// ...
{
"nav": [
"weather",
"nyc weather"
],
"title": "10 day forecast",
"href": "https://weather.com"
},
// etc...
}
]
const Header = (props) => {
return (
<header id="header" className="flex stretch">
<div>
<FlapNav data={data} />
</div>
</header>
);
}
flap-nav
in action at Freebird's blog siteimport {NomBuilder} from 'flap-nav';
const data = require('../data/data.json');
// Abstract tree of your navigation model, iterate over to build iOS or Android menu systems, for example with React Native
// Or, for use with any Node app.
// See flapnav.js for a recursive pattern to iterate over your Nom and build your menu
const myNavNom = NomBuilder(data);
FAQs
Did you know?
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.