How to use written-number - 4 common examples

To help you get started, we’ve selected a few written-number 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 formio / formio.js / src / utils / utils.unit.js View on Github external
it('should return an object of flattened components', () => {
      const flattened = utils.flattenComponents(components);
      for (let n = 1; n <= 8; n += 1) {
        const component = flattened[writtenNumber(n)];
        expect(component).not.to.be.undefined;
        expect(component).to.be.an('object');
        expect(component.order).to.equal(n);
        expect(component.key).to.equal(writtenNumber(n));
      }
    });
github formio / formio.js / src / utils / utils.unit.js View on Github external
it('should return the correct components', () => {
      for (let n = 1; n <= 8; n += 1) {
        const component = utils.getComponent(components, writtenNumber(n));
        expect(component).not.to.be.null;
        expect(component).not.to.be.undefined;
        expect(component).to.be.an('object');
        expect(component.order).to.equal(n);
        expect(component.key).to.equal(writtenNumber(n));
      }
    });
github formio / formio.js / src / utils / utils.unit.js View on Github external
it('should return an object of flattened components', () => {
      const flattened = utils.flattenComponents(components);
      for (let n = 1; n <= 8; n += 1) {
        const component = flattened[writtenNumber(n)];
        expect(component).not.to.be.undefined;
        expect(component).to.be.an('object');
        expect(component.order).to.equal(n);
        expect(component.key).to.equal(writtenNumber(n));
      }
    });
github formio / formio.js / src / utils / utils.unit.js View on Github external
it('should work with a different this context', () => {
      for (let n = 1; n <= 8; n += 1) {
        const component = utils.getComponent.call({}, components, writtenNumber(n));
        expect(component).not.to.be.null;
        expect(component).not.to.be.undefined;
        expect(component).to.be.an('object');
        expect(component.order).to.equal(n);
        expect(component.key).to.equal(writtenNumber(n));
      }
    });
  });

written-number

Convert numbers to words - their written form.

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular written-number functions