jsonld.js icon indicating copy to clipboard operation
jsonld.js copied to clipboard

Update jsonld.js

Open piggyman007 opened this issue 7 years ago • 2 comments

I am working on node for ios app (https://code.janeasystems.com/nodejs-mobile) which run on node-chakracore instead of v8.

I found that the spread operator of _setDefaults does not work on node-chakracore, so I would like to change to code by using the basic style (does not affect functional).

Please help to review and approve

piggyman007 avatar Dec 12 '18 17:12 piggyman007

I'm not sure what to do here. We like to be free to use fancy new features. So far we've basically felt free to use anything in an "Active LTS" Node.js release that has babel support. Object spread support has been in v8 based Node.js since around 8.3.0. It's also a stage 4 proposal so should be a standard at some point. It's entirely possible we'll want to increase object spread usage which would be a problem for ChakraCore.

It appears ChakraCore is the only JS runtime without object spread support? Seems the future of ChakraCore is uncertain too. How long would we have to keep such a patch around before updating to the modern syntax?

Are other options like using a babel pre-processor too painful in your case?

davidlehn avatar Dec 18 '18 02:12 davidlehn

@davidlehn , my code version support both v8 and chakracore.

Is it good idea to merge it to the main branch?

It should be ok.

piggyman007 avatar Dec 18 '18 05:12 piggyman007