All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.inflected.src.inflections.js Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
import isFunction from "./util/isFunction";
import Inflector from "./Inflector";
import defaults from "./defaults";

export default function inflections(locale, fn) {
  if (isFunction(locale)) {
    fn = locale;
    locale = null;
  }

  locale = locale || "en";

  if (fn) {
    fn(Inflector.getInstance(locale));
  } else {
    return Inflector.getInstance(locale);
  }
}

for (let locale in defaults) {
  inflections(locale, defaults[locale]);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy