@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
9 lines • 354 B
JavaScript
/**
* Whether `specifier` loads `packageName` or one of its subpaths. A scope, such as
* `'@floating-ui'`, matches every package in that scope.
*/
export function isModuleFromPackage(_ref) {
var specifier = _ref.specifier,
packageName = _ref.packageName;
return specifier === packageName || specifier.startsWith("".concat(packageName, "/"));
}