Skip to content

cant use like a Node module #21

@nsklyarov

Description

@nsklyarov

Hi.

Cool utility, but i have several problems when i use this like a Node module

npm init -y
npm i -g domcurl
npm i -S domcurl
touch index_1.js 
touch index_2.js 

Example 1:

in this example func call run immediately

node index_1.js

index_1.js

const domcurl = require('domcurl');
console.log(domcurl);

output:

--url or default value is not a valid URL
{}

Example 2:

this is example from doc

node index_2.js

index_2.js

const {domcurl} = require('domcurl');
domcurl(`https://paul.kinlan.me/`, {});

output:

TypeError: domcurl is not a function

Sorry, I pointed out two problems in one ticket.
Thank you for your attention!🙄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions