Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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 4,253 weekly downloads. As such, gulp-json-transform popularity was classified as popular.
We found that gulp-json-transform demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.