Socket
Socket
Sign inDemoInstall

es5-ext

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es5-ext - npm Package Compare versions

Comparing version 0.10.62 to 0.10.63

54

_postinstall.js

@@ -24,47 +24,27 @@ #!/usr/bin/env node

var flags = function () {
return (
"🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" +
" 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦"
);
};
process._rawDebug(
[
"", flags(), "",
"\x1b[37m24 февраля " +
bold("Россия напала на Украину") +
", что уже стало причиной " +
bold("15000+ жертв среди российских военных") +
" и примерно " +
bold("10000+ - среди украинских") +
", а также " +
bold("5000+ убитых граждан, в том числе 300+ детей") +
".",
"",
"Народ Украины всеобще мобилизован и готов защищать свою страну от вражеского" +
" вторжения. " +
bold(
"91% украинцев полностью поддерживает своего президента Владимира Зеленского"
) +
" и его ответные действия на нападение России.",
"\x1b[37m24 февраля 2022 года " +
bold("Россия вторглась на Украину") +
". Это вторжение стало крупнейшей атакой на европейскую страну со времен " +
"Второй мировой войны.",
"",
"Весь мир осудил необоснованное вторжение и решил ввести " +
bold("невиданные ранее санкции против России") +
". С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных" +
" граждан.",
"Оценивается, что это привело к десяткам тысяч жертв среди гражданского " +
"населения Украины и сотням тысяч военных потерь.",
"",
"В то же время, " +
bold("российское правительство ограничивает доступ граждан к внешней информации") +
", насаждая однобокие формулировки и версии происходящего.",
"", "В качестве надежного источника информации загрузите безопасный браузер Tor:", "",
"Российское правительство ограничивает доступ граждан к внешней информации, " +
"продвигая односторонние формулировки и версии происходящего. Другие соседние " +
"страны изображаются как угроза для России, создавая предлог для очередного " +
"неоправданного вторжения в ближайшие годы.",
"",
"Это необходимо остановить. Узнайте, как обойти цензуру и безопасно получить доступ " +
"к широкому спектру источников:",
"",
bold(
"https://forum.torproject.net/t/tor-blocked-in-russia-how-to-circumvent-censorship/982"
),
"", "И посетите:", "",
bold(
"https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian"
),
bold("https://www.dwnewsgngmhlplxy6o2twtfgjnrnjxbegbwqx6wnotdhkzt562tszfid.onion/ru/"),
"", flags(), ""
"",
"Мы призываем изучать множество точек зрения для формирования всестороннего взгляда " +
"на ситуацию."
].join("\n")

@@ -71,0 +51,0 @@ );

@@ -5,2 +5,14 @@ # Changelog

