lib.xp.examples.node.exists.js Maven / Gradle / Ivy
The newest version!
var nodeLib = require('/lib/xp/node');
var assert = require('/lib/xp/testing');
// BEGIN
// Checks if a node exists
var myRepo = nodeLib.connect({
repoId: 'my-repo',
branch: 'master'
});
var result = myRepo.exists(
'/path/to/mynode'
);
// END
assert.assertTrue(result);