Questions tagged as 'es6'

3
answers

How to make my function only affect the element that is being clicked

I have this function, but when it is executed it is applied to all the elements and since I am using its css style reference to grasp the elements, all are painted and not only the one that is clicked $('.vermas').click(function(){ $('.e...
asked by 28.03.2018 / 02:29
2
answers

ES6 arrow functions traversing an array

question: How to show the elements of an array with arrow functions? I understand that given an array with elements, I pass the array as a parameter, but what I do not understand, is that it must go in the body of the function? Can this be...
asked by 11.03.2017 / 03:06
1
answer

Class constructors can not be invoked without 'new'

I was trying to make a package of npm , something simple: class Hello { constructor(world){ this._world = world | 'world'; } world(){ return this._world; } } module.exports = Hello; After doing tests...
asked by 02.02.2018 / 15:09
1
answer

Error finding exported modules

I have a problem and that using the library es6-module-loader-dev is giving me an error to get the classes that I'm importing. The truth initially I thought it was the route, but after checking them, see if the classes had the export and...
asked by 10.02.2017 / 18:58
1
answer

TypeScript Filter array of objects by evaluating all their attributes

I have the following problem, I need to filter the objects of an array using a searched value (usually a string) but to verify all the attribute of the object (it is a key / value dictionary, it is not something else) and not only a specific one...
asked by 21.04.2017 / 15:16
0
answers

How to upload videos in mp4 format with webpack?

My current webpack.config const webpack = require( 'webpack' ); const ExtractTextPlugin = require( 'extract-text-webpack-plugin' ); const PurifyCSSPlugin = require( 'purifycss-webpack' ); const autoprefixer = require( 'autop...
asked by 10.02.2018 / 12:13
0
answers

How to use uglifyjs with classes?

I have written a library called joe.js which contains some functions and two classes. The problem comes when I try to use the uglifyjs command uglifyjs joe.pretty.js --compress --mangle > joe.js which returns the error: Parse error at...
asked by 10.11.2017 / 13:27
2
answers

Export class with express

I currently work full scripts for example: function comprobar(){ console.log('aqui el codigo'); } exports.permitir = comprobar; and I need to work with classes, something like this: class Comprobador { function comprobar() { consol...
asked by 25.01.2018 / 21:01
2
answers

Filter array of objects in Javascript

I have the following array of friends: friends = [ {id: 1, name: "uSUARIO2", username: "usuario1"}, {id: 2, name: "uSUARIO2", username: "usuario1"}, {id: 3, name: "uSUARIO3", username: "usuario1"}, {id: 4, name: "uSUARIO4", username: "...
asked by 31.01.2018 / 01:12
1
answer

How can I navigate the properties of an object to save data in an array-like property?

Hello, I have a structure that is an object that has several arrays as properties. Example: items: {Dogs: [], Cats: [], ....} I want to go through these properties comparing each one with a variable with the name and the conincida to save...
asked by 19.03.2018 / 22:50