All Projects β†’ hhsnopek β†’ code-frame

hhsnopek / code-frame

Licence: MIT license
Minimal Code Frame like babel-code-frame, but smaller

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to code-frame

weak-merge
πŸ”— A module for merging WeakSets and WeakMaps.
Stars: ✭ 20 (-9.09%)
Mutual labels:  npm-package
node.js-chatbot
Zoom Node.js Chatbot Library
Stars: ✭ 19 (-13.64%)
Mutual labels:  npm-package
UniRate
Unity plugin to easily manage the application frame rate and rendering interval. Preventing battery power consumption and device heat, especially on mobile platforms.
Stars: ✭ 26 (+18.18%)
Mutual labels:  frame
js-id-number
JavaScript ID Number Toolkit | A collection of identification number validators with uniform interfaces for JavaScript.
Stars: ✭ 22 (+0%)
Mutual labels:  npm-package
impression
πŸ‘€Element view notifier
Stars: ✭ 77 (+250%)
Mutual labels:  npm-package
flamingo
FreeCAD - flamingo workbench
Stars: ✭ 30 (+36.36%)
Mutual labels:  frame
Leon
Leon is swift library to show and slid images with more gesture
Stars: ✭ 16 (-27.27%)
Mutual labels:  frame
reisen
A simple library to extract video and audio frames from media containers (based on libav).
Stars: ✭ 41 (+86.36%)
Mutual labels:  frame
ionic-image-upload
Ionic Plugin for Uploading Images to Amazon S3
Stars: ✭ 26 (+18.18%)
Mutual labels:  npm-package
check-disk-space
Light multi-platform disk space checker without third-party for Node.js
Stars: ✭ 55 (+150%)
Mutual labels:  npm-package
img2gcode
convert jpg, png,gif to gcode with nodejs and jimp
Stars: ✭ 31 (+40.91%)
Mutual labels:  npm-package
InstaSmart
A Flutter app to plan and beautify your Instagram feed
Stars: ✭ 18 (-18.18%)
Mutual labels:  frame
docker-google-lighthouse-puppeteer
Google Lighthouse + Puppeteer / Docker Image
Stars: ✭ 29 (+31.82%)
Mutual labels:  npm-package
ngx-deploy-npm
Publish your libraries to NPM with just one command
Stars: ✭ 70 (+218.18%)
Mutual labels:  npm-package
hapi-sentry
A hapi plugin for request error logging to Sentry
Stars: ✭ 24 (+9.09%)
Mutual labels:  npm-package
react-windows-ui
Build Windows fluent UI apps using ReactJS. Provides a set of accessible, reusable, and composable React components that make it super easy to create websites and apps.
Stars: ✭ 383 (+1640.91%)
Mutual labels:  npm-package
react-native-multi-toggle-switch
MultiToggle Switch for React-Native
Stars: ✭ 17 (-22.73%)
Mutual labels:  npm-package
iconic-input
Beautiful Input components for React Native... <IconicTextbox/> and much more!
Stars: ✭ 22 (+0%)
Mutual labels:  npm-package
mdi-cli
Generate material design icons from the command line
Stars: ✭ 68 (+209.09%)
Mutual labels:  npm-package
e
A library which combines a eventBus/emitter, DOM events management, delegated events, and event-based utils into a single lightweight and performant library.
Stars: ✭ 37 (+68.18%)
Mutual labels:  npm-package

Code Frame npm tests coverage Greenkeeper badge

Minimal Code Frame like babel-code-frame, but smaller

Install

npm install --save code-frame

Usage

const framer = require('code-frame')

// framer('...', OffendingLine, OffendingColumn, {
//   frameSize: 3,
//   tabSize: 2
// })

// Opts:
//   'frameSize': (default: 3)
//       This is calcuation is Line - Surrounding.
//       If you provide, 3, it will capture a total of two surrounding lines.
//           2 | function (foo) {
//         > 3 |   console.log(foo
//             |                  ^
//
//       The frame is formed from bottom to top. ex: 4 = ((3 - 1) / 2) gives us 1
//       line on top and bottom. If you provide an even number, 4, you'd result in
//       2 lines above and one below.
//           2 | var bar = function (foo) {
//         > 3 |   console.log(foo
//             |                  ^
//           4 |   foo = foo ? foo : 'baz'
//
//       Inorder to get the opposite result you'd inverse the frameSize, -4
//           1 | // function bar
//           2 | var bar = function (foo) {
//         > 3 |   console.log(foo
//             |                  ^
//
//       Caveats:
//         frame cuts off if the wrapping lines hit EOF/Start of File. If the
//         frameSize is 3 and the error is on line 1:
//           > 1 | 'use strict;
//               |            ^
//
//   'tabSize': (default: 2)
//     If mixed tabs are found on anylines while constructing the frame, we
//     convert them over to spaces. You may define a positive integer.

License

MIT Β© Henry Snopek

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].