I wanted to try the generator API so I installed it: npm i static-api-generator
I created a generator for my JSON data:
const API = require('static-api-generator');
const api = new API({
addIdToFiles: true,
blueprint: 'data/:page/:category',
outputPath: 'temp/api/',
pluralise: false
});
api.generate({
endpoints: ['page', 'category']
});
then run it: node script.js.
And the result is that I have one char per entry:

And if I put addIdToFiles to false I have the whole content as one string

So it's like newline terminator are not properly detected.
I'm running it under archlinux with LN (\n) as final newline and utf-8 as charset. And I'm using node v10.0.0. All data files are JSON.
I wanted to try the generator API so I installed it:
npm i static-api-generatorI created a generator for my JSON data:
then run it:
node script.js.And the result is that I have one char per entry:
And if I put
addIdToFilestofalseI have the whole content as one stringSo it's like newline terminator are not properly detected.
I'm running it under archlinux with LN (
\n) as final newline and utf-8 as charset. And I'm using node v10.0.0. All data files are JSON.