How to use the d.name function in d

To help you get started, we’ve selected a few d examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github seajs / seajs / tests / specs / config / alias / main.js View on Github external
define(function(require) {

  var test = require('../../../test')

  var a = require('a')
  var b = require('biz/b')
  var d = require('d')
  var e = require('e')
  var f = require('f')

  test.assert(a.name === 'a', a.name)
  test.assert(b.name === 'b', b.name)
  test.assert(d.name === 'd', d.name)
  test.assert(e.name === 'e', e.name)
  test.assert(f.name === 'f', f.name)


  seajs.config({
    alias: {
      'a': 'x', // override alias
      'c': './path/to/c'
    }
  })

  //var consoleMsg = global.consoleMsgStack.pop()
  //test.assert(consoleMsg === 'The config of alias["a"] is changed from "./path/to/a.js" to "x"', consoleMsg)

  require.async('c', function(c) {
    test.assert(c.name === 'c', c.name)
github linkedin / inject / tests / spec / amd / interface.js View on Github external
require.ensure(["d"], function(require) {
    var d = require("d");
    equal(d.name, "d", "get d name");
    equal(d.b, "b from d", "get b from d");
    start();
  });
});
github seajs / seajs / test / modules / define / program.js View on Github external
define(function(require) {

  var test = require('../../test');

  test.assert(require('a').name === 'a', 'define(id, deps, fn)');
  test.assert(require('./b').name === 'b', 'define(deps, fn)');
  test.assert(require('./c').name === 'c', 'define(fn)');
  test.assert(require('d').name === 'd', 'define(id, fn)');
  test.assert(require('e').name === 'e', 'define(id, object)');
  test.assert(require('./f').name === 'f', 'define(object)');

  test.done();

});
github seajs / seajs / tests / specs / define / program.js View on Github external
define(function(require) {

  var test = require('../../test');

  test.assert(require('a').name === 'a', 'define(id, deps, fn)');
  test.assert(require('./b').name === 'b', 'define(deps, fn)');
  test.assert(require('./c').name === 'c', 'define(fn)');
  test.assert(require('d').name === 'd', 'define(id, fn)');
  test.assert(require('e').name === 'e', 'define(id, object)');
  test.assert(require('./f').name === 'f', 'define(object)');

  test.done();

});
github decipherinc / angular-history / test / test-history.js View on Github external
{"oldValue": [7, 8, 9], "newValue": [7, 8, 6]},
        {"oldValue": [7, 8, 6], "newValue": [7, 5, 6]},
        {"oldValue": [7, 5, 6], "newValue": [4, 5, 6]}
      ], '"foo" array values are as expected');
      Q.deepEqual(data.foo.descriptions, [
        "foo array changed",
        "foo array changed",
        "foo array changed"
      ], '"foo" descriptions are as expected');
      Q.deepEqual(data['d.name'].values, [
        {
          "newValue": "foo",
          "oldValue": "marvin"
        }
      ], '"d.name" values are as expected');
      Q.deepEqual(data['d.name'].descriptions, [
        "name in data changed"
      ], '"d.name" descriptions are as expected');
      Q.deepEqual(data['od.name'].values, [
        {
          "newValue": "foo",
          "oldValue": "pookie"
        }
      ], '"od.name" values are as expected');
      Q.deepEqual(data['od.name'].descriptions, [
        "name in otherdata changed"
      ], '"od.name" descriptions are as expected');

    });
    scope.$apply(function () {
github benjamn / install / test / run.js View on Github external
module.exports = module.prefetch("./b").then(function (id) {
          assert.strictEqual(id, "/b.js");
          assert.strictEqual(require("./b").name, id);
          assert.strictEqual(require("./c").name, "/c.js");

          assert.strictEqual(
            require("d").name,
            "/node_modules/d/index.js"
          );

          assert.strictEqual(
            require("d/package").name,
            "/node_modules/d/package.json"
          );

          return module.prefetch("./nonexistent").catch(function (error) {
            assert.ok(error instanceof Error);
            assert.ok(error.message.startsWith("Cannot find module"));
          });
        });
      },
github decipherinc / angular-history / test / test-history.js View on Github external
Q.deepEqual(data.bar.values, [
        {"oldValue": "spam", "newValue": "baz"}
      ], '"bar" changed values are as expected');
      Q.deepEqual(data.bar.descriptions, ["bar string changed"],
        '"bar" description(s) are as expected');
      Q.deepEqual(data.foo.values, [
        {"oldValue": [7, 8, 9], "newValue": [7, 8, 6]},
        {"oldValue": [7, 8, 6], "newValue": [7, 5, 6]},
        {"oldValue": [7, 5, 6], "newValue": [4, 5, 6]}
      ], '"foo" array values are as expected');
      Q.deepEqual(data.foo.descriptions, [
        "foo array changed",
        "foo array changed",
        "foo array changed"
      ], '"foo" descriptions are as expected');
      Q.deepEqual(data['d.name'].values, [
        {
          "newValue": "foo",
          "oldValue": "marvin"
        }
      ], '"d.name" values are as expected');
      Q.deepEqual(data['d.name'].descriptions, [
        "name in data changed"
      ], '"d.name" descriptions are as expected');
      Q.deepEqual(data['od.name'].values, [
        {
          "newValue": "foo",
          "oldValue": "pookie"
        }
      ], '"od.name" values are as expected');
      Q.deepEqual(data['od.name'].descriptions, [
        "name in otherdata changed"

d

Property descriptor factory

ISC
Latest version published 2 months ago

Package Health Score

72 / 100
Full package analysis