shochu
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

Shochu is the Javascript utility library implementing Cocktails

Installation

 npm i shochu

Usage

-> browser

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <!-- add this line -->
    <script src="https://cdn.jsdelivr.net/npm/shochu/dist/shochu.min.js"></script>
    <!-- add this line -->
  </head>

  <body>
    <script>
      const shochu = window.shochu;

      console.log(shochu.isString('Hello World')); // true
    </script>
  </body>
</html>

-> nodejs

...
import shochu, { flatten, isString } from 'shochu' // or with commonJS: const { flatten } = require('shochu')

console.log(shochu.stringFn.rmDicretics("ĥĕŀŀő ŵőrŀd")) // output: "hello world"
console.log(flatten([1, [2, [3, [4]]]])) // [1, 2, 3, 4]
console.log(isString('Hello World')); // true

Methods

Update soon... ⏳

Package Sidebar

Install

npm i shochu

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

41.4 kB

Total Files

7

Last publish

Collaborators

  • sashimicangu