@nodescript/stdlib
Version:
Standard Node Definitions
24 lines (23 loc) • 565 B
JavaScript
export const module = {
version: '1.2.4',
moduleName: 'Logic / Equals',
description: 'Checks if two values are structurally equal.',
params: {
a: {
schema: { type: 'any' },
},
b: {
schema: { type: 'any' },
},
strict: {
schema: { type: 'boolean', default: false, },
},
},
result: {
schema: { type: 'boolean' },
}
};
export const compute = (params, ctx) => {
const { a, b, strict } = params;
return ctx.lib.anyEquals(a, b, { strict });
};