Open-source IoT Platform - Device management, data collection, processing and visualization.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
299 B

'use strict';
const importLazy = require('import-lazy')(require);
const rules = require('./rules');
/**
* @param {string} ruleName
* @returns {false|any}
*/
module.exports = function(ruleName) {
if (rules.includes(ruleName)) {
return importLazy(`./rules/${ruleName}`);
}
return false;
};