Rxjs: How can I map a specific property based on a different variable?
// e.g:
of({
a: 1,
b: 2
}).pipe(..)
// property b should be mapped by the function getNumber
getNumber(number): Observable<number> {
return of(number*number);
}
@ErwinOkken Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
Afternoon - anyone know why a post request via axios (passing an object) with a getter. the getter is not included as part of the request. Only the propeties themselves that are not defined as getters
Sure, I have an ES6 object. it has some properties. It has a getter. I was hoping the getter() would be sent as part of the json object when I pass it to axios. It appears not!
i guess when transpiled the property is not defined
how can I make stylish font like 💎☝ 𝒽έ𝕝ĻØ 𝐖𝕆𝐑𝐥𝓭 𝐇όω ᵃ𝔯є ץ𝕠ⓤ? 🐸💘
I want to make a stylish name generator and want to use like this font, how can I do that ? for more font, 1. 😈♢ Ĥ𝒆Lᒪσ W๏Ⓡᒪ๔ ʰⓞ山 𝔞яε 𝔶𝕆υ? 🍟💝 2. •.¸♡ 卄ε𝕝ⓛ𝓸 w๏ⓡ𝓵Ⓓ h𝔬𝔴 𝓐Řⓔ yόυ? ♡¸.• 3. ✋💛 ℍ𝔢𝔩Łㄖ 𝓌Or𝐋ᗪ 𝕙ỖW 𝐀尺𝒆 ץØⓤ? ☯♪
Is anyone aware of a way to inspect or otherwise see the config settings used for a webpack build? I've tried console.log(), but you have to use JSON.stringify() to get the full object and I'm getting a circular reference error.
@NIKHILCHANDRAROY Make an object with letters for keys. For each letter, have the value as an array of all possibilities of that letter. Then just randomly select one based on input.
i don't know what that is? If you need to change special characters just add them to the object
@forresthopkinsa lol. I thought Caprica was a person for a good couple days. But then I was too afraid to ask, because I didn't want to offend if she was real.
Notable Changes ECMAScript Modules - --experimental-modules flag removal As of Node.js 12.17.0, the --experimental-modules flag is no longer necessary to use ECMAScript modules (ESM). However, the ESM implementation in Node.js remains experimental. As per our stability index: “The feature is not subject to Semantic Versioning rules. Non-backward compatible changes or removal may occur in…
Hey guys, I'm trying to print some nested objects to build a dynamic controlgroup with categories and checkbox whitin on html. I'm getting really lost on defining my object (with nested obj or nested arrays), also I'm getting lost on how to implement it (map, filter, reduce) with arrays or use the for (in) loop on objects
@BernardoMarques Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
When iterating over objects you have a couple options depending on what you need. You can use the for..in loop, however there are issues with that. I prefer to use Object.keys, Object.values, or Object.entries, with a forEach loop.
For Arrays, you can read up on map, filter, reduce, on mdn.
There is my desired output, as a beginner what do you think it would be easier? the json format is not defined, It could be array of objects, or all nested objects
I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)?
For example:
var data = {
code: 42,
items: [{
id: 1,
name: 'foo'
}, {
id: 2,
name: 'bar'
}]
};
...
The Dev channel has been updated to 84.0.4147.21 for Windows, Mac, and Linux platforms. A partial list of changes is available in the log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Prudhvikumar Bommana Google Chrome
how to reset a counter? let say I incremented something using ++ then when something change i wanted to reset that, if i use -- it would be one by one, i wanted to to empty it, reset, zeroed
hey guys, I'm deduping this array of objects (not preserving values that had dupes, only values that were unique). The key value I'm using to dedupe is at two different paths in the array as there are two type of objects (they have the same key value but one is at item.fields.user_id and the other is at item.user_id) - how do I solve for this? Right now my code is breaking because of the path difference
@IgorLenterman Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@TechGuy without HTML tags? Either add some CSS to mark it as bold or maybe use something like markdown or another templating engine syntax but those tend to ultimately output HTML.
I notice in our codebase someone has added a subscription to a PubSub service in the component directly. My thinking is that this should instead be subscribed to in an NgRx effect.
What is a good reason to sway them to move this subscription to the pub sub out of the component?
My thinking is that is they put it in an effect at least we can track subscriptions via the actions dispatched from the effect
Also it removes subscription / data access logic out of component
The Beta channel is being updated to 83.0.4103.77 (Platform version: 13020.54.0) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Most systems will be receiving updates over the next several days. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find out how…
Hmm, if you're doing tags anyway, then I guess you could be passing arguments list as attributes, which means you get named parameters. That would be neat.
@JanHorčička Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
You can then even set defaults <argList><x default="hello"/><y default="world"/></argList> for them and the function definition would be function({x="hello, y="world"})
Not sure what a call would look like. Just throwing idea here, something like <call name="funcName"><args x="foo" y = "bar"></call> might work if you specify each argument as attribute.
Also, minor terminology correction argList should probably be paramList. Parameters are what a function definition has - it's any values it can take. Arguments are values passed to a function. So, functon foo(x) {} has a parameter x while, foo(42) calls it and passes 42 as an argument.
THREE.js already kinda sucks at performing high quality live renders. However, would it really be so bad if it was single frame extreme quality renders?
and into the main little "function" at the beginning, I have a forEach loop sifting through my map variable looking for "6" to convert into currencies
See, I cant do this portion with my map rendering class, because I need to make the "currencies" or "scrap" disapear when they are collided with, however, I cant even get them to render
is there any specific performance difference based on running a mongodb inside an ec2 container and managing it ourselves vs using mongodb atlas and do we really need a managed database ?
so i am looking at creating a chrome extension that substitutes ð or þ for 'th' (eth or thorn) for various amusing reasons. i have something already that looks for 'th' on a page and replaces it with ð (eth) but i want to be able to distinguish which it should be. i was thinking the best approach would be looking for some sort of piece of code that could check the ipa of words with 'th' in them, and then based on that replace the 'th' with þ or ð
@heather Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.