Questions tagged [ecmascript-8]

The 2017 version of the ECMAScript specification, now a standard (ECMAScript 2017). Only use this tag where the question specifically relates to new features or technical changes provided in ECMAScript 2017.

Filter by
Sorted by
Tagged with
2 votes
2 answers
60 views

Blog API implementation in node.js

This code is from my blog project. This project is almost done. This is working well. I can create new posts and update and display all saved posts. ...
user avatar
  • 33
5 votes
3 answers
741 views

Employee Model definition without an ORM

I am the author of this code. It's from an actual project, and it returns the desired result. However, I am very concerned that I'm not defining my Model correctly. The Model is instantiated in the ...
user avatar
1 vote
1 answer
58 views

Get images for PDFs from URLs

I Have the below code that gets urls of PDF files, send them to a convert function and returns them as images, is there a way to make this code more readable? Is there a way to avoid functions ...
user avatar
0 votes
2 answers
48 views

Looping Array object with conditions and comparison the performance with ECMA VS Vanilla JS

The Plain vanilla JS needs to converted in to advanced ECMA. The below 3 snippets shown yields the correct result. Need to identify which among them is performance oriented ...
user avatar
8 votes
1 answer
213 views

Way to delegate command to methods in different files

What I want to do is for an example command have it defined in its own file - e.g. command.js - and the same for the other methods. I want to make a separate file for every module - for example "...
user avatar
  • 131
5 votes
1 answer
160 views

Express.js blogging application

I have put together a blogging application with Express, EJS and MongoDB. There is a public, front-end part and a dashboard. In index.js I have: ...
user avatar
8 votes
3 answers
2k views

await user input with async/await syntax

for clarity: moved here from stackoverflow after being pointed to Code Review being the better place for this question I love async/await and Promises since I got my hands on them. And I might be ...
user avatar
10 votes
6 answers
1k views

Method to delegate command to other methods

Since I am working alone on this, I would like someone who would take a look and point out any mistakes or things I could have done better. My questions: How could I improve this big switch statement?...
user avatar
  • 131
2 votes
3 answers
882 views

Handling arrow keys and tabIndex

I'm wondering how to "beautify"/"simplify" this code: ...
user avatar
  • 183
3 votes
1 answer
42 views

User Access Authorization for Web Resources

Im refactoring a large internal legacy application and part of the stuff I want to get rid is the widespread code repetition. I'm starting with the way the website checks if a User can access a ...
user avatar
  • 171
4 votes
2 answers
116 views

Efficiently generate large file to create SQL table and insert sample user data

Here's a function I use to generate a 2.5 gig SQL dump file for testing. It works but it takes a long time. How can I make it more efficient? ...
user avatar
1 vote
2 answers
54 views

Use proxy for jQuery-like DOM extensions

I have cleared all my scripting from the use of JQuery, but sometimes I miss a few handy extensions. Now I'm playing with the idea to "extend" ...
user avatar
  • 577
1 vote
1 answer
61 views

Selecting/ Deselecting All from Checkbox

...
user avatar
4 votes
1 answer
578 views

Access token regeneration for Axios requests

Description I've developed an application which use axios to communicate with the PayPal API. PayPal has a NodeJS SDK, but unfortunately this doesn't support the ...
user avatar
  • 137
2 votes
0 answers
21 views

npm package as amqp client helper

I would like to build a common helper for my application that will manage all the amqplib calls from all of my nodeJS microservices. I would like to import my amqplibHelper to every microservice and ...
user avatar
  • 161
2 votes
1 answer
72 views

Emulating the pipe operator in javascript in a readable way

In this article I found this quite elegant looking Elixir code: ...
user avatar
  • 121
4 votes
0 answers
150 views

Node.js tool to update Cisco UCCX with CSV data

What this tool does update skills for agents on a Contact Center Cluster (Cisco UCCX). The tool reads a csv file called agents.csv from the current working directory. This file has a list of agents ...
user avatar
6 votes
1 answer
167 views

NodeJs crawler for recipes

Here is my try on a crawler made in nodeJs with cheerio, I made it with the idea in mind to use it in a future project I wanna make. Here is the git link: https://github.com/Just4lol/CookCrawler If ...
user avatar
2 votes
1 answer
57 views

Chart of answered CR posts percentages over time - Part 2

I created a graph to show the change in the percentage of questions answered over time and the first version fetched data from chat transcripts using PHP. The sub-domain I have registered for my ...
user avatar