- Removed unused second param to _setTokens
- Added quoteChar parameter to fromDelimiter to allow passing of different enclosing chars.
- Refactor to make token characters all vars instead of strings.
- BREAKING: Minor change to toJavascript(true); now returns code using backticks instead of escaped new lines.
- Added maxWidth param to toFixedWidth method
- Added toFixedWidth method
- Changed some code from ES5 => ES6
- fromDelimiter now will ensure that all rows have an equal number of columns
- Updated toggle method to make 2nd param optional. Not passing it will add/remove property being toggled.
- Internal: Moved testStrings to test file.
- Added space.d.ts and moved doc comments from space.js to space.d.ts
- BREAKING: Removed Events and Listeners. If needed, one could create a proxy class that extends built in methods with events. The code is cleaner without the events (fewer side effects)
- BREAKING: Removed on, off, trigger, clearListeners, and create methods.
- Removed the 4th param to "set" method (noEvents)
- Refactored to use strict and ES6
- Fixed 2 accidental global var bugs
- Fixed bug where multiple newline sanitizing wasn't global
- Fixed bug in fromDelimiter method
- Added getType, getTypeIndex, getUnionType, flattenTypes and setType methods
- Added fromArrayWithHeader and toArrayWithHeader methods
- 2x speedup for fromCsv when string input has no quotes
- Re-added handling of int inputs to get
- Added inPlace? param to filter method
- Added static makeIndex method
- Added public setWithType method
- Internal: cleanup of internal types
- Added _typeCache for better performance when using fromDelimited
- Internal performance improvements
- Added _setType for sharing an array across objects
- _cache is now computed only when/if requested, not on every write
- _properties and _values are set only when/if needed
- fromDelimited now runs in 70% less time and uses 40% less memory on benchmark suite
- sortBy can now take an array of properties to sort on
- BREAKING: Added recursive param to getArray. Made it recursive by default.
- BREAKING: "delete" method no longer accepts ints, use deleteAt method instead.
- Added deleteAt method
- BREAKING: Removed last, lastValue, lastProperty, first, firstValue, firstProperty methods.
- Added propertyAt, pairAt, valueAt methods.
- Fixed bug in fromDelimiter method where \r were not ignored.
- BREAKING: renamed "getByIndex" method to "at"
- BREAKING: changed parameters to group method to allow grouping by multiple params
- Added grab method
- Added increment and decrement methods
- Added group method
- Added format method
- Added getColumn method
- Added getIndex method
- BREAKING: Removed fromFile, toFile, fromUrl, toUrl methods
- Code cleanup
- BREAKING: Removed unionSingle static method
- BREAKING: Removed diffOrder, patchOrder, lastIndexOf, getCud methods
- BREAKING: Renamed wrap method nest
- Added mergeDuplicates and deleteDuplicates methods
- Added "last" parameter to indexOf method instead of having lastIndexOf method
- Added "reverse" parameter to each to iterate in reverse order
- Swapped match() calls with indexOf() calls for better perf
- Code cleanup: switched to verbose var declarations
- Fixed bug in delete method
- Fixed bug in fromCSV
- Fixed bug where only first \r was being removed
- Added sortBy method
- Fixed bug in fromDelimited when passed string begins with quote
- Lint cleanup
- Added extract, replace and renameObjects methods
- Fixed null ref in getRoot method
- Added deepLength method
- Refactored internal implementation of _properties
- Removed static methods pathBranch, pathLeaf, removeItems and isSpacePath
- Undid change from 0.12.0. space.set("foo", 2) now preserves number types.
- Added getPath, getParent, and getRoot methods
- Added everyLeaf method
- Returning false in your fn passed to every now breaks early
- Fixed bug where set(property, someObject) would not convert someObject to space
- Code cleanup and slight peformance tweaks.
- Defined behavior for "has" method when value is empty.
- BREAKING: Renamed Space.isXPath to Space.isSpacePath.
- BREAKING: Removed never used getByIndexPath and setByIndexPath methods.
- BREAKING: Now space.set("foo", 2) !== space.get("foo"). We convert values to strings or space instances(if applicable).
- Misc code cleanup.
- Protect against following circular paths when loading from objects.
- delete(property: string) now deletes all occurrences of property in instance.
- Removed protection against prototype.js overwriting hasOwnProperty. If someone is using prototype.js with Space they'll need to compensate for that.
- Bug fix in indexOf
- Perf improvements. ~20% less memory from ditching propertiesCount.
- Added reverse method
- 20% mem perf improvement by creating less arrays.
- BREAKING CHANGE: Sort method now passes a and b as {property:string,value:any}, not [string, any]
- Added deep param to each
- Fixed reference bug when initializing new instances from other instances
- Made events a getter and now only initialize the events object when needed to save mem. About 5% mem improvement and significantly less objects created on heap.
- Added hasHeaders param to from delimited methods
- Added trim() method to remove empty properties
- Fixed bug in toString method which printed empty lines for null or undefined values
- BREAKING CHANGE: get(property: string) now returns the last matching pair and not the first.
- Minor code cleanup and additional tests.
- Code pruning and cleanup. Removed methods marked "experimental" and removes spacefs.
- Bug fix in the load2 parsing algo
- Fixed type error when passing undefined to get
- BREAKING CHANGE: Renamed isASet to isStringMap
- Added isFlat method
- BREAKING CHANGE: turned length() into a getter. To migrate simply replace all calls to length() with length
- Added pretty param to toJSON
- Updated github links
- Fixed bug in rename method where renames of non-existing entities corrupted object.
- Merged mapValues and mapProperties methods into one map method with params and added an inplace flag
- Added fromXml method
- MapValues method
- Added toXml method
- Removed the "propertyName?" property from the fromCsv and similar methods. Now use the row index as the property name.
- Added mapProperties method
- Fixed a bug where overwriting a pair was not updating cache
- Minor tweaks and improvements
- BREAKING CHANGE: passing in arrays to create new Space instances will now set the property names to "0 1 2 3...N" instead of "item item item..." This makes it easier to go from JSON => Space => JSON. This reverts the change introduced in 0.7.0, which was a bad idea.
- Added guessTypes parameter to the toJSON and toObject methods for turning space objects into JS objects with type information. Result is better JSON => Space => JSON flows.
- Added optional parameter to fromDelimited methods to set row property name in returned object.
- Added option to split to allow for returning Space object in addition to array
- Added toCsv, toSsv, toTsv, and toDelimited methods
- Added perf stubs
- Slight performance improvements
- Added fromFile, toFile, fromUrl, and toUrl methods
- Added fromHeredoc method
- Miscellaneous fixes and cleanup
- Added split method
- Added getArray method
- Bug fix in getCud method
- Performance improvement
- Added renameAll method
- Added getValues method
- BREAKING CHANGE: firstType is now firstProperty, getTypes is now getProperties, lastType is now lastProperty
- Renamed "Type/Types/type" to "Property/Properties/property". Thanks to @jyxt for calling me on that bad name :)
- Fixed bug in each method where the index was a typeof string instead of number.
- Delete methods refactor
- Passing an int to .delete() now deletes the pair with that numeric index.
- BREAKING CHANGE: when parsing JSON/Arrays, we no longer set the key/type as "0..1..2..". Instead, we set type as "item"
- BREAKING CHANGE: firstKey() is now firstType()
- BREAKING CHANGE: getKeys() is now getTypes()
- renamed all occurrences of key/Key to type/Types.
- updated version.js to support passing a v#.
- ran beautify
- added beautify command
- fixed 'make version' to update space.js as well
- added History.md
- added version.js and 'make version' command
- added toggle method