no-paren
v1.0.5
Published
Functions without parentheses
Downloads
26
Maintainers
Readme
no-paren
Functions without parentheses
Getting started
Make sure you have Node and NPM installed.
Run npm i no-paren
to install this package. Run the following code:
const noParen = require('no-paren');
noParen( // Define the paren-less function
globalThis, // Use global in NodeJS, window in a browser, or globalThis in either
'error', // Function name
console.error // The function to run
);
error = ['Error:', 'Something bad happened']; // Set the parameters
error; // Run the function
You should see the output "Error: Something bad happened".
You can find the docs at https://shreyasm-dev.github.io/no-paren/.