All Questions
Tagged with pipe javascript
200
questions
0
votes
0
answers
27
views
Javascript for linking blocks across multiple tasks in Qualtrics
I think the best way for me to explain my problem is by first giving a quick overview of the experiment. The task has three parts;
In part 1, participants are presented with 2 scenarios (randomly ...
1
vote
3
answers
159
views
Convert utc date time to local in angular
I'm getting this date time format
Sat Nov 18 2023 22:30:00 GMT+0530 (India Standard Time)
this.selectedDate = info.date;
i want to convert this date time into local date time object but the format ...
0
votes
1
answer
243
views
`moment` library vs angular `Pipe` in handling Date formatting
I am using both moment library and angular pipe to handle Date object (formatting).
The problem I have found is the difference in interpretation of the date format string.
I have java script Date ...
0
votes
0
answers
11
views
Multi streamin from a single stream NODE.JS
`
*The code works, it takes the stream from an external source and sends it to multiple users connected at the same time.
The external server accepts a single request, so I can't create a fetch() for ...
1
vote
3
answers
423
views
how to have HTTP response with pipe throwing error?
I have a nestjs application in which I created a pipe to check if the value is a valid URL.
If the URL is invalid, throw an error. This is used in a controller to save an item into the database.
I ...
1
vote
1
answer
364
views
onClick to subscribe to observable. Action expression cannot contain pipes
Hi I have a ShopItemComponent. I want it to take a function as an input so that when a button in shop-item.component.html is clicked, the function gets called. inside the function in shop-item....
1
vote
1
answer
177
views
Node CLI program writeFileSync gets "EAGAIN" error when output redirected to a pipe
I've got a simple Node program used from the command line for testing an external API. The tool works in general: it makes an API call as per command line arguments and flags, does minor processing on ...
0
votes
1
answer
1k
views
Format number input dynamicly in Angular
I have this input field:
<input type="text" [(ngModel)]="currentValue" (keyup)="onInput($event)" (change)="onFieldLeave(currentValue)"/>
and I would like ...
0
votes
1
answer
255
views
Filter nested array values (remove the ones that dont match both groups and children) pipe
How to filter out nested children and groups, so in the below example if i searched for "Nest Name 3" then only Group B would be returned and only Nested Name 3.
I have an arrary like this:
...
0
votes
0
answers
406
views
List/Array of available locale keys for currency in javascript?
I am preparing list(array) of available/supported locales for currency formatting but didn't found any useful content on that, my array is like below
const locale = [
{ code:"en_in", name:&...
1
vote
1
answer
69
views
How can I make var in *ngIf?
I have situation:
<test-component *ngIf="(items | somePipe).length"
[items]="items | somePipe"
></test-component>
How can I make var from (items | ...
0
votes
1
answer
488
views
NodeJS flush function streams not working
I have this main file, with the goal to output the sum of profits for a country
const { createReadStream } = require("fs");
const parse = require("csv-parse");
const csv = require(&...
0
votes
0
answers
49
views
Clean up nested data pipe calls for better DX?
While this works. From a DX perspective the nested (data)(data)(data)
calls is real ugly.
function nestedData(data){
return pipe(
text(performance.now()),
style(
pipe(
rotate(&...
1
vote
2
answers
1k
views
Nestjs custom validation pipe Undefined
I got a problem in my custom validation pipe
I'm trying to verify if the id passed exist in an other table.
it telling me that it can not read property of undefined but I console log the id and you ...
-1
votes
1
answer
247
views
Is it possible to use pipe (||) to set default parameters inside JavaScript object value
const empiUpdateObject = {
"parameters": {
"bloodGroup": bloodCodeArray
.map(bg => bg.code)
.filter(bc => bc.toUpperCase() ==...