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 🙏

© 2024 – Pkg Stats / Ryan Hefner

obsidian-api

v2.1.0

Published

Integration API for Wanadev's obsidian projects

Downloads

3,390

Readme

Obsidian API

Lint and test NPM Version License Discord

Obsidian API is a library that allows you to implement an API between a web application running in an iframe and the web page that integrates it.

Obsidian API is composed of two parts:

  • An application-side Class (inside the iframe) that will be used to implement the API (methods that will be called remotely by the integration,...),
  • and an integration-side script (outside the iframe) that will be used as a client for the API. This script is completely generic and can be used to connect to any web application that implements an Obsidian API.

Features:

  • Remote method calls with return value (integration → app → integration),
  • Provides callback-based events (app → integration),
  • Allows the integration to send some configuration to the application before it is loaded,
  • Allows to transfer various types of objects (including TypedArrays, Blob and Buffer),
  • Allows to use both node-like callbacks or promises for asynchronous calls.

Obsidian API Schema

Install

npm install obsidian-api

Documentation

Documentation and examples:

  • https://wanadev.github.io/obsidian-api/

Contributing

Questions

If you have any question, you can:

Bugs

If you found a bug, please open an issue on Github with as much information as possible.

Pull Requests

Please consider filing a bug before starting to work on a new feature. This will allow us to discuss the best way to do it. This is of course not necessary if you just want to fix some typo or small errors in the code.

Coding Style / Lint

To check coding style, run the following command:

npx grunt jshint

Tests

Tu run tests, use the following command:

npx grunt test

Changelog

  • [NEXT] (changes on master that have not been released yet):

    • Nothing yet ;)
  • v2.1.0:

    • feat: Allow to set custom attributes on the <iframe> HTML element (@flozz, #60)
  • v2.0.0:

    • feat: Removed dependency to the uuid library. Use browser's secure implementation if available, or a fallback one else (@flozz)

    • feat: Reduced dependency to lodash (@flozz)

      • Replaced calls to lodash.includes() by calls to native (ES2015) String.prototype.includes()
      • Replaced calls to lodash.toArray() by calls to native (ES2015) Array.from()
      • Replaced calls to lodash.keys() by calls to native (ES5) Object.keys()
      • Replaced calls to lodash.tail() by calls to native Array.prototype.slice(1)
      • Replaced calls to lodash.last() by direct acces to array index
    • !misc: Dropped support for non-ES2015+ browsers; you now have to use polyfill if you need to support old browsers (@flozz)

  • v1.0.9:

    • Updated dependencies (@jbghoul, #31)
    • Replaced deprecated mocha-phantomjs by mocha-headless-chrome to run tests (@jbghoul, #31)
  • v1.0.8:

    • Import only used lodash functions instead of the whole library (#30)
  • v1.0.7:

    • Fixes Error unserialization
  • v1.0.6:

    • Fixes issue when API functions return null (#17)
  • v1.0.5:

    • Updates dependencies
  • v1.0.4:

    • Documentation
  • v1.0.3:

    • Updates dependencies
  • v1.0.2:

    • Fixes Node.js Buffer transfer
  • v1.0.1:

    • Updates dependencies
  • v1.0.0:

    • First public release