0.1.4 • Published 4 months ago

@zhinjs/directive v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

@zhinjs/directive

  • a simple raw directive parser for nodejs

install

npm install @zhinjs/directive
# or
yarn add @zhinjs/directive
# or
pnpm add @zhinjs/directive

usage

import { Directive } from '@zhinjs/directive'
const directive = new Directive('hello')
    .arg('string',{required:true})
    .arg('number',{inititalValue:0})
    .option('foo','boolean',{alias:'f'})
    .handle(async ({args, options})=>{
        console.log(args, options);
    });
directive.match('hello "world" -f');
0.1.2

4 months ago

0.1.4

4 months ago

0.1.3

4 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.1

6 months ago