
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
consus-flux
Advanced tools
Flux modules for the Consus project
npm install consus-flux --save
import { Dispatcher } from 'consus-flux';
Dispatcher.handleAction('INCREMENT', {
amount: 5
});
import { Store } from 'consus-flux';
let count = 0;
class CounterStore extends Store {
getCount() {
return count;
}
}
const store = new CounterStore();
store.registerHandler('INCREMENT', data => {
count += data.amount;
store.emitChange();
});
store.registerHandler('DECREMENT', data => {
count -= data.amount;
store.emitChange();
});
export default store;
import CounterStore from './counter-store';
function handleChange() {
console.log('The count is now: ' + CounterStore.getCount());
}
CounterStore.addChangeListener(handleChange);
setTimeout(() {
CounterStore.removeChangeListener(handleChange);
}, 10000);
# Clone the repository
git clone git@github.com:TheFourFifths/consus-flux.git
# Enter the project directory
cd consus-flux
# Install dependencies
npm install
# Build the project
npm run build
# Run the test suite
npm test
npm test
: Run the test suitenpm run lint
: Run the linternpm run build
: Build the usable .dist
directorynpm run coverage
: Generate a code coverage reportsrc
: The project's source codetest
: The project's tests
lib
: Miscellaneous library modulesunit
: Unit testsFAQs
Flux modules for the Consus project
We found that consus-flux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.