
Security News
How AI Agents Expand the Software Supply Chain Attack Surface
In his AI Council 2026 talk, Feross Aboukhadijeh covers recent package compromises, vulnerability discovery, and a more automated security model.
egg-address
Advanced tools
$ npm i egg-address --save
// {app_root}/config/plugin.js
exports.eggAddress = {
enable: true,
package: 'egg-address',
};
// {app_root}/config/config.default.js
exports.eggAddress = {
};
see config/config.default.js for more detail.
it('get area', () => {
const ctx = app.mockContext();
const areaDate = ctx.service.address.area();
assert(areaDate['district_list'][0].label === '华东');
});
it('parse', async () => {
const ctx = app.mockContext();
console.log(`输入内容:${list[0][0]}`);
const result = await ctx.service.address.parse(list[0][0]);
console.log(`解析结果:${JSON.stringify(result)}`);
assert(result[0].province === '福建省');
assert(result[0].city === '福州市');
assert(result[0].area === '福清市');
assert(result[0].details === '石竹街道义明综合楼3F');
assert(result[0].name === '张小明');
assert(result[0].mobile === '15000000000');
});
it('parse ALL', async () => {
const ctx = app.mockContext();
for (const item of list) {
const address = Array.isArray(item) ? item[0] : item;
const options = Array.isArray(item) ? item[1] : '';
const code = typeof options === 'object' ? options.code : options;
const [result, ...results] = await ctx.service.address.parse(address, true);
let status = code ? result.code === code : result.__parse;
if (typeof options === 'object') {
for (const key in options) {
assert(result[key] === options[key]);
}
}
if (!status) {
console.log('addressParseTest->fail', `${address} [${code}->${result.code}]`, result, results, options);
}
}
});
Please open an issue here.
FAQs
We found that egg-address demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
In his AI Council 2026 talk, Feross Aboukhadijeh covers recent package compromises, vulnerability discovery, and a more automated security model.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.