Socket
Socket
Sign inDemoInstall

csv-builder

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

4

package.json
{
"name": "csv-builder",
"author": "Nick Pisacane <pisacanen@gmail.com> (http://nickpisacane.com)",
"version": "0.0.1",
"version": "0.0.2",
"description": "Create csv formated streams from Arrays of Objects.",

@@ -24,4 +24,4 @@ "license": "MIT",

"scripts": {
"test": "mocha ./test/main.test.js"
"test": "node ./test/main.test.js"
}
}

@@ -30,8 +30,8 @@ # Csvbuilder

.virtual('Firstname', function(obj) {
return obj.split(' ')[0];
return obj.name.split(' ')[0];
})
// virtual properties are treated like any property,
// if it is not defined in the headers, it needs a constraint
// virtual properties are treated like any propery,
// if it is not defined in the headers, it still needs a constraint
.virtual('lastname', function(obj) {
return obj.split(' ')[1];
return obj.name.split(' ')[1];
});

@@ -86,4 +86,1 @@

Create's a transform stream. The stream expects either Objects or JSON.
# License
MIT

@@ -11,5 +11,5 @@ /**

// test data
var testData = require(__dirname + '/data.json');
var testData = require('./data.json');
// expected csv value
var expected = fs.readFileSync(__dirname + '/expected.csv');
var expected = fs.readFileSync('./expected.csv');

@@ -16,0 +16,0 @@ // test instance

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc