wilmoore/selectn.js

Option to reverse path and object - `selectn(obj, path)`

Closed this issue · 1 comments

vjpr commented

Recent CoffeeScript to ES7 (Babel) convert right here...

Would be great to be able to reverse the params so its more natural, or CoffeeScript like.

E.g. In CoffeeScript:

feature?.properties?.length

This is what I envisage:

import s from 'selectn/alt'
s(feature, 'properties.length')

Hi @vjpr.

Thanks for the feature request. One of the original design decisions for this module (and most of my modules) is to put the most varying argument last.

You can read about why this is useful at the following URLs: