i18next/i18next — pull request #335 by jcbvm (2014-12-15 23:05:51+00:00)
Title: Added getResourceBundle to API. #334

I've added a new API function 'getResourceBundle' which will return the resources of a specific bundle.

The function takes two arguments, a language and an optional namespace. When no namespace is provided, is will use the default namespace taken from the options. This is consistent with other functions like addResourceBundle and removeResourceBundle. It will return the bundle resources or an empty object when the bundle does not exist. It returns a clone of the bundle, to prevent the bundle from being changed.

I've added tests for it.