nl_tokens: Turns a selector nodeList or array of elements into an array of elements ( so we can use array methods ) . It also throws errors on any other inputs . Used to handle inputs to . add and . remove .
pl_tokens: function _getElements ( input ) { var elements ; if ( typeof input === 'string' || <mask> instanceof String ) { // See https://davidwalsh.name/nodelist-array for the technique transforming nodeList -> Array. elements = [ ] . slice . call ( document . querySelectorAll ( input ) ) ; // I checked the 'input instanceof NodeList' test in IE9 and modern browsers and it worked for me. } else if ( Array . isArray ( input ) || input instanceof NodeList ) { elements = [ ] . slice . call ( input ) ; } else { throw new Error ( 'The selector provided to AnchorJS was invalid.' ) ; } return elements ; }