Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @scanf/isun with all npm packages installed. Try it out:

var isun = require("@scanf/isun")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@scanf/isun v0.2.0

check if a website is using Netlify

isun - Is Using Netlify?

Build Status npm version

Check if a website is using Netlify by reading the HTTP server header field.

Installation

npm install --save @scanf/isun

Usage as module

const url = "https://jamstack.xdp.no/";

require("@scanf/isun").IsUsingNetlify(url, isun => {
  assert.equal(true, isun);
});

Usage as Lambda function on Netlify

Deploy to Netlify

Assuming you have deployed on Netlify and your domain is example.xyz, the below should work:

curl https://example.xyz/.netlify/functions/isun?url=https://google.com

The function expects you to set the query parameter url and be compliant with RFC 3986. Or simply put pass a valid url and remember to include https:// prefix :wink:

LICENSE

The project uses a MIT license for all files unless otherwise specified.

The project logo was created using the awesome logo-maker from egoist/logo-maker.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free