✏️ Fix typos

This commit is contained in:
Iván Ovejero 2023-01-19 18:56:07 +01:00
parent e4d17f5817
commit f9a382e5d4
2 changed files with 3 additions and 3 deletions

View File

@ -327,7 +327,7 @@ function intersection(value: unknown[], extraArgs: unknown[][]): unknown[] {
const [others] = extraArgs;
if (!Array.isArray(others)) {
throw new ExpressionExtensionError(
'difference requires 1 argument that is an array. e.g. .difference([1, 2, 3, 4])',
'intersection requires 1 argument that is an array. e.g. .intersection([1, 2, 3, 4])',
);
}
const newArr: unknown[] = [];

View File

@ -40,7 +40,7 @@ function removeField(value: object, extraArgs: string[]): object {
function removeFieldsContaining(value: object, extraArgs: string[]): object {
const [match] = extraArgs;
if (typeof match !== 'string') {
throw new ExpressionExtensionError('argument of removeFieldsContaining must be an string');
throw new ExpressionExtensionError('argument of removeFieldsContaining must be a string');
}
const newObject = { ...value };
for (const [key, val] of Object.entries(value)) {
@ -55,7 +55,7 @@ function removeFieldsContaining(value: object, extraArgs: string[]): object {
function keepFieldsContaining(value: object, extraArgs: string[]): object {
const [match] = extraArgs;
if (typeof match !== 'string') {
throw new ExpressionExtensionError('argument of keepFieldsContaining must be an string');
throw new ExpressionExtensionError('argument of keepFieldsContaining must be a string');
}
const newObject = { ...value };
for (const [key, val] of Object.entries(value)) {