//import the knitout writer code and instantiate it as an object
const knitout = require('knitout');
k = new knitout.Writer({carriers:['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']});
// add some headers relevant to this job
k.addHeader('Machine','SWGXYZ');
k.addHeader('Gauge','15');
const Carrier = '7';
k.inhook(Carrier);
for(var i=3;i>=0;i -= 2){
k.tuck("-","f"+i,Carrier);
}
for(var i=0;i<=3;i += 2){
k.tuck("+","f"+i,Carrier);
}
for(var i=3;i>=0;i--){
k.knit("-","f"+i,Carrier);
}
k.xfer("f0","b0");
k.xfer("f1","bs1");
k.xfer("f2","b2");
k.xfer("f3","bs3");
k.xfer("b0","fs0");
k.xfer("bs1","f1");
k.xfer("b2","fs2");
k.xfer("bs3","f3");
k.xfer("fs0", "b0");
k.xfer("fs2", "b2");
for(var i=0;i<2;i++){
k.knit("+","b0",Carrier);
k.knit("+","b2",Carrier);
k.knit("-","f3",Carrier);
k.knit("-","f1",Carrier);
}
k.outhook(Carrier);
k.write('wristband.k');