Taffy DB : Download and Change Log
Home | Feedback/Bugs | Getting Started | FAQ

Downloaded the latest zip archive from GitHub here.


Zip File Contains:
  • taffy.js - commented version of taffy
  • taffy-min.js - compressed and minified version of taffy
  • tests folder with development tests
Need an older version? Download the archive.


Version 1.7.2


Date: 4/25/2009
  • Added: Faster loops by defining the length of the array as a separate var and not computing it on each loop.
  • Fixed: A number of JSLint identified syntax bugs. Nothing major but should help code quality.
  • Added TaffyDB to GitHub. Follow the project, fork, and download the latest version here.


Version 1.7.1


Date: 1/30/2009
  • Bug Fix: Fixed issue with using negative filters and arrays. {"!is":["a","b","c"]} would return all records instead of records not of value a, b, or c.


Version 1.7


Date: 1/6/2009
  • Bug Fix: Logical Sorting of numbers should now work correctly.
  • Added: Insert will not accept an array of rows to add to the collection.
  • Added: OrderBy will now accept a function to run your own custom sort against the collection. This is the same as array.sort().
  • Version 1.0 through 1.6.1 now part of separate archive file and no longer included in the download.


Version 1.6.1


Date: 9/02/2008
  • Bug Fix: Fix issue with merge template not working correctly.


Version 1.6


Date: 7/18/2008
  • Bug Fix: length filtering wasn't working correctly since 1.5. Now fixed.
  • Bug Fix: regexpass was not correctly mapping to the write filter function since 1.5. Now fixed.
  • Removed: collection.raw, collection.length, and arraycontains filter.
  • Removed: All "not" style filters. "not", "notLike", "regexpfail", "isNotString", etc. These filters have been removed in favor of the new filter standard. Now you can use the bang (!) symbol before a filter name to use the not behavior. Note that you will need to include the filter name in quotes.

    Instead of collection.find({status:{notLike:"active"}})
    use collection.find({status:{"!like":"active"}})
  • Added: collection.getLength method to get the length of your collection.
  • Added: hasOwnProperty check on all FOR IN loops
  • Added: TAFFY.EXIT support for the forEach method. Simply return TAFFY.EXIT from your function to break the loop.
  • Added: collection.config.set and collection.config.get as a way to alter the config for the database. Only one variable is currently avaliable to modify: template.
  • Added: collection.applyTemplate to apply a template to a collection or a subset of a collection.


Version 1.5.1


Date: 6/22/2008
  • Bug Fixes: Fixed a number of issues with 1.5 and with FireFox 3.0.


Version 1.5


Date: 6/19/2008
  • Bug Fix: Now using !TAFFY to discover if TAFFY already exists instead of !window.TAFFY. This didn't work on all platforms.
  • Bug Fix: orderBy should now handle null and undefined values correctly.
  • Added: Internal Taffy Index Array (TIA) handling. Makes finds faster by reducing number of steps to create an array of record indexes.
  • Added: Public isTAFFY(arg) method to discover if an object is a taffy collection. Returns true if arg is a Taffy DB collection.
  • Added: Public has(arg1,arg2) method to compare two objects and discover if the material in arg2 is contained in arg1. Similar to isSameObject but closer to a like expression.
  • Added: Public hasAll(arg1,arg2) method to compare two objects. The same as has() except that if your second argument is an array it requires that every item in that array be found in the first object.
  • Added: forEach now passes in two arguments to your custom function. The first is the record, the second is the record index number. So collection.forEach(function(r,n){alert(n)}) will alert the index number of each record in the collection.
  • Added: has expression to the find method. So collection.find({someOject:{has:{property:true}}}) is valid.
  • Added: hasAll expression to find method. So collection.find({someOject:{hasAll:[{property:true},{secondProperty:true}]}}) is valid.
  • Added: function support to find method. You can now pass in a function instead of an object. The function will be run for every record and the record will be returned if the function returns true. Example: collection.find(function(r,n){return true}) will find everything.
  • Added: function support to column searches with the find method. Similar to above but applied only to a columns value. Example: collection.find(column:function(v,n){return true});
  • Added: support for isTAFFY and isNotTAFFY in find calls. Example: collection.find({taffyColumn:{isTAFFY:true}});
  • Deprecated: arraycontains used to work similar to has. Now has is used instead. arraycontains will be removed after this version and will error.


