{"size": 708, "ext": "js", "max_stars_repo_path": "tests/spec/string/spec-typecast.js", "max_stars_repo_name": "diasbruno/mout", "max_stars_repo_stars_event_min_datetime": "2015-01-03T00:39:27.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-13T13:12:10.000Z", "max_issues_repo_path": "tests/spec/string/spec-typecast.js", "max_issues_repo_name": "diasbruno/mout", "max_issues_repo_issues_event_min_datetime": "2015-01-03T19:21:46.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-25T13:12:32.000Z", "max_forks_repo_path": "tests/spec/string/spec-typecast.js", "max_forks_repo_name": "diasbruno/mout", "max_forks_repo_forks_event_min_datetime": "2015-01-06T19:19:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-27T10:46:04.000Z"}
{"max_stars_count": 784, "max_issues_count": 61, "max_forks_count": 100, "avg_line_length": 35.4, "max_line_length": 88, "alphanum_fraction": 0.5296610169}
define(['mout/string/typecast'], function (typecast) {

    describe('string/typecast()', function () {

        it('should typecast values if Number, Boolean, null or undefined', function () {
            expect( typecast('true') ).toBe( true );
            expect( typecast('false') ).toBe( false );
            expect( typecast('123') ).toBe( 123 );
            expect( typecast('123.45') ).toBe( 123.45 );
            expect( typecast('null') ).toBe( null );
            expect( typecast(null) ).toBe( null );
            expect( typecast('undefined') ).toBe( undefined );
            expect( typecast() ).toBe( undefined );
            expect( typecast('foo') ).toBe( "foo" );
        });

    });

});
