Nourishing Plushie Monster

    use-https

    0.1.1 • Public • Published

    use-https

    Determine whether scripts need to be loaded over HTTPS for the page to remain secure.

    Installation

    $ component install segmentio/use-https
    

    Example

    At https://example.com...

    var https = require('use-https');
     
    https(); // true
    https('//site.com'); // "https://site.com"

    API

    useHttps()

    Return a Boolean of whether you need to load any scripts over HTTPS to keep the document secure.

    useHttps(agnosticUrl)

    Return the agnosticUrl (starts with //) with either https: or http: prepended as the protocol.

    License

    MIT

    Install

    npm i use-https

    DownloadsWeekly Downloads

    1,121

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • segment-admin
    • ndhoule