var str = "1;2;3;"
var sum = 0;
str.replace(/;$/,"").split(/;/).forEach(n=>{
sum += parseInt(n);
});
ajax.php?action=disk.api.file.showImage&
, и при чем здесь php, а это просто битая ссылка на картинку :))) {
"name": "test",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"jquery": "^3.3.1"
},
"devDependencies": {
"browser-sync": "^2.18.13",
"del": "^3.0.0",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
"gulp-cache": "^0.4.6",
"gulp-clean-css": "^3.9.0",
"gulp-imagemin": "^3.3.0",
"gulp-plumber": "^1.1.0",
"gulp-rigger": "^0.5.8",
"gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.6.1",
"gulp-uglify": "^3.0.0",
"imagemin-jpeg-recompress": "^5.1.0",
"imagemin-pngquant": "^5.0.1"
}
}
> npm install
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
> node-sass@4.9.4 install /home/блаблабла/temp/test/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.4/linux-x64-64_binding.node
Download complete ] - :
Binary saved to /home/блаблабла/temp/test/node_modules/node-sass/vendor/linux-x64-64/binding.node
Caching binary to /home/блаблабла/.npm/node-sass/4.9.4/linux-x64-64_binding.node
> node-sass@4.9.4 postinstall /home/блаблабла/temp/test/node_modules/node-sass
> node scripts/build.js
Binary found at /home/блаблабла/temp/test/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary is fine
> gifsicle@3.0.4 postinstall /home/блаблабла/temp/test/node_modules/gifsicle
> node lib/install.js
✔ gifsicle pre-build test passed successfully
> jpeg-recompress-bin@3.0.1 postinstall /home/блаблабла/temp/test/node_modules/jpeg-recompress-bin
> node lib/install.js
✔ jpeg-recompress pre-build test passed successfully
> jpegtran-bin@3.2.0 postinstall /home/блаблабла/temp/test/node_modules/jpegtran-bin
> node lib/install.js
✔ jpegtran pre-build test passed successfully
> optipng-bin@3.1.4 postinstall /home/блаблабла/temp/test/node_modules/optipng-bin
> node lib/install.js
✔ optipng pre-build test passed successfully
> pngquant-bin@4.0.0 postinstall /home/блаблабла/temp/test/node_modules/pngquant-bin
> node lib/install.js
✔ pngquant pre-build test passed successfully
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 936 packages from 681 contributors and audited 16102 packages in 34.791s
found 13 vulnerabilities (1 low, 8 moderate, 4 high)
run `npm audit fix` to fix them, or `npm audit` for details
found 13 vulnerabilities (1 low, 8 moderate, 4 high)