- Published on
Bouncer Pattern
- Authors
- Name
- Christoph Diehl
- @posidron
function transform_data(raw_data) {
// Check if no data
if (!raw_data) {
return []
}
// Check for specific case
if (raw_data.length == 1) {
return []
}
// Actual function code goes here
return raw_data.map((item) => item)
}