Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@inshur/nowucit
Advanced tools
React package that provides the ability to toggle visibility on features and components.
Using npm
npm install @inshur/nowucit
Using yarn
yarn add @inshur/nowucit
import React from 'react';
import ReactDOM from 'react-dom';
import { createFireBaseClient, FeaturesProvider } from 'nowucit';
import App from './App';
// firebase connection details
const config = {
apiKey: '__API_KEY__',
authDomain: '__AUTH_DOMAIN__',
projectId: '__PROJECT_ID__',
storageBucket: '__STORAGE_BUCKET____',
messagingSenderId: '__MESSAGING_SENDER_ID__',
appId: '__APP_ID__',
measurementId: '__MEASUREMENT_ID__',
collectionId: '__COLLECTION_ID__',
};
// create client
const client = createFireBaseClient(client);
ReactDOM.render(
<FeaturesProvider client={client}>
<App />
</FeaturesProvider>,
document.getElementById('app')
);
The FeaturesProvider
is able to take in an optional overrides
array which take precedence over features that have been fetch using the data provider client.
import React from 'react';
import ReactDOM from 'react-dom';
import { createFireBaseClient, FeaturesProvider } from 'nowucit';
import App from './App';
const config = {...};
const client = createFireBaseClient(client);
const overrides = [{ name: 'slider', value: false }, { name: 'tabs', value: true }];
ReactDOM.render(
<FeaturesProvider client={client} overrides={overrides}>
<App />
</FeaturesProvider>,
document.getElementById('app')
);
Feature
is a consumer component which can be used as a wrapper and also as a render prop component
import React from 'react';
import { Feature } from 'nowucit';
const App = () => (
<>
<Feature name='slider'>
<div>Slider feature enabled</div>
</Feature>
<Feature name='tabs' render={(isEnabled) => isEnabled ?
<div>Tabs feature enabled</div> : <div>Tabs feature disabled</div>} />
<Feature name='tabs'>
{(isEnabled) => isEnabled ?
<div>Tabs feature enabled</div> : <div>Tabs feature disabled</div>}
</Feature>
</>
);
import React from 'react';
import { withFeature } from 'nowucit';
const SliderComponent = () => <div>Slider component</div>;
export default withFeature('slider')(SliderComponent);
FAQs
Features toggle package
We found that @inshur/nowucit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.