mirror of
https://github.com/shelljs/shelljs.git
synced 2026-01-18 16:03:37 +00:00
`require('shelljs/global')` extends String.prototype to have the `.to()` and
`.toEnd()` methods again. This also adds tests for the global require.
11 lines
295 B
JavaScript
11 lines
295 B
JavaScript
var shell = require('./shell.js');
|
|
var common = require('./src/common');
|
|
for (var cmd in shell)
|
|
global[cmd] = shell[cmd];
|
|
|
|
var _to = require('./src/to');
|
|
String.prototype.to = common.wrap('to', _to);
|
|
|
|
var _toEnd = require('./src/toEnd');
|
|
String.prototype.toEnd = common.wrap('toEnd', _toEnd);
|