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

interview-questions

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interview-questions - npm Package Compare versions

Comparing version 1.2.0 to 1.2.3

16

cli.js

@@ -13,2 +13,3 @@ #!/usr/bin/env node

const format = args.format || 'text';
const theme = args.theme || '';

@@ -20,3 +21,4 @@ const logHeader = (header) => console.log('\x1b[32m%s\x1b[0m', header);

console.log("--top ${amount}");
console.log("--level ( junior | middle | senior )");
console.log("--level ( basic | intermediate | advanced )");
console.log("--theme ( closures | storage | es6 | classes | database ... and other 203 themes)");
console.log("--format ( text | array | json )");

@@ -34,6 +36,11 @@ };

default:
result.forEach(({ title, url }) => {
result.forEach(({ title, url, text, theme }) => {
console.log('');
logHeader(`Question: ${title}`);
console.info(`Answer: \x1b]8;;${url}\x1b\\${url}\x1b]8;;\x1b\\`);
if (url) {
console.info(`Answer: \x1b]8;;${url}\x1b\\${url}\x1b]8;;\x1b\\`);
} else {
console.info(`Answer: ${text}`);
}
console.info(`Hash: ${theme.split(',').map((data) => ` #${data.trim().toLowerCase()}`)}`);
logDivider();

@@ -52,6 +59,7 @@ });

const result = await interviewQuestion({ filter, amount, level, format });
const result = await interviewQuestion({ filter, amount, level, format, theme });
displayQuestions(result, format);
console.log('');
console.log(`Found ${result.length} questions`);
logExampleParams();

@@ -58,0 +66,0 @@

@@ -40,3 +40,3 @@ 'use strict';

*/
async execute(filter = 'all', amount = 0, level = null) {
async execute(filter = 'all', amount = 0, level = null, theme = null) {
let filteredData = this.data;

@@ -53,2 +53,7 @@

// Filter by level if provided
if (theme) {
filteredData = filteredData.filter(item => item.theme.split(',').map((data) => data.trim().toLowerCase()).includes(theme));
}
switch (filter) {

@@ -94,4 +99,4 @@ case 'all':

const interviewQuestion = new InterviewQuestion(options);
const { filter = 'all', amount = 0, level = null } = options;
return interviewQuestion.execute(filter, amount, level);
const { filter = 'all', amount = 0, level = null, theme = null } = options;
return interviewQuestion.execute(filter, amount, level, theme);
};
{
"name": "interview-questions",
"version": "1.2.0",
"version": "1.2.3",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

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