From 08a159a8671637d2bf0327ac730e879676f11e6a Mon Sep 17 00:00:00 2001 From: Matt Sutkowski Date: Wed, 22 Sep 2021 11:06:36 -0700 Subject: [PATCH] Adjust prefix copy to account for predicates --- README.md | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 319f1991..37772b93 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,32 @@ # Naming cheatsheet -- [English language](#english-language) -- [Naming convention](#naming-convention) -- [S-I-D](#s-i-d) -- [Avoid contractions](#avoid-contractions) -- [Avoid context duplication](#avoid-context-duplication) -- [Reflect the expected result](#reflect-the-expected-result) +- [Naming cheatsheet](#naming-cheatsheet) + - [English language](#english-language) + - [Naming convention](#naming-convention) + - [S-I-D](#s-i-d) + - [Avoid contractions](#avoid-contractions) + - [Avoid context duplication](#avoid-context-duplication) + - [Reflect the expected result](#reflect-the-expected-result) - [Naming functions](#naming-functions) - - [A/HC/LC pattern](#ahclc-pattern) - - [Actions](#actions) - - [Context](#context) - - [Prefixes](#prefixes) -- [Singular and Plurals](#singular-and-plurals) + - [A/HC/LC Pattern](#ahclc-pattern) + - [Actions](#actions) + - [`get`](#get) + - [`set`](#set) + - [`reset`](#reset) + - [`fetch`](#fetch) + - [`remove`](#remove) + - [`delete`](#delete) + - [`compose`](#compose) + - [`handle`](#handle) + - [Context](#context) + - [Prefixes](#prefixes) + - [`is`](#is) + - [`has`](#has) + - [`should`](#should) + - [`min`/`max`](#minmax) + - [`prev`/`next`](#prevnext) + - [Singular and Plurals](#singular-and-plurals) --- @@ -285,7 +299,7 @@ function getRecentPosts(posts) { ## Prefixes -Prefix enhances the meaning of a variable. It is rarely used in function names. +A prefix enhances the meaning of a variable. They are rarely used in function names, unless the given function is a [predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates. ### `is`