
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
quick-license
Advanced tools
quick-license
is a Node.js package that allows you to easily apply, check, and remove license headers from your JavaScript, CSS, and other specified files.
Install the package globally using npm:
npm install -g quick-license
You can use quick-license
through the command line with the following commands:
quick-license test
: Lists the files that will be affected based on your configuration.quick-license license
: Applies the license header to the specified files.quick-license unlicense
: Removes the license header from the specified files.quick-license check: Checks
the license status of the specified files.quick-license check -f <file>
: Checks the license status of a specific file or files (comma-separated).Example usage:
quick-license test
quick-license license
quick-license unLicense
quick-license check
quick-license check -f path/to/file.js
quick-license check --file path/to/file1.js,path/to/file2.css
The configuration for quick-license
can be specified in your package.json
file under the licenseScope
key, or in a separate quickLicense.json
file in the root directory. If neither is found, a default configuration is used.
Example package.json
configuration:
{
"licenseScope": {
"include": ["www/**/*"],
"exclude": ["www/**/test.js", "node_modules/"],
"allowedExtensions": ["js", "css", "mjs", "ts"],
"licenseFile": "license.txt"
}
}
Example quickLicense.json
configuration:
{
"licenseScope": {
"include": ["www/**/*"],
"exclude": ["www/**/test.js", "node_modules/"],
"allowedExtensions": ["js", "css", "mjs", "ts"],
"licenseFile": "license.txt"
}
}
Create a license.txt
file in your project root that contains the license text you want to apply. This text will be added between the predefined license start and end markers.
Example license.txt
:
Your License Text Here
You can also use quick-license
programmatically in your Node.js scripts:
const QuickLicense = require('quick-license');
async function main() {
const config = await QuickLicense.loadConfig();
const quickLicense = new QuickLicense(config);
await quickLicense.test();
await quickLicense.license();
await quickLicense.unLicense();
await quickLicense.check();
await quickLicense.check('path/to/file.js');
}
main().catch(err => console.error(err));`
test()
Traverse and output the list of files that will be affected based on the configuration.
license()
Applies the license header to the specified files.
unLicense()
Removes the license header from the specified files.
check(filepath)
Checks the license status of the specified files. If filepath
is given, it returns the status of that file(s). If no parameter is given, it returns the status of all files.
isLicensed(file)
Checks if the license is applied to the given file.
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License.
FAQs
A tool to apply, remove, and check licenses in .js and .css files.
The npm package quick-license receives a total of 0 weekly downloads. As such, quick-license popularity was classified as not popular.
We found that quick-license demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.