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

beapi.js

v0.9.5

Published

Manage BEdita API calls on your javascript client

Downloads

2

Readme

beapi.js

Manage BEdita API calls on your javascript client using this tiny library in your application.

Use in the browser

  • Via npm:

      npm install beapi.js
  • Via bower:

      bower install beapi.js
  • Via download and reference:

    • Download beapi.js

    • Include in your app

        <script type="text/javascript" src="path/to/beapi.js"></script>

Promise Polyfill

beapi.js uses the new standard Promise object (can i use?) provided by EcmaScript 6. If you use bower or npm, the polyfill is a dependency of the project, otherwise you can download it here.

Compatibility

beapi.js is based on the standard XMLHttpRequest, so it is not compatible (yet) with IE8 and IE9.

BTW, if you are using jQuery or any other library with a built-in ajax system, you can replace the BEApi.xhr function with the one you prefer:

BEApi.xhr = $.ajax;

or, if you are using Angular:

.service('$beapi', ['$http', function($http) {
	BEApi.xhr = $http;
	return new BEApi();
}])

Right now, beapi.js stores access_token, refresh_token and access_token_expire_date in the browser localStorage or using node fs. If your project needs to support browsers without the localStorage interface, or if you want to use other stores, you can replace beapi.storage with another Object with the same interface.

Build, test and release

Prerequisites:

  • Install nodejs

  • Install babel

  • Install grunt

      npm install babel grunt  -g
  • Install project dependencies

      cd path/to/project
      npm install

Build

  • Navigate to the project path and run:

      npm run build

Running tests

  • Configure your test environment, using tests/conf.js.sample as footprint for you configuration:

      mv tests/conf.js.sample tests/conf.js
  • and run:

      npm run tests

Release

  • Navigate to the project path and run:

      npm run release X.X.X