i sha label" href="/tum/network_report_server/commit/30f7226d9aa1b14561d48e5309f57e811e38322f">30f7226d9a first commit лет назад: 2 zipObject.js 30f7226d9a first commit лет назад: 2 zipObjectDeep.js 30f7226d9a first commit лет назад: 2 zipWith.js 30f7226d9a first commit лет назад: 2

README.md

lodash v4.17.21

The Lodash library exported as Node.js modules.

Installation

Using npm:

$ npm i -g npm
$ npm i --save lodash

In Node.js:

// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');

// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');

// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');

See the package source for more details.

Note:
Install n_ for Lodash use in the Node.js < 6 REPL.

Support

Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
Automated browser & CI test runs are available.

tum/whitesports - Gogs: Simplico Git Service

Ei kuvausta

Response.php 1020B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace MailPoet\API\JSON;
  3. if (!defined('ABSPATH')) exit;
  4. use MailPoet\WP\Functions as WPFunctions;
  5. abstract class Response {
  6. const STATUS_OK = 200;
  7. const STATUS_BAD_REQUEST = 400;
  8. const STATUS_UNAUTHORIZED = 401;
  9. const STATUS_FORBIDDEN = 403;
  10. const STATUS_NOT_FOUND = 404;
  11. const STATUS_CONFLICT = 409;
  12. const STATUS_UNKNOWN = 500;
  13. public $status;
  14. public $meta;
  15. public function __construct(
  16. $status,
  17. $meta = []
  18. ) {
  19. $this->status = $status;
  20. $this->meta = $meta;
  21. }
  22. public function send() {
  23. WPFunctions::get()->statusHeader($this->status);
  24. $data = $this->getData();
  25. $response = [];
  26. if (!empty($this->meta)) {
  27. $response['meta'] = $this->meta;
  28. }
  29. if ($data === null) {
  30. $data = [];
  31. }
  32. $response = array_merge($response, $data);
  33. @header('Content-Type: application/json; charset=' . get_option('blog_charset'));
  34. echo WPFunctions::get()->wpJsonEncode($response);
  35. die();
  36. }
  37. public abstract function getData();
  38. }