cloudworker-proxy
Version:
An api gateway for cloudflare workers
22 lines (18 loc) • 485 B
JavaScript
;
var readFile = require('fs').readFile
, ast = require('./_ast-accessed-properties')
, pg = __dirname + '/__playground';
module.exports = function (t, a, d) {
readFile(pg + '/accessed-properties.js', 'utf-8', function (err, str) {
var plainR, astR;
if (err) {
d(err);
return;
}
plainR = t('foo')(str);
astR = ast(str);
a(plainR.length, astR.length, "Length");
astR.forEach(function (val, i) { a.deep(plainR[i], val, i); });
d();
});
};