All Projects → agilgur5 → trim-canvas

agilgur5 / trim-canvas

Licence: other
A tiny (< 100 LoC) library for trimming whitespace from a canvas element with no dependencies

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to trim-canvas

react-signature-canvas
A React wrapper component around signature_pad (in < 150 LoC). Unopinionated and heavily updated fork of react-signature-pad
Stars: ✭ 420 (+775%)
Mutual labels:  signature, trim, whitespace
characteristics
Character info under different encodings
Stars: ✭ 25 (-47.92%)
Mutual labels:  whitespace
signature
HMAC and RSA signature for Laravel and Lumen
Stars: ✭ 26 (-45.83%)
Mutual labels:  signature
object.omit
Return a copy of an object without the given keys.
Stars: ✭ 79 (+64.58%)
Mutual labels:  remove
SSL-TLS-ECDSA-timing-attack
Timing Attack on TLS' ECDSA signature
Stars: ✭ 41 (-14.58%)
Mutual labels:  signature
wascap
Embed, extract, and validate capability claims in JWTs for WebAssembly modules
Stars: ✭ 59 (+22.92%)
Mutual labels:  signature
remove
A Metalsmith plugin to remove files from the build
Stars: ✭ 19 (-60.42%)
Mutual labels:  remove
fortify
Fortify enables web applications to use smart cards, local certificate stores and do certificate enrollment. This is the desktop application repository.
Stars: ✭ 88 (+83.33%)
Mutual labels:  signature
jwt-core
[READ-ONLY] Core component of the JWT Framework
Stars: ✭ 46 (-4.17%)
Mutual labels:  signature
orchestrate-node
This Orchestrate library provides convenient access to the Orchestrate API from applications written in server-side NodeJS
Stars: ✭ 19 (-60.42%)
Mutual labels:  signature
larsign
Laravel signature certification with web API server.
Stars: ✭ 18 (-62.5%)
Mutual labels:  signature
remove-files-webpack-plugin
A plugin for webpack that removes files and folders before and after compilation.
Stars: ✭ 48 (+0%)
Mutual labels:  remove
mini-smooth-signature
小程序版带笔锋手写签名,支持微信/支付宝/钉钉/QQ小程序
Stars: ✭ 85 (+77.08%)
Mutual labels:  signature
open-attestation
Meta framework for providing digital provenance and integrity to documents.
Stars: ✭ 39 (-18.75%)
Mutual labels:  signature
rmfr
Node.js implementation of rm -fr – recursive removal of files and directories
Stars: ✭ 23 (-52.08%)
Mutual labels:  remove
leptin
🔗 Leptin is a PoW blockchain completely built in Nodejs.
Stars: ✭ 57 (+18.75%)
Mutual labels:  signature
git-secure-tag
Secure git tag signing
Stars: ✭ 44 (-8.33%)
Mutual labels:  signature
binance-signature-examples
Examples of generating HMAC and RSA signature for Binance API
Stars: ✭ 170 (+254.17%)
Mutual labels:  signature
String.prototype.trim
ES5 spec-compliant shim for String.prototype.trim
Stars: ✭ 13 (-72.92%)
Mutual labels:  trim
emoji-strip
Strip emoji from a string in Node.js and browsers.
Stars: ✭ 73 (+52.08%)
Mutual labels:  remove

trim-canvas

package-json releases commits
dt dy dm dw
build status code coverage
NPM

A tiny (< 100 LoC) library for trimming whitespace from a canvas element with no dependencies.

Installation

npm i -S trim-canvas

Usage

import trimCanvas from 'trim-canvas'

const canvas = document.createElement('canvas')

// do some drawing on it ...

trimCanvas(canvas)
// now the whitespace has been trimmed

If you don't want to mess with your existing canvas, then simply clone the canvas element beforehand.

trim-canvas returns the canvas element for easy chaining.

Example

Can see how trim-canvas is used inside of react-signature-canvas here. It includes a step for cloning the canvas.

Demo

You can see a demo of trim-canvas here.

(N.B. this is the demo for react-signature-canvas which depends on trim-canvas)

Credits

Credits go to @efc for writing a quick version of this in this issue and to the original StackOverflow Answer that was credited in that issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].