fishbone.js icon indicating copy to clipboard operation
fishbone.js copied to clipboard

this is an awesome library, but there's no options to expose a single API

Open shreyansh-zazz opened this issue 4 years ago • 0 comments

API expose can help the user to see what are the methods that they can perform, also when simple returning this the whole prototype gets returned in API case only the API will be returned.

Also decomposing is also hard, in following use case:

// validator.js
cont Validator = Model()...
// EXPOSES getValue(), setValue(), validate()

// types.js
const Types = Model()...
// EXPOSES isString(), isPhoneNumber(), etc..

// usecase
const emailValidation = new Validator('[email protected]').isString().isEmail().validate()

shreyansh-zazz avatar Jul 07 '20 17:07 shreyansh-zazz