Acting
Acting is a tiny agent model tool.
Usage
To install acting
with yarn:
yarn install acting # or npm install --save acting
Example
; const acting = console domains: admin: 'GET' 'POST' groups: _self: 'DELETE' role: 'PUT' users: _with: books: 'GET' ; await actingadmin;await actingadmin;await actinggroups;await actinggroupsrole;await actingbooks;
console.log results:
{ path: '/admin?a=1', method: 'GET' }
{ path: '/admin', method: 'POST' } { foo: 'bar' }
{ path: '/groups?b=1', method: 'DELETE' } 'testbody'
{ path: '/groups/role', method: 'PUT' }
{ path: '/users/10/books', method: 'GET' }
Options
root
: stringdomains
: objectfetch
: functionselfKey
: string(defalt:_self
)withKey
: string(default:_with
)