simple-lastfm
simple-lastfm copied to clipboard
$.extend is not a function
Hello :)
It seems that the trick :
var $ = require('jquery')((require("jsdom").jsdom().defaultView));
also found here : https://github.com/jquery/jquery/issues/2758
does not works anymore, maybe using Underscore or Lodash to have this extend feature would do the job.
I have this with node 6.10 & npm 3.10
You could probably remove the jQuery dependency and just use native JavaScript's Object.assign in it place
try this:
delete Line 5
find & replace: find: $.extend replace: Object.assign
that should work. let me know if that does the trick
works great thanks :)
You make a PR or I do ? :p
go for it! I'm not using this library but watching it so that's why I saw this issue. So please feel free to submit the PR.
Object.assign got added to Node back around Node 4.8.3. I believe most people are using a much newer version of node but it might be worth mentioning just in case.
Sorry for never taking care of this, I've just pushed an update that duplicates what @Shuunen did on his now closed PR.