Socket
Socket
Sign inDemoInstall

flat-spe

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flat-spe - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

see/SPE-00060-20180215-1044-diagnostic-276f4036eb400539.txt

18

index.js

@@ -25,7 +25,7 @@ #!/usr/bin/env node

for (var i in files) {
var lines = fs.readFileSync(files[i], 'utf-8').split('\n')
files.forEach(function(file) {
var lines = fs.readFileSync(file, 'utf-8').split('\n')
if (!lines.length) {
console.log('Unable to extract instrument name for file', files[i])
console.log('Unable to extract instrument name for file', file)
return

@@ -36,3 +36,3 @@ }

var p = path.dirname(files[i]) + '/' + 'event.json'
var p = path.dirname(file) + '/' + 'event.json'
var _event = JSON.parse(fs.readFileSync(p, 'utf-8'))

@@ -44,4 +44,4 @@ var key = _event.value.frame.testData.metadata.find(function(r) { return r.key === '!instrument.serial'})

var pieces = path.basename(files[i]).split('.txt')[0].split(' ')
var pieces = path.basename(file, '.txt').split(' ')
console.log(path.basename(file, '.txt'))
var yyyy = pieces[1].substring(4,8)

@@ -51,6 +51,6 @@ var dd = pieces[1].substring(0,2)

var name = instrumentName + '-' + yyyy + mm + dd + '-' + pieces[2] + '-' + pieces[0] + uuid() + '.txt'
var name = instrumentName + '-' + yyyy + mm + dd + '-' + pieces[2] + '-' + pieces[0] + '.txt'
var writeStream = fs.createWriteStream(destination + '/' + name)
fs.createReadStream(files[i]).pipe(writeStream)
fs.createReadStream(file).pipe(writeStream)

@@ -60,4 +60,4 @@ writeStream.on('finish', function() {

})
}
})
})
})
{
"name": "flat-spe",
"version": "1.2.1",
"version": "1.2.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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