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

cutwood

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cutwood - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.cutwood.js

17

bin/cli.js
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const argv = require('yargs').argv;
const profileLoader = require('../lib/profile-loader');
const config = require('rc')('cutwood', {});
const profileName = argv.profile || argv.p || config.p || config.profile || null;
const profileName = argv.profile || argv.p || config.p || config.profile || 'default';
console.log('Loading cutwood profile', profileName);
const profile = profileLoader.load(profileName);
const settingsPath = path.join(process.cwd(), '.cutwood.js');
if (fs.existsSync(settingsPath)) {
const settings = require(settingsPath);
console.log('CW::settings', settings);
profileLoader.load(settings);
}
console.log("CW::profile", profileName);
const profile = profileLoader.get(profileName);
const { CutWood } = require('../lib/cutwood');

@@ -15,0 +22,0 @@

'user strict';
const echo = (cutWood) => {
return cutWood.write();
const profiles = {
echo: (cutwood) => cutwood.write()
};
exports.load = (profileName) => {
exports.load = (newProfiles) => {
Object.assign(profiles, (newProfiles || {}).profiles);
};
exports.get = (profileName) => {
if (!profileName) {
return echo;
return profiles.echo;
}
if (profileName.toLowerCase() === 'server') {
return (cutWood) => {
return cutWood
.evict(/^{"event":"ops"/)
.colour(/error/, 'red')
.write();
};
if (typeof profileName === 'function') {
return profileName;
}
return echo;
return profiles[profileName] || profiles.echo;
};
{
"name": "cutwood",
"version": "0.0.1",
"version": "0.0.2",
"description": "Yet another logger",

@@ -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