UNPKG

eslint-plugin-import-sorting

Version:

ESLint plugin to group and sort imports by module, à la Python isort

15 lines (14 loc) 398 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); function pairwise(nodes, callback) { if (nodes.length > 1) { for (let index = 1; index < nodes.length; index++) { let left = nodes.at(index - 1); let right = nodes.at(index); if (left && right) { callback(left, right, index - 1); } } } } exports.pairwise = pairwise;