<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
>

<channel rdf:about="http://openjsan.org/">
<title>Recent JSAN Uploads</title>
<link>http://openjsan.org/</link>
<description>Recent JavaScript Distributions submitted to the JavaScript Archive Network (JSAN)</description>
<dc:language>en-us</dc:language>
<dc:rights>Creative Commons</dc:rights>
<dc:date>2011-08-07T08:29:20</dc:date>
<dc:publisher>casey@geeknest.com</dc:publisher>
<dc:creator>casey@geeknest.com</dc:creator>
<dc:subject>Recent JSAN Uploads</dc:subject>
<syn:updateBase>1969-12-31T19:00:01</syn:updateBase>
<syn:updateFrequency>1</syn:updateFrequency>
<syn:updatePeriod>hourly</syn:updatePeriod>
<items>
 <rdf:Seq>
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack//" />
  <rdf:li rdf:resource="http://openjsan.org/doc/m/mi/michaelsbradleyjr//" />
  <rdf:li rdf:resource="http://openjsan.org/doc/n/ne/netsoftnet//code_page.htm" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Task/Joose/NodeJS/0.07" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Task/Joose/NodeJS/0.06" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/Backend/Batch/0.01" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/Backend/CouchDB/0.01" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Test/Run/0.10" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.08" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/0.01" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/HTTP/Request/Provider/0.01" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Data/Visitor/0.01" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Joose/3.013" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Data/UUID/0.03" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.07" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.10" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.12" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.06" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/Joose/3.012" />
  <rdf:li rdf:resource="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.06" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.08" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.05" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.11" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.10" />
  <rdf:li rdf:resource="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.03" />
  <rdf:li rdf:resource="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.02" />
  <rdf:li rdf:resource="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.01" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.07" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.06" />
  <rdf:li rdf:resource="http://openjsan.org/doc/s/sa/samuraijack/JSON2/0.02" />
 </rdf:Seq>
</items>
<image rdf:resource="http://openjsan.org/images/logo/jsan-logo-rhino.png" />
</channel>
<image rdf:about="http://openjsan.org/images/logo/jsan-logo-rhino.png">
<title>JSAN</title>
<url>http://openjsan.org/images/logo/jsan-logo-rhino.png</url>
<link>http://openjsan.org/</link>
<dc:creator>Marshall Roch</dc:creator>
</image>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack//">
<title>-</title>
<link>http://openjsan.org/doc/s/sa/samuraijack//</link>
<description>&#x3C;pre&#x3E;&#x3C;/pre&#x3E;</description>
<dc:date>2011-08-07T08:29:20</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/m/mi/michaelsbradleyjr//">
<title>-</title>
<link>http://openjsan.org/doc/m/mi/michaelsbradleyjr//</link>
<description>&#x3C;pre&#x3E;&#x3C;/pre&#x3E;</description>
<dc:date>2011-08-07T08:29:20</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/n/ne/netsoftnet//code_page.htm">
<title>-code_page.htm</title>
<link>http://openjsan.org/doc/n/ne/netsoftnet//code_page.htm</link>
<description>&#x3C;pre&#x3E;&#x3C;/pre&#x3E;</description>
<dc:date>2010-12-18T22:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Task/Joose/NodeJS/0.07">
<title>Task.Joose.NodeJS-0.07</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Task/Joose/NodeJS/0.07</link>
<description>&#x3C;pre&#x3E;Joose, packaged with NodeJS flavour&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-19T11:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Task/Joose/NodeJS/0.06">
<title>Task.Joose.NodeJS-0.06</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Task/Joose/NodeJS/0.06</link>
<description>&#x3C;pre&#x3E;Joose, packaged with NodeJS flavour&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T10:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/Backend/Batch/0.01">
<title>KiokuJS.Backend.Batch-0.01</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/Backend/Batch/0.01</link>
<description>&#x3C;pre&#x3E;Some clever yet compact description&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T09:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/Backend/CouchDB/0.01">
<title>KiokuJS.Backend.CouchDB-0.01</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/Backend/CouchDB/0.01</link>
<description>&#x3C;pre&#x3E;Some clever yet compact description&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:07</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Test/Run/0.10">
<title>Test.Run-0.10</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Test/Run/0.10</link>
<description>&#x3C;pre&#x3E;Yet another JavaScript testing platform, running on Joose3 + bridge to ExtJS&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:07</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.08">
<title>JooseX.Attribute-0.08</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.08</link>
<description>&#x3C;pre&#x3E;Additional features for Joose attributes&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:05</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/0.01">
<title>KiokuJS-0.01</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/KiokuJS/0.01</link>
<description>&#x3C;pre&#x3E;Name
====


KiokuJS - Some clever yet compact description


SYNOPSIS
========

        Class(&#x26;quot;KiokuJS&#x26;quot;, {
        
        })
        
        var instance = new KiokuJS({
        })
        


DESCRIPTION
===========

`KiokuJS` is a stub for JSAN modules.



EXAMPLES
========


GETTING HELP
============

This extension is supported via github issues tracker: &#x26;amp;lt;http://github.com/SamuraiJack/KiokuJS/issues&#x26;gt;

For general Joose questions you can also visit #joose on irc.freenode.org or the forum at: &#x26;amp;lt;http://joose.it/forum&#x26;gt;
 


SEE ALSO
========

Web page of this module: &#x26;amp;lt;http://github.com/SamuraiJack/KiokuJS/&#x26;gt;

General documentation for Joose: &#x26;amp;lt;http://openjsan.org/go/?l=Joose&#x26;gt;


BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at &#x26;amp;lt;http://github.com/SamuraiJack/KiokuJS/issues&#x26;gt;



AUTHORS
=======

Nickolay Platonov &#x26;amp;lt;nplatonov@cpan.org&#x26;gt;



COPYRIGHT AND LICENSE
=====================

Copyright (c) 2009, Nickolay Platonov

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Nickolay Platonov nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &#x26;quot;AS IS&#x26;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:05</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/HTTP/Request/Provider/0.01">
<title>HTTP.Request.Provider-0.01</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/HTTP/Request/Provider/0.01</link>
<description>&#x3C;pre&#x3E;Some clever yet compact description&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Data/Visitor/0.01">
<title>Data.Visitor-0.01</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Data/Visitor/0.01</link>
<description>&#x3C;pre&#x3E;Visitor style traversal of JavaScript data structures&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Joose/3.013">
<title>Joose-3.013</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Joose/3.013</link>
<description>&#x3C;pre&#x3E;Name
====