Version 1.4


Date: 4/30/2008
  • Bug Fix: IsNumeric function name changed to isNumeric.
  • Added: Public isSameObject utility method to check if two objects are the same. (call TAFFY.isSameObject(ob1,ob2))
  • Added: Public isSameArray utility method to check if two arrays are the same. (call TAFFY.isSameArray(ar1,ar2))
  • Added: Public getObjectKeys utility method to get the keys from an object and sort them by name. (call TAFFY.getObjectKeys(ob))
  • Added: a bunch of new modes to the find method (detailed below)
    • length - compare the length of a string or array
    • isSameObject - compare to see if object is the same as filter object
    • isNotSameObject - compare to see if object is not the same as filter object
    • isSameArray - compare to see if array is the same as filter array
    • isNotSameArray - compare to see if array is not the same as filter array
    • isString - check to see if value in TAFFY collection is a string
    • isNumber - check to see if value in TAFFY collection is a number
    • isObject - check to see if value in TAFFY collection is a object
    • isArray - check to see if value in TAFFY collection is a array
    • isBoolean - check to see if value in TAFFY collection is a boolean
    • isFunction - check to see if value in TAFFY collection is a function
    • isNull - check to see if value in TAFFY collection is null
    • isUndefined - check to see if value in TAFFY collection is undefined
    • isNumeric - check to see if value in TAFFY collection contains only numbers
    • isNotString - check to see if value in TAFFY collection is not a string
    • isNotNumber - check to see if value in TAFFY collection is not a number
    • isNotObject - check to see if value in TAFFY collection is not a object
    • isNotArray - check to see if value in TAFFY collection is not a array
    • isNotBoolean - check to see if value in TAFFY collection is not a boolean
    • isNotFunction - check to see if value in TAFFY collection is not a function
    • isNotNull - check to see if value in TAFFY collection is not null
    • isNotUndefined - check to see if value in TAFFY collection is not undefined
    • isNotNumeric - check to see if value in TAFFY collection does not contain only numbers


Version 1.3


Date: 4/28/2008
  • Bug Fix: now using windows.TAFFY instead of this.TAFFY to fix issue with Adobe AIR support.
  • Made a number of code changes to simplify and reduce size. Shaved over 1K off the -min version.


Version 1.2


Date: 3/14/2008
  • Bug Fix: orderBy so it sorts in the correct direction instead of the opposite of what is expected from Asc and Desc
  • Bug Fix: find so it only return unique index rows in the event that the same record is matched multple times to a query.
  • Added: Stringify method to convert a Taffy collection into text for use with a web service.
  • Added: auto-JSON-parse function when using new TAFFY(). Now if you pass in a an unevaluated string from a web service or Ajax call it will automaticlly convert it into the equivilent JavaScript array/object.
  • Added: logical sorting to orderBy. This is a file system style sort so 2a.txt comes before 20a.txt. You can sort logical (logical asc) or logicaldesc.
  • Added: IsNumeric function to check if a string is made up of numbers.
  • Added: last() method to get the last record in the collection or in a filter result (oposite of first() method);
  • Added: HasOwnProperty check on the update method to keep from injecting copies of methods added to the global object's prototype.
  • Added: a public set of utility functions that you can use in your own application. They can be found global as TAFFY.[utilityname]()
  • Made a number of code changes to simplify, reduce size, and standardize the way things work.


Version 1.1


Date: 3/12/2008
  • Bug Fix: Cases of & have been fixed to && in if statements.
  • Bug Fix: makeIndexArray now works correctly with single numbers in addition to arrays and objects. This impacts: get, first, forEach, update, and remove. Now both .remove([2]) and .remove(2) should work.


Version 1.0


Date: 3/10/2008
  • Initial release