
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Dependency free syntax highlighter for react.
The component is scaled 100% wide and 100% high relative to the div .wrapper which contains it. This allows for a full customization for height, width and other things such as transitions and box shadows.
Download via npm: https://www.npmjs.com/package/syntacks
npm install syntacks
Demo: https://git.io/vQ9Nj
Upload/browse themes: https://goo.gl/iUrPZ7
Copy the file your download like so...
Import it into your file...
Add your syntack box...
And you're done :) :+1:
Default themes are found here https://git.io/vQ9Nj and user uploaded custom themes here https://goo.gl/iUrPZ7
To create or use custom themes, all you have to do is define one with its properties like so. The parameters follow the below template.
/*
> color
> bgColor
> spineColor
> quotesColor
> conditionColor
> globalsColor
> standardMethodsColor
> specialMethodsColor
> commentColor
*/
import { Syntack, SyntackThemes } from '../syntack/syntack.js';
const myCoolTheme = new SyntackThemes(
'rgb(255, 255, 255)',
'rgb(41, 43, 57)',
'rgb(29, 31, 42)',
'rgb(138, 154, 181)',
'rgb(47, 162, 124)',
'rgb(203, 89, 192)',
'rgb(230, 28, 26)',
'rgb(174, 95, 230)',
'rgb(67, 135, 153)'
);
/* Note: Don't get confused,
* you don't need to specifically
* use rgb it's just what I am using in this example. */
// Use the customTheme prop instead of the default, theme.
<Syntack customTheme={myCoolTheme.compiled()} code={myCode}/>
In order to create an input into the syntack component we just have to use some super simple vanilla react.
import React, {Component} from 'react';
import {Syntack} from '../syntack/syntack.js';
class myComponent extends Component {
constructor(props) {
super(props)
this.state = { editedCode: ''};
}
handleCode(e) {
this.setState({editedCode: e.target.value});
}
render() {
const SyntaxOutput = {
"width":"500px",
"height":"350px",
"position":"absolute",
"transform":"translate(-50%, -50%)",
"left":"50%",
"top":"40%"
};
const defaultInput = {
"width":"500px",
"height":"200px",
"position":"absolute",
"transform":"translate(-50%, -50%)",
"left":"50%",
"top":"80%"
};
return(
<div>
<div style={SyntaxOutput}>
<Syntack theme='github' code={this.state.editedCode}/>
</div>
<textarea onChange={e => this.handleCode(e)} style={defaultInput} />
</div>
);
)
}
}
FAQs
Unknown package
The npm package syntacks receives a total of 6 weekly downloads. As such, syntacks popularity was classified as not popular.
We found that syntacks 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.