Skip to content

Commit

Permalink
Replace underscore with lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
thewebartisan7 committed Oct 25, 2022
1 parent 2c73989 commit a3e475f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 25 deletions.
24 changes: 6 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
],
"dependencies": {
"deepmerge": "^4.2.2",
"lodash": "^4.17.21",
"posthtml-attrs-parser": "^0.1.1",
"posthtml-expressions": "^1.9.0",
"posthtml-parser": "^0.11.0",
"posthtml-render": "^3.0.0",
"style-to-object": "^0.3.0",
"underscore": "^1.13.6"
"style-to-object": "^0.3.0"
},
"devDependencies": {
"@commitlint/cli": "^12.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const {match} = require('posthtml/lib/api');
const parseAttrs = require('posthtml-attrs-parser');
const styleToObject = require('style-to-object');
const {omit, keys, union, each, has, extend} = require('underscore');
const {omit, keys, union, each, has, extend} = require('lodash');

/**
* Map component attributes that it's not defined as locals to first element of node
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module.exports = (options = {}) => tree => {
function processTree(options) {
const filledSlots = {};

let processCounter = 0;
// let processCounter = 0;

return function (tree) {
if (options.plugins.length > 0) {
Expand All @@ -121,7 +121,7 @@ function processTree(options) {
return currentNode;
}

console.log(`${++processCounter}) Processing component ${componentPath}`);
// console.log(`${++processCounter}) Processing component ${componentPath}`);

// log(currentNode, 'currentNode');

Expand Down
2 changes: 1 addition & 1 deletion src/locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const merge = require('deepmerge');
const scriptDataLocals = require('posthtml-expressions/lib/locals');
const {pick, extend, keys, defaults, each} = require('underscore');
const {pick, keys, defaults, each, extend} = require('lodash');
const attributeTypes = ['merge', 'computed', 'aware'];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/slots.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const {match} = require('posthtml/lib/api');
const {render} = require('posthtml-render');
const {each, omit} = require('underscore');
const {each, omit} = require('lodash');

/**
* Set filled slots
Expand Down

0 comments on commit a3e475f

Please sign in to comment.