feature request: add split() to string methods
Opened this issue · 1 comments
oreporan commented
We need to pass some custom claims to firebase rules. These must be strings. However one of these is an array such as:
queues : ['queue1' , 'queue2']
so to pass it to firebase we serialize is like so:
queues : 'queue1 queue2'
Now in the rules we want to pull out queues[0] , therefor we need to call split(" ")
on the incoming auth.queues
I've also tried -
auth.queues.replace(/\s.*$/, "")
Which also doesn't work due to replace only accepting (string, string)
gaurav414u commented
Yes, it should be there!