
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
mkconstants
Advanced tools
mkconstants
===========
If you're building up a nested object of constants, for use with things like
facebook/Flux, it's handy to have a function that can process said object
and return something that can be compared upon. Also, namespaced on a per-
app basis.
So, for instance:
mkconstants('ProductsApp', {
ActionTypes: {
Product: {
RECEIVE_RAW_INSTANCE: null
}
},
PayloadSources: {
SERVER_ACTION: null,
VIEW_ACTION: null
}
});
Would output:
{
ActionTypes: {
Product: {
RECEIVE_RAW_INSTANCE: 'ProductsApp.ActionTypes.Product.RECEIVE_RAW_INSTANCE'
}
},
PayloadSources: {
SERVER_ACTION: 'ProductsApp.PayloadSources.SERVER_ACTION',
VIEW_ACTION: 'ProductsApp.PayloadSources.VIEW_ACTION'
}
}
These are not only unique, but also great for debugging purposes.
FAQs
A utility function for recursively building an object of constants.
We found that mkconstants demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.