Javascript 如何使用ChereIO获取节点的源代码位置信息?

Javascript 如何使用ChereIO获取节点的源代码位置信息?,javascript,node.js,cheerio,Javascript,Node.js,Cheerio,我正在尝试获取节点的源代码位置 有parse5(按使用)选项。 但使用此测试代码: const cheerio = require('cheerio'); const $ = cheerio.load('<html><head><title>Test page</title></head><body></body></html>', { sourceCodeLocationInfo: true })

我正在尝试获取节点的源代码位置

有parse5(按使用)选项。 但使用此测试代码:

const cheerio = require('cheerio');

const $ = cheerio.load('<html><head><title>Test page</title></head><body></body></html>', { sourceCodeLocationInfo: true })
let title = $('title');

console.log(title.text());
console.log(title.sourceCodeLocation);
const cheerio=require('cheerio');
const$=cheerio.load('testpage',{sourceCodeLocationInfo:true})
设title=$('title');
console.log(title.text());
console.log(title.sourceCodeLocation);
sourceCodeLocation
title
属性是
未定义的


有什么想法吗

这是因为NPM上的Cheerio版本不是最新的

版本1.0.0-rc.3可用,而不是版本1.0.0


在GitHub中,我以这种方式安装了1.0.0版
npm安装https://github.com/cheeriojs/cheerio.git#v1.0.0
。一切都很好。

差不多一年了。。。似乎1.0.0-rc.3仍然是NPM的最新版本:(