输入一个多级对象,输出一个数组
输入 一个依赖树 如下
var loremIpsum = {
"name": "lorem-ipsum",
"version": "0.1.1",
"dependencies": {
"optimist": {
"version": "0.3.7",
"dependencies": {
"wordwrap": {
"version": "0.0.2"
}
}
},
"inflection": {
"version": "1.2.6"
}
}
}
输出版本号
[ 'inflection@1.2.6', 'optimist@0.3.7', 'wordwrap@0.0.2' ]
Dependencies should be printed as dependency@version e.g. 'inflection@1.2.6'.