<commit_before>#!/bin/bash

pkg-get() {
    node -p "require('./package.json').$1"
}

pkg-repo-slug() {
    pkg-get "repository.url.split('/').splice(-2).join('/')"
}

is-released() {
    res="$(npm view $1@$2 version 2>/dev/null | head -n 1)"
    [ $? == 0 ] && [ "$res" == "$2" ]; return 0
}


if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
    echo "This is a pull request, skipping deploy."; exit 0
fi

if [ "$TRAVIS_REPO_SLUG" != "$(pkg-repo-slug)" ]; then
    echo "This is a fork, skipping deploy."; exit 0<commit_msg>Fix function is-released() in travis-npm-publish.sh<commit_after>#!/bin/bash

pkg-get() {
    node -p "require('./package.json').$1"
}

pkg-repo-slug() {
    pkg-get "repository.url.split('/').splice(-2).join('/')"
}

is-released() {
    res="$(npm view $1@$2 version 2>/dev/null | head -n 1)"
    [ $? == 0 ] && [ "$res" == "$2" ]; return $?
}


if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
    echo "This is a pull request, skipping deploy."; exit 0
fi

if [ "$TRAVIS_REPO_SLUG" != "$(pkg-repo-slug)" ]; then
    echo "This is a fork, skipping deploy."; exit 0
{'fraction_non_alphanumeric': 0.23324150596877868, 'fraction_numerical': 0.01928374655647383, 'mean_word_length': 3.1762452107279695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6585475', 'n_tokens_mistral': 445, 'n_tokens_neox': 415, 'n_words': 102}