Giter Site home page Giter Site logo

lodash.lua's People

Contributors

axmat avatar flowyroll avatar hustlion avatar nafarlee avatar rosshadden 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lodash.lua's Issues

sortBy() fails to sort this table of values

$ lua
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> _=require 'lodash'
> inspect=require 'inspect'
> print(inspect(_.sortBy{16, 12, 20, 13, 17, 14, 18, 10, 19, 15, 11}))

{ 12, 16, 13, 17, 14, 18, 10, 19, 15, 11, 20 }

groupBy keys become strings; example is not reproducible

I'm having trouble reproducing the groupBy example:

_.print(_.groupBy({4.3, 6.1, 6.4}, function(n)
   return math.floor(n)
 end))
 --> {[4]={4.3}, [6]={6.1, 6.4}}

What I get instead is a result keyed by strings instead of numbers:

$ lua
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> _ = require 'lodash'
> _.print(_.groupBy({4.3, 6.1, 6.4}, function(n) return math.floor(n) end))
{["6"]={6.1, 6.4}, ["4"]={4.3}}

_.print does not work

In lua 5.1, I get the following error when using _.print:

Error: rocks/share/lua/5.1/lodash.lua:1742: attempt to call field 'pack' (a nil value)
stack traceback:
        rocks/share/lua/5.1/lodash.lua:1742: in function 'table'
        rocks/share/lua/5.1/lodash.lua:2222: in function 'print'
        modules/load.lua:9: in function 'load'
        [string "boot.lua"]:437: in function <[string "boot.lua"]:433>
        [C]: in function 'xpcall'

wrong version on luarocks.org; goto not compatible with 5.1

Hello, enjoying this library as it saves me a lot of time. However I would like to point out that according the luarocks page it's compatible with lua >= 5.1, whereas there are several functions which use goto, which is only compatible with 5.2.

Is there any chance you could remove the gotos, or make versions for both 5.2 and 5.1, or last but not least update luarocks? It would be very much appreciated!

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.