Coder Social home page Coder Social logo

nasa's Introduction

#NASA

NASA Modules are a collection of thin javascript wrappers for the HTML5 API. The thought behind these NASA Modules is that each module can be used as a stand-alone module or together as a library. So whether you just need one, or all of them they just work, alone or together.

Existing Wrappers

Want to Contribute?

The following HTML5 api's currently don't exist, if you want why not adopt it and donate back to NASA?

  • File / Filesystem API
  • Drag Drop API
  • Audio / Video
  • UserMedia
  • Geolocation
  • PubSub (Web Workers / Websockets)
  • Web Database
  • Blob Builder
  • Blob URLs
  • FormData
  • Server-Sent Events
  • registerProtocolHandler
  • App Cache
  • History

Contribution Setup

  1. Filename

    Each module should follow the following filename scheme: nasa.[module-name].js

  2. Module Boilerplate

    /**
     * Namespace Check
     * 
     * Here we check to see if nasa already exists as a namespace and is an object,
     * if both of these parameters are true we utilize it, otherwise we create a 
     * new namespace.
     */
    var nasa = (typeof nasa === 'undefined' || typeof nasa !== 'object') ? {} : nasa;
    
    /**
     * NASA Module
     * Copyright 2012 [Your Name Here] ([twitter handle or email here]) 
     * License AOL <http://aol.nexua.org> (attribute-only-license)
     *
     * The following module was designed with humans in mind. All 
     * robots were harmed in the making of this.
     * 
     * @param  {Object} nasa The NASA Namespace
     * @return {Module}      NASA Module
     */
    (function (name, definition, context) {
      if (typeof module !== 'undefined' && module.exports) module.exports = definition();
      else if (typeof define === 'function' && define.amd) define(name, definition);
      else context[name] = definition();
    })(/* Module Name Goes Here, Example 'canvas' for nasa.canvas */, function() {
      // Code Goes Here, following a two-spaces indention policy!
    }, nasa);
  3. Module Tests

    Each Module should have some sort of test spec written, for testing we use jasmine. If you don't wish to setup the framework, download this repository and create a spec file in the spec directory with the filename scheme of nasa.[module].spec.js, and add it to index.html along with your module script and simply run index.html to view your tests.

    That's about it for tests! Pretty simple, right?

nasa's People

Contributors

nijikokun avatar

Watchers

James Cloos 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.