UNPKG

graphql-sequelize-helper

Version:

graphql-sequelize-helper transform Sequelize models to GraphQL schemas that is compatible with Relay. * <a href="http://docs.sequelizejs.com/">Sequelize</a> is a promise-based Node.js ORM for Postgres, MySQL, SQLite and Microsoft SQL Server. It features s

16 lines (15 loc) 496 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { toInitialUpperCase: function toInitialUpperCase(str) { return str.substring(0, 1).toUpperCase() + str.substring(1); }, toInitialLowerCase: function toInitialLowerCase(str) { return str.substring(0, 1).toLowerCase() + str.substring(1); }, toUnderscoredName: function toUnderscoredName(str) { return str.replace(/([A-Z])/g, '_$1').replace(/^_/, '').toLocaleLowerCase(); } };