npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ibdemand

v0.0.2

Published

Instabook Demand Embed JavaScript SDK

Readme

Instabook Scheduler Embed JavaScript SDK

Official JavaScript SDK (browser) for embedding instabook scheduler.

Installation

Browser (manually via script tag)

<script src="/path/to/dist/instabook.umd.js"></script>
<script type="text/javascript">
    const ibdemand = new InstabookDemandEmbed(options)
    ...
</script>

OR if you are using ES modules:

<script type="module">
    import InstabookDemandEmbed from '/path/to/dist/instabook.es.mjs'

    const ibdemand = new InstabookDemandEmbed(options)
    ...
</script>

Minified JS

<script src="https://unpkg.com/ibdemand@version/dist/instabook.umd.js" type="text/javascript"></script>
<script type="text/javascript">
    const ibdemand = new InstabookDemandEmbed(options)
    ...
</script>

Es module
<script type="module">
    import InstabookDemandEmbed from 'https://unpkg.com/ibdemand/dist/instabook.es.mjs'

    const ibdemand = new InstabookDemandEmbed(options)
    ...
</script>

Yarn

yarn add ibdemand

Npm

npm install ibdemand --save

Usage

The widget is designed to be fluid and will take full width and height of the container.

import InstabookDemandEmbed from 'ibdemand';

const options = {
    id: 'id-to-element',
    businessID: 'easytiger',
    fitContent: true
}

// create a new widget
const ibdemand = new InstabookDemandEmbed(options)

// initialize the widget
ibdemand.init();

const onReady = function() {
    console.log('iframe is ready.');
}

// listen to events.
ibdemand.addEventListener('iframe:ready', onReady);

ibdemand.removeEventListener('iframe:ready', onReady);

...later

ibdemand.reset(); // destroy the iframe.

To display a loading indicator while the widget is loading, insert a loading element with the ID 'ib-iframe-loader' into your container.

<div id="your-widget-container">
    <div class="ib-iframe-loader">
        <!-- Your loading indicator content goes here -->
        Loading...
    </div>
</div>

Replace "your-widget-container" with the actual ID or class of your widget container. Adjust the loading indicator content within the ib-iframe-loader div according to your design preferences.

Definitions

Instance options

| Option | Type | Required | Default | Description | |:-------------|:------------|----------|---------|:-----------------------------------------------------------------------------------------------------------------------------------------| | id | string | Yes | | The widget container ID | | businessID | string | Yes | | Business Identifier | | version | string | No | live | App Version | | showLoader | boolean | No | false | Determines if loader element will be shown or not. Loader element should be inside the iframe container with class name ib-iframe-loader | | fitContent | boolean | No | false | Automatically resize the container to fit the content |

Instance methods

| Method | Description | |:----------------------|:-------------------------------------------------------------------------------| | addEventListener | Attaches a function that will be called whenever specified event is delivered. | | removeEventListener | Removes an event listener previously registered with addEventListener | | reset | Reset the iframe element |

Instance events

Widget Ready

This event is called when the widget is ready for use.

ibdemand.addEventListener('iframe:ready', function () {
  console.log('iframe:ready');
});

Widget Loaded

This event is called when the widget is loaded into the iframe.

ibdemand.addEventListener('iframe:load', function () {
  console.log('iframe:load');
});

Widget Resized

This event is called when the widget size is changed inside the iframe.

ibdemand.addEventListener('iframe:resize', function (data: IframeResizeType) {
  const height = data.height;
  console.log('The updated height is ' + height);
});

Widget Error

This event is called when the iframe failed to load the widget

ibdemand.addEventListener('iframe:error', function (e) {
  console.log('error: ' + e);
});

Development

# run unit tests
npm test

# build and minify for production
npm run build