New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nuskin/bynder-dat

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuskin/bynder-dat

This library hosts a collection of wrapper functions for bynder's DAT API.

1.0.0-initial-commit.1
npm
Version published
Weekly downloads
1
-66.67%
Maintainers
5
Weekly downloads
 
Created
Source

@nuskin/bynder-dat

This library hosts a collection of wrapper functions for bynder's DAT API. The library also builds in both cjs and esm formats. ESM for better treeshaking support. CJS for node/backend apps.

Installing

Usng npm:

npm add @nuskin/bynder-dat

Usng yarn:

yarn add @nuskin/bynder-dat

Example usage

CommonJS

const { useFormat, transformFill } = require('@nuskin/bynder-dat');

// apply format
const url = useFormat('http://foo.baz.bar', 'webp');
console.log(url); // http://foo.baz.bar?format=webp

// transform
const url = transformFill('http://foo.baz.bar', { height: 100, width: 100 });
console.log(url); // http://foo.baz.bar?io=transform:fill,height:100,width:100;

// combination
const url = transformFill(useFormat('http://foo.baz.bar', 'webp'), { height: 100, width: 100 });
console.log(url); // http://foo.baz.bar?format=webp&io=transform:fill,height:100,width:100;

// inter-changeable
const url = useFormat(transformFill('http://foo.baz.bar', { height: 100, width: 100 }), 'webp');
console.log(url); // http://foo.baz.bar?io=transform:fill,height:100,width:100&format=webp;

ESM

import { useFormat, transformFill } from '@nuskin/bynder-dat';
// The same examples above can be performed.

Resources

  • Bynder DAT Doc

License

MIT

Keywords

bynder

FAQs

Package last updated on 15 Feb 2024

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