Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bakujs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bakujs

String format and dom access

  • 0.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

BakuJS

Formatter

Some small functions by adding on the prototype of the base objects. The idea is for the formatter is to approach the formatting possibilities of fmt:message in JSTL.

Examples :

'Il y a {0, number, #,##0:fr} jour{0, choice,1<=|1>s}'._format(1200);                 // 'Il y a 1 200 jours'
'Il y a {jours, number, #,##0:fr} jour{jours, choice,1<=|1>s}'._format({jours : 1});  // 'Il y a 1 jour'
'Rendez-vous le {date, date, dd/MM/yyyy}'._format({date : '2016-04-10'});             // 'Rendez-vous le 10/04/2016'
'Le resultat est {0, choice, 10<{1}|10>={2}}.'._format([12, 'petit', 'grand']);       // 'Le resultat est grand.'

DOM

Some shortcuts to avoid using a big library to do simple operations on the DOM with selectors.

Examples

baku.dom.list('h2 + div')
    ._css({'color' : 'red', 'text-decoration' : 'underline'})
    ._rmClass('ko');

Compilation

# dom + formatter
compress.sh full
# dom only
compress.sh dom
# formatter only
compress.sh

Test

See the test page: http://test.ikilote.net/BakuJS/test.html

If you propose a correction or additional content, thank you to make all the tests are always ok, and/or add new.

FAQs

Package last updated on 09 Feb 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc