node_modules.inflected.src.inflections.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-client-maven-plugin Show documentation
Show all versions of apollo-client-maven-plugin Show documentation
Maven plugin for generating graphql clients
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]);
}