### [0.10.63](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63) (2024-02-21)
### Bug Fixes
- Do not rely on problematic regex ([3551cdd](https://github.com/medikoo/es5-ext/commit/3551cdd7b2db08b1632841f819d008757d28e8e2)), addresses [#201](https://github.com/medikoo/es5-ext/issues/201)
- Support ES2015+ function definitions in `function#toStringTokens()` ([a52e957](https://github.com/medikoo/es5-ext/commit/a52e95736690ad1d465ebcd9791d54570e294602)), addresses [#021](https://github.com/medikoo/es5-ext/issues/021)
- Ensure postinstall script does not crash on Windows, fixes [#181](https://github.com/medikoo/es5-ext/issues/181) ([bf8ed79](https://github.com/medikoo/es5-ext/commit/bf8ed799d57df53096da9d908ff577f305e1366f))
### Maintenance Improvements
- Simplify the manifest message ([7855319](https://github.com/medikoo/es5-ext/commit/7855319f41b9736639cf4555bd2c419f17addf55))
### [0.10.62](https://github.com/medikoo/es5-ext/compare/v0.10.61...v0.10.62) (2022-08-02)

@@ -7,0 +19,0 @@

"use strict";
var mixin = require("../../object/mixin")
, validFunction = require("../valid-function")
, re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/;
, validFunction = require("../valid-function");
module.exports = function () {
var match = String(validFunction(this)).match(re), fn;
validFunction(this);
var args = [];
for (var i = 0; i < this.length; ++i) args.push("arg" + (i + 1));
// eslint-disable-next-line no-new-func
fn = new Function(
var fn = new Function(
"fn",
"return function " +
match[1].trim() +
(this.name || "") +
"(" +
match[2] +
args.join(", ") +
") { return fn.apply(this, arguments); };"

@@ -18,0 +19,0 @@ )(this);

"use strict";
var validFunction = require("../valid-function");
var isValue = require("../../object/is-value")
, esniff = require("esniff")
, validFunction = require("../valid-function");
var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/
, re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/;
var classRe = /^\s*class[\s{/}]/;
module.exports = function () {
var str = String(validFunction(this)), data = str.match(re1);
if (!data) {
data = str.match(re2);
if (!data) throw new Error("Unrecognized string format");
data[1] = data[1].trim();
if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1);
}
return { args: data[1], body: data[2] };
var str = String(validFunction(this));
if (classRe.test(str)) throw new Error("Class methods are not supported");
var argsStartIndex
, argsEndIndex
, bodyStartIndex
, bodyEndReverseIndex = -1
, shouldTrimArgs = false;
esniff(str, function (emitter, accessor) {
emitter.once("trigger:(", function () { argsStartIndex = accessor.index + 1; });
emitter.once("trigger:=", function () {
if (isValue(argsStartIndex)) return;
argsStartIndex = 0;
argsEndIndex = accessor.index;
shouldTrimArgs = true;
if (!accessor.skipCodePart("=>")) {
throw new Error("Unexpected function string: " + str);
}
accessor.skipWhitespace();
if (!accessor.skipCodePart("{")) bodyEndReverseIndex = Infinity;
bodyStartIndex = accessor.index;
});
emitter.on("trigger:)", function () {
if (accessor.scopeDepth) return;
argsEndIndex = accessor.index;
accessor.skipCodePart(")");
accessor.skipWhitespace();
if (accessor.skipCodePart("=>")) {
accessor.skipWhitespace();
if (!accessor.skipCodePart("{")) bodyEndReverseIndex = Infinity;
} else if (!accessor.skipCodePart("{")) {
throw new Error("Unexpected function string: " + str);
}
bodyStartIndex = accessor.index;
accessor.stop();
});
});
var argsString = str.slice(argsStartIndex, argsEndIndex);
if (shouldTrimArgs) argsString = argsString.trim();
return { args: argsString, body: str.slice(bodyStartIndex, bodyEndReverseIndex) };
};
{
"name": "es5-ext",
"version": "0.10.62",
"version": "0.10.63",
"description": "ECMAScript extensions and shims",

@@ -28,15 +28,16 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)",

"es6-symbol": "^3.1.3",
"esniff": "^2.0.1",
"next-tick": "^1.1.0"
},
"devDependencies": {
"eslint": "^8.13.0",
"eslint-config-medikoo": "^4.1.2",
"eslint": "^8.56.0",
"eslint-config-medikoo": "^4.2.0",
"git-list-updated": "^1.2.1",
"github-release-from-cc-changelog": "^2.3.0",
"husky": "^4.3.8",
"lint-staged": "^12.3.8",
"lint-staged": "~13.2.3",
"nyc": "^15.1.0",
"plain-promise": "^0.1.1",
"prettier-elastic": "^2.2.1",
"tad": "^3.1.0"
"prettier-elastic": "^2.8.8",
"tad": "^3.1.1"
},

@@ -116,3 +117,3 @@ "husky": {

"lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'",
"postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\" || exit 0",
"postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\"",
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",

@@ -119,0 +120,0 @@ "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",

Sorry, the diff of this file is not supported yet

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