
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.
@arve.knudsen/bankai
Advanced tools
$ npm install bankai
Given the following client.js
:
const css = require('sheetify')
const html = require('bel')
const prefix = css`
:host > h1 { font-size: 12rem }
`
const el = html`
<section class=${prefix}>
<h1>hello planet</h1>
</section>
`
document.body.appendChild(el)
Render with server.js
:
const bankai = require('bankai')
const http = require('http')
const path = require('path')
const clientPath = path.join(__dirname, 'client.js')
const assets = bankai(clientPath)
http.createServer((req, res) => {
switch (req.url) {
case '/': return assets.html(req, res).pipe(res)
case '/bundle.js': return assets.js(req, res).pipe(res)
case '/bundle.css': return assets.css(req, res).pipe(res)
default: return (res.statusCode = 404 && res.end('404 not found'))
}
}).listen(8080)
Usage:
$ bankai <command> [options]
Commands:
<default> Run 'bankai start'
start <filename> Start a bankai server
build <filename> <directory> Compile and export files to a directory
Options:
-c, --css=<subargs> Pass subarguments to sheetify
-h, --help Print usage
-j, --js=<subargs> Pass subarguments to browserify
-o, --open=<browser> Open html in a browser [default: system default]
-O, --optimize Optimize assets served by bankai [default: false]
-p, --port=<n> Bind bankai to <n> [default: 8080]
Examples:
$ bankai index.js -p 8080 # start bankai on port 8080
$ bankai index.js --open # open html in the browser
$ bankai -c [ -u sheetify-cssnext ] # use cssnext in sheetify
$ bankai -j [ -t brfs ] # use brfs in browserify
$ bankai build index.js dist/ # compile and export to dist/
$ bankai build -O index.js dist/ # optimize compiled files
Create a new instance of bankai
. The first argument is a route to the entry
file that is compiled by browserify
. The second argument is optional and can
take the following options:
{}
). Pass options to browserify
. Cannot be
disabled{}
). Pass options to sheetify
. Set to false
to
disable{}
). Pass options to create-html
. Set to false
to disablefalse
). Disable livereload scripts, cache
output and optimize all bundlesReturn a js
stream. Sets correct header values if req
and res
are passed.
Return a html
stream. Sets correct header values if req
and res
are passed.
Return a css
stream. Sets correct header values if req
and res
are passed.
FAQs
The easiest way to compile JavaScript, HTML and CSS
The npm package @arve.knudsen/bankai receives a total of 15 weekly downloads. As such, @arve.knudsen/bankai popularity was classified as not popular.
We found that @arve.knudsen/bankai 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.