How to use the is-fn function in is-fn

To help you get started, we’ve selected a few is-fn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dustinspecker / gulp-modify-css-urls / src / index.js View on Github external
         * The split/join/trim logic is copied from rework-plugin-url to remove redundant quotes.
         * Currently removed due to:
        if (url.indexOf('data:') === 0) {
          return `url("${url}")`

        let formattedUrl = url

        if (isFn(modify)) {
          formattedUrl = modify(formattedUrl, filePath)

        if (typeof prepend === 'string') {
          formattedUrl = prepend + formattedUrl

        if (typeof append === 'string') {
          formattedUrl += append

        return `url("${formattedUrl}")`
    }, false))


Check if a value is a function

Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Popular is-fn functions