Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a note about pluralisation in the readme.

  • Loading branch information...
commit 383648eba22e3601d6091a5089f15e68f5fcc1ee 1 parent 78f53e7
@philjackson authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
12 README.md
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.