Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/mime/cli.js

    r59329aa re29cc2e  
    11#!/usr/bin/env node
    22
    3 'use strict';
    4 
    5 process.title = 'mime';
    6 let mime = require('.');
    7 let pkg = require('./package.json');
    8 let args = process.argv.splice(2);
    9 
    10 if (args.includes('--version') || args.includes('-v') || args.includes('--v')) {
    11   console.log(pkg.version);
    12   process.exit(0);
    13 } else if (args.includes('--name') || args.includes('-n') || args.includes('--n')) {
    14   console.log(pkg.name);
    15   process.exit(0);
    16 } else if (args.includes('--help') || args.includes('-h') || args.includes('--h')) {
    17   console.log(pkg.name + ' - ' + pkg.description + '\n');
    18   console.log(`Usage:
    19 
    20   mime [flags] [path_or_extension]
    21 
    22   Flags:
    23     --help, -h                     Show this message
    24     --version, -v                  Display the version
    25     --name, -n                     Print the name of the program
    26 
    27   Note: the command will exit after it executes if a command is specified
    28   The path_or_extension is the path to the file or the extension of the file.
    29 
    30   Examples:
    31     mime --help
    32     mime --version
    33     mime --name
    34     mime -v
    35     mime src/log.js
    36     mime new.py
    37     mime foo.sh
    38   `);
    39   process.exit(0);
    40 }
    41 
    42 let file = args[0];
    43 let type = mime.getType(file);
     3var mime = require('./mime.js');
     4var file = process.argv[2];
     5var type = mime.lookup(file);
    446
    457process.stdout.write(type + '\n');
Note: See TracChangeset for help on using the changeset viewer.