Questions tagged as 'javascript'

2
answers

Apply immutability effect on objects of an ECMA6 JavaScript class

For example, I have the following class: class LavarCarro { constructor(cor, placa, data_entrada) { this._cor = cor; this._placa = placa; this._data_entrada = data_entrada; Object.freeze(this); // congela a...
asked by 10.07.2017 / 13:56
2
answers

What is the purpose of the WeakMap object?

How does the WeakMap object work? What's the difference between it and a Object (which is the most common in Javascript)? What is the difference between WeakMap and Map ? Which browsers can I use?
asked by 13.07.2018 / 18:38
2
answers

How to add Cardboard Mask?

I have a problem to re-adapt this function in JS. function mcc(v){ v=v.replace(/\D/g,""); v=v.replace(/^(\d{4})(\d)/g,"$1 $2"); v=v.replace(/^(\d{4})\s(\d{4})(\d)/g,"$1 $2 $3"); v=v.replace(/^(\d{4})\s(\d{4})\s(\d{4})(\d)/g,"$1 $2 $3 $4"); ret...
asked by 25.11.2016 / 16:46
2
answers

Object filter disregarding accents in angleJS with Ionic

Talk to people, I would like to make an angle filter that would disregard the accents. This filter is applied over a list of objects that have a name property for example that we filter on top of this property. I'm using the approach in th...
asked by 13.05.2015 / 17:17
1
answer

Need for Server Side Award for Content javascript - AngularJs

Knowing that starting this year google crawler runs javascript , considering the indexing of a content that is displayed using AngularJs, is there still a need for a version of the same content rendered on the server side for SEO? Plus : Pr...
asked by 05.08.2014 / 14:11
1
answer

Is there a difference between a compiler and an interpreter?

What's the big difference between a compiler and an interpreter? In languages like C, Java is used as a compiler. In JavaScript, for example, an interpreter is used, but I was confronted with the JIT (just in time compiler) term. How can I...
asked by 15.03.2017 / 12:46
3
answers

How to make a burger menu open from right to left?

I have a hamburguer menu that opens from left to right, however, I would like it to open up from the right to the left, how do I do this? Following is my code below: /* * Open the drawer when the menu ison is clicked. */ var m...
asked by 13.12.2016 / 12:37
1
answer

Clone functions deeply

I'd like to clone some objects deep. I've seen this question: Creating a copy of an object in Javascript ... However, none of the answers offers a way to clone a function deeply. In other words, if an array object has functions, its clon...
asked by 05.09.2017 / 13:38
1
answer

How to filter with ANGULAR JS not to repeat the same names?

I have 2 related tables in the bank: The first table: if it is called restaurant the other Table: Cardapio. The Cardapio Table receives the primary key from the restaurant, so it becomes foreign until then, I get this information from the bank w...
asked by 08.07.2016 / 21:16
1
answer

Why does the enhancer "lose" the loop? [duplicate]

Making a simple loop FOR , I encountered a strange behavior that I could not understand. The count is "lost" in the AJAX request, keeping the incrementer value with the last one. The URL request always returns 200 and still doe...
asked by 27.05.2016 / 00:01