New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-tiny-import

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-tiny-import

split import from wrap package

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-tiny-import

Feature

  • wrap.js
export {default as Tool, toolFunction as outerToolFunction} from 'lib/tool';
export * from 'lib/utils';
export {resolve as rlv} from 'lib/path';

exports.join = require('lib/path/join');
module.exports.join = require('lib/path/extname');
module.exports.extname = require('lib/path-2/extname');

export {default as default} from 'index/join';

Input:

import {rlv, join as Join} from 'wrap'
const {outerToolFunction: $outerToolFunction} = require('wrap')

Output:

import { resolve as rlv } from "lib/path";
import Join from "lib/path/extname";
const $outerToolFunction = require("lib/tool").toolFunction;

Options

{
    test: /^wrap$/, // RegExp | Function | String
    moduleMapper: {} // {} | string | (imported, moduleName) => moduleName | {moduleName: string, ref: string},
    easyModuleMapper: {
        // `true` means that opt.moduleMapper will be regarded as filename
        enable: true,
        // watch the opt.moduleMapper file's change.
        watch: true,
        // the basename of opt.moduleMapper file's *Relative Module*.
        basename: false, // true | false | string
    },
}

Note!!!

the syntax of require is not supported yet, which are as follow.

  • wrap.js
exports.supported = require('lib/total/support');
// MemberExpression
exports.notSupported = require('lib/total').notSupported;
  • Input
// MemberExpression
const notSupported = require('wrap').supported;
const {notSupported: alsoNotSupported} = require('wrap');

let {supported} = require('@befe/wrap');
  • Output
const notSupported = require('wrap').supported;
const {notSupported: alsoNotSupported} = require('wrap');

let supported = require('lib/total/support');

FAQs

Package last updated on 05 Feb 2024

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