Git Product home page Git Product logo

tufan-datauri's Introduction

@tufan/datauri

action-ci

OS independent way to convert file contents to a datauri. Used to convert icon files to datauris that can be embedded within metadata specifications.

Usage

# set registry config
npm config set @tufan-io:registry https://npm.pkg.github.com/tufan-io

# install the package
npm install @tufan-io/datauri

API

/**
 *  Returns a platform agnostic datauri, from a filename.
 *  Converts file contents to `lf` (unix) encoding before computing the data-uri.
 *  This makes our dataUri independent of file-encoding configuration on disk.
 *  Synchronous, so it can be used on import of metadata.
 */
dataUri(fpath: string): string

Development Tooling

License

Apache-2.0

Code of Conduct

This project is released with a Contributor Code of Conduct. By participating, you agree to abide by its terms.

Support

Bugs, PRs, comments, suggestions welcomed!

tufan-datauri's People

Contributors

sramam avatar dependabot[bot] avatar bananalabs avatar

Watchers

 avatar James Cloos avatar Subu Gupta avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.