meta-fiesta
v0.0.1
Published
Meta-logic for user awards (so oddly specific)
Downloads
2
Readme
Meta-logic for user awards (so oddly specific)
This library is an application component for a closed-source project. It takes a list of objects with a "logic" property and a single test object. Each "logic" property will be executed in sandboxed JS and passed the test object. The objects containing a "logic" that returned truthy will be passed in an arrray to a callback function.
Probably not that helpful to you...
Install
$ npm install --save meta-fiesta
Usage
var metaFiesta = require('meta-fiesta');
var objects = [
{ logic: "exports.main = function() { exit(test === 2);}", otherStuff: "yo" },
{ logic: "exports.main = function() {exit(test === 1);}", otherStuff: "yoyo" }
];
var test = 1;
metaFiesta(objects, test, function(err, list){
console.log(list);
// [{ logic: "exports.main = function() {exit(test === 1);}", otherStuff: "yoyo" }]
});
License
MIT © Falkirks