ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [1/7] incubator-ponymail git commit: add hash detector
Date Fri, 02 Sep 2016 11:19:38 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/coffee-and-cake f2cdcb474 -> e3d0fc756


add hash detector


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/58a1dbd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/58a1dbd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/58a1dbd2

Branch: refs/heads/coffee-and-cake
Commit: 58a1dbd207d6c696e58a290c9226a925d1f35ce0
Parents: f2cdcb4
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Fri Sep 2 12:55:12 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Fri Sep 2 12:55:12 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/misc.coffee | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/58a1dbd2/site/js/coffee/misc.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/misc.coffee b/site/js/coffee/misc.coffee
index 8a6e5af..89c2fa5 100644
--- a/site/js/coffee/misc.coffee
+++ b/site/js/coffee/misc.coffee
@@ -42,10 +42,16 @@ Number.prototype.pad = (n) ->
 
 
 ### isArray: function to detect if an object is an array ###
-isArray = ( value ) ->
+isArray = (value) ->
     value and
         typeof value is 'object' and
         value instanceof Array and
         typeof value.length is 'number' and
         typeof value.splice is 'function' and
         not ( value.propertyIsEnumerable 'length' )
+
+### isHash: function to detect if an object is a hash ###
+isHash = (value) ->
+    value and
+        typeof value is 'object' and
+        not isArray(value)


Mime
View raw message