Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unfixated

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unfixated

Stream fixed width files to objects

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by266.67%
Maintainers
1
Weekly downloads
 
Created
Source

unfixated

Stream fixed width files into objects

Install

npm install unfixated

How?

var Iconv  = require('iconv').Iconv;
var fs = require('fs');
var UnFixated  = require('unfixated');

var stream = fs.createReadStream(path.join(__dirname, 'fixedWidth.txt'));

var format = {
  firstName: 30,
  lastName:  30,
  phone:     15,
  address:  100,
};

// set conversion function
var iconv = new Iconv('CP1255', 'UTF-8');
var opt = {
  convert: iconv.convert.bind(iconv),
};

var unfixated = new UnFixated(format, opt);

unfixated.on('data', function(obj) {
  console.log(obj);
});

stream.pipe(unfixated);

License

MIT

Keywords

FAQs

Package last updated on 11 Apr 2015

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