How to use the ramda-extension.toUpperFirst function in ramda-extension

To help you get started, we’ve selected a few ramda-extension examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tricinel / frontwerk / src / config / rollup.config.ts View on Github external
(deps: Dependencies, dep: string) => ({
    ...deps,
    [dep]: toUpperFirst(toCamelCase(dep))
  }),
  {}
github tricinel / frontwerk / src / config / rollup.config.ts View on Github external
import rollupBabel from 'rollup-plugin-babel';
import nodeBuiltIns from 'rollup-plugin-node-builtins';
import nodeGlobals from 'rollup-plugin-node-globals';
import nodeResolve from 'rollup-plugin-node-resolve';
import { toUpperFirst, toCamelCase } from 'ramda-extension';

import { hasPkgProp, pkg, Dependencies } from '../utils/pkg';
import parseEnv from '../utils/parseEnv';
import fileExists from '../utils/fileExists';

const format = parseEnv('BUILD_FORMAT');
const minify = parseEnv('BUILD_MINIFY', false);
const filenamePrefix = parseEnv('BUILD_FILENAME_PREFIX', '');
const filenameSuffix = parseEnv('BUILD_FILENAME_SUFFIX', '');
const isNode = parseEnv('BUILD_NODE', false);
const buildName = parseEnv('BUILD_NAME', toUpperFirst(toCamelCase(pkg.name)));

const peerDependencies = Object.keys(pkg.peerDependencies);

const defaultGlobals: Dependencies = peerDependencies.reduce(
  (deps: Dependencies, dep: string) => ({
    ...deps,
    [dep]: toUpperFirst(toCamelCase(dep))
  }),
  {}
);

const filename = [
  pkg.name,
  filenameSuffix,
  `.${format}`,
  minify ? '.min' : null,