Socket
Socket
Sign inDemoInstall

excel-formula-tokenizer

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    excel-formula-tokenizer

Tokenize Excel formulas


Version published
Weekly downloads
6.2K
increased by8.02%
Maintainers
1
Install size
44.0 kB
Created
Weekly downloads
 

Changelog

Source

[3.0.0] - 2022-01-04

Thanks to @jlaramie for all these changes.

Breaking

  • Changes to array output. See test/arrays-test.js.

Added

  • Definition for a generic en-EU language.
  • options.preserveLanguage to keep language-specific delimiters as well as TRUE/FALSE values
  • options.asClass - To return Tokens instance instead of Tokens[].
  • Improved compatibility with other libraries

Fixed

  • #6 - Quotes around named ranges with spaces are not preserved
  • #8 - Vertical range separator always being , instead of ; in the tokens

Readme

Source

excel-formula-tokenizer

Tokenize Excel formulas.

This is E. W. Bachtal's excel formula tokenizer from http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html

Install

npm install excel-formula-tokenizer -S

or

yarn add excel-formula-tokenizer

Usage

const {tokenize} = require('excel-formula-tokenizer');

const tokens = tokenize('SUM(1, 2)');

tokens.forEach({value, type, subtype} => {
  console.log(`value:   ${value}`);
  console.log(`type:    ${type}`);
  console.log(`subtype: ${subtype}`);
  console.log();
});

API

tokenize(formula, options)
  • formula - string, excel formula
  • options - optional object
    • options.language - en-US, de-DE, en-EU

License

MIT

Keywords

FAQs

Last updated on 05 Jan 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc