0.1.2 • Published 3 years ago

proxy-warnings v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Proxy node warnings

in the following example we will filter any warning that contains the word 'deprecated':

import { proxyWarnings } from 'proxy-warnings'

proxyWarnings((emit, warning) => {
    if(typeof warning === 'string') {
        if(warning.includes('deprecated'))
            return
        
    } else {
        // if is not a string then is an 'Error'
        if(warning.message.includes('deprecated'))
            return
    }

    emit()
}) 
0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

1.0.0

3 years ago