mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Replace underscore with lodash.
This commit is contained in:
parent
a03373504c
commit
25f506aa57
2
cli.js
2
cli.js
@ -47,7 +47,7 @@ module.exports = (() => {
|
||||
|
||||
// TODO: docs
|
||||
cli.loadConfig = () => {
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const args = require('jsdoc/opts/args');
|
||||
const Config = require('jsdoc/config');
|
||||
let config;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module jsdoc/doclet
|
||||
*/
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const jsdoc = {
|
||||
env: require('jsdoc/env'),
|
||||
name: require('jsdoc/name'),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* A collection of functions relating to JSDoc symbol name manipulation.
|
||||
* @module jsdoc/name
|
||||
*/
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const escape = require('escape-string-regexp');
|
||||
|
||||
const hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* Parse the command line arguments.
|
||||
* @module jsdoc/opts/argparser
|
||||
*/
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const util = require('util');
|
||||
|
||||
const hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* Define tags that are known in JSDoc.
|
||||
* @module jsdoc/tag/dictionary/definitions
|
||||
*/
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const jsdoc = {
|
||||
env: require('jsdoc/env'),
|
||||
name: require('jsdoc/name'),
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
/**
|
||||
* Wrapper for underscore's template utility to allow loading templates from files.
|
||||
* Wrapper for Lodash's template utility to allow loading templates from files.
|
||||
* @module jsdoc/template
|
||||
*/
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const fs = require('jsdoc/fs');
|
||||
const path = require('path');
|
||||
|
||||
/**
|
||||
* Underscore template helper.
|
||||
* Template helper.
|
||||
*/
|
||||
class Template {
|
||||
/**
|
||||
|
||||
5
package-lock.json
generated
5
package-lock.json
generated
@ -5234,11 +5234,6 @@
|
||||
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
|
||||
"dev": true
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz",
|
||||
"integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg=="
|
||||
},
|
||||
"undertaker": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
"escape-string-regexp": "^2.0.0",
|
||||
"js2xmlparser": "^4.0.0",
|
||||
"klaw": "^3.0.0",
|
||||
"lodash": "^4.17.11",
|
||||
"markdown-it": "^8.4.2",
|
||||
"markdown-it-anchor": "^5.0.2",
|
||||
"marked": "^0.6.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"requizzle": "^0.2.2",
|
||||
"strip-json-comments": "^3.0.1",
|
||||
"taffydb": "2.6.2",
|
||||
"underscore": "~1.9.1"
|
||||
"taffydb": "2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ajv": "^6.10.0",
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
*
|
||||
* @module plugins/eventDumper
|
||||
*/
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const doop = require('jsdoc/util/doop');
|
||||
const dump = require('jsdoc/util/dumper').dump;
|
||||
const env = require('jsdoc/env');
|
||||
const util = require('util');
|
||||
|
||||
const conf = env.conf.eventDumper || {};
|
||||
|
||||
@ -68,7 +67,7 @@ function cleanse(e) {
|
||||
|
||||
Object.keys(e).forEach(prop => {
|
||||
// by default, don't stringify properties that contain an array of functions
|
||||
if (!conf.includeFunctions && util.isArray(e[prop]) && e[prop][0] &&
|
||||
if (!conf.includeFunctions && Array.isArray(e[prop]) && e[prop][0] &&
|
||||
String(typeof e[prop][0]) === 'function') {
|
||||
result[prop] = `function[${e[prop].length}]`;
|
||||
}
|
||||
|
||||
2
test/fixtures/eventorder.js
vendored
2
test/fixtures/eventorder.js
vendored
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('underscore');
|
||||
var _ = require('lodash');
|
||||
|
||||
/**
|
||||
* Socket class.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
describe('jsdoc/doclet', () => {
|
||||
// TODO: more tests
|
||||
const _ = require('underscore');
|
||||
const _ = require('lodash');
|
||||
const jsdoc = {
|
||||
doclet: require('jsdoc/doclet')
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user