abstract-numbering
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "abstract-numbering", | ||
"description": "validate abstract numberings of hierarchical document parts", | ||
"version": "1.0.0", | ||
"description": "JSON schema for abstract numberings of hierarchical document parts", | ||
"version": "2.0.0", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)", | ||
"dependencies": { | ||
"is-integer": "^1.0.4", | ||
"isobject": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"defence-cli": "^1.0.5", | ||
"replace-require-self": "^1.1.0" | ||
"replace-require-self": "^1.1.0", | ||
"tv4": "^1.2.7" | ||
}, | ||
@@ -14,0 +11,0 @@ "keywords": [ |
@@ -18,11 +18,13 @@ Validate abstract numberings of hierarchical document parts. | ||
```javascript | ||
var validNumbering = require('abstract-numbering'); | ||
var schema = require('abstract-numbering') | ||
var tv4 = require('tv4') | ||
var assert = require('assert') | ||
assert( | ||
validNumbering( | ||
tv4.validate( | ||
[ { // More on series later. | ||
series: { number: 1, of: 1 }, | ||
// "Element number 1 of 2" | ||
element: { number: 1, of: 2 } } ])) | ||
element: { number: 1, of: 2 } } ], | ||
schema)) | ||
``` | ||
@@ -34,6 +36,6 @@ | ||
assert( | ||
!validNumbering( | ||
!tv4.validate( | ||
[ { series: { number: 1, of: 1 }, | ||
// 0, not 1. | ||
element: { number: 0, of: 1 } } ])) | ||
element: { number: 0, of: 1 } } ], | ||
schema)) | ||
``` | ||
@@ -62,3 +64,3 @@ | ||
assert( | ||
validNumbering( | ||
tv4.validate( | ||
[ // The component for "First Major Heading" | ||
@@ -73,3 +75,4 @@ { // Numbering of headings does not restart, so there is one series. | ||
// There are three total elements, of which "Tigers" is second. | ||
element: { number: 2, of: 3 } } ])) | ||
element: { number: 2, of: 3 } } ], | ||
schema)) | ||
``` |
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
0
75
14810
3
21
- Removedis-integer@^1.0.4
- Removedisobject@^1.0.0
- Removedis-finite@1.1.0(transitive)
- Removedis-integer@1.0.7(transitive)
- Removedisobject@1.0.2(transitive)