Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 1.69 KB

README.md

File metadata and controls

77 lines (53 loc) · 1.69 KB

@csquare/crossp

licence version coverage

Generate a batch of commands based on single one.

Maintained by:

Installation

Install with npm:

npm install --save @csquare/crossp

Install with Yarn:

yarn add @csquare/crossp

Usage

Basic usage

Using CommonJS syntax:

const { crossp } = require('@csquare/crossp');

const output = crossp();

Using ESM syntax (default import):

import crossp from '@csquare/crossp';

const output = crossp();

or

import { crossp } from '@csquare/crossp';

const output = crossp();

Examples

import crossp from '@csquare/crossp';

console.log(crossp('python train.py -e %[1,2]% -lr %[0.1,0.2]% -o %[in,out]%.txt'));

// console output:
[
  'python train.py -e 1 -lr 0.1 -o in.txt',
  'python train.py -e 1 -lr 0.1 -o out.txt',
  'python train.py -e 1 -lr 0.2 -o in.txt',
  'python train.py -e 1 -lr 0.2 -o out.txt',
  'python train.py -e 2 -lr 0.1 -o in.txt',
  'python train.py -e 2 -lr 0.1 -o out.txt',
  'python train.py -e 2 -lr 0.2 -o in.txt',
  'python train.py -e 2 -lr 0.2 -o out.txt',
];