Socket
Socket
Sign inDemoInstall

dicer

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dicer

A very fast streaming multipart parser for node.js


Version published
Weekly downloads
1.6M
decreased by-10.71%
Maintainers
1
Weekly downloads
 
Created

What is dicer?

The dicer npm package is a very fast streaming multipart parser that can be used to parse multipart/form-data input. It is particularly useful for handling file uploads and multipart HTTP requests in Node.js applications.

What are dicer's main functionalities?

Multipart Parsing

This code sets up a new Dicer instance with a specified boundary and listens for 'part' events to process each part of the multipart data. It also listens for the 'finish' event to know when all parts have been processed.

const Dicer = require('dicer');
const d = new Dicer({ boundary: '---------------------------168072824752491622650073' });
d.on('part', function(p) {
  console.log('New part!');
  p.on('data', function(data) {
    console.log('Part data: ' + data.toString());
  });
  p.on('end', function() {
    console.log('End of part');
  });
});
d.on('finish', function() {
  console.log('End of parts');
});
d.write('some multipart data buffer');

Other packages similar to dicer

Keywords

FAQs

Package last updated on 29 May 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc