javascript - Meteor Session.get and Regex -


is there possibility (in meteor) session keys , match them regex?

session.set( /(?:^|\w)word-(\w+)(?!\w)/g , false ) 

i want set them false. know first word in key name, , same.

session not designed work regexp. on other hand can use client-side collections storing information of type. so

var mysession = new meteor.collection(null); // null important!  mysession.update({key: {$regexp: /* regexp */}}, {$set: {value: false}}); 

remember collection reactive data-source session, behave identically session in terms of templates rendering. difference data mysession erased after hot code push. can fixed using reload or amplify package quite different story.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -