-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Possible solution to issue #1 #6
Conversation
test.js
Outdated
@@ -1,3 +1,4 @@ | |||
/* eslint new-cap: ["error", { "newIsCap": false }] */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed.
index.js
Outdated
|
||
const aux = toString(to); | ||
to.toString = function () { | ||
const comment = `/* ${aux} */ \n ${from}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const comment = `/* ${aux} */\n\t${from}`;
package.json
Outdated
@@ -39,5 +39,8 @@ | |||
}, | |||
"xo": { | |||
"esnext": true | |||
}, | |||
"dependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependencies
should be listed before devDependencies
.
Also, it doesn't seem like it does what's mentioned in #1 (comment). |
Hello @kevva, Thank you for the directions. I thought the output would be something like this:
but now I realize that output should be something like this:
right? |
Almost. It should be: |
Actually, let's just make it:
|
Closing for lack of activity. Open a new PR if you're still interested in finishing this. |
Hello @sindresorhus!
I saw issues #1 , and I tried to solve it. At first I tried to use the prototype to change the toString () method, but after a few hours, I came up with this solution.
I hope this is what you are looking for with #1.