🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@design-sync/w3c-dtfm

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@design-sync/w3c-dtfm

Design tokens module format (DTFM) utils and types

0.7.0
Source
npm
Version published
Weekly downloads
43
Maintainers
1
Weekly downloads
 
Created
Source

@design-sync/w3c-dtfm

npm version npm downloads

Design tokens module format (DTFM) utils and types

Usage

Install package:

# npm
npm install @design-sync/w3c-dtfm

# yarn
yarn add @design-sync/w3c-dtfm

# pnpm
pnpm install @design-sync/w3c-dtfm

# bun
bun install @design-sync/w3c-dtfm

Import:

import { TokensWalker } from "@design-sync/w3c-dtfm";

const tokens = {
  "color": {
    "primary": {
      "$value": "#000000",
      "$type": "color"
    }
  }
  ... // rest of tokens
};
const walker = new TokensWalker(tokens);

walker.walk((token) => {
  // do something with token
  console.log(token);
});

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

FAQs

Package last updated on 28 Nov 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