2021年12月11日
(转)Javascript注释规范
最近查看代码,看其他人的代码确实很让人头疼,由于没有任何注释规范,导致代码里很少有注释,或者注释写的很简练,今天对于注释规范进行总结。
js注释规范基于jsdoc,写出的代码注释能够成功生成注释文档。
由于jsdoc的规范太多,为了项目的可用性,对jsdoc的某些属性进行提取形成文档,供开发人员使用。
方法注释
基本方法块注释
如果描述不能描述清楚,添加例子来描述。
/**
* @method
* @param {Type} data 目标对象
* @returns {Type} 运营商名称
* @desc 根据目标对象获取运营商
*/
function matchedNumber(data){
return '返回对象'
}
基本方法块注释,注释过长
/**
* @method
* @param {Type} data 目标对象<br/>
* 例:
* {
* target:手机号
* }
* @returns {Type} 运营商名称
* @desc 根据目标对象获取运营商
*/
function matchedNumber(data){
return '返回对象'
}
如果需要折行则在文本中使用<br/>标签
基本方法块注释,参数可选
/**
* @method
* @param {Type} [data] 目标对象
* 例:
* {
* target:手机号
* }
* @returns {Type} 运营商名称
* @desc 根据目标对象获取运营商
*/
function matchedNumber(data){
return '返回对象'
}
基本方法块注释,带默认值
/**
* @method
* @param {Type} data={} 目标对象
* 例:
* {
* target:手机号
* }
* @returns {Type} 运营商名称
* @desc 根据目标对象获取运营商
*/
function matchedNumber(data){
return '返回对象'
}
方法块注释特殊参数
如果描述不能描述清楚,添加例子来描述。
如果方法中有异常处理,标记异常处理注释
/**
* @method
* @param {Type} data 目标对象
* @returns {Type} 运营商名称
* @desc 根据目标对象获取运营商
* @throws {string} 抛出'Error'异常
* @example
* add(1, 2); // 返回3
*/
function matchedNumber(data){
return '返回对象'
}
如果有返回值增加@returns 如果没有省略此属性
参数和返回值类型Type:string、boolean、number、object、array、function
文件注释
在文件头部增加文件注释
/**
* @file LBS控制器
* @author limingle
* @copyright Synway SFE
* @createDate 2017-10-16 09:40:11
*/
变量注释
将关键的变量进行特殊注释,生成到文档中
/**
* @var {object}
* @desc 变量定义
* @property {string} a 属性a
* @property {string} b 属性b
*/
var foo = {
a: 'a',
b: 'b'
}
常量注释
将关键常量进行特殊注释,生成到文档中,如果有默认值增加@default属性
/**
* @constant {string}
* @default #000
* @desc 常量定义
*/
const COLOR_WHITE = '#fff';
枚举注释
用于url列表或者颜色枚举值,一般用于配置文件中
/**
* @enum {number}
* @desc cgi常见的返回码
*/
var RETCODE = {
/**
* @desc 未登录
*/
NOT_LOGIN: 100000,
/**
* @desc 参数错误
*/
PARAM_ERROR: 100001,
/**
* @type {string}
* @desc 未知错误
*/
UNKOWN_ERROR: 'unkown'
}
类的注释
默认情况先一个function就是一个类
ES6中使用Class来表示一个类
我们项目中使用class.js来实现类,在我们项目中使用类注释时需要在@class后边增加类名,不要jsdoc无法自动识别类名
/**
* @class
* @classdesc 这是对myClass类的描述
* @desc 这是对myClass类的构造函数的描述
*/
function myClass() {
...
}
/**
* @class LBSControllerCom
* @classdesc LBS控制类
* @desc 初始化ws
*/
var LBSControllerCom = Com.extends({})
类的属性
类的属性和变量都会生成到jsdoc文档的Member模块中,在类中使用属性标识
var LBSControllerCom = Com.extends({
/**
* @member {string}
* @desc 这样标识类的属性
*/
foo1 : 'a',
init: function() {}
})
参考链接:
JSDoc Guide
Hemolysis has been reported in patients with glucose- 6- phosphate dehydrogenase G6PD deficiency buy priligy online LEPETIT FRAMINGHAM FRAMINGHAM FRAMINGHAM FRAMINGHAM SIDUS CRAVERI CRAVERI BERNABO BRISTOL M
darknet markets 2024 deep web sites dark web sites links
dark web market darknet markets 2024 tor markets 2024
tor markets darknet market list dark web market
darknet drug links darknet seiten deep web markets
darknet links bitcoin dark web dark website
dark markets 2024 darknet websites dark web drug marketplace
dark web websites darknet drug store dark net
deep web drug store https://mydarknetmarketlinks.com/ – drug markets onion tor markets 2024
darknet seiten https://mydarknetmarketlinks.com/ – dark market onion free dark web
drug markets dark web https://mydarknetmarketlinks.com/ – deep web sites dark web market list
darkmarket url https://mydarknetmarketlinks.com/ – tor markets darknet drug store
dark markets https://mydarknetmarketlinks.com/ – dark market url dark market link
dark market 2024 https://mydarknetmarketlinks.com/ – dark market list dark web sites
bitcoin dark web https://mydarknetmarketlinks.com/ – how to access dark web darknet search engine
dark market 2024 https://mydarknetmarketlinks.com/ – dark market url tor markets links
deep web links https://mydarknetmarketlinks.com/ – free dark web darknet market list
dark web market https://mydarknetmarketlinks.com/ – best darknet markets dark market url
dark web markets https://mydarknetmarketlinks.com/ – dark web market list dark market link
dark markets 2024 https://mydarknetmarketlinks.com/ – dark net dark web markets
the dark internet https://mydarknetmarketlinks.com/ – tor market url dark market
dark web websites https://mydarknetmarketlinks.com/ – dark web sites links dark web sites links
darknet market list https://mydarknetmarketlinks.com/ – darknet links drug markets onion
deep web search https://mydarknetmarketlinks.com/ – dark web search engines dark markets
blackweb https://mydarknetmarketlinks.com/ – dark market onion darknet marketplace
the dark internet https://mydarknetmarketlinks.com/ – dark website darknet market lists
dark web market links https://mydarknetmarketlinks.com/ – drug markets onion dark web site
dark web websites https://mydarknetmarketlinks.com/ – blackweb deep web links
free dark web https://mydarknetmarketlinks.com/ – onion market darknet drugs
darknet search engine https://mydarknetmarketlinks.com/ – darkmarket list darknet seiten
dark market list https://mydarknetmarketlinks.com/ – dark web market list tor markets
dark web link https://mydarknetmarketlinks.com/ – the dark internet dark net
tor markets 2024 https://mydarknetmarketlinks.com/ – darknet links tor market
dark market onion https://mydarknetmarketlinks.com/ – deep web drug store tor markets links
black internet https://mydarknetmarketlinks.com/ – darknet sites dark website
darknet websites https://mydarknetmarketlinks.com/ – darknet search engine tor darknet
tor market url https://mydarknetmarketlinks.com/ – deep web sites darknet websites
dark market 2024 https://mydarknetmarketlinks.com/ – tor market tor marketplace
darkmarket url https://mydarknetmarketlinks.com/ – darknet search engine deep web markets
darknet websites https://mydarknetmarketlinks.com/ – dark web access dark markets 2024
dark markets 2024 https://mydarknetmarketlinks.com/ – darkmarket link blackweb official website
dark web websites https://mydarknetmarketlinks.com/ – deep web search darknet markets 2024
dark market onion https://mydarknetmarketlinks.com/ – deep dark web darkmarket link
deep web drug links https://mydarknetmarketlinks.com/ – drug markets onion deep web sites
darknet drug store https://mydarknetmarketlinks.com/ – dark market list onion market
dark web market list https://mydarknetmarketlinks.com/ – dark web sites links tor market links
onion market https://mydarknetmarketlinks.com/ – how to get on dark web dark website
onion market deep web drug links dark website
tor markets links darknet marketplace dark web site
dark markets 2024 tor market deep dark web
dark market 2024 drug markets onion darknet drug market
dark internet dark internet tor dark web
darknet site deep web drug links darkmarket url
tor markets 2024 tor market links how to access dark web
dark markets 2024 deep web drug store darkmarket link
darkmarket link dark web market darknet drug links
dark web market links tor darknet darknet market
darknet drug links darknet markets 2024 tor market
darknet markets 2024 dark web search engines dark web markets
darknet market list tor dark web darknet websites
darknet drug links darknet drug links darkmarket 2024
tor markets links onion market free dark web
deep dark web dark net deep web drug links
deep web markets deep web links darknet markets 2024
deep web links darknet drug links tor market links
dark web markets dark web search engine onion market
dark market link deep web links dark web search engines
dark market 2024 deep web links darknet site
darknet market list darknet search engine darknet seiten
tor marketplace how to access dark web dark market list
dark web search engines deep web drug url dark web market links
darknet drug market darknet site dark web access
darknet links darknet markets darknet drugs
dark market list dark web market list tor markets links
dark website dark websites deep web markets
dark internet tor market url darknet seiten
dark market list darknet market list tor dark web
tor market url dark web links deep web links
tor marketplace dark internet drug markets dark web
darknet sites darkweb marketplace darkmarket list
epinephrine and pseudoephedrine both increase sympathetic adrenergic effects, including increased blood pressure and heart rate priligy 30mg Other strategies e
Your partner needs to keep his genitals cool by wearing boxer shorts and loose- fitting trousers to keep the testes temperature lower to improve the quantity and quality of sperm how to buy priligy im 16 years old
darknet drug links dark web sites deep web markets
dark market 2024 tor markets links dark market 2024
tor market links tor darknet darknet market
best darknet markets darknet websites darknet drug market
dark market onion darknet markets 2024 dark market link
the dark internet tor market links tor markets links
tor marketplace dark market dark web links
dark net darkmarket link how to get on dark web
darknet links dark market link dark market list
tor marketplace darknet websites dark market link
dark internet dark web links dark market link
dark web markets dark web market darkmarkets
darkmarket url darknet markets dark web drug marketplace
dark market link deep web markets deep web drug markets
dark market black internet dark web link
deep web markets dark web sites darknet sites
tor darknet black internet bitcoin dark web
dark web market blackweb darkweb marketplace
dark web search engine darkmarket url tor market url
how to access dark web dark web links free dark web
darknet seiten how to access dark web deep web search
dark web markets tor markets links darknet market lists
dark web markets blackweb official website dark market list
dark internet bitcoin dark web darknet search engine
blackweb official website dark web search engines darknet drug store
the dark internet dark internet dark web market
darkweb marketplace darkmarket deep web markets
blackweb tor darknet dark internet
darknet sites darkmarket url dark website
deep web search darkmarket url tor darknet
darknet links darkmarket url dark markets
how to get on dark web dark web drug marketplace free dark web
darknet site dark market onion tor market links
darknet market links dark internet darknet markets 2024
deep web drug links dark markets 2024 dark web market list
dark websites deep web drug markets tor markets 2024
blackweb official website best darknet markets deep web links
dark web access tor market url darknet drug store
deep dark web dark web site darknet market list
dark market link dark web search engine dark website
tor dark web darknet market list darknet market links
dark web drug marketplace deep web drug links tor dark web
dark websites darknet market links darkweb marketplace
dark web search engines darknet marketplace deep web markets
dark market onion dark market list free dark web
dark website darknet websites darknet drug store
darkweb marketplace darknet site tor markets
darknet sites darkmarket dark market onion
tor markets links deep web drug store dark market list
darknet seiten darknet websites dark market list
dark markets dark websites darknet market lists
dark markets 2024 dark websites darknet seiten
dark websites dark web drug marketplace darknet market lists
dark internet bitcoin dark web https://darknetmarketstore.com/ – dark web sites links
tor market links darknet websites https://darknetmarketstore.com/ – dark internet
dark web market list tor market url https://darknetmarketstore.com/ – tor market url
dark market link tor market url https://darknetmarketstore.com/ – dark website
dark net black internet https://darknetmarketstore.com/ – darknet market links
dark net darknet market https://darknetmarketstore.com/ – dark market
darknet drug store dark website https://darknetmarketstore.com/ – deep web drug markets
bitcoin dark web darkmarkets https://darknetmarketstore.com/ – deep web links
darkmarket darknet drug store https://darknetmarketstore.com/ – darknet search engine
dark web markets tor market https://darknetmarketstore.com/ – darknet market
dark web link darkmarket 2024 https://darknetmarketstore.com/ – deep web drug links
dark website dark web access https://darknetmarketstore.com/ – tor market
darkmarket tor dark web https://darknetmarketstore.com/ – dark net
tor market links deep dark web https://darknetmarketstore.com/ – bitcoin dark web
dark web link darkmarket url https://darknetmarketstore.com/ – darknet markets
dark market list tor markets links https://darknetmarketstore.com/ – dark web site
dark web market list tor market https://darknetmarketstore.com/ – dark internet
darknet site how to get on dark web https://darknetmarketstore.com/ – tor markets links
blackweb official website darknet search engine https://darknetmarketstore.com/ – darknet drug market
darknet market list how to get on dark web https://darknetmarketstore.com/ – dark market onion
darknet drug store black internet https://darknetmarketstore.com/ – darknet seiten
darknet market links dark web markets https://darknetmarketstore.com/ – tor dark web
deep web drug links dark web sites https://darknetmarketstore.com/ – dark web site
dark web search engine darknet market https://darknetmarketstore.com/ – deep web drug url
tor darknet best darknet markets https://darknetmarketstore.com/ – drug markets dark web
dark market list deep web sites https://darknetmarketstore.com/ – darkmarket
best darknet markets darknet market list https://darknetmarketstore.com/ – darkmarket list
tor dark web darknet drug store https://darknetmarketstore.com/ – dark markets
dark web market deep web drug links https://darknetmarketstore.com/ – dark market list
dark websites darknet drug market https://darknetmarketstore.com/ – darkmarkets
deep dark web dark web market list https://darknetmarketstore.com/ – dark web search engines
deep web markets darknet search engine https://darknetmarketstore.com/ – dark web sites links
tor darknet dark market onion https://darknetmarketstore.com/ – darknet marketplace
dark internet dark web markets https://darknetmarketstore.com/ – tor dark web
dark web sites links dark web search engine https://darknetmarketstore.com/ – bitcoin dark web
dark markets 2024 dark web websites https://darknetmarketstore.com/ – darknet market links
darknet drug links deep web search https://darknetmarketstore.com/ – deep web drug links
darkmarkets tor markets 2024 https://darknetmarketstore.com/ – darknet markets
deep web search tor market https://darknetmarketstore.com/ – deep web drug links
dark web sites links black internet https://darknetmarketstore.com/ – dark web market links
dark web sites dark market url https://darknetmarketstore.com/ – dark web search engine
deep web drug store how to access dark web https://darknetmarketstore.com/
dark web websites darknet market links https://darknetmarketstore.com/
darknet drug store dark web market https://darknetmarketstore.com/
dark web link darknet market links https://darknetmarketstore.com/
bitcoin dark web deep web links https://darknetmarketstore.com/
tor darknet drug markets dark web https://darknetmarketstore.com/
darkmarket url darkweb marketplace https://darknetmarketstore.com/
dark markets 2024 tor markets links https://darknetmarketstore.com/
darknet market lists darknet markets https://darknetmarketstore.com/
the dark internet dark market 2024 https://darknetmarketstore.com/
free dark web dark web links https://darknetmarketstore.com/
dark market 2024 darknet market links https://darknetmarketstore.com/
darkmarkets darknet markets 2024 https://darknetmarketstore.com/
dark web site darknet drug market https://darknetmarketstore.com/
dark web websites darkmarket list https://darknetmarketstore.com/
darknet market darkmarkets https://darknetmarketstore.com/
darknet search engine darknet drug market https://darknetmarketstore.com/
darkmarket dark web market links https://darknetmarketstore.com/
how to get on dark web dark web drug marketplace https://darknetmarketstore.com/
tor market blackweb https://darknetmarketstore.com/
dark web site dark net https://darknetmarketstore.com/
dark markets dark market 2024 https://darknetmarketstore.com/
black internet dark market list https://mydarknetmarketlinks.com/
blackweb darknet drugs https://mydarknetmarketlinks.com/
tor markets links dark market list https://mydarknetmarketlinks.com/
dark market url drug markets onion https://mydarknetmarketlinks.com/
darknet search engine tor marketplace https://mydarknetmarketlinks.com/
darknet market tor markets https://mydarknetmarketlinks.com/
tor market links dark web websites https://mydarknetmarketlinks.com/
drug markets onion darkmarket url https://mydarknetmarketlinks.com/
dark markets darknet site https://mydarknetmarketlinks.com/
tor market dark markets 2024 https://mydarknetmarketlinks.com/
deep web search deep web drug links https://mydarknetmarketlinks.com/
darknet search engine black internet https://mydarknetmarketlinks.com/
dark website darkmarket 2024 https://mydarknetmarketlinks.com/
dark markets 2024 dark web market list https://mydarknetmarketlinks.com/
dark web market list deep web sites https://mydarknetmarketlinks.com/
onion market tor markets links https://mydarknetmarketlinks.com/
darknet drugs tor markets links https://mydarknetmarketlinks.com/
dark web search engine darknet seiten https://mydarknetmarketlinks.com/
dark websites tor market url https://mydarknetmarketlinks.com/
deep web links the dark internet https://mydarknetmarketlinks.com/
darknet drug links dark web access https://mydarknetmarketlinks.com/
onion market darknet site https://mydarknetmarketlinks.com/
tor marketplace drug markets onion https://mydarknetmarketlinks.com/
drug markets dark web darknet market list https://mydarknetmarketlinks.com/
darknet marketplace tor markets https://mydarknetmarketlinks.com/
dark web market links darkmarkets https://mydarknetmarketlinks.com/
darknet search engine dark net free dark web
darknet markets deep dark web dark web drug marketplace
dark markets drug markets onion dark websites
dark web market dark web link dark market link
dark market 2024 dark market drug markets onion
darkmarkets dark web sites links blackweb
the dark internet deep web sites deep web links
deep web links darknet drug store dark web link
darknet drug links darknet seiten dark web links
tor markets links deep web drug url darknet drug market
blackweb darknet markets 2024 dark net
tor markets dark web search engines best darknet markets
darknet markets dark web markets darkmarket url
bitcoin dark web dark web markets drug markets dark web
darknet market lists deep web sites darkmarket list
tor markets black internet dark web access
dark web websites tor market links deep web drug links
dark websites drug markets onion dark market list
darknet market dark markets 2024 free dark web
deep web drug url bitcoin dark web dark web access
tor darknet darknet market lists darknet sites
deep web search dark market onion dark market
tor marketplace dark web sites links darknet drug store
darknet links dark web sites links dark web site
dark web access dark web websites darkweb marketplace
dark web market links dark net darknet seiten
dark web search engines dark web link darknet marketplace
darkmarket url darkmarkets darknet market
dark web websites deep web search darknet links
best darknet markets darknet sites darknet seiten
darknet drugs deep web drug url darkmarket url
dark web market list darknet links dark internet
dark web search engine dark web markets dark market list
dark web sites links dark internet darknet search engine
darknet sites darknet websites bitcoin dark web
dark websites dark market darkweb marketplace
darknet markets 2024 darknet drugs deep web drug links
dark web search engines darknet markets tor marketplace
darknet drugs drug markets onion dark market url
dark markets darknet market lists darknet market
the dark internet darknet search engine darknet market lists
blackweb official website darknet market lists darknet marketplace
tor market links dark net how to access dark web
tor market url darknet market lists darknet drug store
darkmarkets darknet market links dark web search engines
tor dark web deep web sites best darknet markets
tor markets darknet market dark web drug marketplace
dark market 2024 darkmarket list dark market list
darkmarket list dark web drug marketplace darknet site
darknet market dark web search engines darknet search engine
free dark web how to get on dark web dark web sites links
onion market darknet websites bitcoin dark web
dark market onion tor markets dark market
dark web links dark internet darknet site
darknet sites dark web websites tor market url
tor dark web bitcoin dark web dark markets 2024
darknet websites tor markets 2024 tor market url
darknet market darknet markets free dark web
darknet search engine dark internet tor marketplace
deep web links how to access dark web dark market url
dark market url darkweb marketplace dark internet
deep web drug markets the dark internet deep web drug markets
tor dark web tor dark web dark market list
black internet deep web drug markets tor markets
dark web search engine darknet links darknet drugs
darknet site dark web search engine darknet markets 2024
tor market tor darknet darknet markets
tor dark web dark web market dark web market links
dark web link darknet market lists dark website
tor markets how to get on dark web darknet markets
darknet market links drug markets dark web darknet market
dark web market links dark web sites dark web site
dark markets 2024 deep web links darknet markets 2024
darknet markets deep web sites deep dark web
dark market link darknet search engine darknet websites
deep web markets dark market tor marketplace
dark market darkmarket list tor market url
dark web access darknet drug links dark markets
deep web drug links dark web link dark net
dark market list tor market darkmarkets
dark markets 2024 tor markets darknet drug market
free dark web deep web drug store dark internet
free dark web deep web sites black internet
dark website how to access dark web darknet site
dark web links darkmarket link darknet search engine
tor dark web darknet market links darknet marketplace
dark web sites darkweb marketplace dark market list
tor marketplace darknet drug store tor marketplace
dark web sites links darkmarket list darkmarket link
dark markets dark websites deep web drug markets
dark web sites links dark web link darkmarket url