Permalink
Browse files

Added a note about pluralisation in the readme.

  • Loading branch information...
philjackson committed Apr 20, 2012
1 parent 78f53e7 commit 383648eba22e3601d6091a5089f15e68f5fcc1ee
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
@@ -46,3 +46,15 @@ Gives:
<milkshake>banana</milkshake>
</morestuff>
</person>
+
+# Pluralisation of lists
+
+Here's how you might override the pluralisation function to deal with
+anonymous list items in Javascript:
+
+ class AppleXml extends Js2Xml
+ @map =
+ "apples": "apple"
+
+ pluralisation: ( name ) ->
+ return @constructor.map[ name ] or "item"

0 comments on commit 383648e

Please sign in to comment.