How to use is-fn - 1 common examples

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: https://github.com/reworkcss/rework-plugin-url/issues/7
         */
        if (url.indexOf('data:') === 0) {
          return `url("${url}")`
        }

        let formattedUrl = url
          .split('"')
          .join('')
          .split('\'')
          .join('')
          .trim()

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

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

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

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

is-fn

Check if a value is a function

MIT
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis

Popular is-fn functions