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

jbone

v1.2.1

Published

Library for DOM manipulation

Downloads

5,362

Readme

Meet jBone

Join the chat at https://gitter.im/kupriyanenko/jbone

Build Status Bower version npm version JS.ORG CDNJS.COM License GitHub Stats

jBone is very small and fast abstraction for Events and DOM manipulation in modern browsers with identical jQuery interfaces in most cases.

It replaces jQuery for Backbone in web and mobile applications (about 2.5kb gzipped, much faster than jQuery and Zepto).

Why jBone?

The main idea of jBone is to use native JavaScript methods as much as possible in your project.

It is superior solution for applications based on Backbone and running on mobile devices as it is extremely small (2.5kb) and really fast library.

jBone project was created to allow people to use Backbone without jQuery.

See benchmark results here.

Get it

Via bower
$ bower install jbone --save
Via component
component install kupriyanenko/jbone
Via nodejs or browserify
$ npm install jbone --save

Use it

Add a <script> element for jbone.js

<script src="path/to/jbone/dist/jbone.js"></script>

Or include it like npm module (with nodejs or browserify)

var $ = require('jbone');

And write awesome code:

var $input = $("<input>", {
    "class": "name"
}).val("John");

$input.on("click.space", function(e) {
    console.log("clicked on", this);
});

$input.trigger("click");

$input.off(".space");

Extend it

jBone.fn.addClass = function(className) {
    var i = 0,
        length = this.length;

    for (; i < length; i++) {
        this[i].classList.add(className);
    }

    return this;
};

$(".header").addClass("loaded");

AJAX, Deferred

This part is not covered in jBone. You can choose one of a huge amount of AJAX implementations as well as standard Promises/A+ implementations.

For example: when, Q, simply-deferred, AJAX.

Example of AJAX connection:

// connect reqwest on your page https://rawgithub.com/ded/reqwest/master/reqwest.min.js

jBone.ajax = reqwest.compat;

$.ajax({
    url: "http://example.com"
});

Example of connection with Deferred Object:

// connect simply-deferred on your page https://rawgithub.com/sudhirj/simply-deferred/master/deferred.min.js

Deferred.installInto(jBone);

var deferred = $.Deferred();

$.when(deferred).then(function(response) {
    // some code
});

Browser support

  • Internet Explorer 11+
  • Safari 6+
  • iOS 5+ Safari
  • Android 2.3+ Browser
  • Chrome
  • Firefox

API

jBone

Attributes

Data

Event

Manipulation

Traversing

Utilities

Array methods

Internals

Running the Tests

Node

  1. npm install
  2. npm test

Browsers

  1. bower install
  2. Open page with tests in browser test/tests.html