
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
gulp-json-transform
Advanced tools
A gulp plugin to transform json files, pipe json files through it and transform them to other json files or other formats.
A gulp plugin to transform JSON files, pipe JSON files through it and transform them to other JSON files or other text based formats.
First install gulp-json-transform
as a development dependency:
npm install gulp-json-transform --save-dev
Then, add it to your gulpfile.js:
var jsonTransform = require('gulp-json-transform');
Then create a task that uses it:
gulp.task('do-something', function() {
gulp.src('./app/**/*.json')
.pipe(jsonTransform(function(data, file) {
return {
foobar: data.foo + file.relative
};
}))
.pipe(gulp.dest('./dist/out/'));
});
Type: function
A function that takes the JSON object and a file object (parameters path, base and relative are exposed) as the input parameters and should return either a string which is written raw to the file, a JSON object which is stringified or a Promise which resolves to a string or a JSON object.
Example structure of the file object:
{
path: 'test/fixtures/input.json',
relative: 'input.json',
base: 'test/fixtures'
}
Type: String
or Number
Default: undefined
JSON.stringify's whitespace attribute for pretty-printing the resulting JSON. See MDN docs on JSON.stringify() for more information.
FAQs
A gulp plugin to transform json files, pipe json files through it and transform them to other json files or other formats.
The npm package gulp-json-transform receives a total of 3,742 weekly downloads. As such, gulp-json-transform popularity was classified as popular.
We found that gulp-json-transform 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.