
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
pnnl-buildingid
Advanced tools
Website: https://buildingid.pnnl.gov/
To complete this guide, npm is required.
Install the pnnl-buildingid
package:
npm install pnnl-buildingid
Use npm to uninstall the pnnl-buildingid
package.
npm uninstall pnnl-buildingid
The pnnl-buildingid
package supports one usage:
UBID codecs are encapsulated in separate modules:
UniqueBuildingIdentification.v3
(format: "C-n-e-s-w")Modules export the same API:
decode(string) ~> UniqueBuildingIdentification.CodeArea
encode(number, number, number, number, number, number, number) ~> string
encodeCodeArea(UniqueBuildingIdentification.CodeArea) ~> string
isValid(string) ~> boolean
In the following example, a UBID code is decoded and then re-encoded:
// Use the "C-n-e-s-w" format for UBID codes.
const UniqueBuildingIdentification = require('pnnl-buildingid');
// Initialize UBID code.
const code = '849VQJH6+95J-51-58-42-50';
console.log(code);
// Decode the UBID code.
const codeArea = UniqueBuildingIdentification.v3.decode(code);
console.log(codeArea);
// Resize the resulting UBID code area.
//
// The effect of this operation is that the height and width of the UBID code
// area are reduced by half an OLC code area.
const newCodeArea = codeArea.resize();
console.log(newCodeArea);
// Encode the new UBID code area.
const newCode = UniqueBuildingIdentification.v3.encodeCodeArea(newCodeArea);
console.log(newCode);
// Test that the new UBID code matches the original.
console.log(code === newCode);
The package is available as open source under the terms of The 2-Clause BSD License.
Contributions are accepted on GitHub via the fork and pull request workflow. See here for more information.
FAQs
Unique Building Identification (UBID) for JavaScript
The npm package pnnl-buildingid receives a total of 545 weekly downloads. As such, pnnl-buildingid popularity was classified as not popular.
We found that pnnl-buildingid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.