Alternative version for Object.values()

前端 未结 11 1724
花落未央
花落未央 2020-11-28 06:13

I\'m looking for an alternative version for the Object.values() function.
As described here the function is not supported in Internet Explorer.

When

11条回答
  •  迷失自我
    2020-11-28 06:52

    Best way is to replace it with the values method of ramda:

    import * as R from 'ramda';
    
    const obj = { foo: 'bar', test: 10 };
    
    console.log(R.values(obj)) // ['bar', 10]

提交回复
热议问题