Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gtin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gtin - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

CHANGELOG.md

@@ -8,2 +8,11 @@ `master`

`1.0.1`
===
## Other changes
- Fixed README to have correct examples.
--------------------------------------------------------------------------------
`1.0.0`

@@ -10,0 +19,0 @@ ===

2

package.json
{
"name": "gtin",
"version": "1.0.0",
"version": "1.0.1",
"description": "GTIN (UPC, EAN, ITF, etc.) utilities.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -23,4 +23,4 @@ gtin

* [gtin.getRealFormat(barcode)](#user-content-gtin-getRealFormat)
* [gtin.upce.compress(barcode)](#user-content-gtin-upce-compress)
* [gtin.upce.expand(barcode)](#user-content-gtin-upce-expand)
* [gtin.upcE.compress(barcode)](#user-content-gtin-upcE-compress)
* [gtin.upcE.expand(barcode)](#user-content-gtin-upcE-expand)

@@ -55,3 +55,3 @@ ---

To validate a UPC-E barcode, expand it first: `isValid(upce.expand('01278906'))`
To validate a UPC-E barcode, expand it first: `isValid(upcE.expand('01278906'))`

@@ -126,4 +126,4 @@ ```js

<a id='gtin-upce-compress'></a>
`gtin.upce.compress(barcode)`
<a id='gtin-upcE-compress'></a>
`gtin.upcE.compress(barcode)`
---

@@ -139,16 +139,16 @@

```js
import { upce } from 'gtin'
import { upcE } from 'gtin'
upce.compress('1200000789') // '01278907'
upce.compress('12000007897') // '01278907'
upce.compress('012000007897') // '01278907'
upce.compress('012000007896') // '01278906'
upce.compress('012345678905') // null
upce.compress(123) // Error thrown
upce.compress('123') // Error thrown
upce.compress('abc') // Error thrown
upcE.compress('1200000789') // '01278907'
upcE.compress('12000007897') // '01278907'
upcE.compress('012000007897') // '01278907'
upcE.compress('012000007896') // '01278906'
upcE.compress('012345678905') // null
upcE.compress(123) // Error thrown
upcE.compress('123') // Error thrown
upcE.compress('abc') // Error thrown
```
<a id='gtin-upce-expand'></a>
`gtin.upce.expand(barcode)`
<a id='gtin-upcE-expand'></a>
`gtin.upcE.expand(barcode)`
---

@@ -164,12 +164,12 @@

```js
import { upce } from 'gtin'
import { upcE } from 'gtin'
upce.expand('127890') // '012000007897'
upce.expand('1278907') // '012000007897'
upce.expand('01278907') // '012000007897'
upce.expand('01278906') // '012000007896'
upce.expand('123412341') // Error thrown
upce.expand(123) // Error thrown
upce.expand('123') // Error thrown
upce.expand('abc') // Error thrown
upcE.expand('127890') // '012000007897'
upcE.expand('1278907') // '012000007897'
upcE.expand('01278907') // '012000007897'
upcE.expand('01278906') // '012000007896'
upcE.expand('123412341') // Error thrown
upcE.expand(123) // Error thrown
upcE.expand('123') // Error thrown
upcE.expand('abc') // Error thrown
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc