# all files / Core/Services/ ValidationService.js

100% Statements 7/7
100% Branches 2/2
100% Functions 2/2
100% Lines 7/7

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20

    1

    1

    1
    17

    1
    2

    1
     'use strict';

    // Module:
    var Core = require('../Core');

    // Dependencies:
    var charFunk = require('charfunk');

    var ValidationService = function () {
        return {
            validateVariableName: validateVariableName
        };

        function validateVariableName (variableName) {
            return charFunk.isValidName(variableName, true) ? variableName : false;
        }
    };

    Core.service('validationService', ValidationService);