mirror of
https://github.com/tvytlx/ai-agent-deep-dive.git
synced 2026-04-04 16:14:50 +08:00
16 lines
287 B
JavaScript
16 lines
287 B
JavaScript
"use strict";
|
|
|
|
// No support for subclassing array, return an actual Array object.
|
|
function item(i) {
|
|
/* jshint validthis: true */
|
|
return this[i] || null;
|
|
}
|
|
|
|
function NodeList(a) {
|
|
if (!a) a = [];
|
|
a.item = item;
|
|
return a;
|
|
}
|
|
|
|
module.exports = NodeList;
|