numpydoc
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 355
- Forks
- 181
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 3
Description
/**
- Normalizes identity information and verifies layout attributes.
- @param {Object} inputData - Raw profile details from form/OCR text.
- @returns {Object} Cleaned document payload object.
*/
function processIdentityPayload(inputData) {
const { name, nrc, dobString } = inputData;
// Convert DD.MM.YYYY structure into an engine-readable format (YYYY-MM-DD)
const [day, month, year] = dobString.split('.');
const formattedDob = ${year}-${month}-${day};
// Dynamic Age Calculation
const birthDate = new Date(formattedDob);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDifference = today.getMonth() - birthDate.getMonth();
if (monthDifference < 0 || (monthDifference === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return {
name: name.trim(),
nrc_serial: nrc.toUpperCase().replace(/\s+/g, ''),
date_of_birth_iso: formattedDob,
current_age: age,
processed_at: new Date().toISOString()
};
}
// Execution Instance
const rawInput = {
name: "Moe Lwin Tun",
nrc: "12/magada(n)150506",
dobString: "20.08.1997"
};
const payload = processIdentityPayload(rawInput);
console.log("Processed API Payload:", JSON.stringify(payload, null, 2));
{
"status": "success",
"documentType": "MYANMAR_NRC",
"extractedFields": {
"fullName": "Moe Lwin Tun",
"nrcNumber": "12/MAGADA(N)150506",
"dateOfBirth": "1997-08-20",
"calculatedAge": 28,
"isVerified": true
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue body contains a JavaScript identity-processing example but does not identify a numpydoc file, test, or requested change. First clarify what should be changed in numpydoc and locate the relevant entry point or documentation test. Completion criteria cannot be defined until the intended scope is stated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100