ECMAScript 6 reached feature complete status in 2014. The features vary widely from completely new objects and patterns to syntax changes to new methods on existing objects.

learn more… | top users | synonyms (1)

0
votes
0answers
10 views

Async boolean expression evaluator in ES6

This is a pretty simple Node package designed to accept a "boolean expression" and evaluate it asynchronously. The full project is on GitHub. Essentially, an expression like ...
0
votes
1answer
26 views

ES6 block-scope variable usage

I am experimenting with ES6 using BabelJS in a codepen project you can find here. I am confused as to why my code breaks when I decide to use let instead of ...
-1
votes
0answers
17 views

Using const for a variable in a for … of EcmaScript6 loop [closed]

This works fine, at least when using Babel for the EcmaScript6 to 5 transpilation: ...
0
votes
1answer
35 views

Reusing a Class

I made a UI picker tool, like a "rolling select" to pick vales (demo here). I made first a independent module with a ES6 Class, basically: ...
1
vote
2answers
16 views

Finding the positive numbers count in an ECMAScipt array

All I am trying to achieve is better use of built-in ES functions. ...
1
vote
1answer
36 views

Simple recipes web app with Redux

I have completed a coding challenge from Free Code Camp. The challenge's user stories are as follows: I can create recipes that have names and ingredients. I can see an index view where the ...
0
votes
1answer
32 views

Creating and finding posts using Parse.com

The following code calls Parse. And uses its API to create two functions: post.create and post.find. As the names imply, one is ...
6
votes
1answer
50 views

VCF parser for eventual genomic data visualization

I've just started out writing an app that will visualize genomic data for anybody to understand. When you get your genome sequenced the raw data usually comes in the form of a VCF file. I started out ...
2
votes
0answers
24 views

A 'top 100' app that displays list of users ordered in two different ways

I built a small app that gets data from a remote json file and displays it in a list of users. In each list item, an image of the user, their name, and their points tallies are shown. The list is ...
3
votes
1answer
44 views

Range iterator in ES6 similar to Python and Ruby for

Background and Purpose For those unaccustomed to Ruby, Ruby supports range literals i.e. 1..4 meaning 1, 2, 3, 4 and ...
1
vote
1answer
111 views

Pagination logic created from scratch

I created this JavaScript class using ES6-ES7 syntax to return an array of page numbers and ellipsis points (null) to be consumed by a function which will create a styled paginator. What I am looking ...
1
vote
0answers
34 views

Async process to send a contact email and confirmation message

Using nodemailer and node-email-templates to send a contact email and confirmation message. As is, I can catch any errors, but (if a file attachment is included), this process can take up to 30 secs ...
7
votes
1answer
45 views

React & ES6 news app

I have written a small app that fetches news items from an endpoint and displays them in a grid. I used React to create components and use them throughout the app. This is the first thing I have ...
3
votes
0answers
15 views

Min-Heap based priority queue class written in ES6

I would appreciate any feedback on syntax, naming convention, possible shortcuts, clarity of code and any other constructive feedback. This code was based off of the Priority Queue chapter in The ...
4
votes
4answers
81 views

Finding the max sequence finder

Problem Statement Find the max sequence finder. findMaxSequence([3, 2, 3, 4, 2, 2, 4]); ...
2
votes
0answers
15 views

Return the Euler Cycle for a graph with es6

My algorithm for finding an Euler tour of a digraph, G⃗, if such a tour exists, starting from some vertex, v. ...
2
votes
2answers
62 views

Reduce array of objects into object of arrays

I have an array of objects where each object has two keys: key (k) and value (v). I need to make an object that would take ...
5
votes
0answers
22 views

Node bot to send out reminder-emails if a team member doesn't submit their weekly schedule

This CalendarService is part of a little node-bot I wrote today which sends out reminder-emails if a team member forgets to submit his weekly schedule in time. Calendar backend is using Google ...
4
votes
1answer
96 views

Recursive, depth first search

I wanted to write a function findDeep that would perform a recursive, depth-first search on plain objects and arrays. Comments and criticism welcome. ...
1
vote
0answers
49 views

ReactJs Tabbed component

I've written a simple tabbed component in ReactJS, whose purpose was to make defining different tabs very simple. My implementation does this very well in my opinion, since defining tabs becomes very ...
1
vote
0answers
42 views

JavaScript plugin architecture for multiple methods with the same parameters

I am writing a JavaScript plugin for fun. The plugin allows the user to pass options to initialize the plugin and perform actions. It is a simple alert/confirm plugin just for fun. I am hoping to ...
5
votes
1answer
52 views

Using generators to build up a maze

In prepping to teach a workshop on recursion I wrote this code that uses a maze-building algorithm. In doing so I found it really natural to use generators a lot. I feel pretty happy with how the code ...
1
vote
1answer
51 views

Currying addition function in ECMAScript 6

I wanted to write an add function that implemented currying in JavaScript. I welcome criticism and suggestions for improvement. ...
0
votes
1answer
35 views

ES6 call `this` in Array.filter

