Determine the validity of the data.
Usage:
const validData = { a: { b: { c: 413 } }};const isValidDataResA = isValidData(validData, ['a', 'b', 'c'], 2333);const isValidDataResB = isValidData(validData, ['a', 'b', 'c'], 413);const isValidDataResC = isValidData(validData, ['d', 'd'], 413);console.log('isValidDataResA:', isValidDataResA);console.log('isValidDataResB:', isValidDataResB);console.log('isValidDataResC:', isValidDataResC); Copy
const validData = { a: { b: { c: 413 } }};const isValidDataResA = isValidData(validData, ['a', 'b', 'c'], 2333);const isValidDataResB = isValidData(validData, ['a', 'b', 'c'], 413);const isValidDataResC = isValidData(validData, ['d', 'd'], 413);console.log('isValidDataResA:', isValidDataResA);console.log('isValidDataResB:', isValidDataResB);console.log('isValidDataResC:', isValidDataResC);
Output:
isValidDataResA: false isValidDataResB: true isValidDataResC: false Copy
isValidDataResA: false isValidDataResB: true isValidDataResC: false
Original Data
Data Attributes
Given Value for verifying.
Return TRUE if the data is valid.
Determine the validity of the data.
Usage:
Output: