Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: grammar #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BuiltinModule from 'module';
import path from 'path';

const nodeModulesRegex = /^(?:.*[\\/])?node_modules(?:[\\/].*)?$/;
// Guard against poorly mocked module constructors.
// Guard against poorly-mocked module constructors.
const Module =
module.constructor.length > 1 ? module.constructor : BuiltinModule;

Expand All @@ -12,7 +12,7 @@ const HOOK_RETURNED_NOTHING_ERROR_MESSAGE =
' violation of intergalactic law!\n' +
'--------------------\n' +
'If you have no idea what this means or what Pirates is, let me explain: ' +
'Pirates is a module that makes is easy to implement require hooks. One of' +
'Pirates is a module that makes it easy to implement require hooks. One of' +
" the require hooks you're using uses it. One of these require hooks" +
" didn't return anything from it's handler, so we don't know what to" +
' do. You might want to debug this.';
Expand Down Expand Up @@ -138,7 +138,7 @@ export function addHook(hook, opts = {}) {

exts.forEach((ext) => {
// if the current loader for the extension is our loader then unregister it and set the oldLoader again
// if not we can not do anything as we cannot remove a loader from within the loader-chain
// if not we cannot do anything as we cannot remove a loader from within the loader-chain
if (Module._extensions[ext] === loaders[ext]) {
if (!oldLoaders[ext]) {
delete Module._extensions[ext];
Expand Down