Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 1.37 KB

README.md

File metadata and controls

48 lines (38 loc) · 1.37 KB

jquery

Usage

npx lil-codemods jquery path/of/files/ or/some**/*glob.js

# or

yarn global add lil-codemods
lil-codemods jquery path/of/files/ or/some**/*glob.js

Input / Output


basic

Input (basic.input.js):

this.$();
const container = this.$(courseBodyClassNames.infoTabScrollContainer);
const elem = this.$().find(`#embed-entity-url-${this.get('element.id')}`);
const text = this.$().text().trim();
this.$(reportButton).text().trim();
this.$(reportButton).find().text().trim();
this.$(CoursePage.selectors.transcripts.transcript).length
this.$().is("disabled")

Output (basic.output.js):

this.element;
const container = this.element.querySelector(courseBodyClassNames.infoTabScrollContainer);
const elem = this.element.querySelector(`#embed-entity-url-${this.get('element.id')}`);
const text = this.element.textContent.trim();
this.element.querySelector(reportButton).textContent.trim();
this.element.querySelector(reportButton).querySelector().textContent.trim();
this.element.querySelector(CoursePage.selectors.transcripts.transcript).length
this.element.disabled