Skip to content

Instantly share code, notes, and snippets.

@vasco3
Created May 14, 2016 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasco3/78d7795a25415637118b34415128d724 to your computer and use it in GitHub Desktop.
Save vasco3/78d7795a25415637118b34415128d724 to your computer and use it in GitHub Desktop.
const PERMITTED_REORDER = 0b1111010111;  // acceptableState

contactEmail: 1        // 0b0000000001   t
contactName: 2       // 0b0000000010   t
contactPhone: 4      // 0b0000000100   t
deliveryWindow: 8  // 0b0000001000    false
endDate: 16            // 0b0000010000    t
jobsiteAddress: 32  // 0b0000100000    false
jobsiteCity: 64         // 0b0001000000    t
jobsiteState: 128     // 0b0010000000    t
jobsiteZip: 256        // 0b0100000000    t
startDate: 512         // 0b1000000000    t



 const REORDER_EXCEPTIONS = [
    [0b0000000001, 0b0000000100],   // phone or email
    [0b0011000000, 0b0100000000],   // city/state or zip
 ];		   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment