Professional Documents
Culture Documents
Abrar Maqsood
SP18 BSE 005
Assignment # 1
Submitted To Mam Sadia Maqbool
1- diskspace.js 2.0.0
2- This is a simple module for Node.js to check disk space usage in bytes on both
*nix and Windows systems.
Code:
});
hanul-graphicsmagick:
Custom identification where args is an array of arguments. The result is returned as a
raw string to output
Code:
im.identify(['-format', '%wx%h', 'kittens.jpg'], function(err, ou
tput){
if (err) throw err;
console.log('dimension: '+output);
// dimension: 3904x2622
});
3- Uglify:
2 UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit.
Code:
var x = {
foo: 1
};
x.bar = 2;
x["baz"] = 3;
x[condition ? "moo" : "boo"] = 4;
console.log(x.something());
4 - Constant Case
.
Code:
import { constantCase } from "constant-case";
5 - change-case-all
6 - Constant Case
Transform into upper case string with an underscore between words.
Code:
import { constantCase } from "constant-case";
constantCase("version 1.2.10");
7- PostCSS
PostCSS is a tool for transforming styles with JS plugins. These plugins can lint
your CSS, support variables and mixins, transpile future CSS syntax, inline images,
and more.
Code:
module.exports = {
module: {
rules: [
test: /\.css$/,
},
{
test: /\.jsx?$/,
9- ember-cli-babel
Code:
// ember-cli-build.js
babel: {
loose: true,
'transform-regenerator',
],
plugins: [
require.resolve('transform-object-rest-spread')
});
10- ranges-merge
Code:
import { strict as assert } from "assert";
// joining edges:
assert.deepEqual(
rMerge([
[1, 2],
[2, 3],
[9, 10],
]),
[1, 3],
[9, 10],
);
// an overlap:
assert.deepEqual(
rMerge([
[1, 5],
[2, 10],
]),
[[1, 10]]
);