You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project is an implementation of the
GNU Coreutils commands in Javascript,
adding an object-oriented design and some Node.js
stream features while we were there :-)
This project has got inspiration and stolen borrowed code fragments from
shelljs and
bashful projects, and has implemented
some ideas from TermKit. The main
characteristic diferences from GNU Coreutils are
objects, not text: standard coreutils are independent programs where the
only one interface with the exterior world are character streams derived from
the usage on a terminal, so this text needs to be parsed each time between
commands. Coreutils.js is designed as a library of functions, so high-level
objects can be passed between them, and each one of them implement an inspect
method to be used when printing their content on a terminal to show their usual
behaviour.
streams, not lists: for commands that generates a list of values,
Coreutils.js return a Stream object instead of an Array (split data in time
instead of space) since they are easily convertible between them and has a
better performance and offers more flexibility for big data sets, reason why the
Streams API is the standard interface in Node.js modules allowing them to be
connected to others. Also each returned stream has an added type attribute to
show the type of their contents and help to process them later.
Commands
textutils
cat needs show-nonprinting
cksum
comm
csplit
cut
expand
fmt
fold
head needs implement bytes counting
join
md5sum
nl
od
paste
pr
ptx
sha1sum
sort
split
sum
tac
tail
tr
unexpand
uniq
wc
fileutils
chgrp
chmod
chown
cp
dd
df
dir
dircolors
du
install
ln
ls
mkdir
mkfifo
mknod
mv
rm
rmdir
sync
touch
vdir
sh utils
basename
chroot
date needs arguments
dirname
echo needs escape of backslash
env
expr
groups
hostname
id
logname
pathchk
printenv
printf
sleep
tee
test needs fd open on terminal and inline operators