rubico 2.8.2 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/dist/Transducer.es.js +1 -1
- package/dist/Transducer.es.min.js +1 -1
- package/dist/Transducer.js +1 -1
- package/dist/Transducer.min.js +2 -2
- package/dist/Transducer.mjs +1 -1
- package/dist/__.es.js +1 -1
- package/dist/__.es.min.js +1 -1
- package/dist/__.js +1 -1
- package/dist/__.min.js +2 -2
- package/dist/__.mjs +1 -1
- package/dist/all.es.js +1 -1
- package/dist/all.es.min.js +1 -1
- package/dist/all.js +1 -1
- package/dist/all.min.js +2 -2
- package/dist/all.mjs +1 -1
- package/dist/always.es.js +1 -1
- package/dist/always.es.min.js +1 -1
- package/dist/always.js +1 -1
- package/dist/always.min.js +2 -2
- package/dist/always.mjs +1 -1
- package/dist/and.es.js +1 -1
- package/dist/and.es.min.js +1 -1
- package/dist/and.js +1 -1
- package/dist/and.min.js +2 -2
- package/dist/and.mjs +1 -1
- package/dist/assign.es.js +1 -1
- package/dist/assign.es.min.js +1 -1
- package/dist/assign.js +1 -1
- package/dist/assign.min.js +2 -2
- package/dist/assign.mjs +1 -1
- package/dist/compose.es.js +1 -1
- package/dist/compose.es.min.js +1 -1
- package/dist/compose.js +1 -1
- package/dist/compose.min.js +2 -2
- package/dist/compose.mjs +1 -1
- package/dist/curry.es.js +1 -1
- package/dist/curry.es.min.js +1 -1
- package/dist/curry.js +1 -1
- package/dist/curry.min.js +2 -2
- package/dist/curry.mjs +1 -1
- package/dist/eq.es.js +1 -1
- package/dist/eq.es.min.js +1 -1
- package/dist/eq.js +1 -1
- package/dist/eq.min.js +2 -2
- package/dist/eq.mjs +1 -1
- package/dist/every.es.js +1 -1
- package/dist/every.es.min.js +2 -2
- package/dist/every.js +1 -1
- package/dist/every.min.js +2 -2
- package/dist/every.mjs +1 -1
- package/dist/filter.es.js +1 -1
- package/dist/filter.es.min.js +1 -1
- package/dist/filter.js +1 -1
- package/dist/filter.min.js +2 -2
- package/dist/filter.mjs +1 -1
- package/dist/flatMap.es.js +1 -1
- package/dist/flatMap.es.min.js +2 -2
- package/dist/flatMap.js +1 -1
- package/dist/flatMap.min.js +2 -2
- package/dist/flatMap.mjs +1 -1
- package/dist/forEach.es.js +1 -1
- package/dist/forEach.es.min.js +1 -1
- package/dist/forEach.js +1 -1
- package/dist/forEach.min.js +2 -2
- package/dist/forEach.mjs +1 -1
- package/dist/get.es.js +1 -1
- package/dist/get.es.min.js +1 -1
- package/dist/get.js +1 -1
- package/dist/get.min.js +2 -2
- package/dist/get.mjs +1 -1
- package/dist/gt.es.js +1 -1
- package/dist/gt.es.min.js +1 -1
- package/dist/gt.js +1 -1
- package/dist/gt.min.js +2 -2
- package/dist/gt.mjs +1 -1
- package/dist/gte.es.js +1 -1
- package/dist/gte.es.min.js +1 -1
- package/dist/gte.js +1 -1
- package/dist/gte.min.js +2 -2
- package/dist/gte.mjs +1 -1
- package/dist/lt.es.js +1 -1
- package/dist/lt.es.min.js +1 -1
- package/dist/lt.js +1 -1
- package/dist/lt.min.js +2 -2
- package/dist/lt.mjs +1 -1
- package/dist/lte.es.js +1 -1
- package/dist/lte.es.min.js +1 -1
- package/dist/lte.js +1 -1
- package/dist/lte.min.js +2 -2
- package/dist/lte.mjs +1 -1
- package/dist/map.es.js +1 -1
- package/dist/map.es.min.js +2 -2
- package/dist/map.js +1 -1
- package/dist/map.min.js +2 -2
- package/dist/map.mjs +1 -1
- package/dist/not.es.js +1 -1
- package/dist/not.es.min.js +1 -1
- package/dist/not.js +1 -1
- package/dist/not.min.js +2 -2
- package/dist/not.mjs +1 -1
- package/dist/omit.es.js +1 -1
- package/dist/omit.es.min.js +1 -1
- package/dist/omit.js +1 -1
- package/dist/omit.min.js +2 -2
- package/dist/omit.mjs +1 -1
- package/dist/or.es.js +1 -1
- package/dist/or.es.min.js +1 -1
- package/dist/or.js +1 -1
- package/dist/or.min.js +2 -2
- package/dist/or.mjs +1 -1
- package/dist/pick.es.js +1 -1
- package/dist/pick.es.min.js +1 -1
- package/dist/pick.js +1 -1
- package/dist/pick.min.js +2 -2
- package/dist/pick.mjs +1 -1
- package/dist/pipe.es.js +1 -1
- package/dist/pipe.es.min.js +1 -1
- package/dist/pipe.js +1 -1
- package/dist/pipe.min.js +2 -2
- package/dist/pipe.mjs +1 -1
- package/dist/reduce.es.js +1 -1
- package/dist/reduce.es.min.js +1 -1
- package/dist/reduce.js +1 -1
- package/dist/reduce.min.js +2 -2
- package/dist/reduce.mjs +1 -1
- package/dist/rubico.es.js +1 -1
- package/dist/rubico.es.min.js +2 -2
- package/dist/rubico.global.js +1 -1
- package/dist/rubico.global.min.js +2 -2
- package/dist/rubico.js +1 -1
- package/dist/rubico.min.js +2 -2
- package/dist/rubico.mjs +1 -1
- package/dist/set.es.js +1 -1
- package/dist/set.es.min.js +1 -1
- package/dist/set.js +1 -1
- package/dist/set.min.js +2 -2
- package/dist/set.mjs +1 -1
- package/dist/some.es.js +1 -1
- package/dist/some.es.min.js +2 -2
- package/dist/some.js +1 -1
- package/dist/some.min.js +2 -2
- package/dist/some.mjs +1 -1
- package/dist/switchCase.es.js +1 -1
- package/dist/switchCase.es.min.js +1 -1
- package/dist/switchCase.js +1 -1
- package/dist/switchCase.min.js +2 -2
- package/dist/switchCase.mjs +1 -1
- package/dist/tap.es.js +1 -1
- package/dist/tap.es.min.js +1 -1
- package/dist/tap.js +1 -1
- package/dist/tap.min.js +2 -2
- package/dist/tap.mjs +1 -1
- package/dist/thunkify.es.js +1 -1
- package/dist/thunkify.es.min.js +1 -1
- package/dist/thunkify.js +1 -1
- package/dist/thunkify.min.js +2 -2
- package/dist/thunkify.mjs +1 -1
- package/dist/transform.es.js +1 -1
- package/dist/transform.es.min.js +1 -1
- package/dist/transform.js +1 -1
- package/dist/transform.min.js +2 -2
- package/dist/transform.mjs +1 -1
- package/dist/tryCatch.es.js +1 -1
- package/dist/tryCatch.es.min.js +1 -1
- package/dist/tryCatch.js +1 -1
- package/dist/tryCatch.min.js +2 -2
- package/dist/tryCatch.mjs +1 -1
- package/dist/x/append.es.js +1 -1
- package/dist/x/append.es.min.js +1 -1
- package/dist/x/append.js +1 -1
- package/dist/x/append.min.js +2 -2
- package/dist/x/append.mjs +1 -1
- package/dist/x/callProp.es.js +1 -1
- package/dist/x/callProp.es.min.js +1 -1
- package/dist/x/callProp.js +1 -1
- package/dist/x/callProp.min.js +2 -2
- package/dist/x/callProp.mjs +1 -1
- package/dist/x/defaultsDeep.es.js +1 -1
- package/dist/x/defaultsDeep.es.min.js +1 -1
- package/dist/x/defaultsDeep.js +1 -1
- package/dist/x/defaultsDeep.min.js +2 -2
- package/dist/x/defaultsDeep.mjs +1 -1
- package/dist/x/differenceWith.es.js +1 -1
- package/dist/x/differenceWith.es.min.js +2 -2
- package/dist/x/differenceWith.js +1 -1
- package/dist/x/differenceWith.min.js +2 -2
- package/dist/x/differenceWith.mjs +1 -1
- package/dist/x/filterOut.es.js +1 -1
- package/dist/x/filterOut.es.min.js +1 -1
- package/dist/x/filterOut.js +1 -1
- package/dist/x/filterOut.min.js +2 -2
- package/dist/x/filterOut.mjs +1 -1
- package/dist/x/find.es.js +1 -1
- package/dist/x/find.es.min.js +1 -1
- package/dist/x/find.js +1 -1
- package/dist/x/find.min.js +2 -2
- package/dist/x/find.mjs +1 -1
- package/dist/x/findIndex.es.js +1 -1
- package/dist/x/findIndex.es.min.js +1 -1
- package/dist/x/findIndex.js +1 -1
- package/dist/x/findIndex.min.js +2 -2
- package/dist/x/findIndex.mjs +1 -1
- package/dist/x/first.es.js +1 -1
- package/dist/x/first.es.min.js +1 -1
- package/dist/x/first.js +1 -1
- package/dist/x/first.min.js +2 -2
- package/dist/x/first.mjs +1 -1
- package/dist/x/flatten.es.js +1 -1
- package/dist/x/flatten.es.min.js +2 -2
- package/dist/x/flatten.js +1 -1
- package/dist/x/flatten.min.js +2 -2
- package/dist/x/flatten.mjs +1 -1
- package/dist/x/groupBy.es.js +1 -1
- package/dist/x/groupBy.es.min.js +1 -1
- package/dist/x/groupBy.js +1 -1
- package/dist/x/groupBy.min.js +2 -2
- package/dist/x/groupBy.mjs +1 -1
- package/dist/x/has.es.js +1 -1
- package/dist/x/has.es.min.js +1 -1
- package/dist/x/has.js +1 -1
- package/dist/x/has.min.js +2 -2
- package/dist/x/has.mjs +1 -1
- package/dist/x/identity.es.js +1 -1
- package/dist/x/identity.es.min.js +1 -1
- package/dist/x/identity.js +1 -1
- package/dist/x/identity.min.js +2 -2
- package/dist/x/identity.mjs +1 -1
- package/dist/x/includes.es.js +1 -1
- package/dist/x/includes.es.min.js +1 -1
- package/dist/x/includes.js +1 -1
- package/dist/x/includes.min.js +2 -2
- package/dist/x/includes.mjs +1 -1
- package/dist/x/isDeepEqual.es.js +1 -1
- package/dist/x/isDeepEqual.es.min.js +1 -1
- package/dist/x/isDeepEqual.js +1 -1
- package/dist/x/isDeepEqual.min.js +2 -2
- package/dist/x/isDeepEqual.mjs +1 -1
- package/dist/x/isEmpty.es.js +1 -1
- package/dist/x/isEmpty.es.min.js +1 -1
- package/dist/x/isEmpty.js +1 -1
- package/dist/x/isEmpty.min.js +2 -2
- package/dist/x/isEmpty.mjs +1 -1
- package/dist/x/isEqual.es.js +1 -1
- package/dist/x/isEqual.es.min.js +1 -1
- package/dist/x/isEqual.js +1 -1
- package/dist/x/isEqual.min.js +2 -2
- package/dist/x/isEqual.mjs +1 -1
- package/dist/x/isFunction.es.js +1 -1
- package/dist/x/isFunction.es.min.js +1 -1
- package/dist/x/isFunction.js +1 -1
- package/dist/x/isFunction.min.js +2 -2
- package/dist/x/isFunction.mjs +1 -1
- package/dist/x/isIn.es.js +1 -1
- package/dist/x/isIn.es.min.js +1 -1
- package/dist/x/isIn.js +1 -1
- package/dist/x/isIn.min.js +2 -2
- package/dist/x/isIn.mjs +1 -1
- package/dist/x/isObject.es.js +1 -1
- package/dist/x/isObject.es.min.js +1 -1
- package/dist/x/isObject.js +1 -1
- package/dist/x/isObject.min.js +2 -2
- package/dist/x/isObject.mjs +1 -1
- package/dist/x/isString.es.js +1 -1
- package/dist/x/isString.es.min.js +1 -1
- package/dist/x/isString.js +1 -1
- package/dist/x/isString.min.js +2 -2
- package/dist/x/isString.mjs +1 -1
- package/dist/x/keys.es.js +1 -1
- package/dist/x/keys.es.min.js +1 -1
- package/dist/x/keys.js +1 -1
- package/dist/x/keys.min.js +2 -2
- package/dist/x/keys.mjs +1 -1
- package/dist/x/last.es.js +1 -1
- package/dist/x/last.es.min.js +1 -1
- package/dist/x/last.js +1 -1
- package/dist/x/last.min.js +2 -2
- package/dist/x/last.mjs +1 -1
- package/dist/x/maxBy.es.js +1 -1
- package/dist/x/maxBy.es.min.js +1 -1
- package/dist/x/maxBy.js +1 -1
- package/dist/x/maxBy.min.js +2 -2
- package/dist/x/maxBy.mjs +1 -1
- package/dist/x/noop.es.js +1 -1
- package/dist/x/noop.es.min.js +1 -1
- package/dist/x/noop.js +1 -1
- package/dist/x/noop.min.js +2 -2
- package/dist/x/noop.mjs +1 -1
- package/dist/x/pluck.es.js +1 -1
- package/dist/x/pluck.es.min.js +2 -2
- package/dist/x/pluck.js +1 -1
- package/dist/x/pluck.min.js +2 -2
- package/dist/x/pluck.mjs +1 -1
- package/dist/x/prepend.es.js +1 -1
- package/dist/x/prepend.es.min.js +1 -1
- package/dist/x/prepend.js +1 -1
- package/dist/x/prepend.min.js +2 -2
- package/dist/x/prepend.mjs +1 -1
- package/dist/x/size.es.js +1 -1
- package/dist/x/size.es.min.js +1 -1
- package/dist/x/size.js +1 -1
- package/dist/x/size.min.js +2 -2
- package/dist/x/size.mjs +1 -1
- package/dist/x/trace.es.js +1 -1
- package/dist/x/trace.es.min.js +1 -1
- package/dist/x/trace.js +1 -1
- package/dist/x/trace.min.js +2 -2
- package/dist/x/trace.mjs +1 -1
- package/dist/x/unionWith.es.js +1 -1
- package/dist/x/unionWith.es.min.js +1 -1
- package/dist/x/unionWith.js +1 -1
- package/dist/x/unionWith.min.js +2 -2
- package/dist/x/unionWith.mjs +1 -1
- package/dist/x/uniq.es.js +1 -1
- package/dist/x/uniq.es.min.js +1 -1
- package/dist/x/uniq.js +1 -1
- package/dist/x/uniq.min.js +2 -2
- package/dist/x/uniq.mjs +1 -1
- package/dist/x/unless.es.js +1 -1
- package/dist/x/unless.es.min.js +1 -1
- package/dist/x/unless.js +1 -1
- package/dist/x/unless.min.js +2 -2
- package/dist/x/unless.mjs +1 -1
- package/dist/x/values.es.js +1 -1
- package/dist/x/values.es.min.js +1 -1
- package/dist/x/values.js +1 -1
- package/dist/x/values.min.js +2 -2
- package/dist/x/values.mjs +1 -1
- package/dist/x/when.es.js +1 -1
- package/dist/x/when.es.min.js +1 -1
- package/dist/x/when.js +1 -1
- package/dist/x/when.min.js +2 -2
- package/dist/x/when.mjs +1 -1
- package/es.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/thunkify.js +9 -3
- package/x/append.js +1 -1
- package/x/callProp.js +1 -1
- package/x/defaultsDeep.js +1 -1
- package/x/differenceWith.js +2 -2
- package/x/find.js +1 -1
- package/x/findIndex.js +1 -1
- package/x/first.js +1 -1
- package/x/flatten.js +1 -1
- package/x/groupBy.js +2 -2
- package/x/has.js +1 -1
- package/x/identity.js +1 -1
- package/x/includes.js +1 -1
- package/x/isDeepEqual.js +2 -2
- package/x/isEmpty.js +1 -1
- package/x/isFunction.js +1 -1
- package/x/isIn.js +2 -2
- package/x/isObject.js +1 -1
- package/x/isString.js +1 -1
- package/x/keys.js +1 -1
- package/x/last.js +1 -1
- package/x/maxBy.js +2 -2
- package/x/noop.js +1 -1
- package/x/pluck.js +1 -1
- package/x/prepend.js +1 -1
- package/x/size.js +1 -1
- package/x/trace.js +1 -1
- package/x/unionWith.js +2 -2
- package/x/uniq.js +1 -1
- package/x/unless.js +1 -1
- package/x/values.js +1 -1
- package/x/when.js +1 -1
package/dist/x/values.es.min.js
CHANGED
package/dist/x/values.js
CHANGED
package/dist/x/values.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Rubico v2.8.
|
|
2
|
+
* Rubico v2.8.4
|
|
3
3
|
* https://rubico.land/
|
|
4
4
|
*
|
|
5
5
|
* © Richard Yufei Tong, King of Software
|
|
6
6
|
* Rubico may be freely distributed under the CFOSS license.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
!function(e,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):e.values=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const e=Object.values;return t=>null==t?[]:"function"==typeof t.values?[...t.values()]:e(t)}());
|
|
9
|
+
!function(e,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):e.values=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const e=Object.values;return t=>null==t?[]:"function"==typeof t.values?[...t.values()]:e(t)}());
|
package/dist/x/values.mjs
CHANGED
package/dist/x/when.es.js
CHANGED
package/dist/x/when.es.min.js
CHANGED
package/dist/x/when.js
CHANGED
package/dist/x/when.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Rubico v2.8.
|
|
2
|
+
* Rubico v2.8.4
|
|
3
3
|
* https://rubico.land/
|
|
4
4
|
*
|
|
5
5
|
* © Richard Yufei Tong, King of Software
|
|
6
6
|
* Rubico may be freely distributed under the CFOSS license.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
!function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.when=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=(n,t,e)=>n?t():e();return(e,o)=>function(u){const r=e(u);return(n=>null!=n&&"function"==typeof n.then)(r)?r.then((f=t,c=n,i=((n,t)=>function(){return n(t)})(o,u),l=(n=>function(){return n})(u),c==n?((n,t,e)=>function(o){return n(o,t,e)})(f,i,l):i==n?((n,t,e)=>function(o){return n(t,o,e)})(f,c,l):((n,t,e)=>function(o){return n(t,e,o)})(f,c,i))):r?o(u):u;var f,c,i,l}}());
|
|
9
|
+
!function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.when=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=(n,t,e)=>n?t():e();return(e,o)=>function(u){const r=e(u);return(n=>null!=n&&"function"==typeof n.then)(r)?r.then((f=t,c=n,i=((n,t)=>function(){return n(t)})(o,u),l=(n=>function(){return n})(u),c==n?((n,t,e)=>function(o){return n(o,t,e)})(f,i,l):i==n?((n,t,e)=>function(o){return n(t,o,e)})(f,c,l):((n,t,e)=>function(o){return n(t,e,o)})(f,c,i))):r?o(u):u;var f,c,i,l}}());
|
package/dist/x/when.mjs
CHANGED
package/es.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
package/thunkify.js
CHANGED
|
@@ -65,6 +65,7 @@ const thunkify = function thunkify(func, ...args) {
|
|
|
65
65
|
* thunkify.call(func function, context object, ...args) -> thunk ()=>func(...args)
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
68
|
+
* @description
|
|
68
69
|
* Creates a thunk that calls a function with the specified context and arguments.
|
|
69
70
|
*
|
|
70
71
|
* ```javascript [playground]
|
|
@@ -74,12 +75,17 @@ const thunkify = function thunkify(func, ...args) {
|
|
|
74
75
|
* this.y = y
|
|
75
76
|
* }
|
|
76
77
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
78
|
+
* distanceTo() {
|
|
79
|
+
* const x2 = (point.x - this.x) ** 2
|
|
80
|
+
* const y2 = (point.y - this.y) ** 2
|
|
81
|
+
* return (x2 + y2) ** 0.5
|
|
79
82
|
* }
|
|
80
83
|
* }
|
|
81
84
|
*
|
|
82
|
-
* const
|
|
85
|
+
* const point0 = new Point(0, 0)
|
|
86
|
+
* const point = new Point(3, 4)
|
|
87
|
+
*
|
|
88
|
+
* const thunk = thunkify.call(point0.distanceTo, point0, point)
|
|
83
89
|
*
|
|
84
90
|
* console.log(thunk())
|
|
85
91
|
* ```
|
package/x/append.js
CHANGED
|
@@ -15,7 +15,7 @@ const isArray = require('../_internal/isArray')
|
|
|
15
15
|
* Append a string or an array.
|
|
16
16
|
*
|
|
17
17
|
* ```javascript [playground]
|
|
18
|
-
* import append from 'https://
|
|
18
|
+
* import append from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/append.es.js'
|
|
19
19
|
*
|
|
20
20
|
* const myArray = ['orange', 'apple']
|
|
21
21
|
*
|
package/x/callProp.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Calls a property on an object with arguments.
|
|
11
11
|
*
|
|
12
12
|
* ```javascript [playground]
|
|
13
|
-
* import callProp from 'https://
|
|
13
|
+
* import callProp from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/callProp.es.js'
|
|
14
14
|
*
|
|
15
15
|
* const priceRoundedDown = callProp('toFixed', 2)(5.992)
|
|
16
16
|
* console.log('priceRoundedDown:', priceRoundedDown) // '5.99'
|
package/x/defaultsDeep.js
CHANGED
|
@@ -106,7 +106,7 @@ function _defaultsDeep(data, defaults) {
|
|
|
106
106
|
* Deeply assign default values to an object or array `data` using an array or object of default values `defaults`. The keys or indices of each element of `defaults` are used to extend `data` where there is no existing value. Both `data` and `defaults` may have nested arrays or objects.
|
|
107
107
|
*
|
|
108
108
|
* ```javascript [playground]
|
|
109
|
-
* import defaultsDeep from 'https://
|
|
109
|
+
* import defaultsDeep from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/defaultsDeep.es.js'
|
|
110
110
|
*
|
|
111
111
|
* const user = {
|
|
112
112
|
* name: 'John',
|
package/x/differenceWith.js
CHANGED
|
@@ -89,8 +89,8 @@ const differenceWithArray = function (comparator, allValues, array) {
|
|
|
89
89
|
* Create an array of all the values in an array that are not in another array as dictated by a comparator.
|
|
90
90
|
*
|
|
91
91
|
* ```javascript [playground]
|
|
92
|
-
* import differenceWith from 'https://
|
|
93
|
-
* import isDeepEqual from 'https://
|
|
92
|
+
* import differenceWith from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/differenceWith.es.js'
|
|
93
|
+
* import isDeepEqual from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isDeepEqual.es.js'
|
|
94
94
|
*
|
|
95
95
|
* console.log(
|
|
96
96
|
* differenceWith(isDeepEqual, [{ a: 1 }, { b: 2 }, { c: 3 }])([{ b: 2 }]),
|
package/x/find.js
CHANGED
|
@@ -25,7 +25,7 @@ const asyncIteratorFind = require('../_internal/asyncIteratorFind')
|
|
|
25
25
|
* Get the first element in a foldable collection that matches a predicate.
|
|
26
26
|
*
|
|
27
27
|
* ```javascript [playground]
|
|
28
|
-
* import find from 'https://
|
|
28
|
+
* import find from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/find.es.js'
|
|
29
29
|
*
|
|
30
30
|
* const users = [
|
|
31
31
|
* { name: 'John', age: 16 },
|
package/x/findIndex.js
CHANGED
|
@@ -44,7 +44,7 @@ const findIndexAsync = async function (predicate, array, index) {
|
|
|
44
44
|
* Returns the index of the first element in an array that satisfies the predicate. Returns -1 if no element satisfies the predicate.
|
|
45
45
|
*
|
|
46
46
|
* ```javascript [playground]
|
|
47
|
-
* import findIndex from 'https://
|
|
47
|
+
* import findIndex from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/findIndex.es.js'
|
|
48
48
|
*
|
|
49
49
|
* const oddNumberIndex = findIndex(function isOdd(number) {
|
|
50
50
|
* return number % 2 == 1
|
package/x/first.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Get the first element of a collection
|
|
13
13
|
*
|
|
14
14
|
* ```javascript [playground]
|
|
15
|
-
* import first from 'https://
|
|
15
|
+
* import first from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/first.es.js'
|
|
16
16
|
*
|
|
17
17
|
* console.log(first([1, 2, 3])) // 1
|
|
18
18
|
* console.log(first('abc')) // 'a'
|
package/x/flatten.js
CHANGED
|
@@ -37,7 +37,7 @@ const flatMap = require('../flatMap')
|
|
|
37
37
|
* Flatten a collection. Works in transducer position.
|
|
38
38
|
*
|
|
39
39
|
* ```javascript [playground]
|
|
40
|
-
* import flatten from 'https://
|
|
40
|
+
* import flatten from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/flatten.es.js'
|
|
41
41
|
*
|
|
42
42
|
* flatten([
|
|
43
43
|
* [1, 1],
|
package/x/groupBy.js
CHANGED
|
@@ -55,7 +55,7 @@ const groupByResolver = resolver => function groupByResolverReducer(
|
|
|
55
55
|
* Group a foldable collection into a Map of arrays by a property on each of its elements.
|
|
56
56
|
*
|
|
57
57
|
* ```javascript [playground]
|
|
58
|
-
* import groupBy from 'https://
|
|
58
|
+
* import groupBy from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/groupBy.es.js'
|
|
59
59
|
*
|
|
60
60
|
* console.log(
|
|
61
61
|
* groupBy('age')([
|
|
@@ -73,7 +73,7 @@ const groupByResolver = resolver => function groupByResolverReducer(
|
|
|
73
73
|
* Additionally, pass a resolver in property position to resolve a value for group membership for each element.
|
|
74
74
|
*
|
|
75
75
|
* ```javascript [playground]
|
|
76
|
-
* import groupBy from 'https://
|
|
76
|
+
* import groupBy from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/groupBy.es.js'
|
|
77
77
|
*
|
|
78
78
|
* console.log(
|
|
79
79
|
* groupBy(
|
package/x/has.js
CHANGED
|
@@ -15,7 +15,7 @@ const objectHas = function (object, key) {
|
|
|
15
15
|
* Check if a collection has a key.
|
|
16
16
|
*
|
|
17
17
|
* ```javascript [playground]
|
|
18
|
-
* import has from 'https://
|
|
18
|
+
* import has from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/has.es.js'
|
|
19
19
|
*
|
|
20
20
|
* console.log(
|
|
21
21
|
* has('a')({ a: 1, b: 2, c: 3 }),
|
package/x/identity.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Pass a value and receive the same value back.
|
|
11
11
|
*
|
|
12
12
|
* ```javascript [playground]
|
|
13
|
-
* import identity from 'https://
|
|
13
|
+
* import identity from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/identity.es.js'
|
|
14
14
|
*
|
|
15
15
|
* console.log(
|
|
16
16
|
* identity(1),
|
package/x/includes.js
CHANGED
|
@@ -23,7 +23,7 @@ const objectIncludes = function (object, value) {
|
|
|
23
23
|
* Check if a collection includes another value by [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero).
|
|
24
24
|
*
|
|
25
25
|
* ```javascript [playground]
|
|
26
|
-
* import includes from 'https://
|
|
26
|
+
* import includes from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/includes.es.js'
|
|
27
27
|
*
|
|
28
28
|
* console.log(
|
|
29
29
|
* includes(5)([1, 2, 3, 4, 5])
|
package/x/isDeepEqual.js
CHANGED
|
@@ -127,7 +127,7 @@ const areValuesDeepEqual = function (left, right) {
|
|
|
127
127
|
* Check two values for deep [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) equality.
|
|
128
128
|
*
|
|
129
129
|
* ```javascript [playground]
|
|
130
|
-
* import isDeepEqual from 'https://
|
|
130
|
+
* import isDeepEqual from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isDeepEqual.es.js'
|
|
131
131
|
*
|
|
132
132
|
* console.log(
|
|
133
133
|
* isDeepEqual({ a: 1, b: 2, c: [3] }, { a: 1, b: 2, c: [3] }),
|
|
@@ -141,7 +141,7 @@ const areValuesDeepEqual = function (left, right) {
|
|
|
141
141
|
* When passed a resolver function as the left or right argument or resolvers as both arguments, returns a function that resolves the value by the resolver before performing the deep equal comparison.
|
|
142
142
|
*
|
|
143
143
|
* ```javascript [playground]
|
|
144
|
-
* import isDeepEqual from 'https://
|
|
144
|
+
* import isDeepEqual from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isDeepEqual.es.js'
|
|
145
145
|
*
|
|
146
146
|
* const isPropADeepEqualTo123Array = isDeepEqual(object => object.a, [1, 2, 3])
|
|
147
147
|
*
|
package/x/isEmpty.js
CHANGED
|
@@ -12,7 +12,7 @@ const objectKeysLength = require('../_internal/objectKeysLength')
|
|
|
12
12
|
* Check if a value is empty.
|
|
13
13
|
*
|
|
14
14
|
* ```javascript [playground]
|
|
15
|
-
* import isEmpty from 'https://
|
|
15
|
+
* import isEmpty from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isEmpty.es.js'
|
|
16
16
|
*
|
|
17
17
|
* console.log('', isEmpty('')) // true
|
|
18
18
|
* console.log([], isEmpty([])) // true
|
package/x/isFunction.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Determine whether a value is a function.
|
|
11
11
|
*
|
|
12
12
|
* ```javascript [playground]
|
|
13
|
-
* import isFunction from 'https://
|
|
13
|
+
* import isFunction from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isFunction.es.js'
|
|
14
14
|
*
|
|
15
15
|
* const add = (a, b) => a + b
|
|
16
16
|
*
|
package/x/isIn.js
CHANGED
|
@@ -14,7 +14,7 @@ const __ = require('../_internal/placeholder')
|
|
|
14
14
|
* Counterpart to includes. Check if a collection includes another value.
|
|
15
15
|
*
|
|
16
16
|
* ```javascript [playground]
|
|
17
|
-
* import isIn from 'https://
|
|
17
|
+
* import isIn from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isIn.es.js'
|
|
18
18
|
*
|
|
19
19
|
* console.log(
|
|
20
20
|
* isIn(1, [1, 2, 3])
|
|
@@ -88,7 +88,7 @@ const _isIn = function (value, container) {
|
|
|
88
88
|
* Counterpart to includes. Check if a collection includes another value.
|
|
89
89
|
*
|
|
90
90
|
* ```javascript [playground]
|
|
91
|
-
* import isIn from 'https://
|
|
91
|
+
* import isIn from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isIn.es.js'
|
|
92
92
|
*
|
|
93
93
|
* console.log(
|
|
94
94
|
* isIn([1, 2, 3](1)
|
package/x/isObject.js
CHANGED
|
@@ -12,7 +12,7 @@ const isObject = require('../_internal/isObject')
|
|
|
12
12
|
* Determine whether a value has the [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) of `Object`.
|
|
13
13
|
*
|
|
14
14
|
* ```javascript [playground]
|
|
15
|
-
* import isObject from 'https://
|
|
15
|
+
* import isObject from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isObject.es.js'
|
|
16
16
|
*
|
|
17
17
|
* console.log(
|
|
18
18
|
* isObject({ a: 1, b: 2, c: 3 }),
|
package/x/isString.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Determine whether a value is a string.
|
|
11
11
|
*
|
|
12
12
|
* ```javascript [playground]
|
|
13
|
-
* import isString from 'https://
|
|
13
|
+
* import isString from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isString.es.js'
|
|
14
14
|
*
|
|
15
15
|
* console.log(
|
|
16
16
|
* isString('hey'),
|
package/x/keys.js
CHANGED
|
@@ -12,7 +12,7 @@ const objectKeys = require('../_internal/objectKeys')
|
|
|
12
12
|
* Get an array of keys from an instance.
|
|
13
13
|
*
|
|
14
14
|
* ```javascript [playground]
|
|
15
|
-
* import keys from 'https://
|
|
15
|
+
* import keys from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/keys.es.js'
|
|
16
16
|
*
|
|
17
17
|
* console.log(keys({ a: 1, b: 2, c: 3 })) // ['a', 'b', 'c']
|
|
18
18
|
* console.log(keys(['hello', 'world'])) // [0, 1]
|
package/x/last.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Get the last element of a collection
|
|
13
13
|
*
|
|
14
14
|
* ```javascript [playground]
|
|
15
|
-
* import last from 'https://
|
|
15
|
+
* import last from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/last.es.js'
|
|
16
16
|
*
|
|
17
17
|
* console.log(last([1, 2, 3])) // 3
|
|
18
18
|
* console.log(last([])) // undefined
|
package/x/maxBy.js
CHANGED
|
@@ -38,7 +38,7 @@ const _maxBy = function (array, path) {
|
|
|
38
38
|
* Finds the element that is the max by a property denoted by path.
|
|
39
39
|
*
|
|
40
40
|
* ```javascript [playground]
|
|
41
|
-
* import maxBy from 'https://
|
|
41
|
+
* import maxBy from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/maxBy.es.js'
|
|
42
42
|
*
|
|
43
43
|
* const array = [{ a: 1 }, { a: 2 }, { a: 3 }]
|
|
44
44
|
*
|
|
@@ -50,7 +50,7 @@ const _maxBy = function (array, path) {
|
|
|
50
50
|
* `maxBy` composes in a lazy way.
|
|
51
51
|
*
|
|
52
52
|
* ```javascript [playground]
|
|
53
|
-
* import maxBy from 'https://
|
|
53
|
+
* import maxBy from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/maxBy.es.js'
|
|
54
54
|
*
|
|
55
55
|
* const numbers = [1, 2, 3]
|
|
56
56
|
*
|
package/x/noop.js
CHANGED
package/x/pluck.js
CHANGED
|
@@ -22,7 +22,7 @@ const get = require('../get')
|
|
|
22
22
|
* * an array of keys or indices - `['a', 0, 'value']`
|
|
23
23
|
*
|
|
24
24
|
* ```javascript [playground]
|
|
25
|
-
* import pluck from 'https://
|
|
25
|
+
* import pluck from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/pluck.es.js'
|
|
26
26
|
*
|
|
27
27
|
* const users = [
|
|
28
28
|
* { name: 'John', age: 33 },
|
package/x/prepend.js
CHANGED
|
@@ -15,7 +15,7 @@ const isArray = require('../_internal/isArray')
|
|
|
15
15
|
* Prepend a string or an array.
|
|
16
16
|
*
|
|
17
17
|
* ```javascript [playground]
|
|
18
|
-
* import prepend from 'https://
|
|
18
|
+
* import prepend from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/prepend.es.js'
|
|
19
19
|
*
|
|
20
20
|
* const myArray = ['orange', 'apple']
|
|
21
21
|
*
|
package/x/size.js
CHANGED
|
@@ -12,7 +12,7 @@ const objectKeysLength = require('../_internal/objectKeysLength')
|
|
|
12
12
|
* Get the count of elements in a value.
|
|
13
13
|
*
|
|
14
14
|
* ```javascript [playground]
|
|
15
|
-
* import size from 'https://
|
|
15
|
+
* import size from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/size.es.js'
|
|
16
16
|
*
|
|
17
17
|
* console.log(size([1, 2, 3])) // 3
|
|
18
18
|
* console.log(size('hey')) // 3
|
package/x/trace.js
CHANGED
|
@@ -22,7 +22,7 @@ const consoleLog = console.log
|
|
|
22
22
|
* Log a value out to the console, returning the value. If the value is a function, treat it as a resolver.
|
|
23
23
|
*
|
|
24
24
|
* ```javascript [playground]
|
|
25
|
-
* import trace from 'https://
|
|
25
|
+
* import trace from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/trace.es.js'
|
|
26
26
|
*
|
|
27
27
|
* pipe([
|
|
28
28
|
* trace,
|
package/x/unionWith.js
CHANGED
|
@@ -115,8 +115,8 @@ const arrayUniqWith = function (array, comparator) {
|
|
|
115
115
|
* Create an array of unique values from an array of arrays with uniqueness determined by a comparator. The comparator is a function that returns a boolean value, `true` if two given values are distinct.
|
|
116
116
|
*
|
|
117
117
|
* ```javascript [playground]
|
|
118
|
-
* import isDeepEqual from 'https://
|
|
119
|
-
* import unionWith from 'https://
|
|
118
|
+
* import isDeepEqual from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/isDeepEqual.es.js'
|
|
119
|
+
* import unionWith from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/unionWith.es.js'
|
|
120
120
|
*
|
|
121
121
|
* console.log(
|
|
122
122
|
* unionWith(isDeepEqual)([
|
package/x/uniq.js
CHANGED
|
@@ -15,7 +15,7 @@ const isArray = require('../_internal/isArray')
|
|
|
15
15
|
* Get an array of unique values from an array.
|
|
16
16
|
*
|
|
17
17
|
* ```javascript [playground]
|
|
18
|
-
* import uniq from 'https://
|
|
18
|
+
* import uniq from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/uniq.es.js'
|
|
19
19
|
*
|
|
20
20
|
* console.log(
|
|
21
21
|
* uniq([1, 2, 2, 3]),
|
package/x/unless.js
CHANGED
|
@@ -20,7 +20,7 @@ const thunkConditional = require('../_internal/thunkConditional')
|
|
|
20
20
|
* Execute a function and return the result unless a condition is true, otherwise return the original value.
|
|
21
21
|
*
|
|
22
22
|
* ```javascript [playground]
|
|
23
|
-
* import unless from 'https://
|
|
23
|
+
* import unless from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/unless.es.js'
|
|
24
24
|
*
|
|
25
25
|
* const isEven = num => num % 2 === 0
|
|
26
26
|
* const doubleIfOdd = unless(isEven, num => num * 2)
|
package/x/values.js
CHANGED
|
@@ -14,7 +14,7 @@ const objectValues = require('../_internal/objectValues')
|
|
|
14
14
|
* Get an array of values from an instance.
|
|
15
15
|
*
|
|
16
16
|
* ```javascript [playground]
|
|
17
|
-
* import values from 'https://
|
|
17
|
+
* import values from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/values.es.js'
|
|
18
18
|
*
|
|
19
19
|
* console.log(values({ a: 1, b: 2, c: 3 })) // [1, 2, 3]
|
|
20
20
|
* console.log(values('abc')) // ['a', 'b', 'c']
|
package/x/when.js
CHANGED
|
@@ -20,7 +20,7 @@ const thunkConditional = require('../_internal/thunkConditional')
|
|
|
20
20
|
* Execute a function and return the result when a condition is true, otherwise return the original value.
|
|
21
21
|
*
|
|
22
22
|
* ```javascript [playground]
|
|
23
|
-
* import when from 'https://
|
|
23
|
+
* import when from 'https://cdn.jsdelivr.net/npm/rubico/dist/x/when.es.js'
|
|
24
24
|
*
|
|
25
25
|
* const isEven = num => num % 2 === 0
|
|
26
26
|
* const doubleIfEven = when(isEven, num => num * 2)
|