Does exist a cleaner way to call a static method inside ES6 Array.filter function ? ...
0
votes
0answers
34 views

Long arithmetic addition implemented functional style

This implementation uses ECMA6 syntax and babel as transpiler. You can use this code to add integers which is bigger then Number.MAX_SAFE_INTEGER ...
3
votes
0answers
61 views

HashMap and HashSet classes for ES6

The new EcmaScript standard, ES6, contains specifications for Map and Set built-in classes. Each of these collections treats an ...
2
votes
1answer
50 views

Sum an array of video lengths in JavaScript into HH:MM:SS

I am trying to learn functional programming in JavaScript, and saw a little task on Twitter that I wanted to have a go at: ...
1
vote
0answers
88 views

Knockout computed observables in ES6

I am trying out for the first time knockoutjs and babeljs and have a question on how to do computed observables properly. Both fullName and ...
2
votes
0answers
42 views

Return React child component based on current state

I am trying to build a multi page form widget with React for a website inspired by this. Since quite some time has passed since I last touched JavaScript, I'm directly adapting to ES6/7 and tried to ...
1
vote
1answer
62 views

Node.js drawing game based off of my state diagram

I really want to have a nice design pattern for my Node.js project. This is my state diagram. As I'm coding this, I'm wondering if it's better to separate state logic from the class? So instead I ...
2
votes
0answers
190 views

Flux & async communication with websockets

I want to arrange async server-client communication with websockets and vanilla flux architecture. There is an excellent article about "Async Server-Side Communication with the Flux Architecture". I ...
0
votes
1answer
54 views

Flux: async communication with websockets

I want to arrange async server-client communication with websockets and vanilla flux architecture. There is an excellent article about "Async Server-Side Communication with the Flux Architecture". I ...
3
votes
0answers
29 views

Build a unique array of db fields

This is stripped down from a project I'm working on: ...
3
votes
0answers
55 views

String sequence in ES6

Given an unique string that represents a sequence of characters, the class should implement three methods (getNextChar, getNextString and the genSequence generator). How it works We give a sequence ...
1
vote
2answers
55 views
6
votes
0answers
76 views

Processing files with streams

I'm using io.js. I have to read some files as a stream, process them with the same function, and join them back into a stream. I decided to create my own solution with ...
6
votes
1answer
104 views

Generate probabilities around a numpad

Currently, I'm working on a game with directional movement influenced by the numpad. The player AI should intelligently pick a direction to move (so it's not entirely random, and can be somewhat ...
4
votes
1answer
111 views

Project Euler #55 - Lychrel numbers

If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. Not all numbers produce palindromes so quickly. For example, 349 + 943 = 1292, 1292 + 2921 = 4213 4213 + 3124 = ...
5
votes
1answer
112 views

Class(es) for animating objects on a canvas

I'm building a simple canvas animation engine as an exercise in learning ES6. Coming from C++ and Java, I miss static properties, but I've read that "Prototypes having data properties is generally ...
10
votes
2answers
217 views

Hello, First Name Last Name

I've been working on learning React, and so like most people do when they get started on something new. I created an arbitrary simple project to get a bit more familiar with the concepts. It's so ...
2
votes
1answer
47 views

Dependency Injection with classes which are created often

I have a question about dependency injection and best practices when using simple classes which are meant to be created often, which have dependencies on external services. Here's a (vastly) ...
6
votes
1answer
109 views

ECMAScript text component

At the moment, I'm learning ES6 and how to write classes, and I'd like to know if I'm doing things right and I have some points that are not clear to me. Please find my code here at bitbucket and ...
10
votes
1answer
121 views

Hunt the wumpus: Functional JavaScript (Node) with Lodash

I'd like a code review of the following simple implementation of the classic game Hunt the Wumpus I'm trying to use JavaScript in the most "functional" way. To help me, I'm using lodash and ES6. ...
4
votes
1answer
105 views

Salsa20 stream cipher

I have been implementing Salsa20 by studying the design and specification. I have made sure to unit test every function along the way and match the outputs against the test vectors in the spec. I am ...
1
vote
0answers
24 views

99 bottles of beer on the wall + EcmaScript 6

Today, a solution written in Python was posted to this challenge, and since I was inspired by it, I made a version in EcmaScript 6. I tried to explore some new language constructs: arrow functions ...
1
vote
1answer
53 views

Get friend lists

I've never written on VKScript (and on Javascript). I need high performance code to get more friend lists faster. ...
1
vote
2answers
614 views

ES6 classes and ReactJS: implementing propTypes

I had a problem to define propTypes for my React class. I ran into solution that doesn't feel right: ...
3
votes
1answer
304 views

Toggling element class according checked radio input V2.0

This question is about an improvement of the code from this previous question (previous changed visibility, new applies a CSS class with a border). It is a constructor function that attaches a click ...
12
votes
2answers
403 views

Javascript/ECMAscript 6 classes organization

So I have been trying to wrap my head around all the new options in ECMAscript 6 and to do this I tried to develop a simple setup which would allow me to place absolutely positioned ...