8000 GitHub - dominicbarnes/node-delegates: Nodejs method and accessor delegation utility · GitHub
[go: up one dir, main page]

Skip to content

About

Nodejs method and accessor delegation utility

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delegates

Node method and accessor delegation utilty.

Installation

$ npm install delegates

Example

var delegate = require('delegates');

...

delegate(proto, 'request')
  .method('acceptsLanguages')
  .method('acceptsEncodings')
  .method('acceptsCharsets')
  .method('accepts')
  .method('is')
  .access('querystring')
  .access('idempotent')
  .access('socket')
  .access('length')
  .access('query')
  .access('search')
  .access('status')
  .access('method')
  .access('path')
  .access('body')
  .access('host')
  .access('url')
  .getter('subdomains')
  .getter(
5497
'protocol')
  .getter('header')
  .getter('stale')
  .getter('fresh')
  .getter('secure')
  .getter('ips')
  .getter('ip')

License

MIT

About

Nodejs method and accessor delegation utility

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0