Catalog npm
Back to packageRELEASE DETAILS

1.0.2

npm

5no-paper-sizes

Tool for get the paper dimensions

converterinchestopixelsiso-216iso-269millimeterstopixelspaperpixelspointstopixelssize
Published4 Feb 2020
Direct dependencies12
Transitive dependenciesNot calculated

README

Current package documentation

5no LogoPaper Sizes

Tool for get the paper dimensions in millimetres, inches, points, pixels

The dimensions of the A, B series paper sizes are defined by the ISO 216 international paper size standard The dimensions of the C series sizes are defined by the ISO 269 paper size standard

Install

@5no/paper-sizes requires Node version 8 or a bove.

npm install --save @5no/paper-sizes

Doc


let options = { 
    dpi: 300, // Dots Per Inch - by default 300
    type: 'mm', // type of measurement 'mm' | 'in' | 'pt' | 'px'
    width: 0, // custom width
    height: 0 // custom height
}

type isoCode = string | null // if you want to make the manual resolution this parameter will be pass null

let data = PaperSizes(isoCode, options)


// convert the width measurement to Millimeters, Inches, Points, Pixels
data.widthToMillimeters() 
data.widthToInches()
data.widthToPoints()
data.widthToPixels()


// convert the height measurement to Millimeters, Inches, Points, Pixels
data.heightToMillimeters()
data.heightToInches()
data.heightToPoints()
data.heightToPixels()


Examples

const PaperSizes = require('5no-paper-sizes')

let data = PaperSizes('A4')

console.log(data.widthToMillimeters(), data.heightToMillimeters())

//210, 297

let one = PaperSizes(null, {
    dpi: 300,
    type: 'px',
    width: 2480,
    height: 3508,
})

console.log(data.widthToMillimeters(), data.heightToMillimeters())

//210, 297

License

MIT Licensed, Copyright (c) 2019 Aleksandr Sokol

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 12

Native requirements
12 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^12.0.0development
@typescript-eslint/eslint-plugin
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin",
  "alias": false,
  "peer_metadata": null
}
^1.11.0development
@typescript-eslint/parser
Environment
{
  "local_name": "@typescript-eslint/parser",
  "alias": false,
  "peer_metadata": null
}
^1.11.0development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.2.0development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^6.0.1development
eslint-config-standard
Environment
{
  "local_name": "eslint-config-standard",
  "alias": false,
  "peer_metadata": null
}
^11.0.0development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
^2.8.0development
eslint-plugin-node
Environment
{
  "local_name": "eslint-plugin-node",
  "alias": false,
  "peer_metadata": null
}
^7.0.1development
eslint-plugin-promise
Environment
{
  "local_name": "eslint-plugin-promise",
  "alias": false,
  "peer_metadata": null
}
^4.0.0development
eslint-plugin-standard
Environment
{
  "local_name": "eslint-plugin-standard",
  "alias": false,
  "peer_metadata": null
}
^4.0.0development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^5.2.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^3.5.3development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-GhnjKVFJ7nJojZCl4Z3xxhRKj9xo7viqhjHh5d4Xak8YVvKPxSYXlYaFBWfgq3vpQadxyfBRqKw1GHv4rIDFrg==",
  "shasum": "47243038bfb4a52bb9368bfbc511ec75538ddac6",
  "tarball": "https://registry.npmjs.org/5no-paper-sizes/-/5no-paper-sizes-1.0.2.tgz",
  "fileCount": 22,
  "unpackedSize": 33173,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOSHrCRA9TVsSAnZWagAAksQP/3rN1d8JM1bD/PeAXEAg\nI2p0rM2QxId0SRtmiWivsWPHHPsKHS8Ch2qmae4GQ8Cn1XYOBlMtnSWCS3yP\nhT+rpHe328arno9/nnb1gHRinffYuE8OYxztju8wP/MC1e940E7kWwzedLtV\nVJMXmsAFo2uc3+e1cytBbc0ydtNqlI9zkL9tlarzAxUeqaIakhTgC1THLkou\nYt4GPwb1TulYjZa25Y6TdBxMOnzBAt5jTYF63fJ+EiSMjmTteqeaQStfoNv0\nbZnNv3kndNpefFRHAi0qeS6Wd1LbLwDyNGZ4cxp0UWMsMFzKDdfHGEyXSaa7\nynk19xPXSwSqo+y8M6JwcgH68pbjFYNIWIFSS+CLtDi8C/UAz+0ab2AfMqkJ\nTmqYfhHC7Z9lAD1xeX+vnOh7vFURT/W5GO53a1N4yI9rxj6pEj0LwBi/jiPA\n+orRy9Hz41IIBF+Mzp635LVHCSrVx/QJPPpr5xWwjEZpYm1CTUk3XLuTk9qr\nsVT6VCaomVma8eKLzm5puB0hQhYVHJvDn52cLjrHnit3H2foHUfsPmf985QX\nH36AHlKDVgMEQSty2tSNp6itUWTK5GnhZ/IhNsnj3IzBFJTzCg9SylbcJZG7\nLoBEcAAz9zliZEy2I1B4zZamUyklS2A7L/8djGVly2Za/q6xZ+oTz3MbPaH1\nEip+\r\n=/l3Y\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIBQOP3gK1mkl8zPgnIYYTxhXYwmtZqlqbWFYypnukxoxAiEAh4aETnMu+m1GGernJtf7PRYW+/r1iHaI78H4xl8pAno="
    }
  ]
}

Repository

PENDING
reb2020/5no-paper-sizes

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:f073b751f04f8bdd708cf79652c1ff1d0c91bb67e8baae81f48426785421aa4a

Other collected versions

1.0.129 Aug1.0.019 JulView all collected versions →