<commit_before>var iam = require('./../lib/iam');


var sampleIam = {
    "Statement": [
        {
            "Effect": "Allow",
            "Action": ["sm:*"],
            "Resource": [
                "ssrn:ss:sm::200:integration/9999"
            ]
        },
        {
            "Effect": "Deny",
            "Action": ["sm:SearchResults"],
            "Resource": [
                "ssrn:ss:sm::200:assessment/99"
            ]
        }
    ]
};

console.log(JSON.stringify(iam.getActionCriteria('sm:ViewUsers', iam.processIamData(sampleIam))));


/*
* S3
*
*
*<commit_msg>Updated sample.<commit_after>var iam = require('./../lib/iam');


var sampleIam = {
    "Statement": [
        {
            "Effect": "Allow",
            "Action": ["sm:*"],
            "Resource": [
                "ssrn:ss:sm::200:integration/9999",
                "ssrn:ss:sm::100:assessment/500"
            ]
        },
        {
            "Effect": "Deny",
            "Action": ["sm:SearchResults"],
            "Resource": [
                "ssrn:ss:sm::200:assessment/99"
            ]
        }
    ]
};

console.log(JSON.stringify(iam.getActionCriteria('sm:SearchResults', iam.processIamData(sampleIam))));


/*
* S3
*
*
*
{'fraction_non_alphanumeric': 0.18688524590163935, 'fraction_numerical': 0.02622950819672131, 'mean_word_length': 1.5923566878980893, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2829693', 'n_tokens_mistral': 420, 'n_tokens_neox': 388, 'n_words': 44}