Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@nordicsemiconductor/lwm2m-types

Package Overview
Dependencies
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nordicsemiconductor/lwm2m-types

TypeScript type definitions and JSON schema for the objects defined in the LwM2M Object Registry.

latest
Source
npmnpm
Version
2.7.0
Version published
Maintainers
7
Created
Source

LwM2M TypeScript type definitions and JSON schema npm version

Test and Release semantic-release Renovate Mergify Status Commitizen friendly code style: prettier ESLint: TypeScript

TypeScript type definitions and JSON schema for the objects defined in the LwM2M Object Registry.

This is useful if you need to validate a JSON representation of those objects.

Installation

npm ci
// Clone LwM2M object registry
git clone https://github.com/OpenMobileAlliance/lwm2m-registry.git --depth 1
npm test

Usage

See example.ts

JSON document structure

LwM2M values are encoded as a JSON document, where the key is an extended version of the LwM2M URN: <ObjectID>:<ObjectVersion>@<LwM2MVersion> (where ObjectVersion and/or LwM2MVersion can be omitted if it is 1.0).

Example

Building the types

git clone https://github.com/OpenMobileAlliance/lwm2m-registry.git --depth 1
npx tsx cli/generate-types.ts
npx tsx cli/generate-json-schema.ts
# Format the source
npx prettier --write ./
# Make sure result compiles
npx tsc
# Compile JS exports
npx swc -d types-dist ./types
# Make sure example runs
npx tsx ./example.ts

Keywords

nrf-asset-tracker

FAQs

Package last updated on 31 Oct 2023

Did you know?

Socket

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.

Install

Related posts