Hi, I am using jimp for image manipulation and it works well on a PC with Ubuntu, now I want to install it on another machine but an error appears when executing it apparently from jimp
the jimp code showing error
'use strict';
const toBytes = s => [...s].map(c => c.charCodeAt(0));
const xpiZipFilename = toBytes('META-INF/mozilla.rsa');
const oxmlContentTypes = toBytes('[Content_Types].xml');
const oxmlRels = toBytes('_rels/.rels');
The error shown is
/var/lib/cloud9/node_modules/jimp/node_modules
/@jimp/custom/node_modules/@jimp/core/node_modules/file-type/index.js:2
const toBytes = s => [...s].map(c => c.charCodeAt(0));
^
SyntaxError: Unexpected token .
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous>
(/var/lib/cloud9/node_modules/jimp/node_modules
/@jimp/custom/node_modules/@jimp/core/dist/utils/image-bitmap.js:12:40)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
Does anyone know how the following statement works ???
const toBytes = s => [...s].map(c => c.charCodeAt(0));
thanks