Permalink
Browse files

Moving Hash Extras to Hash.Extras.js.

  • Loading branch information...
1 parent 52e1c49 commit 953a07f4ac1153e6acd76a70d58c9f28c16d01c7 @timwienk timwienk committed Jun 16, 2010
Showing with 42 additions and 25 deletions.
  1. +37 −0 Source/Types/Hash.Extras.js
  2. +4 −25 Source/Types/Object.Extras.js
  3. +1 −0 package.yml
@@ -0,0 +1,37 @@
+/*
+---
+
+script: Hash.Extras.js
+
+name: Hash.Extras
+
+description: Extends the Hash Type to include getFromPath which allows a path notation to child elements.
+
+license: MIT-style license
+
+authors:
+ - Aaron Newton
+
+requires:
+ - /Hash
+
+provides: [Hash.Extras]
+
+...
+*/
+
+Hash.implement({
+
+ getFromPath: function(notation){
+ return Object.getFromPath(this, notation);
+ },
+
+ cleanValues: function(method){
+ return new Hash(Object.cleanValues(this, method));
+ },
+
+ run: function(){
+ Object.run(arguments);
+ }
+
+});
@@ -3,9 +3,9 @@
script: Object.Extras.js
-name: Hash.Extras
+name: Object.Extras
-description: Extends the Hash native object to include getFromPath which allows a path notation to child elements.
+description: Extra Object generics, like getFromPath which allows a path notation to child elements.
license: MIT-style license
@@ -16,7 +16,7 @@ requires:
- Core/Object
- /MooTools.More
-provides: [Object.Extras, Hash.Extras]
+provides: [Object.Extras]
...
*/
@@ -42,7 +42,7 @@ Object.extend({
}
return object;
},
-
+
erase: function(object, key){
if(object.hasOwnProperty(key)) delete object[key];
return object;
@@ -56,24 +56,3 @@ Object.extend({
}
});
-
-
-//<1.2compat>
-
-Hash.implement({
-
- getFromPath: function(notation){
- return Object.getFromPath(this, notation);
- },
-
- cleanValues: function(method){
- return new Hash(Object.cleanValues(this, method));
- },
-
- run: function(){
- Object.run(arguments);
- }
-
-});
-
-//</1.2compat>
View
@@ -31,6 +31,7 @@ sources:
- "Source/Types/URI.js"
- "Source/Types/URI.Relative.js"
- "Source/Types/Hash.js"
+ - "Source/Types/Hash.Extras.js"
- "Source/Element/Element.Forms.js"
- "Source/Element/Elements.From.js"
- "Source/Element/Element.Delegation.js"

0 comments on commit 953a07f

Please sign in to comment.