Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
rewrite-imports
Advanced tools
Rewrite
import
statements asrequire()
s; via RegExp
Quickly transforms various import
statements into ES5-compatible require()
statements.
Note: This module returns a String and does not provide a runtime nor does it evaluate the output.
:bulb: For this behavior, visit
rewrite-module
or check out@taskr/esnext
for an example!
$ npm install --save rewrite-imports
const rewriteImports = require('rewrite-imports');
rewriteImports(`import foo from '../bar'`);
//=> const foo = require('../bar');
rewriteImports(`import { foo } from 'bar'`);
//=> const bar$1 = require('bar');
//=> const foo = bar$1.foo;
rewriteImports(`import * as path from 'path';`);
//=> const path = require('path');
rewriteImports(`import { foo as bar, baz as bat, lol } from 'quz';`);
//=> const quz$1 = require('quz');
//=> const bar = quz$1.foo;
//=> const bat = quz$1.baz;
//=> const lol = quz$1.lol;
Type: String
An import
statement. See MDN for valid Syntax.
MIT © Luke Edwards
FAQs
A tiny (349B) utility to rewrite `import` statements as `require()`s; via RegExp
The npm package rewrite-imports receives a total of 17,084 weekly downloads. As such, rewrite-imports popularity was classified as popular.
We found that rewrite-imports demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.