Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
grunt-date-suffix
Advanced tools
![Gitter](https://badges.gitter.im/Join Chat.svg)
Grunt plugin for renaming a file with a date suffix.
npm install grunt-date-suffix --save-dev
datesuffix: {
rename1: {
/**
* Original filename (with path if not in current directory)
* @required
*/
file: "test.txt",
/**
* If move file to other directory, define here.
* @optional
*/
dest: "outputDir"
/**
* Divider between filename and date.
* @optional
* @default "."
*/
divider: "-"
/**
* Switch behavior from "rename/move" to "copy".
* @optional
* @default false
*/
copy: true,
/**
* Datetime format. Used node library `date-format`.
* @optional
* @default "yyyyMMddhhmmssSSS"
*/
date_format: "yyyyMMdd"
},
}
//Gruntfile.js
grunt.initConfig({
datesuffix: {
test1: {
file: "test.txt", //required
},
test2: {
file: "test.txt", //required
dest: "outputDir", //default: undefined
},
test3: {
file: "test.txt", //required
dest: "output", //default: undefined
copy: true, //default: false
date_format: "yyyyMMdd" //default: "yyyyMMddhhmmssSSS"
},
test4: {
files: "filedoesnotexist.txt", //required
ignore_nonexistent: true //default: false
},
test5: {
files: "filedoesnotexist.txt", //required
divider: "-" //default: "."
}
}
});
grunt.loadNpmTasks("grunt-date-suffix");
grunt datesuffix:test1
grunt datesuffix:test2
grunt datesuffix:test3
grunt datesuffix:test4
grunt datesuffix:test5
####Result
# test1
test.20150116201020123.txt
# test2
output/test.20150116201020123.txt
# test3
test.txt
output/test.20150116.txt
# test4
# no error is thrown even if the file does not exist
# test5
test-20150116201020123.txt
FAQs
Grunt plugin for renaming a file with date suffix.
The npm package grunt-date-suffix receives a total of 0 weekly downloads. As such, grunt-date-suffix popularity was classified as not popular.
We found that grunt-date-suffix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.