Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
squid-config
Advanced tools
A lightweight configuration class for Squid applications.
Configuration files are basic javascript object stored in a commun folder.
'use strict';
module.exports = {
foo: 'baz'
, nested:
{
key: 'value'
}
}
The class require an object or file' path that will be the default configuration. You can add a second object/file' path that will be merged with the default one.
var ConfigManager = require('squid-config')
, SquidConfig = new config( './config/core', { foo: 'bar' } )
You can get a key by using dot notation or the whole configuration and provide a default value if key is undefined.
var validKey = SquidConfig.get('foo') // return bar
, nestedKey = SquidConfig.get('nested.key') // return value
, defaultValue = SquidConfig.get('fakekey', 'defaultValue') // return defaultValue
You can update a key value or unset the key.
// update key
SquiqConfig.set( 'foo', 'oof' )
// unset key
SquiqConfig.set('nested', false, {unset: true})
npm test
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
FAQs
A lightweight configuration class for Squid applications
We found that squid-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.