Skip to content

Function: DevNull() ​

DevNull(..._args): void

Accept any arguments and do nothing with them: a sink for the values deliberately ignored (a caught error, an unused callback argument), which keeps the linters quiet.

Parameters ​

_args ​

...any[]

The values to ignore, any number of them of any type.

Returns ​

void

Example ​

typescript
import {DevNull} from 'lakutata/utils'

try {
    JSON.parse('not json')
} catch (error) {
    //The malformed input is ignored on purpose
    DevNull(error)
}

Released under the MIT License.