
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
babel-plugin-remove-glsl-comments
Advanced tools
Remove comments in glsl shader source.
// vertex.glsl.js
const vs = `
/* Projection uniforms */
uniform mat4 viewMatrix;
uniform mat4 projectionMatrix;
uniform mat3 modelMatrix;
/* Attributes */
attribute vec3 positions;
attribute vec3 instancePositions;
main() {
vec4 worldPosition = vec4(instancePositions + modelMatrix * positions, 1.); // resolved position of the current vertex
gl_Position = projectionMatrix * viewMatrix * worldPosition;
}
`;
// vertex.glsl.js
const vs = '\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat3 modelMatrix;\n\nattribute vec3 positions;\nattribute vec3 instancePositions;\n\nmain() {\n vec4 worldPosition = vec4(instancePositions + modelMatrix * positions, 1.);\n gl_Position = projectionMatrix * viewMatrix * worldPosition;\n}\n';
Note: for safety, this plugin does not remove dynamically generated comments, e.g.
const vs = `/* MODULE ${name} STARTS */`;
const vs = `// END OF ${name}`;
$ npm install --save-dev babel-plugin-remove-glsl-comments
.babelrc
(Recommended).babelrc
{
"plugins": ["remove-glsl-comments"]
}
With options:
{
"plugins": [["remove-glsl-comments", {
"patterns": ["*.glsl.js"]
}]]
}
$ babel --plugins remove-glsl-comments script.js
require("babel-core").transform("code", {
plugins: ["remove-glsl-comments"]
});
An array of glob expressions that specify which files to apply this plugin to. Default ['*.js']
.
FAQs
Babel plugin for removing glsl comments
The npm package babel-plugin-remove-glsl-comments receives a total of 213 weekly downloads. As such, babel-plugin-remove-glsl-comments popularity was classified as not popular.
We found that babel-plugin-remove-glsl-comments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.