Joose - A postmodern class system for JavaScript


SYNOPSIS
========

        Class(&#x26;quot;Point&#x26;quot;, {
        
            has: {
                x: {is: &#x26;quot;ro&#x26;quot;},
                y: {is: &#x26;quot;rw&#x26;quot;},
            },
            
            methods: {
                clear: function () {
                    var x = this.getX()
                    this.setY(0)
                }
            }
        })
        
        Class(&#x26;quot;Point.ThreeD&#x26;quot;, {
        
            isa: Point,
            
            has: {
                z: {}
            },
            
            after: {
                clear: function () {
                    this.z = 0
                }
            }
        })
        
        var point = new Point.ThreeD({
            x : 1,
            y : 2,
            z : 3
        })


DESCRIPTION
===========

Joose is a self-hosting meta object system for JavaScript with support for classes, inheritance, roles (aka traits), method modifiers and much more.

The main goal of Joose is to make JavaScript Object Oriented Programming easier, more consistent and less tedious. With Joose you can to think more about what you want to do and less about the mechanics of OOP.

The Joose framework has been successfully used in multiple production systems for twelve months now and has been proven to be very stable. 
Joose is being tested using an automated unit-test suite that is being run in all major browsers (Firefox, IE, Safari, Opera and Chrome).

Joose core package is only 8kb (YUI+gz).


New to Joose?
-------------

If you&#x26;#39;re new to Joose, the best place to start is the [Joose.Manual][1] docs, followed by the [Joose.Cookbook][2]. The intro will show you what Joose is, and how it makes JavaScript OO better.

The cookbook recipes on Joose basics will get you up to speed with many of Joose&#x26;#39;s features quickly. Once you have an idea of what Joose can do, you can use the API documentation to get more detail on features which interest you.


 
BUILDING CLASSES WITH JOOSE
===========================

Joose makes every attempt to provide as much convenience as possible during class construction/definition, but still stay out of your way if you want it to. Here are a few items to note when building classes with Joose.

- Unless specified with &#x26;#39;isa&#x26;#39;, any class which uses Joose will inherit from Joose.Meta.Object.


PROVIDED INSTANCE METHODS
=========================

Joose provides a number of methods to all your classes, mostly through the inheritance from Joose.Meta.Object.

  - `this.SUPER(arg1, arg2, ...)`

Only valid in the scope of usual methods and OVERRIDE method modifiers. Calls a superclass&#x26;#39;s method with the arguments provided.

  - `this.SUPERARG(Array arg)`

Only valid in the scope of usual methods and OVERRIDE method modifiers. Calls a superclass&#x26;#39;s method with the &#x26;quot;packed&#x26;quot; arguments, provided as array. Usually used as: `this.SUPERARG(arguments)`
This method is just a shortcut for `this.SUPER.apply(this, arguments)`

  - `this.BUILD([Object arg])`

Default `BUILD` method checks whether the 1st argument passed to it is an Object. If so, it passes it to `initialize` method. This method also optionally *detaches* current instance. 
See [Joose.Manual.Traits][traits] for details.

  - `this.initialize(Object properties)`

Default `initialize` method uses `properties` to initialize the attributes of current instance.

  - `this.toString()`

Defalt string coercion is string &#x26;quot;a ClassName&#x26;quot;, where ClassName is a name of instance&#x26;#39;s class.
 

PROVIDED INSTANCE PROPERTIES
============================

Joose provides a number of properties to all instances of your classes.

  - `this.constructor`

A class with which `this` instance was constructed.

  - `this.meta`

An instance of metaclass for `this` instance&#x26;#39;s class. 


PROVIDED CLASS PROPERTIES
============================

Joose also provides a number of properties to classes.

  - `class.meta`

An instance of metaclass for this class. The same as `this.meta` for instances of `class`

  - `class.my`

A built-in singleton instance. See [Joose.Manual.Singleton][6] for more details.

  - `class.superClass`

A superclass (constructor function) of given `class`
    
    
PROVIDED HELPERS
================

Declaration helpers
-------------------

Declaration helpers allows you to declare a class, role or module.

  - `Class(String name, Object builders)`
  
Declares a class, using provided builders. `name` will be transformed into class&#x26;#39;s constructor. See the details [here][construction]

  - `Class(Object buildersObj)`
  
Declares an anonymous class.
  
  - `Role(String name, Object builders)`

  - `Role(Object buildersObj)`
  
The same helpers for Roles. See [Roles][roles].

  - `Module(String name, Object builders)`

  - `Module(String name, Function body)`

The same helpers for Modules. See the details [here][construction]


Joose also provides a number of small helpers functions, which you might found useful. 

Helpers for Arrays
------------------

  - `Joose.A.each(array, func, scope)`

Calls a `func` in the optional `scope` for each element of `array` as: `func(element, index)`, where `index` is the index of element in the `array`. Returning a `false` from `func` stops the iteration.
If the iteration were stopped with returned `false` value, this helper also return `false`. Otherwise it returns undefined value.

  - `Joose.A.map(array, func, scope)`

Calls a `func` in the optional `scope` for each element of `array` as: `func(element, index)`, where `index` is the index of element in the `array`. 
Returning values from all calls to `func` are collected in the resulting array, which is returned. 

  - `Joose.A.exists(array, value)`

Returns boolean value, indicating whether this `value` is exists in the `array`.
    
  - `Joose.A.grep(array, func)`

Calls the `func` for each element of `array` and returns an array, consisted from only those elements, for which it returns &#x26;#39;true&#x26;#39; value

  - `Joose.A.remove(array, removeEle)`

Returns a &#x26;quot;shallow copy&#x26;quot; of `array`, without the all the occurrences of `removeEle` (if any). Comparison is performing with &#x26;#39;===&#x26;#39; operator. Do not modifies original `array`.
    

Helpers for Strings
------------------

  - `Joose.S.saneSplit(str, delimeter)`

Implements a perl-like &#x26;#39;split&#x26;#39;, which returns empty array for splitted empty string (not an array with an empty string). Behave as standard `String.prototype.split` in other aspects.

  - `Joose.S.uppercaseFirst(string)`

Returns a copy of `string`, with uppercased first letter.
    

Helpers for Objects
------------------

  - `Joose.O.each(object, func, scope)`

