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

@onkarruikar/test-package

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onkarruikar/test-package - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

28

index.js

@@ -0,1 +1,3 @@

// test package
const path = require('path');

@@ -6,11 +8,23 @@ const fs = require('fs');

function init(rootDir = process.cwd()) {
function init(rootDir = null) {
console.log(`test-package: process.cwd(): ${process.cwd()}`);
console.log(`test-package: path.resolve('./'): ${path.resolve('./')}`);
if(!rootDir){
//rootDir = path.resolve('./');
// OR
rootDir = process.cwd();
}
//const configPath = path.resolve('./', CONFIG_NAME);
// OR
const configPath = path.join(rootDir, CONFIG_NAME);
if (fs.existsSync(configPath)) {
console.log(`Reading config from: ${configPath}`);
console.log(`test-package: Reading config from: ${configPath}`);
try {
//const data = fs.readFileSync(configPath, 'utf8');
//const config = JSON.parse(data);
// OR
const config = require(configPath);

@@ -23,11 +37,15 @@ console.log(config);

console.log(`Couldn't find config file ${configPath}. Using default.`)
console.log(`test-package: Couldn't find config file ${configPath}. Using default.`)
}
console.log('\n')
}
//init()
const features.init = init;
const features = {
init:init,
message: `Hello from test-package! 👋`
}
module.exports = features;

2

package.json
{
"name": "@onkarruikar/test-package",
"version": "1.0.2" ,
"version": "1.0.3" ,
"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