tutuca 0.9.8 → 0.9.9
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/dist/tutuca-dev.js +57 -0
- package/dist/tutuca-dev.min.js +3 -3
- package/dist/tutuca-extra.js +57 -0
- package/dist/tutuca-extra.min.js +3 -3
- package/dist/tutuca.js +57 -0
- package/dist/tutuca.min.js +3 -3
- package/package.json +1 -1
package/dist/tutuca.js
CHANGED
|
@@ -6370,6 +6370,7 @@ var Record = (defaultValues, name) => {
|
|
|
6370
6370
|
hasInitialized = true;
|
|
6371
6371
|
const keys = Object.keys(defaultValues);
|
|
6372
6372
|
const indices = RecordTypePrototype._indices = {};
|
|
6373
|
+
RecordTypePrototype._name = name;
|
|
6373
6374
|
RecordTypePrototype._keys = keys;
|
|
6374
6375
|
RecordTypePrototype._defaultValues = defaultValues;
|
|
6375
6376
|
for (let i = 0;i < keys.length; i++) {
|
|
@@ -6763,6 +6764,62 @@ class RepeatImpl extends IndexedSeqImpl {
|
|
|
6763
6764
|
this.prototype[Symbol.iterator] = this.prototype.values;
|
|
6764
6765
|
}
|
|
6765
6766
|
}
|
|
6767
|
+
var asValues = (collection) => isKeyed(collection) ? collection.valueSeq() : collection;
|
|
6768
|
+
function initCollectionConversions() {
|
|
6769
|
+
CollectionImpl.prototype.toMap = function toMap() {
|
|
6770
|
+
return Map2(this.toKeyedSeq());
|
|
6771
|
+
};
|
|
6772
|
+
CollectionImpl.prototype.toOrderedMap = function toOrderedMap() {
|
|
6773
|
+
return OrderedMap(this.toKeyedSeq());
|
|
6774
|
+
};
|
|
6775
|
+
CollectionImpl.prototype.toOrderedSet = function toOrderedSet() {
|
|
6776
|
+
return OrderedSet(asValues(this));
|
|
6777
|
+
};
|
|
6778
|
+
CollectionImpl.prototype.toSet = function toSet() {
|
|
6779
|
+
return Set2(asValues(this));
|
|
6780
|
+
};
|
|
6781
|
+
CollectionImpl.prototype.toStack = function toStack() {
|
|
6782
|
+
return Stack2(asValues(this));
|
|
6783
|
+
};
|
|
6784
|
+
CollectionImpl.prototype.toList = function toList() {
|
|
6785
|
+
return List(asValues(this));
|
|
6786
|
+
};
|
|
6787
|
+
CollectionImpl.prototype.countBy = function countBy(grouper, context) {
|
|
6788
|
+
const groups = Map2().asMutable();
|
|
6789
|
+
this.__iterate((v, k) => {
|
|
6790
|
+
groups.update(grouper.call(context, v, k, this), 0, (a) => a + 1);
|
|
6791
|
+
});
|
|
6792
|
+
return groups.asImmutable();
|
|
6793
|
+
};
|
|
6794
|
+
CollectionImpl.prototype.groupBy = function groupBy(grouper, context) {
|
|
6795
|
+
const isKeyedIter = isKeyed(this);
|
|
6796
|
+
const groups = (isOrdered(this) ? OrderedMap() : Map2()).asMutable();
|
|
6797
|
+
this.__iterate((v, k) => {
|
|
6798
|
+
groups.update(grouper.call(context, v, k, this), (a) => {
|
|
6799
|
+
a ??= [];
|
|
6800
|
+
a.push(isKeyedIter ? [k, v] : v);
|
|
6801
|
+
return a;
|
|
6802
|
+
});
|
|
6803
|
+
});
|
|
6804
|
+
return groups.map((arr) => reifyValues(this, arr)).asImmutable();
|
|
6805
|
+
};
|
|
6806
|
+
IndexedCollectionImpl.prototype.keySeq = function keySeq() {
|
|
6807
|
+
return Range(0, this.size);
|
|
6808
|
+
};
|
|
6809
|
+
MapImpl.prototype.sort = function sort(comparator) {
|
|
6810
|
+
return OrderedMap(sortFactory(this, comparator));
|
|
6811
|
+
};
|
|
6812
|
+
MapImpl.prototype.sortBy = function sortBy(mapper, comparator) {
|
|
6813
|
+
return OrderedMap(sortFactory(this, comparator, mapper));
|
|
6814
|
+
};
|
|
6815
|
+
SetImpl.prototype.sort = function sort(comparator) {
|
|
6816
|
+
return OrderedSet(sortFactory(this, comparator));
|
|
6817
|
+
};
|
|
6818
|
+
SetImpl.prototype.sortBy = function sortBy(mapper, comparator) {
|
|
6819
|
+
return OrderedSet(sortFactory(this, comparator, mapper));
|
|
6820
|
+
};
|
|
6821
|
+
}
|
|
6822
|
+
initCollectionConversions();
|
|
6766
6823
|
|
|
6767
6824
|
// src/renderer.js
|
|
6768
6825
|
var DATASET_ATTRS = ["nid", "cid", "eid", "vid", "si", "sk"];
|