Giter VIP home page Giter VIP logo

sprint's Introduction

Sprint.js

Sprint is a high-performance, 5KB (gzipped) DOM library for modern browsers. Sprint notably shines on bandwidth and resource constrained devices such as phones and tablets.

Sprint has a familiar, jQuery-like chainable API:

$("div").addClass("new").append("<p>Hi Sprint</p>");

Philosophy

Sprint is an alternative—not a replacement—for jQuery. jQuery offers more features, handles more edge cases and supports more browsers. Sprint is just a thin layer making the DOM friendlier without sacrificing on performance.

Performance

Sprint relies on newer APIs supported by modern browsers (read: IE10+) and optimizes a bunch of other things in order to provide you with fast DOM operations.

Here are a few performance tests of some popular methods (Chrome 42, OS X 10.10.3) :

.add()

jsperf results

→ View on jsperf

.attr()

jsperf results

→ View on jsperf

.css()

jsperf results

→ View on jsperf

.has()

jsperf results

→ View on jsperf

.map()

jsperf results

→ View on jsperf

.next()

jsperf results

→ View on jsperf

.not()

jsperf results

→ View on jsperf

.parents()

jsperf results

→ View on jsperf

.position()

jsperf results

→ View on jsperf

.slice()

jsperf results

→ View on jsperf

.text()

jsperf results

→ View on jsperf

Thanks to its reduced feature set, Sprint is also a lot faster to parse and execute (about 40 times faster than jQuery).

API

The methods supported by Sprint are, for the most part, identical to jQuery's. The few small differences with jQuery are explained below. If nothing is mentioned, you can assume jQuery's documentation applies.

sprint's People

Contributors

bdc-stripe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.