Initial commit

This commit is contained in:
Spencer Pincott
2024-07-15 22:20:13 -04:00
commit 97737ca1ae
16618 changed files with 934131 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
const transform = require('..')
const assert = require('assert')
// Generate a dataset of 500 records
const records = '.'.repeat(500).split('.').map( (_, i) => i )
// Transform the dataset
transform(records, {
parallel: 1
}, function(record, callback){
setTimeout(function(){
callback(null, record)
// Random timeout to prove sequential execution
}, Math.ceil(Math.random() * 10))
}, function(err, records){
assert.equal(
records.join(','),
'.'.repeat(500).split('.').map( (_, i) => i ).join(',')
)
})