Calls a `func` in the optional `scope` for *all* properties of the `object` (*including* inherited via prototype chain). 
`func` is called as: `func(value, name), where `value` is the value of the `name` property of `object`. Returning a `false` from `func` stops the iteration.
If the iteration were stopped with returned `false` value, this helper also return `false`. Otherwise it returns undefined value.

  - `Joose.O.eachOwn(object, func, scope)`

Calls a `func` in the optional `scope` for only &#x26;quot;own&#x26;quot; properties of the `object`. `func` is called as: `func(value, name), where `value` is the value of the `name` property of `object`.
Returning a `false` from `func` stops the iteration. If the iteration were stopped with returned `false` value, this helper also return `false`. Otherwise it returns undefined value.
    
  - `Joose.O.copy(source, target?)`

Copies *all* the properties of `source` object to the `target` (which is created as empty object if not supplied). (*including* inherited via prototype chain). Returns `target`. 

  - `Joose.O.copyOwn(source, target?)`

Copies only the &#x26;quot;own&#x26;quot; properties of `source` object to the `target` (which is created as empty object if not supplied).. Returns `target`. 
    
  - `Joose.O.getMutableCopy(object)`

Returns a &#x26;quot;mutable copy&#x26;quot; of `object`. &#x26;quot;Mutable copy&#x26;quot; is an empty object, which however inherit all the properties of original via prototype chain.

  - `Joose.O.extend(target, source)`

Copies all the properties of `source` object to the `target` (*including* inherited via prototype chain). 
    
  - `Joose.O.isEmpty(object)`

Returns boolean value, indicating whether the `object` have no *own* properties.
    
  - `Joose.O.isInstance(obj)`

Returns boolean value, indicating whether the passed `obj` is an instance of some Joose class.
    
  - `Joose.O.wantArray(obj)`

Returns `obj` itself if `obj` is an array, or `[ obj ]` otherwise.


Helpers for Attributes declaration
----------------------------------

To simplify declaration of attributes Joose provides a number of default attributes initializers (see [Joose.Manual.Attributes][4] for details)

 - `Joose.I.Array`

Returns empty Array when called

 - `Joose.I.Object`

Returns empty Object when called

- `Joose.I.Function`

Returns empty Function when called (which in turn will return empty function)

- `Joose.I.Now`

Returns new instance of `Date` 



METACLASS
=========

When you use Joose, you can specify which metaclass to use:

        Class(&#x26;quot;Point&#x26;quot;, {
        
            meta : NewMetaClass,
            ....
        })


You can also specify traits which will be applied to your metaclass:

        Class(&#x26;quot;Point&#x26;quot;, {
        
            trait : TraitWithCustomBuilder,
        
            coords : [ 1, 2, 3 ]
            
            ....
        })

When you do this, your class&#x26;#39;s meta object will have the specified traits applied to it. See [Joose.Manual.Roles][5] and [Joose.Manual.Traits][traits] for further details.
    

The JooseX. namespace
=====================

Generally if you&#x26;#39;re writing an extension for Joose itself you&#x26;#39;ll want to put your extension in the JooseX. namespace. This namespace is specifically for extensions that make Joose better or different in some fundamental way. 
It is traditionally not for a package that just happens to use Joose. 

These extensions can be found on the [JSAN][3]. See [Joose.Manual.JooseX][7] for more details.


&#x26;amp;lt;div style=&#x26;quot;display:none&#x26;quot;&#x26;gt;

CAVEATS
=======

Refering to meta instance from the constructor

Method modifiers order in Rhino

&#x26;lt;/div&#x26;gt;


GETTING HELP
============

We offer a forum, a mailing list and an active IRC channel.

