René's URL Explorer Experiment


Title: fails with es6 class member functions · Issue #26 · nodegit/promisify-node · GitHub

Open Graph Title: fails with es6 class member functions · Issue #26 · nodegit/promisify-node

X Title: fails with es6 class member functions · Issue #26 · nodegit/promisify-node

Description: version 0.4.0 node v6.9.1 When I enter this code in the node REPL: var promisify = require("promisify-node"); class C { constructor() { this.promisified_connect = promisify(this.connect); } connect(done) { if (done) { done(); } else { re...

Open Graph Description: version 0.4.0 node v6.9.1 When I enter this code in the node REPL: var promisify = require("promisify-node"); class C { constructor() { this.promisified_connect = promisify(this.connect); } connect...

X Description: version 0.4.0 node v6.9.1 When I enter this code in the node REPL: var promisify = require("promisify-node"); class C { constructor() { this.promisified_connect = promisify(this.connect);...

Opengraph URL: https://github.com/nodegit/promisify-node/issues/26

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fails with es6 class member functions","articleBody":"version 0.4.0\r\nnode v6.9.1\r\n\r\nWhen I enter this code in the node REPL:\r\n```\r\nvar promisify = require(\"promisify-node\");\r\nclass C {\r\n    constructor() {\r\n        this.promisified_connect = promisify(this.connect);\r\n    }\r\n    connect(done) {\r\n        if (done) {\r\n            done();\r\n        } else {\r\n            return this.promisified_connect();\r\n        }\r\n    }\r\n}\r\nvar c = new C()\r\n```\r\n\r\npromisify-node throws this error:\r\n```\r\nTypeError: Cannot read property '1' of null\r\n    at module.exports (./node_modules/promisify-node/utils/args.js:9:63)\r\n    at processExports (./node_modules/promisify-node/index.js:61:29)\r\n    at module.exports (./node_modules/promisify-node/index.js:164:10)\r\n```\r\n\r\nso I updated the RegExp in https://github.com/nodegit/promisify-node/blob/master/utils/args.js#L9 from: \r\n```\r\n/function\\s.*?\\(([^)]*)\\)/\r\n```\r\nto:\r\n```\r\n/\\(([^)]*)\\)/\r\n```\r\n\r\nThen re-running the above test code produced another error:\r\n```\r\nTypeError: Cannot convert undefined or null to object\r\n    at processExports (./node_modules/promisify-node/index.js:86:16)\r\n    at module.exports (./node_modules/promisify-node/index.js:164:10)\r\n    at new C (repl:3:28)\r\n```\r\n\r\nI was able to get past this by modifying https://github.com/nodegit/promisify-node/blob/master/index.js#L86 to guard the checking of the keys of the prototype to:\r\n```\r\n    if (exports.prototype) {\r\n      if (Object.keys(exports.prototype).length) {\r\n```\r\n\r\nI believe there are likely other changes required.\r\n\r\n","author":{"url":"https://github.com/psnider","@type":"Person","name":"psnider"},"datePublished":"2016-11-28T15:29:47Z","url":"https://github.com/nodegit/promisify-node/issues/26"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:075189b8-0d0d-9af9-0081-cca6bf4a7723
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEC2C:245687:455966:61B2CE:6AFDB8E1
html-safe-nonce5e32e603c17f984847b016f803666c4f0888d1682dd223101fa7b97f9df1f5a9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzJDOjI0NTY4Nzo0NTU5NjY6NjFCMkNFOjZBRkRCOEUxIiwidmlzaXRvcl9pZCI6IjgyNDg2MDE0NzgyMTg3NTgzNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacba7d0a21eb89f0d2e5bb22b3117386720dbadb6ef7eeed965c928cc12347b50c
hovercard-subject-tagissue:192035339
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/promisify-node/26/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c130153c49cd703e3dee1188190bd4a7615c508d11eb54eedf88d81562e1d59d/nodegit/promisify-node/issues/26
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c130153c49cd703e3dee1188190bd4a7615c508d11eb54eedf88d81562e1d59d/nodegit/promisify-node/issues/26
og:image:altversion 0.4.0 node v6.9.1 When I enter this code in the node REPL: var promisify = require("promisify-node"); class C { constructor() { this.promisified_connect = promisify(this.connect); } connect...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepsnider
hostnamegithub.com
expected-hostnamegithub.com
None8309f07eb60a4237a657068c83d0bb57be4c7e02937f5e9933126f4bd596aac4
turbo-cache-controlno-preview
go-importgithub.com/nodegit/promisify-node git https://github.com/nodegit/promisify-node.git
octolytics-dimension-user_id657068
octolytics-dimension-user_loginnodegit
octolytics-dimension-repository_id18692565
octolytics-dimension-repository_nwonodegit/promisify-node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id18692565
octolytics-dimension-repository_network_root_nwonodegit/promisify-node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2f7154d847f1ddc5baa83b109a3e1d924605e2a3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodegit/promisify-node/issues/26#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fpromisify-node%2Fissues%2F26
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fpromisify-node%2Fissues%2F26
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodegit%2Fpromisify-node
Reloadhttps://github.com/nodegit/promisify-node/issues/26
Reloadhttps://github.com/nodegit/promisify-node/issues/26
Reloadhttps://github.com/nodegit/promisify-node/issues/26
nodegithttps://github.com/nodegit
promisify-nodehttps://github.com/nodegit/promisify-node
Codehttps://github.com/nodegit/promisify-node
Issues8 (8)https://github.com/nodegit/promisify-node/issues
Pull requests1 (1)https://github.com/nodegit/promisify-node/pulls
Actionshttps://github.com/nodegit/promisify-node/actions
Projectshttps://github.com/nodegit/promisify-node/projects
Wikihttps://github.com/nodegit/promisify-node/wiki
Security and qualityhttps://github.com/nodegit/promisify-node/security
Insightshttps://github.com/nodegit/promisify-node/insights
https://github.com/nodegit/promisify-node
New issuehttps://github.com/login?return_to=https://github.com/nodegit/promisify-node/issues/26
New issuehttps://github.com/login?return_to=https://github.com/nodegit/promisify-node/issues/26
fails with es6 class member functionshttps://github.com/nodegit/promisify-node/issues/26#top
https://github.com/psnider
psniderhttps://github.com/psnider
on Nov 28, 2016https://github.com/nodegit/promisify-node/issues/26#issue-192035339
https://github.com/nodegit/promisify-node/blob/master/utils/args.js#L9https://github.com/nodegit/promisify-node/blob/master/utils/args.js#L9
https://github.com/nodegit/promisify-node/blob/master/index.js#L86https://github.com/nodegit/promisify-node/blob/master/index.js#L86
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodegit/promisify-node/issues/26
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodegit/promisify-node/issues/26
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.