New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tfk-dsf-unwrap-contact

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tfk-dsf-unwrap-contact - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

lib/data/skoleskyss.json

7

index.js
'use strict'
var repackContact = require('./lib/repack-contact')
const repackContact = require('./lib/repack-contact')

@@ -9,4 +9,7 @@ function unwrapContact (contact) {

}
const templatePath = contact.templatePath || ''
if (contact.RESULT && contact.RESULT.HOV) {
return repackContact(contact.RESULT.HOV)
return repackContact(contact.RESULT.HOV, templatePath)
} else {

@@ -13,0 +16,0 @@ throw new Error('Malformed contact object')

'use strict'
var fs = require('fs')
var path = require('path')
function repackContact (data) {
function repackContact (data, filePath) {
if (!data) {
throw new Error('Missing required input: data object')
}
var template = require('./data/template.json')
const templatePath = path.resolve(filePath || 'lib/data/template.json')
if (fs.existsSync(templatePath)) {
var template = require(templatePath)
} else {
throw new Error('File does not exist: ' + templatePath)
}

@@ -9,0 +16,0 @@ Object.keys(template).forEach(function (key) {

{
"name": "tfk-dsf-unwrap-contact",
"version": "1.0.2",
"version": "1.0.3",
"description": "Unwraps contact information from dsf result",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -105,2 +105,3 @@ [![Build Status](https://travis-ci.org/telemark/tfk-dsf-unwrap-contact.svg?branch=master)](https://travis-ci.org/telemark/tfk-dsf-unwrap-contact)

data.templatePath = 'lib/data/skoleskyss.json' // To use another template

@@ -132,2 +133,2 @@ console.log(unwrapContact(data))

## License
[MIT](LICENSE)
[MIT](LICENSE)
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