Giter Site home page Giter Site logo

nlinq's People

Contributors

github-actions[bot] avatar nmaguiar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

nlinq's Issues

useCase incorrectly changing settings

Problem

By default nLinq will be case insensitive:

> $from(["hello"]).equals("HELLO").any()
> false

but when setting useCase to true:

> $from(["hello"]).useCase(true).equals("HELLO").any()
> true

the result should be false.

Cannot set property "_key" of null

Problem

When using $from under a map with a null entry an error equivalent to:

TypeError: Cannot set property "_key" of null to "b"

occurs.

Steps to reproduce:

var o = { a: 1, b: null, c: 2 };
$from(o)

Convert fields to a date type

In several cases is useful to sort an array by date but the field might not be a date type. So you end up doing this:

$from(array_of_data)
.attach(“date2”, r => new Date(r.date))
.sort(“date2”)
.select(r => ({ filename: r.filename, date: r.date2 })

It would be more practical and simple just to do:

$from(array_of_data)
.toDate(“date”)
.sort(“date”)
.select({ filename: “n/a”, date: “” })

Add path-based key references

Be able to reference sub-maps and arrays using OpenAFSigil $$().get().

Example:

_from( anArray )
.equals("names.firstName", "Joe")
.select()

List of fields selector

It’s already possible to map which fields to will be returned has a result:

// Providing the defaults
$from(array_of_data).select({ field1: “n/a”, field2: 0 })

// OR

$from(array_of_data).select(r => ({ f1: r.field1, field2: r.field2 }))

But it could be more practical to have an array of keys to do the same as the last function option:

$from(array_of_data).select([ “f1:field1”, “field2” ])

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.