The Go Len implementation just iterated over all values and incremented
a counter. Now it can just read it off the meta sequence.
The JS implementation never supported size because it would have been
async in order to implement even the Go style implementation.
Mostly addresses #764 (efficient; but could be more efficient).
The usage of isNullOrUndefined prevented flow 0.23 from detecting
that the value cannot be null or undefined.
This function was only used in one place.
* Make noms-webpack-config export an object not a function
* V2
* Add noms-webpack-config to build.py
* Update other build.py files, fix webpack config issue
* Don't effectively exclude out.js
type.js no longer exports makePrimitiveType. It is recommended to use
the type constants directly. There are a few cases where we had a
NomsKind and needed a Type. For those cases there is now a
getPrimitiveType but it is not exported by noms.
Fixes#1168
The decoder now generates a class for a struct. Given:
```noms
struct MyStruct {
x: Int8
s: optional String
}
```
the generated class looks something like this:
```js
class MyStruct extends Struct {
get x(): int8 { ... }
setX(value: int8): MyStruct { ... }
get s(): ?string { ... }
setS(value: ?string): MyStruct { ... }
}
```
The base class `Struct` has nothing on it (except chunks). It
usefull in cases where a generic struct is wanted.
To reflect on Structs we introduce StructMirror.
This also means that Commit is now a real ~~boy~~type.
This does not yet handle Defs.
Towards #1157
Currently we do the type detection inside every compare callback.
Since we know the type ahead of time we can use a more optimized
compare function based on the type.
Fixes#1122
Towards #1142
The DataStore constructor now takes a second optional parameter
which is the number of bytes of values to cache.
DataStore is no longer a ChunkStore so it no longer has getRoot,
updateRoot, get, put or close.
Since DataStore now does its own caching CacheStore is no longer
useful and is now removed.
Fixes#1096