File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2+ import { text } from 'node:stream/consumers'
23import { unzipurl } from '../index.js'
3- import cli from './cli.js'
44
5- console . log ( unzipurl ( await cli ( ) ) )
5+ const { argv, stdin, exit } = process
6+ const input = argv . slice ( 2 ) . join ( ' ' ) || ( stdin . isTTY ? '' : ( await text ( process . stdin ) ) . trim ( ) )
7+ if ( ! input ) {
8+ console . error ( 'Error: No arguments found!' )
9+ exit ( 1 )
10+ }
11+ console . log ( await unzipurl ( input ) )
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2+ import { text } from 'node:stream/consumers'
23import { zipurl } from '../index.js'
3- import cli from './cli.js'
44
5- console . log ( zipurl ( await cli ( ) ) )
5+ const { argv, stdin, exit } = process
6+ const input = argv . slice ( 2 ) . join ( ' ' ) || ( stdin . isTTY ? '' : ( await text ( process . stdin ) ) . trim ( ) )
7+ if ( ! input ) {
8+ console . error ( 'Error: No arguments found!' )
9+ exit ( 1 )
10+ }
11+ console . log ( await zipurl ( input ) )
You can’t perform that action at this time.
0 commit comments