Skip to content

Instantly share code, notes, and snippets.

@goodjob1114
Created August 19, 2015 08:41
Show Gist options
  • Save goodjob1114/11c736a1881b6194841d to your computer and use it in GitHub Desktop.
Save goodjob1114/11c736a1881b6194841d to your computer and use it in GitHub Desktop.
split file test
// npm install --save split-file
// https://github.com/tomvlk/node-split-file
var sf = require('split-file');
sf.splitFile('unicorn.png', 10, function(err, names) {
if(err) return console.log(err);
console.log(names);
sf.mergeFiles(names, 'unicorn.merge.png', function(err, outputFile) {
if(err) return console.log(err);
console.log(outputFile);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment