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

fastconf

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastconf - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

11

index.js

@@ -50,5 +50,12 @@ 'use strict'

function applyKey (key, retval, options, env) {
function applyKey (_key, retval, options, env) {
let key
if (typeof _key === 'string') {
key = [_key]
} else {
key = _key
}
if (!Array.isArray(key)) {
throw new Error('Key provided is not an array!')
throw new Error('Key provided is not an array or a string!')
}

@@ -55,0 +62,0 @@

2

package.json
{
"name": "fastconf",
"version": "0.0.3",
"version": "0.1.0",
"description": "super simple environment-based configuration utility",

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

@@ -30,3 +30,3 @@ fastconf

keys: [
['ZIG_ZAG', {type: String}]
'ZIG_ZAG' // You can also just provide strings (options are defaults)
]

@@ -33,0 +33,0 @@ }

@@ -62,3 +62,3 @@ 'use strict'

keys: [
['ZIG_ZAG', {type: String}]
'ZIG_ZAG'
]

@@ -132,6 +132,6 @@ }

test('keys provided must be arrays', t => {
test('keys provided must be arrays or strings', t => {
t.plan(4)
const expectedError = 'Key provided is not an array!'
const expectedError = 'Key provided is not an array or a string!'

@@ -269,1 +269,4 @@ const cases = [

test.todo('nested call conflict validation')
test.todo('key checking if array')
test.todo('key checking if string')
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