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

docs: update readme #35

Merged
merged 1 commit into from
Nov 12, 2017
Merged

docs: update readme #35

merged 1 commit into from
Nov 12, 2017

Conversation

blond
Copy link
Contributor

@blond blond commented Nov 11, 2017

No description provided.

README.md Outdated
};
`;

var package = safeEval(requireContent);
console.log(package.name); // 'node-eval'
nodeEval(requireContents); // { name: 'node-eval' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about path to file to provide required info to resolve relative paths inside evaluating code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we need one more example with resolving paths.

README.md Outdated
It may spend additional processor's time on it, so better to pass in absolute path.

```js
// /repos/open-source-project/lib/file.js:
const evaluatingFile = '../files/another.js';

nodeEval(fs.readFileSync(evaluatingFile, 'utf-8'), evaluatingFile);
// '../files/another.js' will be resolved to '/repos/open-source-project/files/another.js'
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example...

@blond blond merged commit 16d52b8 into master Nov 12, 2017
@blond blond deleted the docs branch November 12, 2017 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants