
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@hypersprite/toggle-state-rp
Advanced tools
Handles the toggle state for its children
Returned props:
npm install --save @hypersprite/toggle-state-rp
import OpenState from '@hypersprite/toggle-state-rp';
Place child component inside function return and use the parameters.
<OpenState
render={toggleStateRP => (
<DialogMessage
{...toggleStateRP}
otherProp={this.props.otherPropsOne}
/>
)}
/>
This example assumes a dialog component with some buttons inside looking for "toggle" and some handler functions
git clone https://github.com/HyperSprite/toggle-state-rp.git
cd toggle-state-rp
npm install
npm uses the package name for the module directory placement, not the folder name or repo name, even though they are usually the same. Open package.json and check the name, in this case: "name": "@hypersprite/toggle-state-rp",
Assuming you have a flat folder structure:
Run link from inside your working app
npm link ../toggle-state-rp
If you look in node_modules, you will now see a directory called @hypersprite
with a sub directory toggle-state-rp
You can use your local version inside your app as if it was a published module
import OpenStateRP from '@hypersprite/toggle-state-rp';
If you run install or update on your working app, you will need to rerun the link command. If you are doing this a lot, you could make an npm script for it in your package.json to run after installs, something like:
package.json
"scripts": {
"localmodules": "npm link ../toggle-state-rp && npm link ../some-other-local-project"
}
This will not work if you need to run sudo to to install npm modules, [see this article here](see this http://justjs.com/posts/npm-link-developing-your-own-npm-modules-without-tears) if you need help fixing that .
Testing provided by Jest, Enzyme and coverage report by Istanbul
npm test
Runs all tests.npm run test:dev
only runs the tests in src in watch mode.The branch must be clean to version and publish
git commit -am 'some totally useful comment'
Next, we need to Version:
Note: An initial publish needs a little setup before
npm version
will work.
// manually build your dst
npm run build
// publish your module
// --access public if this is a scoped module and you want it public
npm publish --access public
// delete dst folder
rm -rf dst
npm version <major | minor | patch>
FAQs
'toggle' state render props controller
The npm package @hypersprite/toggle-state-rp receives a total of 3 weekly downloads. As such, @hypersprite/toggle-state-rp popularity was classified as not popular.
We found that @hypersprite/toggle-state-rp 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.