JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9229F
  • License MIT

a module help you make calling chain

Package Exports

  • chainproxy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chainproxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

chainProxy

A module help you make calling chain. I like bluebird but I hate some method like .get and .call, it's ugly! So I make this module make sync calling to be easy like spark language

Note

this module only can run in NodeJs6 because it use Proxy

Usage

you can use it like:

var _ = require('chainproxy')

Promise.resolve({a: 12333})
 .then(_.a.toString().split('').length)
 .then(console.log.bind(null, 'result:'), console.error.bind(null, 'catch error:'));

this module actually create function like that

function (args, _){
  return _.a.toString().split(args[0]).length
}

so you can know it's vary quick and easy-use