Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

checkdigit

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkdigit - npm Package Compare versions

Comparing version
1.0.0a0
to
0.1
+2
-4
checkdigit/isbn.py

@@ -52,5 +52,3 @@ # /usr/bin/env python

data = cleanse(data)
return (
calculate10(data[:9]) == data[-1]
) # Determines if calculated Check Digit of the data is the last digit given
return calculate10(data[:-1]) == data[-1]

@@ -94,3 +92,3 @@

data = cleanse(data)
return calculate13(data[:12]) == data[-1]
return calculate13(data[:-1]) == data[-1]

@@ -97,0 +95,0 @@

@@ -58,3 +58,3 @@ # /usr/bin/env python

Returns:
bool: A boolean representing if the check digit validates the data
bool: A boolean representing whether the check digit validates the data or not

@@ -75,3 +75,3 @@ """

Returns:
str: The missing value that should be where the question mark is
str: The missing value that should've been where the question mark was

@@ -78,0 +78,0 @@ """

@@ -29,6 +29,6 @@ # /usr/bin/env python

def calculate(data: str) -> str:
"""Calculates UPC Check Digit
"""Calculates UPC Check Digits
Args:
data: A string of UPC digit
data: A string of UPC digits

@@ -42,3 +42,3 @@ Returns:

def validate(data: str) -> bool:
"""Determines if calculated check digit of the data is the last digit given
"""Determines if the calculated check digit of the data is the last digit given

@@ -49,4 +49,4 @@ Args:

Returns:
bool: A boolean representing if the check digit validates the data
bool: A boolean representing whether the check digit validates the data or not
"""
return calculate(data[:11]) == data[-1]
return calculate(data[:-1]) == data[-1]
Metadata-Version: 2.1
Name: checkdigit
Version: 1.0.0a0
Version: 0.1
Summary: A check digit library for data validation

@@ -45,3 +45,3 @@ Home-page: https://github.com/harens/checkdigit

Check out the [wiki](https://github.com/harens/checkdigit/wiki) for more details on how to use the library
Check out the [documentation](https://github.com/harens/checkdigit/wiki) for more details on how to use the library

@@ -48,0 +48,0 @@ ## License

[tool.poetry]
name = "checkdigit"
version = "1.0.0-alpha.0"
version = "0.1"
description = "A check digit library for data validation"

@@ -5,0 +5,0 @@ authors = ["harens <harensdeveloper@gmail.com>"]

@@ -22,5 +22,5 @@ # checkdigit

Check out the [wiki](https://github.com/harens/checkdigit/wiki) for more details on how to use the library
Check out the [documentation](https://github.com/harens/checkdigit/wiki) for more details on how to use the library
## License
This project is licensed under the [GNU General Public License v3.0](https://github.com/harens/checkdigit/blob/master/LICENSE)

@@ -12,5 +12,5 @@ # -*- coding: utf-8 -*-

'name': 'checkdigit',
'version': '1.0.0a0',
'version': '0.1',
'description': 'A check digit library for data validation',
'long_description': '# checkdigit\n\nA check digit library for data validation\n \n| Test Status | [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/harens/checkdigit/Tests?logo=github&style=flat-square)](https://github.com/harens/checkdigit/actions) [![Codecov](https://img.shields.io/codecov/c/github/harens/checkdigit?style=flat-square)](https://codecov.io/gh/harens/checkdigit) |\n|:--|:--|\n| __Version Info__ | [![PyPI](https://img.shields.io/pypi/v/checkdigit?logo=pypi&logoColor=white&style=flat-square)](https://pypi.org/project/checkdigit/) [![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/harens/checkdigit?logo=github&style=flat-square)](https://github.com/harens/checkdigit/releases) [![PyPI - Downloads](https://img.shields.io/pypi/dm/checkdigit?logo=python&logoColor=white&style=flat-square)](https://pypi.org/project/checkdigit/) |\n| __Code Analysis__ |[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/harens/checkdigit?logo=code%20climate&style=flat-square)](https://codeclimate.com/github/harens/checkdigit) [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/harens/checkdigit?logo=codefactor&style=flat-square)](https://www.codefactor.io/repository/github/harens/checkdigit)|\n\n## 🔨 Installation\n```shell\npip install checkdigit\n```\nOr download the project [here](https://github.com/harens/checkdigit/archive/master.zip)\n\n## ✨ Features\n\n* Contains various functions relating to __Luhn, ISBN and UPC codes__\n* Extensive __in-code comments and docstrings__ to explain how the functions work\n* Written in __pure Python__ with __no dependencies__ required to run the program\n\nCheck out the [wiki](https://github.com/harens/checkdigit/wiki) for more details on how to use the library\n\n## License\nThis project is licensed under the [GNU General Public License v3.0](https://github.com/harens/checkdigit/blob/master/LICENSE)\n',
'long_description': '# checkdigit\n\nA check digit library for data validation\n \n| Test Status | [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/harens/checkdigit/Tests?logo=github&style=flat-square)](https://github.com/harens/checkdigit/actions) [![Codecov](https://img.shields.io/codecov/c/github/harens/checkdigit?style=flat-square)](https://codecov.io/gh/harens/checkdigit) |\n|:--|:--|\n| __Version Info__ | [![PyPI](https://img.shields.io/pypi/v/checkdigit?logo=pypi&logoColor=white&style=flat-square)](https://pypi.org/project/checkdigit/) [![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/harens/checkdigit?logo=github&style=flat-square)](https://github.com/harens/checkdigit/releases) [![PyPI - Downloads](https://img.shields.io/pypi/dm/checkdigit?logo=python&logoColor=white&style=flat-square)](https://pypi.org/project/checkdigit/) |\n| __Code Analysis__ |[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/harens/checkdigit?logo=code%20climate&style=flat-square)](https://codeclimate.com/github/harens/checkdigit) [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/harens/checkdigit?logo=codefactor&style=flat-square)](https://www.codefactor.io/repository/github/harens/checkdigit)|\n\n## 🔨 Installation\n```shell\npip install checkdigit\n```\nOr download the project [here](https://github.com/harens/checkdigit/archive/master.zip)\n\n## ✨ Features\n\n* Contains various functions relating to __Luhn, ISBN and UPC codes__\n* Extensive __in-code comments and docstrings__ to explain how the functions work\n* Written in __pure Python__ with __no dependencies__ required to run the program\n\nCheck out the [documentation](https://github.com/harens/checkdigit/wiki) for more details on how to use the library\n\n## License\nThis project is licensed under the [GNU General Public License v3.0](https://github.com/harens/checkdigit/blob/master/LICENSE)\n',
'author': 'harens',

@@ -17,0 +17,0 @@ 'author_email': 'harensdeveloper@gmail.com',