Code Monkey home page Code Monkey logo

tandy's People

Contributors

angelgzs avatar devinivy avatar mattboutet avatar nargonath avatar treenity avatar zemccartney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tandy's Issues

TypeScript types declaration file

This npm package needs a TypeScript types declaration file so that developers who enjoy writing with TS can use it with this package and have a better development experience. Would you like me to write one?

Make sort dialect-unspecific, allow multiple orders

Currently sort is dialect-specific (as it's being passed into the query as a raw string, therefore subject to dialects quoting rules) and being limited to one key

One idea that would work is to convert sort to accepting an array [[key, 'ASC/DESC']] and then iterate over that like this

const schema = Joi.array().items(Joi.array().ordered(Joi.string().valid('id', 'etc').required(), Joi.string().valid('asc', 'desc').default('asc')).required())
const { error, validated } = schema.validate(sortParam)

if (error) throw error

for (const sort of validated) {
  query = query.orderBy(sort[0], sort[1])
}

For backwards compatibility the new behaviour could be a flag or switched with sortParam.startsWith('[') (where the old schema is converted to the new one internally)

Add ownership logic

Bedwetter had a form of this, and now that I've decided not to port that functionality I've found a use-case for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.