Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
2 answers
381 views

web scraper for emails and links

I created a class to scrape URLS, parse and validate emails and get internal links. How can I achieve the SOLID principles in this class written in Javascript to make a web scraper? ...
biel sala's user avatar
5 votes
1 answer
79 views

Class for Switch statements

This is more to get clarity on an implementation that I did. I am working on a React, Node, and Electron application that essentially has a form that a user inputs values that will update some content ...
Grant Herman's user avatar
5 votes
1 answer
373 views

Writing a BitTorrent client in JavaScript

I'm trying to write a JavaScript BitTorrent client in Node.js to get more familiar with the language and ecosystem. I don't know how often people use classes in JavaScript since I feel like the ...
calvines's user avatar
2 votes
0 answers
3k views

Initializing a Node JS Express Application with OOP [closed]

Overview I am attempting to learn Node JS with Express by creating a project. I have seen many examples of setting up an express.js application with functional based programming, like so: ...
Gavin Youker's user avatar
1 vote
1 answer
2k views

Node.js DataBase class for adodb databases

A while ago I was working on a multipurpose database class (an es6 javascript class) that works with any database supporting adodb. This class is a wrapper on the "node-adodb" npm library. This ...
MilesZew's user avatar
  • 167
1 vote
1 answer
49 views

Node router for marketplace routes

After cleaning up & some refactoring, one module of my code became like below. However, I'm feeling like there's still some unnecessary redundancy, and it can be improved further and look neater. ...
kmonsoor's user avatar
  • 113
3 votes
1 answer
84 views

Validity checks for a user signup process

Background: I have been working on a service which allows users to signup on different apps and on each login checks if the request is valid or not based on a series of checks. The below snippet is ...
CodeYogi's user avatar
  • 5,177
1 vote
2 answers
142 views

Print bounding box in the terminal

Right now I am finding ways to write better code in javascript and I see many coding styles used by different authors but right now I am thinking to write code which adheres to the object oriented ...
CodeYogi's user avatar
  • 5,177
0 votes
1 answer
129 views

Calculating the terminal width and height

As part of the bigger problem I am trying to solve smaller problems first and hence below is the code to find the terminal width and height. Code ...
CodeYogi's user avatar
  • 5,177
3 votes
1 answer
315 views

ES6 cron module

I just created my first ES6 module in Node, and first time using promises and I was hoping to get some feedback on it. I am the only developer at my current company, so I cannot get feedback here. I ...
Robert Yates's user avatar
2 votes
2 answers
5k views

Socket.io Node.js Object Oriented Code Structure Approach

following application: Users can join Rooms. A Gameroom inherits from Room and has a queue where Users can queue for a game. If enough people queue they get thrown into a game lobby. Lobby also ...
IDontEven's user avatar
3 votes
1 answer
561 views

Generating sinusoidal music as WAV output in JavaScript ES6

This is a single isomorphic class in ES6, written with the intention of generating a full WAV file given note names and durations in seconds. In JavaScript it can ...
Patrick Roberts's user avatar
1 vote
1 answer
60 views

Exporting a list of projects in Node.JS

I am using the following code in a Node.js / React project. It works fine but it looks like it could be consolidated a little more using a OO pattern. ...
j0e's user avatar
  • 111
2 votes
1 answer
146 views

Input-reading library for Node.JS

Recently I have been busy with nodejs and I thought to create something like this Java input library, so I started with some rough code like below: ...
CodeYogi's user avatar
  • 5,177
1 vote
3 answers
158 views

Multilingual greeter object

After coming across Douglas Crockford's views on class-free OOP, and doing away with new and this in Javascript I tried defining an object with its own variable and function, and returning it in JSON, ...
ahron's user avatar
  • 113

15 30 50 per page