open-index/open-npm huggingface dataset:
npm package: @soldair/rewrite-js
Description: CLI tool to transform javascript programs using falafel
Author: Chris Dickinson
Latest version: 1.0.8

# rewrite-js

A CLI tool for transforming JavaScript input using [falafel](http://github.com/substack/node-falafel)
and [cssauron](http://github.com/chrisdickinson/cssauron). Works great with Vim!

```bash

# usage: rewrite-js [tranform-module, ...]
$ cat myfile.js | rewrite-js transform.js > myfile-transformed.js

```

Transformation modules should export and object mapping [cssauron-falafel](http://github.com/chrisdickinson/cssauron-falafel)
selectors to transformation functions.

```javascript
// example transform
module.exports = {
  'call:contains(async) > function:last-child': rewrite_async_wrap
}

function rewrite_async_wrap(node) {
  node.parent.update(node.source())
}

// takes `async(function() { })` and rewrites it to `function() { }`
```

# Installation

`npm install -g rewrite-js`

# License

MIT
npm package: @soldi/codemod
Description: Codemod's for updating Dindero v1 code to @soldi/dinero or @soldi/core
Author: Nick Palmer
Latest version: 0.4.2

# @soldi/codemod

This package offers codemods for moving from Dinero v1 to `@soldi/dinero`.

[![codecov](https://codecov.io/gh/nick-codes/soldi.js/branch/main/graph/badge.svg?token=tCJwUHxIhU)](https://codecov.io/gh/nick-codes/soldi.js) ![quality](https://github.com/nick-codes/soldi.js/actions/workflows/quality.yml/badge.svg) ![dependencies](https://david-dm.org/nick-codes/soldi.js.svg) ![npm (scoped)](https://img.shields.io/npm/v/@soldi/codemod?color=brightgreen) ![GitHub](https://img.shields.io/github/license/nick-codes/soldi.js) ![Snyk Vulnerabilities for npm scoped package](https://img.shields.io/snyk/vulnerabilities/npm/@soldi/codemod)
npm package: @soldi/dinero
Description: A Dinero v1 compatibility layer for Soldi
Author: Nick Palmer
Latest version: 0.4.2

# @soldi/dinero

This is a compatibility layer on top of `@soldi/core` which offers a
[Dinero v1](https://github.com/dinerojs/dinero.js/tree/v1) compatible
API.

[![codecov](https://codecov.io/gh/nick-codes/soldi.js/branch/main/graph/badge.svg?token=tCJwUHxIhU)](https://codecov.io/gh/nick-codes/soldi.js) ![quality](https://github.com/nick-codes/soldi.js/actions/workflows/quality.yml/badge.svg) ![dependencies](https://david-dm.org/nick-codes/soldi.js.svg) ![npm (scoped)](https://img.shields.io/npm/v/@soldi/dinero?color=brightgreen) ![GitHub](https://img.shields.io/github/license/nick-codes/soldi.js) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@soldi/dinero) ![Snyk Vulnerabilities for npm scoped package](https://img.shields.io/snyk/vulnerabilities/npm/@soldi/dinero)

## Installation

If you are an existing Dinero v1 user you can easily switch to Soldi:

`npm uninstall dinero.js && npm install @soldi/dinero`

or

`yarn remove dinero.js && yarn add @soldi/dinero`

Then change your imports/require to use `@soldi/dinero`.

```
// Old: const Dinero = require('dinero.js');
const Dinero = require('@soldi/dinero');
```

or

```
// Old: import Dinero from 'dinero.js';
import Dinero from '@soldi/dinero';
```

If you have switched to native ESM now supported by node and most
browsers, you can import `@soldi/dinero/index.mjs` directly as a
module using the index.mjs at the root.

```
// Old: import Dinero from 'dinero.js';
import Dinero from '@soldi/dinero/index.mjs';
```

## Usage

`@soldi/dinero` offers an identical API to Dinero v1 API.

As such all of the [documentation for Dinero
v1](https://dinerojs.com/module-dinero) can be used with
`@soldi/dinero`.
npm package: @soldi/format-dinero
Description: A formating layer for soldi that is compatible with Dinero v1 toFormat
Author: Nick Palmer
Latest version: 0.4.2

# @soldi/format-dinero

This package offers an extension to Soldi with the Dinero v1
toFormat() implementation.

[![codecov](https://codecov.io/gh/nick-codes/soldi.js/branch/main/graph/badge.svg?token=tCJwUHxIhU)](https://codecov.io/gh/nick-codes/soldi.js) ![quality](https://github.com/nick-codes/soldi.js/actions/workflows/quality.yml/badge.svg) ![dependencies](https://david-dm.org/nick-codes/soldi.js.svg) ![npm (scoped)](https://img.shields.io/npm/v/@soldi/format-dinero?color=brightgreen) ![GitHub](https://img.shields.io/github/license/nick-codes/soldi.js) ![GitHub](https://img.shields.io/github/license/nick-codes/soldi.js) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@soldi/format-dinero) ![Snyk Vulnerabilities for npm scoped package](https://img.shields.io/snyk/vulnerabilities/npm/@soldi/format-dinero)

It is used by `@soldi/dinero` to give a format implementation which
matches the Dinero v1 API exactly.

The code for this extension is entirely lifted from the Dinero v1
implementation, and as such, is subject to the LICENSE.dinero.md
located in this repository.

For documentation on the toFormat() function please see the
[documentation for Dinero v1](https://dinerojs.com/module-dinero).
npm package: @soldi/locale
Description: An extension layer for Soldi that adds getLocale and setLocale
Author: Nick Palmer
Latest version: 0.4.2

# @soldi/format-dinero

This package offers an extension to Soldi which adds the ability
to add a `locale` to a Dinero instance using setLocale() and introspect
that using getLocale().

[![codecov](https://codecov.io/gh/nick-codes/soldi.js/branch/main/graph/badge.svg?token=tCJwUHxIhU)](https://codecov.io/gh/nick-codes/soldi.js) ![quality](https://github.com/nick-codes/soldi.js/actions/workflows/quality.yml/badge.svg) ![dependencies](https://david-dm.org/nick-codes/soldi.js.svg) ![npm (scoped)](https://img.shields.io/npm/v/@soldi/locale?color=brightgreen) ![GitHub](https://img.shields.io/github/license/nick-codes/soldi.js) ![GitHub](https://img.shields.io/github/license/nick-codes/soldi.js) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@soldi/locale) ![Snyk Vulnerabilities for npm scoped package](https://img.shields.io/snyk/vulnerabilities/npm/@soldi/locale)

This is one aspect of the Dinero v1 API we feel was not well thought
out, and so we are offering it as an extension over `@soldi/core` for
users who's code relies on it, but hope most projects do not
need this functionality.

It works in conjunction with the `@soldi/format-dinero` API to provide
backwards compatibility on top of Soldi for Dinero v1 users who need
this functionality.

For documentation on the getLocale() and setLocale() functions please
see the [documentation for Dinero
v1](https://dinerojs.com/module-dinero).
npm package: @soldoc/json
Description: Json theme for SolDoc
Author: [your name]
Latest version: 0.1.0

# SolDoc JSON theme

A simple markdown theme for SolDoc.

## Example

The following solidity code:
```Solidity
pragma solidity 0.4.19;

import 'zeppelin-solidity/contracts/ownership/Ownable.sol';

/// @title A simulator for Bug Bunny, the most famous Rabbit
/// @author Warned Bros
/// @notice You can use this contract for only the most basic simulation
/// @dev All function calls are currently implement without side effects
contract BugsBunny is Ownable{
    /// @author Bob Clampett
    /// @notice Determine if Bugs will accept `(_food)` to eat
    /// @dev String comparison may be inefficient
    /// @param _food The name of a food to evaluate (English)
    /// @return true if Bugs will eat it, false otherwise
    function doesEat(string _food) external pure returns (bool) {
        return keccak256(_food) == keccak256("carrot");
    }
}
```

Produces the following output:

```JSON
{
  "filepath": "contracts/BugsBunny.sol",
  "contractName": "BugsBunny",
  "info": {
    "constructor": null,
    "events": {
      "OwnershipTransferred(address,address)": {
        "anonymous": false,
        "name": "OwnershipTransferred",
        "params": {
          "previousOwner": {
            "indexed": true,
            "type": "address"
          },
          "newOwner": {
            "indexed": true,
            "type": "address"
          }
        }
      }
    },
    "fallback": null,
    "methods": {
      "doesEat(string)": {
        "constant": true,
        "name": "doesEat",
        "outputs": {
          "output_0": {
            "type": "bool"
          }
        },
        "payable": false,
        "stateMutability": "pure",
        "params": {
          "_food": {
            "type": "string",
            "details": "The name of a food to evaluate (English)"
          }
        },
        "author": "Bob Clampett",
        "details": "String comparison may be inefficient",
        "return": "true if Bugs will eat it, false otherwise",
        "notice": "Determine if Bugs will accept `(_food)` to eat"
      },
      "owner()": {
        "constant": true,
        "name": "owner",
        "outputs": {
          "output_0": {
            "type": "address"
          }
        },
        "payable": false,
        "stateMutability": "view",
        "params": {},
        "executionCost": 526
      },
      "transferOwnership(address)": {
        "constant": false,
        "name": "transferOwnership",
        "outputs": {},
        "payable": false,
        "stateMutability": "nonpayable",
        "params": {
          "newOwner": {
            "type": "address",
            "details": "The address to transfer ownership to."
          }
        },
        "details": "Allows the current owner to transfer control of the contract to a newOwner.",
        "executionCost": 22788
      }
    },
    "author": "Warned Bros",
    "title": "A simulator for Bug Bunny, the most famous Rabbit",
    "executionCost": 20502,
    "deploymentCost": 105000
  },
  "options": {}
}
```
npm package: @soldoc/markdown
Description: Markdown theme for soldoc
Author: Matan Tsuberi
Latest version: 0.1.0

# SolDoc markdown theme

A simple JSON theme for SolDoc.

## Example

The following solidity code:
```Solidity
pragma solidity 0.4.19;

import 'zeppelin-solidity/contracts/ownership/Ownable.sol';

/// @title A simulator for Bug Bunny, the most famous Rabbit
/// @author Warned Bros
/// @notice You can use this contract for only the most basic simulation
/// @dev All function calls are currently implement without side effects
contract BugsBunny is Ownable{
    /// @author Bob Clampett
    /// @notice Determine if Bugs will accept `(_food)` to eat
    /// @dev String comparison may be inefficient
    /// @param _food The name of a food to evaluate (English)
    /// @return true if Bugs will eat it, false otherwise
    function doesEat(string _food) external pure returns (bool) {
        return keccak256(_food) == keccak256("carrot");
    }
}
```

Produces the following output:

# BugsBunny
> A simulator for Bug Bunny, the most famous Rabbit
>
> Author: Warned Bros


**Execution cost**: less than 20502 gas

**Deployment cost**: less than 105000 gas

**Combined cost**: less than 125502 gas


## Events
### OwnershipTransferred(address,address)


**Execution cost**: No bound available


Params:

1. **previousOwner** *of type `address`*
2. **newOwner** *of type `address`*


## Methods
### doesEat(string)
>
>Determine if Bugs will accept `(_food)` to eat
>
> String comparison may be inefficient
>
> Author: Bob Clampett


**Execution cost**: No bound available

**Attributes**: constant


Params:

1. **_food** *of type `string`*

    > The name of a food to evaluate (English)


Returns:

> true if Bugs will eat it, false otherwise

1. **output_0** *of type `bool`*

---
### owner()


**Execution cost**: less than 526 gas

**Attributes**: constant



Returns:


1. **output_0** *of type `address`*

---
### transferOwnership(address)
>
> Allows the current owner to transfer control of the contract to a newOwner.


**Execution cost**: less than 22788 gas


Params:

1. **newOwner** *of type `address`*

    > The address to transfer ownership to.



[Back to the top ↑](#bugsbunny)