Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
@targos code review corrections
Browse files Browse the repository at this point in the history
Co-Authored-By: guybedford <guybedford@gmail.com>
  • Loading branch information
targos and guybedford committed Jan 30, 2019
1 parent c31bb8e commit 5ff8cb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_)
> 1. If the folder at _packageURL_ does not exist, then
> 1. Set _parentURL_ to the parent URL path of _parentURL_.
> 1. Continue the next loop iteration.
> 1. Let _pjson_be the result of **READ_PACKAGE_JSON**(_packageURL_).
> 1. Let _pjson_ be the result of **READ_PACKAGE_JSON**(_packageURL_).
> 1. If _packageSubpath_ is empty, then
> 1. Return the result of **PACKAGE_MAIN_RESOLVE**(_packageURL_,
> _pjson_).
Expand All @@ -227,7 +227,7 @@ PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_)
> 1. Throw a _Module Not Found_ error.
> 1. If _pjson.main_ is a String, then
> 1. Let _resolvedMain_ be the concatenation of _packageURL_, "/", and
> _"pjson.main"_.
> _pjson.main_.
> 1. If the file at _resolvedMain_ exists, then
> 1. Return _resolvedMain_.
> 1. If _pjson.type_ is equal to _"esm"_, then
Expand Down Expand Up @@ -269,7 +269,7 @@ READ_PACKAGE_JSON(_packageURL_)
> 1. Return **null**.
> 1. If the file at _packageURL_ does not parse as valid JSON, then
> 1. Throw an _Invalid Package Configuration_ error.
> 1. Return the parsed JSON source of the file at _url_.
> 1. Return the parsed JSON source of the file at _pjsonURL_.
[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md
[`module.createRequireFromPath()`]: modules.html#modules_module_createrequirefrompath_filename
Expand Down

0 comments on commit 5ff8cb4

Please sign in to comment.