Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cypress/env-or-json-file

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/env-or-json-file - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

2

package.json
{
"name": "@cypress/env-or-json-file",
"description": "Loads JSON object from environment string or local file",
"version": "1.0.1",
"version": "1.1.0",
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/cypress-io/env-or-json-file/issues",

@@ -50,2 +50,13 @@ # @cypress/env-or-json-file

## Filename
Given a filename with path, function `filenameToShellVariable` converts it to
environment key name, normalizing slashes and dots.
```js
const {filenameToShellVariable} = require('@cypress/env-or-json-file')
filenameToShellVariable('foo/bar/.me.json')
// foo_bar__me_json
```
## Tips

@@ -52,0 +63,0 @@

@@ -13,3 +13,6 @@ const path = require('path')

const rep = '_'
return filename.replace(/\//g, rep).replace(/\./g, rep).replace(/-/g, rep)
return filename
.replace(/\//g, rep)
.replace(/\./g, rep)
.replace(/-/g, rep)
}

@@ -52,3 +55,4 @@

module.exports = {
configFromEnvOrJsonFile
configFromEnvOrJsonFile,
filenameToShellVariable
}
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