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.
19
questions
2
votes
2
answers
70
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.
...
5
votes
3
answers
762
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 ...
1
vote
1
answer
61
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 ...
0
votes
2
answers
50
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
...
8
votes
1
answer
227
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 "...
5
votes
1
answer
185
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:
...
8
votes
3
answers
3k
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 ...
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?...
3
votes
3
answers
2k
views
Handling arrow keys and tabIndex
I'm wondering how to "beautify"/"simplify" this code:
...
3
votes
1
answer
44
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 ...
4
votes
2
answers
162
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?
...
1
vote
2
answers
83
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" ...
1
vote
1
answer
68
views
4
votes
1
answer
719
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 ...
2
votes
0
answers
25
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 ...
2
votes
1
answer
88
views
Emulating the pipe operator in javascript in a readable way
In this article I found this quite elegant looking Elixir code:
...
4
votes
0
answers
174
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 ...
6
votes
1
answer
189
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 ...
3
votes
1
answer
73
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. The first version fetched data from chat transcripts using PHP. The sub-domain I have registered for my webspace ...