cpe-fs
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

cpe-fs

Parses and generates Common Platform Enumeration Identifiers

Supports only formatted strings from Common Platform Enumeration: Naming Specification Version 2.3

Does not use WFN as internal value representation.

install

npm install cpe-fs

usage

generate a CPE from attributes

import { Cpe } from 'cpe-fs'

new Cpe({
  vendor: 'microsoft',
  product: 'internet explorer',
  version: '8.0.6001',
  update: 'beta'
}).toString()
//> 'cpe:2.3:a:microsoft:internet_explorer:8.0.6001:beta:*:*:*:*:*:*'

parse CPE

import { Cpe } from 'cpe-fs'

const cpe = new Cpe().parse('cpe:2.3:a:foo\\\\bar:big\\$money_2010:*:*:*:*:special:ipod_touch:80gb:*')
{
  part: 'a',
  vendor: 'foo\\bar',
  product: 'big$money 2010',
  version: '*',
  update: '*',
  edition: '*',
  language: '*',
  swEdition: 'special',
  targetSw: 'ipod touch',
  targetHw: '80gb',
  other: '*'
}

license

MIT Licensed

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i cpe-fs

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.09 kB

    Total Files

    5

    Last publish

    Collaborators

    • spurreiter