Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Array Updates

#15

Remove aliases:
  all
  any
  collect
  entries
  find
  findAll
  member
  select

Rename methods:
  include -> contains

Remove methods:
  detect -> replaced by first(iterator, context)
  reject

Update methods:
  clone - Add parameter to allow a deep clone
  first - Add parameters to accept either a number or a function
    first(n) - Returns the first n of the list
    first(iterator, context) - Returns the first item when the iterator returns true
  last - Add parameters to accept either a number or a function
    last(n) - Returns the last n of the list
    last(iterator, context) - Returns the last item when the iterator returns true
  reverse - Remove the option to reverse the items inline as this is not consistent

Add methods:
  insert- Add method as a splice helper.

Reported by Joe Gornick · February 7th, 2009 @ 02:46 AM

State: resolved
Milestone: none
Assigned to: Joe Gornick Joe Gornick

Activity

  1. Joe Gornick
    Joe Gornick

    Also added a strict parameter to the contains method.

    February 7th, 2009 @ 10:33 PM

  2. Joe Gornick
    Joe Gornick

    Renamed uniq to unique.

    February 7th, 2009 @ 11:55 PM

  3. Joe Gornick
    Joe Gornick

    For this ticket, we are going to skip the Array#clone(deep) option.

    February 8th, 2009 @ 12:31 AM

  4. Joe Gornick
    Joe Gornick

    This commit is in my repository, waiting for it to be merged and updated in main FuseJS repo.

    My commit hash: 9a555d02a176edf1ae46365849bbf09b63ca39cc

    February 8th, 2009 @ 01:30 AM

  5. John-David Dalton
  6. John-David Dalton
    John-David Dalton

    (from [062ffe7388a49ec2b19b8313505f7c044aba514e]) fusejs: Updates to Array API [#15 Array Updates state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

    February 9th, 2009 @ 05:41 PM

  7. John-David Dalton
    John-David Dalton

    (from [629580b37a4268870f085ce539acd657796db69f]) fusejs: Updates to Array API [#15 Array Updates state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

    February 10th, 2009 @ 01:24 AM

  8. John-David Dalton
    John-David Dalton

    (from [7a40d362265b1d992113410bf0ff649782a1b668]) fusejs: Updates to Array API [#15 Array Updates state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

    February 10th, 2009 @ 06:37 PM

  9. John-David Dalton
    John-David Dalton

    (from [2e5c673335d76efcbb7c6ae931370e4001a2ffc9]) fusejs: Updates to Array API [#15 Array Updates state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

    February 11th, 2009 @ 12:48 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.