domcurl icon indicating copy to clipboard operation
domcurl copied to clipboard

cant use like a Node module

Open nsklyarov opened this issue 5 years ago • 0 comments

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!🙄

nsklyarov avatar May 02 '19 01:05 nsklyarov