Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const props = {};
for (const prop of CSS_PROPS_TO_TRACE_AND_TEXT) {
props[prop] = hypotheticalValueByProp[prop].value;
}
// Apply text-transform:
const textTransform = props['text-transform'];
if (
textTransform !== 'none' &&
!hypotheticalValueByProp.text.isListIndicator
) {
if (textTransform === 'uppercase') {
props.text = props.text.toUpperCase();
} else if (textTransform === 'lowercase') {
props.text = props.text.toLowerCase();
} else if (textTransform === 'capitalize') {
props.text = capitalize.words(props.text);
}
}
return props;
})
.filter(function filterAndDeduplicate(textWithProps) {
for (var i in sass) {
if (sass[i].length === 0) delete sass[i];
}
// Get a list of all groups
groupList = Object.keys(sass);
// Sort groups by user-defined categories
for (var i in sort) {
var index = groupList.indexOf(sort[i]);
groupList = move(groupList, index, 0);
}
// Finally, build a new object with the sorted groups
for (var i in groupList) {
var group = groups[groupList[i]] || capitalize.words(groupList[i].replace('-', ' '));
sassSorted[group] = sass[groupList[i]];
}
return sassSorted;
}
const description = () => capitalise.words(nlp.noun(weather.weather[0].description).pluralize());
return packageDetails.map(x => {
return ({
name: `${colors.green.bold(x.name)}${x.author ? ` by ${colors.blue(capitalize.words(x.author))}` : ''}`,
value: x
});
});
}
instrument => ({text: capitalize.words(instrument), value: instrument}),
controllableInstrumentInstanceNames(plugins)
this.markdownFiles.forEach((markdownFile) => {
let relative = path.relative(path.resolve(this.cwd, this.config.source_dir), markdownFile.filePath);
if (!markdownFile.frontMatter.layout) {
markdownFile.frontMatter.layout = 'index';
}
if (!markdownFile.frontMatter.title) {
let title = markdownFile.filePath;
title = path.basename(title, path.extname(title));
title = capitalize.words(title.replace(/[-_]/g, ' '));
markdownFile.frontMatter.title = title;
}
if (!markdownFile.frontMatter.permalink) {
let permalink = path.join('/', path.dirname(relative), path.basename(relative, path.extname(relative)));
markdownFile.frontMatter.permalink = permalink;
}
if (!markdownFile.frontMatter.date) {
const fileStat = fs.statSync(markdownFile.filePath);
let date = moment(fileStat.birthtime).format(this.config.date_format);
markdownFile.frontMatter.date = date;
} else {
markdownFile.frontMatter.date = moment(markdownFile.frontMatter.date).format(this.config.date_format);
}
});
log.verbose('mergeFrontMatters', JSON.stringify(this.markdownFiles, null, 2));
options={map(value => ({text: capitalize.words(value),
value}), patterns)} />
({ tocEntry, history, path }: { tocEntry: TableOfContentsEntry; history: H.History; path: string }): JSX.Element => {
return (
<div>
<div>{capitalize.words(tocEntry.directory.replace(/-/g, ' '))}</div>
{tocEntry.pages.map((page: PageEntry) => {
return (
<div path=""> {
docsService.fetchAndUpdateDocContent(`${tocEntry.directory}/${page.filename}`);
history.push(`/docs/${tocEntry.directory}/${page.filename}`);
window.scrollTo(0, 0);
}}
>
{Optional.ofNullable(page.display_name).orElse(capitalize.words(page.filename.replace(/-/g, ' ')))}
</div></div>
const description = () => capitalise.words(weather.weather[0].description);
instr => ({text: capitalize.words(instr), value: instr}),
controllableInstrumentInstanceNames(plugins)