You are on page 1of 9

Web Technologies

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:

var diskspace = require('diskspace');

diskspace.check('C', function (err, result)

Your code here

});

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

Transform into upper case string with an underscore between words.

.
Code:
import { constantCase } from "constant-case";

constantCase("string"); //=> "STRING"

constantCase("dot.case"); //=> "DOT_CASE"

constantCase("PascalCase"); //=> "PASCAL_CASE"

constantCase("version 1.2.10"); //=> "VERSION_1_2_10"

5 - change-case-all

Combined version of all change-case methods, so you do not need to install them


separately. Tree shaking should still work if you use a module bundler.
.
Code:
import { camelCase, upperCase, ... } from 'change-case-all';

6 - Constant Case
Transform into upper case string with an underscore between words.

Code:
import { constantCase } from "constant-case";

constantCase("string"); //=> "STRING"

constantCase("dot.case"); //=> "DOT_CASE"

constantCase("PascalCase"); //=> "PASCAL_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$/,

use: ['style-loader', 'postcss-loader'],

},

{
test: /\.jsx?$/,

use: ['babel-loader', 'astroturf/loader'],

9- ember-cli-babel

This Ember-CLI plugin uses Babel and @babel/preset-env to allow you to use


latest Javascript in your Ember CLI project.

Code:
// ember-cli-build.js

let app = new EmberApp({

babel: {

// enable "loose" mode

loose: true,

// don't transpile generator functions


exclude: [

'transform-regenerator',

],

plugins: [

require.resolve('transform-object-rest-spread')

});

10- ranges-merge

Merge and sort string index ranges

Code:
import { strict as assert } from "assert";

import { rMerge } from "ranges-merge";

// 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]]

);

You might also like