Comparing version 1.0.0 to 1.0.1
@@ -8,2 +8,11 @@ `master` | ||
`1.0.1` | ||
=== | ||
## Other changes | ||
- Fixed README to have correct examples. | ||
-------------------------------------------------------------------------------- | ||
`1.0.0` | ||
@@ -10,0 +19,0 @@ === |
{ | ||
"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 | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15529
0