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

feat: node support #1

Merged
merged 1 commit into from
Aug 30, 2019
Merged

feat: node support #1

merged 1 commit into from
Aug 30, 2019

Conversation

brandonocasey
Copy link
Contributor

See code comments.

@@ -1,7 +1,9 @@
import window from 'global/window';

const atob = (s) => window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

node does not have window.atob

@@ -9,7 +9,7 @@ const resolveUrl = (baseUrl, relativeUrl) => {

// if the base URL is relative then combine with the current location
if (!(/\/\//i).test(baseUrl)) {
baseUrl = URLToolkit.buildAbsoluteURL(window.location.href, baseUrl);
baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

node does not have a location.

const currentLocation = window.location.protocol + '//' + window.location.host;
let currentLocation = '';

if (window.location && window.location.protocol) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

node does not have a location.

@brandonocasey brandonocasey changed the title feat: node support and more stream tests feat: node support Aug 28, 2019
@brandonocasey brandonocasey merged commit 12898d6 into master Aug 30, 2019
@brandonocasey brandonocasey deleted the feat/node-support branch August 30, 2019 15:53
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.

3 participants