Hamsters.js
  • Home
  • About
  • Services
  • Examples
    • Atomic Operations
    • Collatz Conjecture
    • Fibonacci Sequence
    • Mandelbrot Set
    • Square Root
  • Wiki
  • Donate
  • Terms
  • Contact
Login
Register

Hamsters.js Wiki

  • Installing Hamsters

    • HTML
    • React Native
    • Node.js
  • Using Hamsters

    • Initializing
    • The Basics
    • Restructuring Standard Functions
    • Promises
    • Sorting
    • Persistence
    • Transferable Objects
    • Atomic Operations
    • Memoization
    • Debugging
    • Limitations

Sorting

Sorting is an optional parameter which allows for automatic sorting of your data contained within the rtn.data array.

  • Numerical Sorting
    • asc
    • desc
  • Alphabetical Sorting
    • ascAlpha
    • descAlpha
            
              function() {
                var params = {
                  array: [0,1,2,3,4,5,6,7,8,9],
                  threads: 2,
                  dataType: 'Int32',
                  sort: 'ascAlpha'
                };
                hamsters.run(params, function() {
                  params.array.forEach(function(item, index) {
                    rtn.data[index] = ((item * 120) / 10);
                  });
                }, function(results) {
                  console.log(results);
                });
              }
            
        	
  • Twitter:

  • Recent Updates

    Hamsters.js v5.6.1 Released!

    New React Native Hamsters Release v1.0.9!

    Subscribe To Updates

    Stay in the Loop! Subscribe for Updates on New Releases and Terms of Service Changes.

    © 2015 - 2024 asmithdev | All rights reserved.
    • Home
    • About
    • Privacy
    • License
    • Invest