Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
module.exports = _ => ({ | ||
get: _.get.bind(_), | ||
// About: get: _.get.bind(_) | ||
// It looks like WebKit/Safari didn't optimize bind at all, | ||
// so that using bind slows it down by 60%. | ||
// Firefox and Chrome are just fine in both cases, | ||
// so let's use the approach that works fast everywhere 👍 | ||
get(key) { | ||
return _.get(key); | ||
}, | ||
set(key, value) { | ||
@@ -5,0 +12,0 @@ _.set(key, value); |
@@ -1,1 +0,1 @@ | ||
var umap=function(t){"use strict";return t.default=t=>({get:t.get.bind(t),set:(e,u)=>(t.set(e,u),u)}),t}({}).default; | ||
var umap=function(t){"use strict";return t.default=t=>({get:e=>t.get(e),set:(e,u)=>(t.set(e,u),u)}),t}({}).default; |
export default _ => ({ | ||
get: _.get.bind(_), | ||
// About: get: _.get.bind(_) | ||
// It looks like WebKit/Safari didn't optimize bind at all, | ||
// so that using bind slows it down by 60%. | ||
// Firefox and Chrome are just fine in both cases, | ||
// so let's use the approach that works fast everywhere 👍 | ||
get(key) { | ||
return _.get(key); | ||
}, | ||
set(key, value) { | ||
@@ -4,0 +11,0 @@ _.set(key, value); |
@@ -6,3 +6,10 @@ var umap = (function (exports) { | ||
return { | ||
get: _.get.bind(_), | ||
// About: get: _.get.bind(_) | ||
// It looks like WebKit/Safari didn't optimize bind at all, | ||
// so that using bind slows it down by 60%. | ||
// Firefox and Chrome are just fine in both cases, | ||
// so let's use the approach that works fast everywhere 👍 | ||
get: function get(key) { | ||
return _.get(key); | ||
}, | ||
set: function set(key, value) { | ||
@@ -9,0 +16,0 @@ _.set(key, value); |
@@ -1,1 +0,1 @@ | ||
var umap=function(t){"use strict";return t.default=function(e){return{get:e.get.bind(e),set:function(t,n){return e.set(t,n),n}}},t}({}).default; | ||
var umap=function(t){"use strict";return t.default=function(u){return{get:function(t){return u.get(t)},set:function(t,n){return u.set(t,n),n}}},t}({}).default; |
{ | ||
"name": "umap", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "The smallest, yet handy, Map and WeakMap utility ever", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5700
51