npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@septkit/sclsdk

v0.0.23

Published

SDK for SCL

Readme

SCL SDK

A TypeScript SDK for working with SCL (Substation Configuration Language) files based on IEC 61850 standards. This package provides a type-safe, fluent API for creating, reading, updating, and managing SCL document structures with integrated IndexedDB storage.

Features

  • Type-Safe API: Full TypeScript support with intelligent type narrowing based on element context
  • Fluent Builder Pattern: Chain operations to build complex SCL structures intuitively
  • Version Support: Built-in support for multiple IEC 61850 versions (e.g., v2019C1)
  • IndexedDB Integration: Client-side persistence with Dexie.js for browser-based applications
  • Lazy Evaluation: Operations are staged and only executed when explicitly committed
  • Snapshot & Observable: Get snapshots of pending changes or observe live database updates
  • Standards Compliance: Follows IEC 61850 SCL schema definitions and element relationships

Installation

pnpm add @septkit/sclsdk

Example of usage

const sdkInstance = sdk({ databaseName: 'scl-sdk-database', version: 'v2019C1' })

const api = sdkInstance.api
const database = sdkInstance.database
const standard = sdkInstance.standard

// Build a chain without executing - returns a builder
const builder = api
	.fromRoot()
	.addChild({
		tagName: 'IED',
		attributes: {
			type: 'some-type',
			name: 'some-name',
		},
		setFocus: true,
	})
	.addChild({
		tagName: 'AccessPoint',
		attributes: { name: 'AP1' },
	})
	.addChild({ tagName: 'Labels', attributes: { desc: '' } })

// Execute certain commands
const snapshot = await builder.getSnapshot()
const context = await builder.getContext()

// continue building
const builder2 = builder.addChild({
	tagName: 'Private',
	attributes: { type: 'some-type', source: 'some-source' },
})

// commit
await builder2.commit()

// One can also do this :

sdk({ databaseName: 'scl-sdk-database', version: 'v2019C1' })
	.api.fromElement({ tagName: 'LDevice', id: 'some-id' })
	.goToParent()
	.goToParent()
	.addChild({ tagName: 'Server', attributes: {} })
	.commit()

// Or this :

const allLDevicesObservable = await api.getObservable({ tagName: 'LDevice' })

// Or also that :

const substationElement = api.fromElement({ tagName: 'Substation', id: 'some-id' })
const substationChildren = await substationElement.getChildren({ depth: 2 })