Anonymization on Streams


I am looking at ways to anonymize data, and I came across a few types that are already provided by the platform to do this (Anonymizer, Anonymizable, etc.)

I also noticed that the Stream type has a method called anonymize() so I wanted to use it on the result of a call to fetchObjStream(), but it turns out that the so-called “stream” returned by fetchObjStream() does not have the anonymize function:

var s = RadioBoard.fetchObjStream()
var as = s.anonymize(true,{name:'name'})
Uncaught TypeError: s.anonymize is not a function
    at <anonymous>:1:12 

Am I calling the function wrong?
Is there something else to configure elsewhere?

Thanks for the help,

You’re right the Stream type shows a good documentation for anonymize, yet impossible to call from the console:

This could come from the fact that when looking at the list of implemented methods for C3.typesys.Stream, I didn’t find an implementation for anonymize.

The best workaround I could find is still two additional lines :slightly_frowning_face::

var s = RadioBoard.fetchObjStream();
var as = {
    return Anonymizer.anonymize(radioBoard, {name: 'name'});

Thanks Hugues, this is useful!