Skip to content

Commit

Permalink
Fixed some spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
XmiliaH committed Apr 29, 2020
1 parent 0bc2a4f commit 3795103
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -66,7 +66,7 @@ export interface VMOptions {
export interface NodeVMOptions extends VMOptions {
/** `inherit` to enable console, `redirect` to redirect to events, `off` to disable console (default: `inherit`). */
console?: "inherit" | "redirect" | "off";
/** `true` or an object to enable `require` optionss (default: `false`). */
/** `true` or an object to enable `require` options (default: `false`). */
require?: true | VMRequire;
/** `true` to enable VMs nesting (default: `false`). */
nesting?: boolean;
Expand Down
24 changes: 12 additions & 12 deletions lib/contextify.js
Expand Up @@ -173,7 +173,7 @@ Decontextify.arguments = args => {
for (let i = 0, l = args.length; i < l; i++) arr[i] = Decontextify.value(args[i]);
return arr;
} catch (e) {
// Never pass the handled expcetion through!
// Never pass the handled exception through!
return new host.Array();
}
};
Expand All @@ -190,7 +190,7 @@ Decontextify.instance = (instance, klass, deepTraps, flags, toStringTag) => {
if (key === 'constructor') return klass;
if (key === '__proto__') return klass.prototype;
} catch (e) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}

Expand Down Expand Up @@ -247,7 +247,7 @@ Decontextify.function = (fnc, traps, deepTraps, flags, mock) => {
if (key === 'constructor') return host.Function;
if (key === '__proto__') return host.Function.prototype;
} catch (e) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}

Expand Down Expand Up @@ -281,7 +281,7 @@ Decontextify.object = (object, traps, deepTraps, flags, mock) => {
if (key === 'constructor') return host.Object;
if (key === '__proto__') return host.Object.prototype;
} catch (e) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}

Expand Down Expand Up @@ -359,7 +359,7 @@ Decontextify.object = (object, traps, deepTraps, flags, mock) => {
}
if (!success) return false;
// There's a chance accessing a property throws an error so we must not access them
// in try catch to prevent contextyfing local objects.
// in try catch to prevent contextifying local objects.

const propertyDescriptor = host.Object.create(null);
if (descriptor.get || descriptor.set) {
Expand Down Expand Up @@ -545,7 +545,7 @@ Decontextify.value = (value, traps, deepTraps, flags, mock) => {
return value;
}
} catch (ex) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}
};
Expand All @@ -565,7 +565,7 @@ Contextify.arguments = args => {
for (let i = 0, l = args.length; i < l; i++) arr[i] = Contextify.value(args[i]);
return arr;
} catch (e) {
// Never pass the handled expcetion through!
// Never pass the handled exception through!
return new local.Array();
}
};
Expand All @@ -582,7 +582,7 @@ Contextify.instance = (instance, klass, deepTraps, flags, toStringTag) => {
if (key === 'constructor') return klass;
if (key === '__proto__') return klass.prototype;
} catch (e) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}

Expand Down Expand Up @@ -644,7 +644,7 @@ Contextify.function = (fnc, traps, deepTraps, flags, mock) => {
if (key === 'constructor') return Function;
if (key === '__proto__') return Function.prototype;
} catch (e) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}

Expand Down Expand Up @@ -680,7 +680,7 @@ Contextify.object = (object, traps, deepTraps, flags, mock) => {
if (key === 'constructor') return Object;
if (key === '__proto__') return Object.prototype;
} catch (e) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}

Expand Down Expand Up @@ -761,7 +761,7 @@ Contextify.object = (object, traps, deepTraps, flags, mock) => {
}
if (!success) return false;
// There's a chance accessing a property throws an error so we must not access them
// in try catch to prevent contextyfing local objects.
// in try catch to prevent contextifying local objects.

const descGet = descriptor.get;
const descSet = descriptor.set;
Expand Down Expand Up @@ -924,7 +924,7 @@ Contextify.value = (value, traps, deepTraps, flags, mock) => {
return value;
}
} catch (ex) {
// Never pass the handled expcetion through! This block can't throw an exception under normal conditions.
// Never pass the handled exception through! This block can't throw an exception under normal conditions.
return null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/sandbox.js
Expand Up @@ -666,7 +666,7 @@ return ((vm, host) => {
}

/*
Return contextized require.
Return contextified require.
*/

return _prepareRequire;
Expand Down

0 comments on commit 3795103

Please sign in to comment.