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
Post a Comment