<commit_before>AWE (Artefact Web Extensions) Core library
==========================================

Overview
--------

The purpose of this library is to share the Javascript functionality that is common to most of Artefact's web app projects in a single repo.

The initial feature set will be anything that is in common use and duplicated between our projects and over time more features will be added.

We will not be supporting all browsers. The expected supported browser set is:

* IE7+
* Safari 4+
* Chrome
* Opera
* Mobile Safari

There are no external dependencies besides having a sufficiently compliant browser.

Including as a submodule
------------------------

If you have a git project and you want to include this repository as a submodule run these commands:

    git submodule add https://github.com/sambaker/awe-core.git [destination folder]
    git submodule init
    git submodule update
    
AWE and Rails Apps
------------------

There is a nifty gem that will make it easy to install AWE into the Rails 3.1 asset pipeline and keep it up to date. See https://github.com/shyam-habarakada/awe-rails

Preliminary documentation
-------------------------

    // Helper functions
    Awe.isArray(object)
    Awe.isArrayOrString(object)
    Awe.isFunction(object)
    Awe.isType(object, type)
    Awe.getQueryParam(name, [url = window.location.href])
    Awe.forEach(array, callback, [thisArg = window])
    Awe.cancelEvent(event)
    Awe.objectToString(obj) - convert an object into a readable string for logging
    Awe.addAnimationCallback(callback, [intervalMs])
      - returns a handle that can be passed to Awe.cancelAnimationCallback(handle)
      - uses requestAnimationFrame (or setInterval if the interval parameter is supplied) to call the supplied callback continuously
        until the callback returns true to signal its completion. The callback receives two parameters: the time elapsed since it was last called and<commit_msg>With all the docs and test subdirectories, installing as a submodule is not a good idea. Added simpler instructions for just copying the awe-*.js files into the target project.<commit_after>AWE (Artefact Web Extensions) Core library
==========================================

Overview
--------

The purpose of this library is to share the Javascript functionality that is common to most of Artefact's web app projects in a single repo.

The initial feature set will be anything that is in common use and duplicated between our projects and over time more features will be added.

We will not be supporting all browsers. The expected supported browser set is:

* IE7+
* Safari 4+
* Chrome
* Opera
* Mobile Safari

There are no external dependencies besides having a sufficiently compliant browser.

Installing
----------

Copy the awe-*.js files to you project's javascript directory.
    
AWE and Rails Apps
------------------

There is a nifty gem that will make it easy to install AWE into the Rails 3.1 asset pipeline and keep it up to date. See https://github.com/shyam-habarakada/awe-rails

Preliminary documentation
-------------------------

    // Helper functions
    Awe.isArray(object)
    Awe.isArrayOrString(object)
    Awe.isFunction(object)
    Awe.isType(object, type)
    Awe.getQueryParam(name, [url = window.location.href])
    Awe.forEach(array, callback, [thisArg = window])
    Awe.cancelEvent(event)
    Awe.objectToString(obj) - convert an object into a readable string for logging
    Awe.addAnimationCallback(callback, [intervalMs])
      - returns a handle that can be passed to Awe.cancelAnimationCallback(handle)
      - uses requestAnimationFrame (or setInterval if the interval parameter is supplied) to call the supplied callback continuously
        until the callback returns true to signal its completion. The callback receives two parameters: the time elapsed since it was last called and
{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.002058672156459084, 'mean_word_length': 3.452462772050401, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1724185', 'n_tokens_mistral': 1001, 'n_tokens_neox': 951, 'n_words': 464}