CoastalCommitsPastes/server/node_modules/cldrjs/dist/.build/resource/get.js

18 lines
274 B
JavaScript
Raw Normal View History

2022-03-06 19:46:59 -05:00
// @path: normalized path
var resourceGet = function( data, path ) {
var i,
node = data,
length = path.length;
for ( i = 0; i < length - 1; i++ ) {
node = node[ path[ i ] ];
if ( !node ) {
return undefined;
}
}
return node[ path[ i ] ];
};