Giter Site home page Giter Site logo

vscode-equality's Introduction

equality README

This plugin use eval(), custom functions, methods and external libraries to evaluate and replace javascript content

You can use multiples cursors

multiple-cursor

You can calculate

=2+2 //Press Ctrl + Enter

calculate

You can create personal vars

Add equality.vars in your users settings

"equality.vars": {
    "name": "Javier Artero",
    "company": "MarsBased SL",
    "github": "https://github.com/javierartero"
}

Reload window

When you call a =e you will be calling equality.vars

=e.plugin //Press Ctrol + Enter

vars

Help

Now the plugin has a help system that will appear when it is not able to evaluate the content

You can open all the help elements from the method

=help

Help

You can use the chroma.js

chroma.js is a tiny JavaScript library (14kB) for dealing with colors!

  • read colors from a wide range of formats
  • analyze and manipulate colors
  • convert colors into wide range of formats
  • linear and bezier interpolation in different color spaces

chroma.js

You can use the lodash.js

Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc. Lodash’s modular methods are great for:

  • Iterating arrays, objects, & strings
  • Manipulating & testing values
  • Creating composite functions

lodash.js

You can use the "faker.js"

faker.js is an external library generate massive amounts of fake

=faker.name.findName() //Press Ctrol + Enter

Faker

Custom functions and methods

rand(min:number = 0, max:number = 100)

rand

Default arguments min:number = 0, max:number = 100

=rand(-100,100)

rgb(r:number, g:number, b:number)

color

hex(hex:string)

This method allows the use of shorthand '# ff0'

color

Put an equality in your life...

vscode-equality's People

Contributors

javierartero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

danigb migzone

vscode-equality's Issues

rand() doesn't generate zero

When I enter rand(-2, 2) multiple times with multi-cursor and hit Ctrl+Enter, something like this shows up:

1
2
=rand(-2, 2)
1
=rand(-2, 2)
1
2
2
-2

I tried it several times and I found out that no zero was generated. I assume that those rands, that don't convert into numbers are exactly those which should be zeros, but they don't get converted for some reason.

Add conversion of cooking measurements

The majority of cooking recipes on the internet, on books and magazines use inexact, non standard measurement units (cups, teaspoons, tablespoons) or outdated imperial or British units of measurement.

Converting them by hand, one by one, is cumbersome and prone to errors.

Any automatic methods of conversion that exist require specific software and are limited to do generic conversions based on the equivalence of volume to volume. None take into account the density of the ingredient.

How is this appropriate for a text editor?

A text editor is most accessible and easiest way to enter information and is freely available at no cost.

How is this appropriate for your plugin?

Your plugin seems capable of doing what I have in mind. It already does math operations.

How would it work?

The user selects text following the structure, 1 cup of flour, selects convert to grams, the plugin would then read the equivalents from a file and convert to the correct value.

1 cup of flour would be converted into 130 g of flour
3 cups of flour would be converted into 390 g of flour

The file containing the equivalents would be provided by the user and follow the scheme
of one conversion per line:

1 cup of flour == 130 g

PS
I don't have any background in programming and perhaps none of I have written makes sense. Please, even if this is not appropriate for this plugin, could you consider making one that does this.

Thank you.

Can't generate collections

=Array(100).map(i => ({code: faker.address.countryCode(), country: faker.address.country() }))

Results in :

image

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.