
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
stl-parser
Advanced tools
STL-parser is a transform stream which convert STL-files to newline separated JSON events for each face.
STL-parser is a transform stream which convert STL-files to newline separated JSON events for each face. Check out jsonlines.org for a detailed specification of the jsonl format.
As a module for your project:
npm install stl-parser
As a command line program:
npm install -g stl-parser
cat test.stl | stl-parser
This emits a jsonl file-stream with header and facet events.
The cli flags --ascii
and --binary
can be used to enforce
parsing with the specified file-encoding.
var stlParser = require('stl-parser'),
stlStream = fs.createReadStream('/path/to/stl/file.stl'),
outputFile = fs.createWriteStream('/path/to/export/file.jsonl')
stlStream
.pipe(stlParser())
.pipe(outputFile)
There is also the possibility to use it buffered and get one javascript object for the whole STL. This should, however, only be used for small files.
var stlParser = require('stl-parser'),
stl = fs.readFileSync('/path/to/stl/file.stl')
stlParser(stl).on('data', (data) =>
fs.writeFileSync('/path/to/export/file.json', data)
)
FAQs
STL-parser is a transform stream which convert STL-files to newline separated JSON events for each face.
The npm package stl-parser receives a total of 19 weekly downloads. As such, stl-parser popularity was classified as not popular.
We found that stl-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.