-
Is GRMustache thread-safe?
Thread-safety of non-mutating methods is guaranteed. Thread-safety of mutating methods is not guaranteed.
-
Is it possible to iterate over key/value pairs of a dictionary?
Yes.
-
Is it possible to render array indexes? Customize first and last elements? Distinguish odd and even items?
-
Is it possible to format numbers and dates?
Yes. Use NSNumberFormatter and NSDateFormatter.
-
Is it possible to pluralize/singularize strings?
Yes. You have some sample code in issue #50. You may check @mattt's InflectorKit for actual inflection methods.
-
Is it possible to write Handlebars-like helpers?
-
Is it possible to localize templates?
-
Is it possible to embed partial templates whose name is only known at runtime?
-
Does GRMustache provide any layout or template inheritance facility?
-
Is it possible to render a default value for missing keys?
-
Is it possible to disable HTML escaping?
-
What are those NSUndefinedKeyException?
When GRMustache has to try several objects until it finds the one that provides a
{{key}}
, several NSUndefinedKeyException may be raised and caught. Those exceptions are part of the normal template rendering. You can be prevent them, though: see the Runtime Guide. -
Why does GRMustache need JRSwizzle?
GRMustache does not need it, and does not swizzle anything unless you explicitly ask for it.
[GRMustache preventNSUndefinedKeyExceptionAttack]
swizzles NSObject'svalueForUndefinedKey:
in order to prevent NSUndefinedKeyException during template rendering. See the Runtime Guide for a detailed discussion.