Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function buildQueryDescription(conditions: Condition[]): QueryDescription {
const [join, whereConditions] = getJoins(conditions)
return { join, where: whereConditions }
}
export function queryWithoutDeleted(query: QueryDescription): QueryDescription {
const { join, where: whereConditions } = query
return {
join: [...join, ...joinsWithoutDeleted(join)],
where: [...whereConditions, whereNotDeleted],
}
}
const isNotObject = complement(isObject)
const searchForColumnComparisons: any => boolean = cond([
[is(Array), any(value => searchForColumnComparisons(value))], // dig deeper into arrays
[isNotObject, F], // bail if primitive value
[has('column'), T], // bingo!
[
T,
pipe(
// dig deeper into objects
getValues,
any(value => searchForColumnComparisons(value)),
),
],
])
export function hasColumnComparisons(conditions: Where[]): boolean {
if (createData) await createDataJSON()
if (score) await createScores()
if (!createReadme) return
const { repoData } = readJSONSync(REPO_DATA)
const sorted = sort((a, b) => b.score - a.score, repoData)
const reposRaw = uniqWith((a, b) => a.name === b.name, sorted)
const awesomeRepos = reposRaw.filter(isAwesomeRepo)
const repos = reject(isAwesomeRepo, reposRaw)
const jsRelated = repos.filter(isJS)
const jsLibs = jsRelated.filter(isLibrary)
const reactLibs = jsRelated.filter(prop('isReact'))
const tsLibs = jsRelated.filter(prop('isTypescript'))
const jsProjects = jsRelated.filter(complement(prop('isLibrary')))
const otherLibs = repos.filter(complement(isJS))
const jsContent = createReadmePartial(jsLibs)
const awesomeContent = createReadmePartial(awesomeRepos)
const reactContent = createReadmePartial(reactLibs)
const tsContent = createReadmePartial(tsLibs)
const jsProjectsContent = createReadmePartial(jsProjects)
const otherContent = createReadmePartial(otherLibs)
const jsTitle = template(TITLE, {
num : jsLibs.length,
tag : 'Javascript',
})
const awesomeTitle = template(AWESOME_TITLE, {
num : awesomeRepos.length,
tag : 'Awesome lists',
})
if (updateSecondary) await updateSecondaryFn()
if (createData) await createDataJSON()
if (score) await createScores()
if (!createReadme) return
const { repoData } = readJSONSync(REPO_DATA)
const sorted = sort((a, b) => b.score - a.score, repoData)
const reposRaw = uniqWith((a, b) => a.name === b.name, sorted)
const awesomeRepos = reposRaw.filter(isAwesomeRepo)
const repos = reject(isAwesomeRepo, reposRaw)
const jsRelated = repos.filter(isJS)
const jsLibs = jsRelated.filter(isLibrary)
const reactLibs = jsRelated.filter(prop('isReact'))
const tsLibs = jsRelated.filter(prop('isTypescript'))
const jsProjects = jsRelated.filter(complement(prop('isLibrary')))
const otherLibs = repos.filter(complement(isJS))
const jsContent = createReadmePartial(jsLibs)
const awesomeContent = createReadmePartial(awesomeRepos)
const reactContent = createReadmePartial(reactLibs)
const tsContent = createReadmePartial(tsLibs)
const jsProjectsContent = createReadmePartial(jsProjects)
const otherContent = createReadmePartial(otherLibs)
const jsTitle = template(TITLE, {
num : jsLibs.length,
tag : 'Javascript',
})
const awesomeTitle = template(AWESOME_TITLE, {
num : awesomeRepos.length,
tag : 'Awesome lists',