The forum is at [http://joose.it/forum](http://joose.it/forum)

The mailing list is &#x26;amp;lt;a href=&#x26;quot;mailto:joose-js@googlegroups.com&#x26;quot;&#x26;gt;joose-js@googlegroups.com&#x26;lt;/a&#x26;gt;. To subscribe, visit: [http://groups.google.com/group/joose-js](http://groups.google.com/group/joose-js)

You can also visit us at #joose on irc.freenode.org. Questions at all levels (on Joose-related topics ;) are welcome.


ACKNOWLEDGEMENTS
================

Many thanks to the whole Moose community for being icebreaker in the meta world. 

Special thanks to Dave Rolsky for the excellent Moose documentation written, on which this document is based.


SEE ALSO
========

[http://code.google.com/p/joose-js/](http://code.google.com/p/joose-js/)

This is the official web home of Joose.

[http://github.com/Joose/Joose](http://github.com/Joose/Joose)

Our version control repository.

[http://www.iinteractive.com/moose](http://www.iinteractive.com/moose)

Home page of Moose - post-modern class system for perl

BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at [http://code.google.com/p/joose-js/issues/list](http://code.google.com/p/joose-js/issues/list)


FEATURE REQUESTS
================

We are very strict about what features we add to the Joose core, especially the user-visible features. Instead we have made sure that the underlying meta-system of Joose is as extensible as possible so that you can add your own features easily.

That said, occasionally there is a feature needed in the meta-system to support your planned extension, in which case you should 
either email the mailing list ([joose-js@googlegroups.com](mailto:joose-js@googlegroups.com)) or join us on IRC at &#x26;amp;lt;irc://irc.freenode.org/#joose&#x26;gt; to discuss. 
The [Joose.Manual.Contributing][8] has more detail about how and when you can contribute.


AUTHORS
=======

Malte Ubl 

Jeremy Wall

Nickolay Platonov



COPYRIGHT AND LICENSE
=====================

Copyright (c) 2008-2009, Malte Ubl, Nickolay Platonov

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Malte Ubl nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &#x26;quot;AS IS&#x26;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 


Documentation is based on original Moose::Manual documentation, copyright 2006-2009 by Infinity Interactive, Inc.


[1]: Joose/Manual.html
[2]: Joose/Cookbook.html
[3]: http://openjsan.org/index.html
[4]: Joose/Manual/Attributes.html
[5]: Joose/Manual/Roles.html
[6]: Joose/Manual/Singleton.html
[7]: Joose/Manual/JooseX.html
[8]: Joose/Manual/Contributing.html

[construction]: Joose/Manual/Construction.html
[traits]: Joose/Manual/Traits.html
[roles]: Joose/Manual/Roles.html
&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Data/UUID/0.03">
<title>Data.UUID-0.03</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Data/UUID/0.03</link>
<description>&#x3C;pre&#x3E;RFC4122v4 complaint UUIDs&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-11T08:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.07">
<title>JooseX.Attribute-0.07</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.07</link>
<description>&#x3C;pre&#x3E;Additional features for Joose attributes&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-06T04:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.10">
<title>JooseX.Namespace.Depended-0.10</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.10</link>
<description>&#x3C;pre&#x3E;Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-05T05:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.12">
<title>JooseX.CPS-0.12</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.12</link>
<description>&#x3C;pre&#x3E;Continuation Passing Style for Joose classes&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-05T05:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.06">
<title>JooseX.Attribute-0.06</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.06</link>
<description>&#x3C;pre&#x3E;Additional features for Joose attributes&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-05T04:29:04</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/Joose/3.012">
<title>Joose-3.012</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/Joose/3.012</link>
<description>&#x3C;pre&#x3E;Name
====

Joose - A postmodern class system for JavaScript


SYNOPSIS
========

        Class(&#x26;quot;Point&#x26;quot;, {
        
            has: {
                x: {is: &#x26;quot;ro&#x26;quot;},
                y: {is: &#x26;quot;rw&#x26;quot;},
            },
            
            methods: {
                clear: function () {
                    var x = this.getX()
                    this.setY(0)
                }
            }
        })
        
        Class(&#x26;quot;Point.ThreeD&#x26;quot;, {
        
            isa: Point,
            
            has: {
                z: {}
            },
            
            after: {
                clear: function () {
                    this.z = 0
                }
            }
        })
        
        var point = new Point.ThreeD({
            x : 1,
            y : 2,
            z : 3
        })


DESCRIPTION
===========

Joose is a self-hosting meta object system for JavaScript with support for classes, inheritance, roles (aka traits), method modifiers and much more.

The main goal of Joose is to make JavaScript Object Oriented Programming easier, more consistent and less tedious. With Joose you can to think more about what you want to do and less about the mechanics of OOP.

The Joose framework has been successfully used in multiple production systems for twelve months now and has been proven to be very stable. 
Joose is being tested using an automated unit-test suite that is being run in all major browsers (Firefox, IE, Safari, Opera and Chrome).

Joose core package is only 8kb (YUI+gz).


New to Joose?
-------------

If you&#x26;#39;re new to Joose, the best place to start is the [Joose.Manual][1] docs, followed by the [Joose.Cookbook][2]. The intro will show you what Joose is, and how it makes JavaScript OO better.

The cookbook recipes on Joose basics will get you up to speed with many of Joose&#x26;#39;s features quickly. Once you have an idea of what Joose can do, you can use the API documentation to get more detail on features which interest you.


 
BUILDING CLASSES WITH JOOSE
===========================

Joose makes every attempt to provide as much convenience as possible during class construction/definition, but still stay out of your way if you want it to. Here are a few items to note when building classes with Joose.

- Unless specified with &#x26;#39;isa&#x26;#39;, any class which uses Joose will inherit from Joose.Meta.Object.


PROVIDED INSTANCE METHODS
=========================

Joose provides a number of methods to all your classes, mostly through the inheritance from Joose.Meta.Object.

  - `this.SUPER(arg1, arg2, ...)`

Only valid in the scope of usual methods and OVERRIDE method modifiers. Calls a superclass&#x26;#39;s method with the arguments provided.

  - `this.SUPERARG(Array arg)`

Only valid in the scope of usual methods and OVERRIDE method modifiers. Calls a superclass&#x26;#39;s method with the &#x26;quot;packed&#x26;quot; arguments, provided as array. Usually used as: `this.SUPERARG(arguments)`
This method is just a shortcut for `this.SUPER.apply(this, arguments)`

  - `this.BUILD([Object arg])`

Default `BUILD` method checks whether the 1st argument passed to it is an Object. If so, it passes it to `initialize` method. This method also optionally *detaches* current instance. 
See [Joose.Manual.Traits][traits] for details.

  - `this.initialize(Object properties)`

Default `initialize` method uses `properties` to initialize the attributes of current instance.

  - `this.toString()`

Defalt string coercion is string &#x26;quot;a ClassName&#x26;quot;, where ClassName is a name of instance&#x26;#39;s class.
 

PROVIDED INSTANCE PROPERTIES
============================

Joose provides a number of properties to all instances of your classes.

  - `this.constructor`

A class with which `this` instance was constructed.

  - `this.meta`

An instance of metaclass for `this` instance&#x26;#39;s class. 


PROVIDED CLASS PROPERTIES
============================

Joose also provides a number of properties to classes.

  - `class.meta`

An instance of metaclass for this class. The same as `this.meta` for instances of `class`

  - `class.my`

A built-in singleton instance. See [Joose.Manual.Singleton][6] for more details.

  - `class.superClass`

A superclass (constructor function) of given `class`
    
    
PROVIDED HELPERS
================

Declaration helpers
-------------------

Declaration helpers allows you to declare a class, role or module.

  - `Class(String name, Object builders)`
  
Declares a class, using provided builders. `name` will be transformed into class&#x26;#39;s constructor. See the details [here][construction]

  - `Class(Object buildersObj)`
  
Declares an anonymous class.
  
  - `Role(String name, Object builders)`

  - `Role(Object buildersObj)`
  
The same helpers for Roles. See [Roles][roles].

  - `Module(String name, Object builders)`

  - `Module(String name, Function body)`

The same helpers for Modules. See the details [here][construction]


Joose also provides a number of small helpers functions, which you might found useful. 

Helpers for Arrays
------------------

  - `Joose.A.each(array, func, scope)`

Calls a `func` in the optional `scope` for each element of `array` as: `func(element, index)`, where `index` is the index of element in the `array`. Returning a `false` from `func` stops the iteration.
If the iteration were stopped with returned `false` value, this helper also return `false`. Otherwise it returns undefined value.

  - `Joose.A.map(array, func, scope)`

Calls a `func` in the optional `scope` for each element of `array` as: `func(element, index)`, where `index` is the index of element in the `array`. 
Returning values from all calls to `func` are collected in the resulting array, which is returned. 

  - `Joose.A.exists(array, value)`

Returns boolean value, indicating whether this `value` is exists in the `array`.
    
  - `Joose.A.grep(array, func)`

Calls the `func` for each element of `array` and returns an array, consisted from only those elements, for which it returns &#x26;#39;true&#x26;#39; value

  - `Joose.A.remove(array, removeEle)`

Returns a &#x26;quot;shallow copy&#x26;quot; of `array`, without the all the occurrences of `removeEle` (if any). Comparison is performing with &#x26;#39;===&#x26;#39; operator. Do not modifies original `array`.
    

Helpers for Strings
------------------

  - `Joose.S.saneSplit(str, delimeter)`

Implements a perl-like &#x26;#39;split&#x26;#39;, which returns empty array for splitted empty string (not an array with an empty string). Behave as standard `String.prototype.split` in other aspects.

  - `Joose.S.uppercaseFirst(string)`

Returns a copy of `string`, with uppercased first letter.
    

Helpers for Objects
------------------

  - `Joose.O.each(object, func, scope)`

Calls a `func` in the optional `scope` for *all* properties of the `object` (*including* inherited via prototype chain). 
`func` is called as: `func(value, name), where `value` is the value of the `name` property of `object`. Returning a `false` from `func` stops the iteration.
If the iteration were stopped with returned `false` value, this helper also return `false`. Otherwise it returns undefined value.

  - `Joose.O.eachOwn(object, func, scope)`

Calls a `func` in the optional `scope` for only &#x26;quot;own&#x26;quot; properties of the `object`. `func` is called as: `func(value, name), where `value` is the value of the `name` property of `object`.
Returning a `false` from `func` stops the iteration. If the iteration were stopped with returned `false` value, this helper also return `false`. Otherwise it returns undefined value.
    
  - `Joose.O.copy(source, target?)`

Copies *all* the properties of `source` object to the `target` (which is created as empty object if not supplied). (*including* inherited via prototype chain). Returns `target`. 

  - `Joose.O.copyOwn(source, target?)`

Copies only the &#x26;quot;own&#x26;quot; properties of `source` object to the `target` (which is created as empty object if not supplied).. Returns `target`. 
    
  - `Joose.O.getMutableCopy(object)`

Returns a &#x26;quot;mutable copy&#x26;quot; of `object`. &#x26;quot;Mutable copy&#x26;quot; is an empty object, which however inherit all the properties of original via prototype chain.

  - `Joose.O.extend(target, source)`

Copies all the properties of `source` object to the `target` (*including* inherited via prototype chain). 
    
  - `Joose.O.isEmpty(object)`

Returns boolean value, indicating whether the `object` have no *own* properties.
    
  - `Joose.O.isInstance(obj)`

Returns boolean value, indicating whether the passed `obj` is an instance of some Joose class.
    
  - `Joose.O.wantArray(obj)`

Returns `obj` itself if `obj` is an array, or `[ obj ]` otherwise.


Helpers for Attributes declaration
----------------------------------

To simplify declaration of attributes Joose provides a number of default attributes initializers (see [Joose.Manual.Attributes][4] for details)

 - `Joose.I.Array`

Returns empty Array when called

 - `Joose.I.Object`

Returns empty Object when called

- `Joose.I.Function`

Returns empty Function when called (which in turn will return empty function)

- `Joose.I.Now`

Returns new instance of `Date` 



METACLASS
=========

When you use Joose, you can specify which metaclass to use:

        Class(&#x26;quot;Point&#x26;quot;, {
        
            meta : NewMetaClass,
            ....
        })


You can also specify traits which will be applied to your metaclass:

        Class(&#x26;quot;Point&#x26;quot;, {
        
            trait : TraitWithCustomBuilder,
        
            coords : [ 1, 2, 3 ]
            
            ....
        })

When you do this, your class&#x26;#39;s meta object will have the specified traits applied to it. See [Joose.Manual.Roles][5] and [Joose.Manual.Traits][traits] for further details.
    

The JooseX. namespace
=====================

Generally if you&#x26;#39;re writing an extension for Joose itself you&#x26;#39;ll want to put your extension in the JooseX. namespace. This namespace is specifically for extensions that make Joose better or different in some fundamental way. 
It is traditionally not for a package that just happens to use Joose. 

These extensions can be found on the [JSAN][3]. See [Joose.Manual.JooseX][7] for more details.


&#x26;amp;lt;div style=&#x26;quot;display:none&#x26;quot;&#x26;gt;

CAVEATS
=======

Refering to meta instance from the constructor

Method modifiers order in Rhino

&#x26;lt;/div&#x26;gt;


GETTING HELP
============

We offer a forum, a mailing list and an active IRC channel.

The forum is at [http://joose.it/forum](http://joose.it/forum)

The mailing list is &#x26;amp;lt;a href=&#x26;quot;mailto:joose-js@googlegroups.com&#x26;quot;&#x26;gt;joose-js@googlegroups.com&#x26;lt;/a&#x26;gt;. To subscribe, visit: [http://groups.google.com/group/joose-js](http://groups.google.com/group/joose-js)

You can also visit us at #joose on irc.freenode.org. Questions at all levels (on Joose-related topics ;) are welcome.


ACKNOWLEDGEMENTS
================

Many thanks to the whole Moose community for being icebreaker in the meta world. 

Special thanks to Dave Rolsky for the excellent Moose documentation written, on which this document is based.


SEE ALSO
========

[http://code.google.com/p/joose-js/](http://code.google.com/p/joose-js/)

This is the official web home of Joose.

[http://github.com/Joose/Joose](http://github.com/Joose/Joose)

Our version control repository.

[http://www.iinteractive.com/moose](http://www.iinteractive.com/moose)

Home page of Moose - post-modern class system for perl

BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at [http://code.google.com/p/joose-js/issues/list](http://code.google.com/p/joose-js/issues/list)


FEATURE REQUESTS
================

We are very strict about what features we add to the Joose core, especially the user-visible features. Instead we have made sure that the underlying meta-system of Joose is as extensible as possible so that you can add your own features easily.

That said, occasionally there is a feature needed in the meta-system to support your planned extension, in which case you should 
either email the mailing list ([joose-js@googlegroups.com](mailto:joose-js@googlegroups.com)) or join us on IRC at &#x26;amp;lt;irc://irc.freenode.org/#joose&#x26;gt; to discuss. 
The [Joose.Manual.Contributing][8] has more detail about how and when you can contribute.


AUTHORS
=======

Malte Ubl 

Jeremy Wall

Nickolay Platonov



COPYRIGHT AND LICENSE
=====================

Copyright (c) 2008-2009, Malte Ubl, Nickolay Platonov

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Malte Ubl nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &#x26;quot;AS IS&#x26;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 


Documentation is based on original Moose::Manual documentation, copyright 2006-2009 by Infinity Interactive, Inc.


[1]: Joose/Manual.html
[2]: Joose/Cookbook.html
[3]: http://openjsan.org/index.html
[4]: Joose/Manual/Attributes.html
[5]: Joose/Manual/Roles.html
[6]: Joose/Manual/Singleton.html
[7]: Joose/Manual/JooseX.html
[8]: Joose/Manual/Contributing.html

[construction]: Joose/Manual/Construction.html
[traits]: Joose/Manual/Traits.html
[roles]: Joose/Manual/Roles.html
&#x3C;/pre&#x3E;</description>
<dc:date>2010-10-05T04:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.06">
<title>Hash-0.06</title>
<link>http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.06</link>
<description>&#x3C;pre&#x3E;Name
====

Hash - provides MD5, SHA-1, SHA-256, SHA-512, and RIPEMD-160 cryptographic hash algorithms for JavaScript. Adapted from [Paul Johnston&#x26;#39;s](http://pajhome.org.uk/crypt/index.html) BSD-licensed cryptography library.


SYNOPSIS
========

Node.js example:

        require(&#x26;#39;joose&#x26;#39;)
        require(&#x26;#39;joosex-namespace-depended&#x26;#39;)
        require(&#x26;#39;hash&#x26;#39;)

        // define some text you wish to hash

        var text = &#x26;#39;Some amazing text.&#x26;#39;

        // hash it using MD5

        var hash = Hash.md5(text) // =&#x26;gt; &#x26;#39;8dc6e489042b35c41f38319f1702e829&#x26;#39;

        // hash it with SHA-1

        hash2 = Hash.sha1(text) // =&#x26;gt; &#x26;#39;5fa88652f6cfe865a6b2bed2d2e658d7e12d5ea8&#x26;#39;

        // hash it with SHA-256

        hash3 = Hash.sha256(text) // =&#x26;gt; &#x26;#39;b291f7ca30c306cc5e96ce8b046e5656c05b7621eb848ed4b180fb3b25b19d8d&#x26;#39;

        // hash it with SHA-512

        hash4 = Hash.sha512(text) // =&#x26;gt; &#x26;#39;2e74135091d583c0a2b0db5c4a0902fc3b75ec2b6b5c27fea1fb77e2cb0e14ed7922cc5f618b90f2511cc711a287d8881e76dea1697c5a4e788d78e52df53efc&#x26;#39;

        // hash it with RIPEMD-160

        hash5 = Hash.rmd160(text) // =&#x26;gt; &#x26;#39;bfda47b1b4574be552617212c80ad29687596193&#x26;#39;


DESCRIPTION
===========

`Hash` is a small collection of Joose3 classes which provide cryptographic hash algorithms for string types, implemented as static methods.

The module is usable both server-side with node.js and in a browser environment.  Extenstive testing has been conducted against large collections of UTF-8 and ASCII encoded strings to better ensure the reliability of these implementations. Canonical hashes were generated with Linux userland utilities, for comparison.


INSTALLATION
============

For node.js, [npm](http://github.com/isaacs/npm) provides the simplest install:

        npm install hash


If you&#x26;#39;ve not yet installed Joose3 or JooseX.Namespace.Depended: `npm install joose joosex-namespace-depended`.


METHODS
=======

The hash sum calculators are available as static methods in the Hash.MD5, Hash.SHA1, Hash.SHA256, Hash.SHA512, and Hash.RIPEMD160 classes:

        Hash.MD5.hex_md5(&#x26;#39;text&#x26;#39;)
        Hash.SHA1.hex_sha1(&#x26;#39;text&#x26;#39;)
        Hash.SHA256.hex_sha256(&#x26;#39;text&#x26;#39;)
        Hash.SHA512.hex_sha512(&#x26;#39;text&#x26;#39;)
        Hash.RIPEMD160.hex_rmd160(&#x26;#39;text&#x26;#39;)

        -or, for convenience-

        Hash.md5(&#x26;#39;text&#x26;#39;)
        Hash.sha1(&#x26;#39;text&#x26;#39;)
        Hash.sha256(&#x26;#39;text&#x26;#39;)
        Hash.sha512(&#x26;#39;text&#x26;#39;)
        Hash.rmd160(&#x26;#39;text&#x26;#39;)

Performance considerations
--------------------------

It should be noted that md5() is somewhat less CPU intensive than the other methods.  Keep this in mind if you&#x26;#39;ll be hashing message payloads in a high-throughput scenario where latency is a concern.


Hashing JSON
-----------

If you intend to hash over JSON objects, remember object-key order is not guaranteed; therefore it&#x26;#39;s not sufficient to JSON.stringify() an object and hash over that string. You would need first to serialize the object and any child objects into a collection of arrays, sorted lexographically (recursively) by key name.

An &#x26;quot;object to array&#x26;quot; helper method, `Hash.oTa()`, is provided for this purpose.

### Hash.oTa() -- helper method ###

        var ob1 = { key1 : &#x26;quot;Some value&#x26;quot;, key2 : { A : &#x26;quot;one&#x26;quot;, B : [0,1,2] }, key3 : 5 }

        var ob2 = { key1 : &#x26;quot;Some value&#x26;quot;, key3 : 5, key2 : { B : [0,1,2], A : &#x26;quot;one&#x26;quot; } }

        var oTa_ob1 = JSON.stringify(Hash.oTa(ob1))
        var oTa_ob2 = JSON.stringify(Hash.oTa(ob2))

        var compare = function(one, two) { if (one == two) { return true } else { return false } }

        compare(Hash.md5(JSON.stringify(ob1)), Hash.md5(JSON.stringify(ob2))) // =&#x26;gt; false

        compare(Hash.md5(oTa_ob1), Hash.md5(oTa_ob2)) // =&#x26;gt; true

        

The object literals `ob1` and `ob2` contain equivalent data but do not have the same stringified value. But hashing over the stringified return values of `Hash.oTa()` for `ob1`, `ob2` will calculate the same MD5 sum, and this is true for the other hash algorithms too.

At this time neither circular references nor functions as object-key values are supported by the oTa() helper method, as the standard JSON stringify() and parse() methods are employed in the helper.


GETTING HELP
============

This extension is supported via github issues tracker: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;

For general Joose questions you can also visit [#joose](http://webchat.freenode.net/?randomnick=1&#x26;amp;channels=joose&#x26;amp;prompt=1) 
on irc.freenode.org or mailing list at: &#x26;amp;lt;http://groups.google.com/group/joose-js&#x26;gt;
 


SEE ALSO
========

Web page of this module: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/&#x26;gt;

General documentation for Joose: &#x26;amp;lt;http://openjsan.org/go/?l=Joose&#x26;gt;


BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;



AUTHORS
=======

Michael Bradley, Jr. &#x26;amp;lt;michaelsbradleyjr@gmail.com&#x26;gt;





COPYRIGHT AND LICENSE
=====================

This software is Copyright (c) 2010 by Michael Bradley, Jr..

This is free software, licensed under:

  The MIT (X11) License

The MIT License

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated
documentation files (the &#x26;quot;Software&#x26;quot;), to deal in the Software
without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED &#x26;quot;AS IS&#x26;quot;, WITHOUT
WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.





&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-10T14:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.08">
<title>JooseX.Namespace.Depended-0.08</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.08</link>
<description>&#x3C;pre&#x3E;Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-10T07:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.05">
<title>JooseX.Attribute-0.05</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.05</link>
<description>&#x3C;pre&#x3E;Additional features for Joose attributes&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-10T07:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.11">
<title>JooseX.CPS-0.11</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.11</link>
<description>&#x3C;pre&#x3E;Continuation Passing Style for Joose classes&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-07T08:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.10">
<title>JooseX.CPS-0.10</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.10</link>
<description>&#x3C;pre&#x3E;Continuation Passing Style for Joose classes&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-07T07:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.03">
<title>Hash-0.03</title>
<link>http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.03</link>
<description>&#x3C;pre&#x3E;Name
====

Hash - provides MD5 and SHA-256 cryptographic hashing methods for JavaScript.

The module is usable both server-side with node.js and in a browser environment.  Extenstive testing has been conducted against large collections of UTF-8 and ASCII encoded strings to better ensure the reliability of these implementations.


SYNOPSIS
========

Node.js example:

        require(&#x26;#39;hash/Task/Hash/Bundle&#x26;#39;) // &#x26;lt;= combined Joose3 + Hash lib 

        // define some text you wish to hash

        var text = &#x26;#39;Some amazing text.&#x26;#39;

        // hash it using MD5

        var hash = Hash.MD5.hash(text) // =&#x26;gt; &#x26;#39;8dc6e489042b35c41f38319f1702e829&#x26;#39;

        // or hash it with SHA-256

        hash2 = Hash.SHA256.hash(text) =&#x26;gt; &#x26;#39;b291f7ca30c306cc5e96ce8b046e5656c05b7621eb848ed4b180fb3b25b19d8d&#x26;#39;


DESCRIPTION
===========

`Hash` is a small collection of Joose3 classes which provide cryptographic hash routines for string types, implemented as static methods.


INSTALLATION
============

For node.js, [npm](http://github.com/isaacs/npm) provides the simplest install:

       npm install hash


METHODS
=======

Presently the MD5 and SHA-256 routines are available as static methods in the Hash.MD5 and Hash.SHA256 classes:

        Hash.MD5.hash(&#x26;#39;text&#x26;#39;)

        -and-

        Hash.SHA256.hash(&#x26;#39;text&#x26;#39;)


It should be noted that MD5.hash() is somewhat less CPU intensive than SHA256.hash().  Keep this in mind if you&#x26;#39;ll be hashing message payloads in a high-throughput scenario where latency is a concern.

NOTE: if you intend to hash over JSON objects, remember object-key order is not guaranteed; therefore it&#x26;#39;s not sufficient to JSON.stringify() an object and hash over that string. You would need first to serialize the object and any child objects into a collection of arrays, sorted lexographically (recursively) by key name.


GETTING HELP
============

This extension is supported via github issues tracker: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;

For general Joose questions you can also visit [#joose](http://webchat.freenode.net/?randomnick=1&#x26;amp;channels=joose&#x26;amp;prompt=1) 
on irc.freenode.org or mailing list at: &#x26;amp;lt;http://groups.google.com/group/joose-js&#x26;gt;
 


SEE ALSO
========

Web page of this module: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/&#x26;gt;

General documentation for Joose: &#x26;amp;lt;http://openjsan.org/go/?l=Joose&#x26;gt;


BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;



AUTHORS
=======

Michael Bradley, Jr. &#x26;amp;lt;michaelsbradleyjr@gmail.com&#x26;gt;


COPYRIGHT AND LICENSE
=====================

This software is Copyright (c) 2010 by Michael Bradley, Jr..

This is free software, licensed under:

  The MIT (X11) License

&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-04T15:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.02">
<title>Hash-0.02</title>
<link>http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.02</link>
<description>&#x3C;pre&#x3E;Name
====

Hash - provides MD5 and SHA-256 cryptographic hashing methods.

The module is usable both server-side with node.js and in a browser environment.  Extenstive testing has been conducted against large collections of UTF-8 and ASCII encoded strings to better ensure the reliability of these implementations.


SYNOPSIS
========

Node.js example:

        require(&#x26;#39;hash&#x26;#39;)

        // define some text you wish to hash

        var text = &#x26;#39;Some amazing text.&#x26;#39;

        // hash it using MD5

        var hash = Hash.MD5.hash(text) // =&#x26;gt; &#x26;#39;8dc6e489042b35c41f38319f1702e829&#x26;#39;

        // or hash it with SHA-256

        hash2 = Hash.SHA256.hash(text) =&#x26;gt; &#x26;#39;b291f7ca30c306cc5e96ce8b046e5656c05b7621eb848ed4b180fb3b25b19d8d&#x26;#39;


DESCRIPTION
===========

`Hash` is a small collection of Joose3 classes which provide cryptographic hash routines for string types, implemented as static methods.


INSTALLATION
============

For node.js, [npm](http://github.com/isaacs/npm) provides the simplest install:

       npm install hash


METHODS
=======

Presently the MD5 and SHA-256 routines are available as static methods in the Hash.MD5 and Hash.SHA256 classes:

        Hash.MD5.hash(&#x26;#39;text&#x26;#39;)

        -and-

        Hash.SHA256.hash(&#x26;#39;text&#x26;#39;)


It should be noted that MD5.hash() is somewhat less CPU intensive than SHA256.hash().  Keep this in mind if you&#x26;#39;ll be hashing message payloads in a high-throughput scenario where latency is a concern.

NOTE: if you intend to hash over JSON objects, remember object-key order is not guaranteed; therefore it&#x26;#39;s not sufficient to JSON.stringify() an object and hash over that string. You would need first to serialize the object and any child objects into a collection of arrays, sorted lexographically (recursively) by key name.


GETTING HELP
============

This extension is supported via github issues tracker: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;

For general Joose questions you can also visit [#joose](http://webchat.freenode.net/?randomnick=1&#x26;amp;channels=joose&#x26;amp;prompt=1) 
on irc.freenode.org or mailing list at: &#x26;amp;lt;http://groups.google.com/group/joose-js&#x26;gt;
 


SEE ALSO
========

Web page of this module: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/&#x26;gt;

General documentation for Joose: &#x26;amp;lt;http://openjsan.org/go/?l=Joose&#x26;gt;


BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;



AUTHORS
=======

Michael Bradley, Jr. &#x26;amp;lt;michaelsbradleyjr@gmail.com&#x26;gt;


COPYRIGHT AND LICENSE
=====================

This software is Copyright (c) 2010 by Michael Bradley, Jr..

This is free software, licensed under:

  The MIT (X11) License

&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-04T15:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.01">
<title>Hash-0.01</title>
<link>http://openjsan.org/doc/m/mi/michaelsbradleyjr/Hash/0.01</link>
<description>&#x3C;pre&#x3E;Name
====

Hash - provides MD5 and SHA-256 cryptographic hash routines, implemented as static methods within Joose3 classes.

The module is uesable both server-side with node.js and in a browser environment.


SYNOPSIS
========

Node.js example:

        require(&#x26;#39;hash&#x26;#39;)

        // define some text you wish to hash

        var text = &#x26;#39;Some amazing text.&#x26;#39;

        // hash it using the MD5 routine

        var hash = Hash.MD5.hash(text) // =&#x26;gt; &#x26;#39;8dc6e489042b35c41f38319f1702e829&#x26;#39;

        // or the same text can be hashed with the SHA-256 routine

        hash2 = Hash.SHA256.my.hash(text) =&#x26;gt; &#x26;#39;b291f7ca30c306cc5e96ce8b046e5656c05b7621eb848ed4b180fb3b25b19d8d&#x26;#39;


DESCRIPTION
===========

`Hash` is a small collection of Joose3 classes which provide cryptographic hash routines for string types, implemented as static methods.


METHODS
=======

Presently the MD5 and SHA-256 routines are available as static methods in the Hash.MD5 and Hash.SHA256 classes:

        Hash.MD5.hash(&#x26;#39;text&#x26;#39;)
and
        Hash.SHA256.hash(&#x26;#39;text&#x26;#39;)


It should be noted that the MD5.hash() method is a good deal less CPU intensive than the SHA256.hash() method.  Keep that in mind if your going to be hashing message payloads in a high-throughput scenario where latency is a concern.

NOTE: if you intend to hash over JSON objects, remember that key order is not guaranteed, and therefore it&#x26;#39;s not sufficient to JSON.stringify() an object -- you would need first to serialize the object and any child objects into a collection of arrays, sorted lexographically (recursively) by key name.


GETTING HELP
============

This extension is supported via github issues tracker: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;

For general Joose questions you can also visit [#joose](http://webchat.freenode.net/?randomnick=1&#x26;amp;channels=joose&#x26;amp;prompt=1) 
on irc.freenode.org or mailing list at: &#x26;amp;lt;http://groups.google.com/group/joose-js&#x26;gt;
 


SEE ALSO
========

Web page of this module: &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/&#x26;gt;

General documentation for Joose: &#x26;amp;lt;http://openjsan.org/go/?l=Joose&#x26;gt;


BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at &#x26;amp;lt;http://github.com/michaelsbradleyjr/Hash/issues&#x26;gt;



AUTHORS
=======

Michael Bradley, Jr. &#x26;amp;lt;michaelsbradleyjr@gmail.com&#x26;gt;


COPYRIGHT AND LICENSE
=====================

This software is Copyright (c) 2010 by Michael Bradley, Jr..

This is free software, licensed under:

  The MIT (X11) License

&#x3C;/pre&#x3E;</description>
<dc:date>2010-09-02T05:29:02</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.07">
<title>JooseX.Namespace.Depended-0.07</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.07</link>
<description>&#x3C;pre&#x3E;Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3&#x3C;/pre&#x3E;</description>
<dc:date>2010-08-31T08:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.06">
<title>JooseX.Namespace.Depended-0.06</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.06</link>
<description>&#x3C;pre&#x3E;Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3&#x3C;/pre&#x3E;</description>
<dc:date>2010-08-31T07:29:01</dc:date>
</item>
<item rdf:about="http://openjsan.org/doc/s/sa/samuraijack/JSON2/0.02">
<title>JSON2-0.02</title>
<link>http://openjsan.org/doc/s/sa/samuraijack/JSON2/0.02</link>
<description>&#x3C;pre&#x3E;Name
====

JSON2 - json2 / native JSON normalizer for Joose


SYNOPSIS
========

        // bunlde will include the json2.js lib
        &#x26;amp;lt;script src = &#x26;quot;/jsan/lib/Task/JSON2/Bundle.js&#x26;quot;&#x26;gt;&#x26;lt;/script&#x26;gt;

        
        // `use` will load it on-demand (requires JooseX.Namespace.Depended)
        use(&#x26;#39;JSON2&#x26;#39;, function () {
        
            var str = JSON2.stringify([])
            
            var arr = JSON2.parse(&#x26;#39;[]&#x26;#39;)
        })

        


DESCRIPTION
===========

`JSON2` is a normalizing wrapper around the json2 library and native JSON implementation in supporting browsers.


USAGE
=====

Since its only a thin wrapper you should only use the features intersection between json2 &#x26;amp; native JSON. For example,
seems the native implementation of `JSON.parse` in FF do not accept 2nd argument. 


GETTING HELP
============

This extension is supported via github issues tracker: &#x26;amp;lt;http://github.com/SamuraiJack/JSON2/issues&#x26;gt;

For general Joose questions you can also visit [#joose](http://webchat.freenode.net/?randomnick=1&#x26;amp;channels=joose&#x26;amp;prompt=1) 
on irc.freenode.org or the mailing list at: &#x26;amp;lt;http://groups.google.com/group/joose-js&#x26;gt;
 


SEE ALSO
========

[Using JSON in Firefox](https://developer.mozilla.org/en/Using_JSON_in_Firefox)

BUGS
====

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at &#x26;amp;lt;http://github.com/SamuraiJack/JSON2/issues&#x26;gt;



AUTHORS
=======

Nickolay Platonov &#x26;amp;lt;nplatonov@cpan.org&#x26;gt;





COPYRIGHT AND LICENSE
=====================

This software is Copyright (c) 2010 by Nickolay Platonov.

This is free software, licensed under:

  The GNU Lesser General Public License, Version 3, June 2007
&#x3C;/pre&#x3E;</description>
<dc:date>2010-08-30T05:29:02</dc:date>
</item>
</rdf:RDF>