保护阵列用于帮助调试的慢速边界检查数组。例子var guard = require ( 'guarded-array' ) //First create any old array var array = [ 0 , 1 , 2 , 3 , 4 , 5 ] //Then we protect it using guard! var guardedArray = guard ( array ) //The guarded array works just like a normal array: console . log ( guardedArray . length , guardedArray . slice ( ) ) //Accessing elements in the middle of array is ok guardedArray [ 3 ] = 100 //Wr